summaryrefslogtreecommitdiff
path: root/src/trg-torrent-props-dialog.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-26 18:55:21 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-26 18:55:21 +0000
commitaff982298fb16ef8bbf32697df59965def50eb5d (patch)
tree185f87e687e7c312dd5e2835234ebaf32a326cfc /src/trg-torrent-props-dialog.c
parentecf7d01164029d5b5cd139e7db8a5e8705c6fac5 (diff)
closer to gtk3 support, I think just the graph needs doing now.
Diffstat (limited to 'src/trg-torrent-props-dialog.c')
-rw-r--r--src/trg-torrent-props-dialog.c14
1 files changed, 3 insertions, 11 deletions
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 <gtk/gtk.h>
#include <json-glib/json-glib.h>
+#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);