From b933e7cfa64bd777ba7dc2d13ab8fa102f5cd4b4 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 15 Sep 2010 08:58:07 -0500 Subject: Putting a printout in for showing menus. --- tools/indicator-loader.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools') diff --git a/tools/indicator-loader.c b/tools/indicator-loader.c index 0f4a7be..747b216 100644 --- a/tools/indicator-loader.c +++ b/tools/indicator-loader.c @@ -79,6 +79,13 @@ entry_removed (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user return; } +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"); + return; +} + static gboolean load_module (const gchar * name, GtkWidget * menu) { @@ -97,6 +104,7 @@ load_module (const gchar * name, GtkWidget * menu) /* Connect to it's signals */ g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_ADDED, G_CALLBACK(entry_added), menu); g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_ENTRY_REMOVED, G_CALLBACK(entry_removed), menu); + g_signal_connect(G_OBJECT(io), INDICATOR_OBJECT_SIGNAL_MENU_SHOW, G_CALLBACK(menu_show), NULL); /* Work on the entries */ GList * entries = indicator_object_get_entries(io); -- cgit v1.2.3 From 6269aec66333ed1e308ebc22182ceaa57217ad36 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 16 Sep 2010 16:15:31 -0500 Subject: Creating a callback on the loader to signal the event press down to the entry. --- tools/indicator-loader.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools') diff --git a/tools/indicator-loader.c b/tools/indicator-loader.c index 747b216..03614aa 100644 --- a/tools/indicator-loader.c +++ b/tools/indicator-loader.c @@ -27,6 +27,17 @@ License along with this library. If not, see #define ENTRY_DATA_NAME "indicator-custom-entry-data" +static void +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); + + indicator_object_entry_activate(INDICATOR_OBJECT(user_data), (IndicatorObjectEntry *)entry, gtk_get_current_event_time()); + return; +} + static void entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_data) { @@ -48,6 +59,8 @@ entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_d gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), GTK_WIDGET(entry->menu)); } + g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(activate_entry), io); + gtk_menu_shell_append(GTK_MENU_SHELL(user_data), menuitem); gtk_widget_show(menuitem); -- cgit v1.2.3 From fc94eab8fd3749f0c9c68451f359c9e1efcdfd3b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 15 Oct 2010 12:24:12 -0500 Subject: All the environment flags we should set for debugging --- tools/indicator-debugging | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tools/indicator-debugging (limited to 'tools') diff --git a/tools/indicator-debugging b/tools/indicator-debugging new file mode 100644 index 0000000..afc2093 --- /dev/null +++ b/tools/indicator-debugging @@ -0,0 +1,8 @@ +# Timeout after 1 minute +export INDICATOR_SERVICE_SHUTDOWN_TIMEOUT=60000 + +# If no one connects, still stay alive +export INDICATOR_ALLOW_NO_WATCHERS=1 + +# Don't restart the services if they crash +export INDICATOR_SERVICE_RESTART_DISABLE=1 -- cgit v1.2.3 From 2e3ea76f4947c1148f6c3a8b870e0e319deaa20c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 15 Oct 2010 12:37:08 -0500 Subject: Installing the environment file in the session dir --- tools/Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/Makefile.am b/tools/Makefile.am index 5e5ef8d..4b959a5 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -19,3 +19,8 @@ indicator_loader_LDADD = \ -L$(top_builddir)/libindicator/.libs \ -lindicator +xsessiondir = $(sysconfdir)/X11/Xsession.d + +xsession_DATA = indicator-debugging + +EXTRA_DIST = $(xsession_DATA) -- cgit v1.2.3 From 0f99ed218d71e96d2fa5f10c5f0791b61445f8aa Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 15 Oct 2010 12:39:13 -0500 Subject: Adding a number in the name --- tools/80indicator-debugging | 8 ++++++++ tools/Makefile.am | 2 +- tools/indicator-debugging | 8 -------- 3 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 tools/80indicator-debugging delete mode 100644 tools/indicator-debugging (limited to 'tools') diff --git a/tools/80indicator-debugging b/tools/80indicator-debugging new file mode 100644 index 0000000..afc2093 --- /dev/null +++ b/tools/80indicator-debugging @@ -0,0 +1,8 @@ +# Timeout after 1 minute +export INDICATOR_SERVICE_SHUTDOWN_TIMEOUT=60000 + +# If no one connects, still stay alive +export INDICATOR_ALLOW_NO_WATCHERS=1 + +# Don't restart the services if they crash +export INDICATOR_SERVICE_RESTART_DISABLE=1 diff --git a/tools/Makefile.am b/tools/Makefile.am index 4b959a5..168cea8 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -21,6 +21,6 @@ indicator_loader_LDADD = \ xsessiondir = $(sysconfdir)/X11/Xsession.d -xsession_DATA = indicator-debugging +xsession_DATA = 80indicator-debugging EXTRA_DIST = $(xsession_DATA) diff --git a/tools/indicator-debugging b/tools/indicator-debugging deleted file mode 100644 index afc2093..0000000 --- a/tools/indicator-debugging +++ /dev/null @@ -1,8 +0,0 @@ -# Timeout after 1 minute -export INDICATOR_SERVICE_SHUTDOWN_TIMEOUT=60000 - -# If no one connects, still stay alive -export INDICATOR_ALLOW_NO_WATCHERS=1 - -# Don't restart the services if they crash -export INDICATOR_SERVICE_RESTART_DISABLE=1 -- cgit v1.2.3 From b877951a5c45aaaa49718748b5f786681e3e9622 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 15 Oct 2010 12:41:16 -0500 Subject: Add mean comment --- tools/80indicator-debugging | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/80indicator-debugging b/tools/80indicator-debugging index afc2093..f21559c 100644 --- a/tools/80indicator-debugging +++ b/tools/80indicator-debugging @@ -1,3 +1,9 @@ +# These are environment variables that effect the behavior +# of libindicator's service manager and indicator service +# objects. They turn off various robustness features that +# make debugging difficult and are not recommended for +# daily use. Development use only! + # Timeout after 1 minute export INDICATOR_SERVICE_SHUTDOWN_TIMEOUT=60000 -- cgit v1.2.3