summaryrefslogtreecommitdiffstats
path: root/tools/dbus-viewer.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2005-03-31 02:24:12 +0000
committerHavoc Pennington <hp@redhat.com>2005-03-31 02:24:12 +0000
commit6cd7cb575d82e4a52a20af94306f4450ecba26ff (patch)
tree79b2f8f2643d783c75ec63cc0a4332d0781e3c67 /tools/dbus-viewer.c
parent8e0bd8c06cfd3c99dc591f541b14662509549f0a (diff)
2005-03-30 Havoc Pennington <hp@redhat.com>
* configure.in: change check to gtk 2.4 * tools/dbus-viewer.c (name_combo_changed_callback): remove gtk_combo_box_get_active_text() usage to decrement GTK requirement to 2.4
Diffstat (limited to 'tools/dbus-viewer.c')
-rw-r--r--tools/dbus-viewer.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/tools/dbus-viewer.c b/tools/dbus-viewer.c
index e8ed5432..b031c7dd 100644
--- a/tools/dbus-viewer.c
+++ b/tools/dbus-viewer.c
@@ -378,14 +378,21 @@ static void
name_combo_changed_callback (GtkComboBox *combo,
TreeWindow *w)
{
- char *text;
+ GtkTreeIter iter;
- text = gtk_combo_box_get_active_text (combo);
-
- if (text)
+ if (gtk_combo_box_get_active_iter (combo, &iter))
{
- tree_window_set_service (w, text);
- g_free (text);
+ GtkTreeModel *model;
+ char *text;
+
+ model = gtk_combo_box_get_model (combo);
+ gtk_tree_model_get (model, &iter, 0, &text, -1);
+
+ if (text)
+ {
+ tree_window_set_service (w, text);
+ g_free (text);
+ }
}
}