From aff982298fb16ef8bbf32697df59965def50eb5d Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Wed, 26 Oct 2011 18:55:21 +0000 Subject: closer to gtk3 support, I think just the graph needs doing now. --- src/trg-torrent-props-dialog.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/trg-torrent-props-dialog.c') diff --git a/src/trg-torrent-props-dialog.c b/src/trg-torrent-props-dialog.c index cf8898d..0a3954a 100644 --- a/src/trg-torrent-props-dialog.c +++ b/src/trg-torrent-props-dialog.c @@ -21,6 +21,7 @@ #include #include +#include "util.h" #include "torrent.h" #include "json.h" #include "trg-client.h" @@ -161,11 +162,7 @@ static GtkWidget *trg_props_limitsPage(TrgTorrentPropsDialog * win, w = trg_json_widget_check_new(&priv->widgets, json, FIELD_HONORS_SESSION_LIMITS, _("Honor global limits"), NULL); hig_workarea_add_wide_control(t, &row, w); - w = priv->bandwidthPriorityCombo = gtk_combo_box_new_text(); - //widget_set_json_key(w, FIELD_BANDWIDTH_PRIORITY); - gtk_combo_box_append_text(GTK_COMBO_BOX(w), _("Low")); - gtk_combo_box_append_text(GTK_COMBO_BOX(w), _("Normal")); - gtk_combo_box_append_text(GTK_COMBO_BOX(w), _("High")); + w = priv->bandwidthPriorityCombo = gtr_combo_box_new_enum(_("Low"), 0, _("Normal"), 1, _("High"), 2); gtk_combo_box_set_active(GTK_COMBO_BOX(w), torrent_get_bandwidth_priority(json) + 1); @@ -186,12 +183,7 @@ static GtkWidget *trg_props_limitsPage(TrgTorrentPropsDialog * win, hig_workarea_add_section_title(t, &row, _("Seeding")); - w = priv->seedRatioMode = gtk_combo_box_new_text(); - gtk_combo_box_append_text(GTK_COMBO_BOX(w), _("Use global settings")); - gtk_combo_box_append_text(GTK_COMBO_BOX(w), - _("Stop seeding at ratio")); - gtk_combo_box_append_text(GTK_COMBO_BOX(w), - _("Seed regardless of ratio")); + w = priv->seedRatioMode = gtr_combo_box_new_enum(_("Use global settings"), 0, _("Stop seeding at ratio"), 1, _("Seed regardless of ratio"), 2); gtk_combo_box_set_active(GTK_COMBO_BOX(w), torrent_get_seed_ratio_mode(json)); hig_workarea_add_row(t, &row, _("Seed ratio mode:"), w, NULL); -- cgit v1.2.3