diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-10-26 18:55:21 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-10-26 18:55:21 +0000 |
commit | aff982298fb16ef8bbf32697df59965def50eb5d (patch) | |
tree | 185f87e687e7c312dd5e2835234ebaf32a326cfc /src/trg-torrent-add-dialog.c | |
parent | ecf7d01164029d5b5cd139e7db8a5e8705c6fac5 (diff) |
closer to gtk3 support, I think just the graph needs doing now.
Diffstat (limited to 'src/trg-torrent-add-dialog.c')
-rw-r--r-- | src/trg-torrent-add-dialog.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/trg-torrent-add-dialog.c b/src/trg-torrent-add-dialog.c index 9589751..8e3880f 100644 --- a/src/trg-torrent-add-dialog.c +++ b/src/trg-torrent-add-dialog.c @@ -612,37 +612,6 @@ static void gtr_dialog_set_content(GtkDialog * dialog, GtkWidget * content) gtk_widget_show_all(content); } -GtkWidget *gtr_combo_box_new_enum(const char *text_1, ...) -{ - GtkWidget *w; - GtkCellRenderer *r; - GtkListStore *store; - va_list vl; - const char *text; - va_start(vl, text_1); - - store = gtk_list_store_new(2, G_TYPE_INT, G_TYPE_STRING); - - text = text_1; - if (text != NULL) - do { - const int val = va_arg(vl, int); - gtk_list_store_insert_with_values(store, NULL, INT_MAX, 0, val, - 1, text, -1); - text = va_arg(vl, const char *); - } - while (text != NULL); - - w = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store)); - r = gtk_cell_renderer_text_new(); - gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(w), r, TRUE); - gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(w), r, "text", 1, NULL); - - /* cleanup */ - g_object_unref(store); - return w; -} - GtkWidget *gtr_priority_combo_new(void) { return gtr_combo_box_new_enum(_("Low"), TR_PRI_LOW, |