From 14cdff4c343ce0eee37f769a0ba815222c405086 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 7 Jul 2011 08:25:11 -0500 Subject: Handling the right box for the right version of GTK --- tools/indicator-loader.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools') diff --git a/tools/indicator-loader.c b/tools/indicator-loader.c index 0cdf1ff..027d364 100644 --- a/tools/indicator-loader.c +++ b/tools/indicator-loader.c @@ -44,7 +44,11 @@ entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_d g_debug("Signal: Entry Added"); GtkWidget * menuitem = gtk_menu_item_new(); +#if GTK_CHECK_VERSION(3,0,0) GtkWidget * hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3); +#else + GtkWidget * hbox = gtk_hbox_new(FALSE, 3); +#endif if (entry->image != NULL) { gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(entry->image), FALSE, FALSE, 0); -- cgit v1.2.3 From d23b4e89cdc6f95ff8e14d8a9fcb89ce2d8682d5 Mon Sep 17 00:00:00 2001 From: Ken VanDine Date: Thu, 7 Jul 2011 10:38:35 -0400 Subject: Make xsessiondir = $(pkgdatadir) --- tools/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/Makefile.am b/tools/Makefile.am index 287d34f..cefd944 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -34,7 +34,7 @@ indicator_loader3_SOURCES = $(indicator_loader_SOURCES) indicator_loader3_CFLAGS = $(indicator_loader_CFLAGS) indicator_loader3_LDADD = $(indicator_loader_LDADD) -xsessiondir = $(sysconfdir)/X11/Xsession.d +xsessiondir = $(pkgdatadir) xsession_DATA = 80indicator-debugging -- cgit v1.2.3 From ee271867c1390ff9438158a3b88387432cd24f37 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 11 Jul 2011 16:00:12 -0500 Subject: Handle NULL entries without crashing --- tools/indicator-loader.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/indicator-loader.c b/tools/indicator-loader.c index 027d364..06dd4b4 100644 --- a/tools/indicator-loader.c +++ b/tools/indicator-loader.c @@ -32,7 +32,9 @@ activate_entry (GtkWidget * widget, gpointer user_data) { g_return_if_fail(INDICATOR_IS_OBJECT(user_data)); gpointer entry = g_object_get_data(G_OBJECT(widget), ENTRY_DATA_NAME); - g_return_if_fail(entry == NULL); + if (entry == NULL) { + g_debug("Activation on: (null)"); + } indicator_object_entry_activate(INDICATOR_OBJECT(user_data), (IndicatorObjectEntry *)entry, gtk_get_current_event_time()); return; @@ -99,7 +101,11 @@ entry_removed (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user static void menu_show (IndicatorObject * io, IndicatorObjectEntry * entry, guint timestamp, gpointer user_data) { - g_debug("Show Menu: %s", entry->label != NULL ? gtk_label_get_text(entry->label) : "No Label"); + if (entry != NULL) { + g_debug("Show Menu: %s", entry->label != NULL ? gtk_label_get_text(entry->label) : "No Label"); + } else { + g_debug("Show Menu: (null)"); + } return; } -- cgit v1.2.3