My d-bus doesn't work, or does it?

Olivier Andrieu oliv__a at users.sourceforge.net
Tue Mar 8 07:08:22 PST 2005


 > "John (J5) Palmieri" [Mon, 07 Mar 2005]:
 > On Mon, 2005-03-07 at 20:42, Nick Gray wrote:
 > 
 > > I didn't make it this far! I noticed that the version 0.31 came
 > > out and I proceeded to download and compile it, the same
 > > way. Unfortunately my build failed and after a little
 > > investigation, I discovered that 0.31 is using functions in Gtk
 > > version 2.6 ( gtk_combo_box_get_active_text )
 > 
 > Just use the disable-gtk flag:
 > 
 > ./configure --disable-gtk

Indeed, but the gtk tool probably doesn't _need_ gtk 2.6 :
gtk_combo_box_get_active_text is simply a convenience function, it can
be replaced by an equivalent 3 lines of code that work with GTK 2.4
(patch attached).  

However, there are still warnings related to i18n, I don't know about
that.

-- 
   Olivier
-------------- next part --------------
--- dbus-viewer.c.~1.11.~	2005-02-17 22:19:48.000000000 +0100
+++ dbus-viewer.c	2005-03-08 16:02:02.272189030 +0100
@@ -379,8 +379,13 @@
                              TreeWindow  *w)
 {
   char *text;
+  GtkTreeIter iter;
+  GtkTreeModel *model;
 
-  text = gtk_combo_box_get_active_text (combo);
+  text = NULL;
+  model = gtk_combo_box_get_model (combo);
+  if (gtk_combo_box_get_active_iter (combo, &iter) && model)
+    gtk_tree_model_get (model, &iter, 0, &text, -1);
 
   if (text)
     {


More information about the dbus mailing list