From acc7f891bdccbd58d92b957a20a0cb10f6a7513e Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Thu, 26 Mar 2009 13:51:06 +0200 Subject: Add gnome_program_init with LIBGNOMEUI_MODULE. --- configure.ac | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- src/applet-main.c | 24 +++++++++++++++++++++++- 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index cb11502..42d87c6 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,8 @@ PANEL_REQUIRED_VERSION=2.0.0 DBUS_REQUIRED_VERSION=0.76 PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION - libpanelapplet-2.0 >= $PANEL_REQUIRED_VERSION) + libpanelapplet-2.0 >= $PANEL_REQUIRED_VERSION + libgnomeui-2.0) AC_SUBST(APPLET_CFLAGS) AC_SUBST(APPLET_LIBS) @@ -91,6 +92,22 @@ AM_CONDITIONAL(USE_GIR, test "x$gir_ok" = "xyes") GTK_DOC_CHECK([1.4]) +############################## +# Custom Junk +############################## + +AC_DEFUN([AC_DEFINE_PATH], [ + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_path=`eval echo [$]$2` + ac_define_path=`eval echo [$]ac_define_path` + $1="$ac_define_path" + AC_SUBST($1) + ifelse($3, , + AC_DEFINE_UNQUOTED($1, "$ac_define_path"), + AC_DEFINE_UNQUOTED($1, "$ac_define_path", $3)) +]) + ########################### # Internationalization ########################### @@ -98,9 +115,39 @@ GTK_DOC_CHECK([1.4]) GETTEXT_PACKAGE=indicator-applet AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the default gettext domain]) +AC_DEFINE_PATH(GNOMELOCALEDIR, "${datadir}/locale", [locale directory]) AM_GLIB_GNU_GETTEXT +############################## +# ./configure Flags messings +############################## + +cflags_set=${CFLAGS+set} +# find the actual value for $prefix that we'll end up with +REAL_PREFIX= +if test "x$prefix" = "xNONE"; then + REAL_PREFIX=$ac_default_prefix +else + REAL_PREFIX=$prefix +fi + +# Have to go $sysconfdir->$prefix/etc->/usr/local/etc +# if you actually know how to code shell then fix this :-) +SYSCONFDIR_TMP="$sysconfdir" +old_prefix=$prefix +prefix=$REAL_PREFIX +EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP` +prefix=$old_prefix +AC_SUBST(EXPANDED_SYSCONFDIR) + +dnl Save flags to aclocal +ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" + +AC_DEFINE_PATH(PREFIX, "${prefix}", [prefix directory]) +AC_DEFINE_PATH(SYSCONFDIR, "${sysconfdir}", [system configuration dir]) +AC_DEFINE_PATH(LIBDIR, "${libdir}", [system configuration dir]) + ########################### # Files ########################### diff --git a/src/applet-main.c b/src/applet-main.c index 62faab0..51e3c93 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -20,7 +20,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include #include +#include #define SYMBOL_NAME "get_menu_item" #define ICONS_DIR (DATADIR G_DIR_SEPARATOR_S "indicator-applet" G_DIR_SEPARATOR_S "icons") @@ -34,6 +36,13 @@ static void cw_panel_background_changed (PanelApplet *applet, GdkPixmap *pixmap, GtkWidget *menubar); +/* ****************** * + * Global Variables * + * ****************** */ + +static GnomeProgram *program = NULL; + + /************* * main * ***********/ @@ -172,7 +181,20 @@ applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data) GtkWidget *menubar; gint i; gint indicators_loaded = 0; - + static gboolean first_time = FALSE; + + if (!first_time) + { + gint argc = 1; + gchar *argv[2] = { "indicator-applet", NULL}; + + first_time = TRUE; + program = gnome_program_init ("indicator-applet", "0.1", + LIBGNOMEUI_MODULE, argc, argv, + GNOME_PROGRAM_STANDARD_PROPERTIES, + NULL); + } + /* Set panel options */ gtk_container_set_border_width(GTK_CONTAINER (applet), 0); panel_applet_set_flags(applet, PANEL_APPLET_EXPAND_MINOR); -- cgit v1.2.3 From 0d98376427b1d0382a59664bffb48f0c3377b285 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 26 Mar 2009 10:13:11 -0500 Subject: Bumping version --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 42d87c6..f1887fa 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/applet-main.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-applet, 0.1.3) +AM_INIT_AUTOMAKE(indicator-applet, 0.1.4) AM_MAINTAINER_MODE -- cgit v1.2.3 From 37af771e05d655d9fe3723a4138714c360d5fa14 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 26 Mar 2009 11:27:16 -0500 Subject: Getting gtkdoc stuff to be a little happier --- autogen.sh | 2 +- configure.ac | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index e9e599a..8e23f95 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,4 +9,4 @@ which gnome-autogen.sh || { USE_GNOME2_MACROS=1 \ USE_COMMON_DOC_BUILD=yes \ -. gnome-autogen.sh +gnome-autogen.sh --enable-gtk-doc diff --git a/configure.ac b/configure.ac index f1887fa..90d75c7 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,8 @@ AM_CONDITIONAL(USE_GIR, test "x$gir_ok" = "xyes") ########################### GTK_DOC_CHECK([1.4]) +GNOME_DOC_INIT +GNOME_COMPILE_WARNINGS ############################## # Custom Junk -- cgit v1.2.3 From f6bd9e6f57bb14d2bfbee3a184e54beb79269f77 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 26 Mar 2009 13:24:38 -0500 Subject: ATK name for Eitan --- src/applet-main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/applet-main.c b/src/applet-main.c index 51e3c93..8de2358 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -199,6 +199,8 @@ applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data) gtk_container_set_border_width(GTK_CONTAINER (applet), 0); panel_applet_set_flags(applet, PANEL_APPLET_EXPAND_MINOR); panel_applet_setup_menu(applet, menu_xml, menu_verbs, NULL); + atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (applet)), + "indicator-applet"); /* Init some theme/icon stuff */ gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), -- cgit v1.2.3 From 1f7ae08ced7b7be7d852139e73dde71de68da2f7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 26 Mar 2009 16:01:46 -0500 Subject: Changing license in about box to make sense. --- src/applet-main.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/applet-main.c b/src/applet-main.c index 8de2358..0dbb665 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -126,16 +126,15 @@ about_cb (BonoboUIComponent *ui_container, }; static gchar *license[] = { - N_("The Indicator Applet is free software; you can redistribute it and/or modify " - "it under the terms of the GNU General Public License as published by " - "the Free Software Foundation; either version 3 of the License."), - N_("This program is distributed in the hope that it will be useful, " - "but WITHOUT ANY WARRANTY; without even the implied warranties of " - "MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR " - "PURPOSE. See the GNU General Public License for more details."), - N_("You should have received a copy of the GNU General Public License " - "along with this program; if not, write to the Free Software " - "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA "), + N_("This program is free software: you can redistribute it and/or modify it " + "under the terms of the GNU General Public License version 3, as published " + "by the Free Software Foundation."), + N_("This program is distributed in the hope that it will be useful, but " + "WITHOUT ANY WARRANTY; without even the implied warranties of " + "MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR " + "PURPOSE. See the GNU General Public License for more details."), + N_("You should have received a copy of the GNU General Public License along " + "with this program. If not, see ."), NULL }; gchar *license_i18n; -- cgit v1.2.3 From 045b2579c670b16bac9e7c13ede6bd2780edf83e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 26 Mar 2009 16:06:23 -0500 Subject: Switching the case for 'No Indicators' to make it a label to still support right click through. --- src/applet-main.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/applet-main.c b/src/applet-main.c index 0dbb665..7f7b260 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -224,10 +224,6 @@ applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data) g_signal_connect_after(menubar, "expose-event", G_CALLBACK(menubar_on_expose), menubar); gtk_container_set_border_width(GTK_CONTAINER(menubar), 0); - gtk_container_add(GTK_CONTAINER(applet), menubar); - panel_applet_set_background_widget(applet, menubar); - gtk_widget_show(menubar); - /* load 'em */ if (g_file_test(INDICATOR_DIR, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) { GDir * dir = g_dir_open(INDICATOR_DIR, 0, NULL); @@ -240,10 +236,13 @@ applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data) } if (indicators_loaded == 0) { - GtkWidget * item = gtk_menu_item_new_with_label("No Indicators"); - gtk_widget_set_sensitive(item, FALSE); - gtk_menu_shell_append(GTK_MENU_SHELL(menubar), item); + GtkWidget * item = gtk_label_new("No Indicators"); + gtk_container_add(GTK_CONTAINER(applet), item); gtk_widget_show(item); + } else { + gtk_container_add(GTK_CONTAINER(applet), menubar); + panel_applet_set_background_widget(applet, menubar); + gtk_widget_show(menubar); } /* Background of applet */ -- cgit v1.2.3 From d917e8b68804e839d8cac4c8af9b4600e3e67308 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 26 Mar 2009 16:10:58 -0500 Subject: Comment for label --- src/applet-main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/applet-main.c b/src/applet-main.c index 7f7b260..ee738b4 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -236,6 +236,7 @@ applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data) } if (indicators_loaded == 0) { + /* A label to allow for click through */ GtkWidget * item = gtk_label_new("No Indicators"); gtk_container_add(GTK_CONTAINER(applet), item); gtk_widget_show(item); -- cgit v1.2.3 -- cgit v1.2.3 From 497702ed6eafa6e35611409df0e92ad24e302c50 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Mar 2009 14:18:38 -0500 Subject: Bad truth in the hide function. --- libindicate/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libindicate/server.c b/libindicate/server.c index 8a35906..39753d2 100644 --- a/libindicate/server.c +++ b/libindicate/server.c @@ -318,7 +318,7 @@ indicate_server_hide (IndicateServer * server) g_return_if_fail(INDICATE_IS_SERVER(server)); IndicateServerPrivate * priv = INDICATE_SERVER_GET_PRIVATE(server); - if (priv->visible) + if (!priv->visible) return; priv->visible = FALSE; -- cgit v1.2.3 From 31ea8d2deae2d037c80d56380eac011970914bb4 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Mar 2009 14:41:02 -0500 Subject: Removing the translatable marking for 'Indicator Applet Factory' --- data/GNOME_IndicatorApplet.server.in.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/GNOME_IndicatorApplet.server.in.in b/data/GNOME_IndicatorApplet.server.in.in index 96a553c..c576246 100644 --- a/data/GNOME_IndicatorApplet.server.in.in +++ b/data/GNOME_IndicatorApplet.server.in.in @@ -6,8 +6,8 @@ - - + + -- cgit v1.2.3 From 02501d7edadbf3d3d3b9f2ab9a560bfe0b197af3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Mar 2009 23:17:22 -0500 Subject: Patch from Gabor Kelemen to make the license and 'No Indicators' message translatable. --- src/applet-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applet-main.c b/src/applet-main.c index ee738b4..fdd7a23 100644 --- a/src/applet-main.c +++ b/src/applet-main.c @@ -139,7 +139,7 @@ about_cb (BonoboUIComponent *ui_container, }; gchar *license_i18n; - license_i18n = g_strjoinv ("\n\n", license); + license_i18n = g_strconcat (_(license[0]), "\n\n", _(license[1]), "\n\n", _(license[2]), NULL); gtk_show_about_dialog(NULL, "version", "0.1", @@ -237,7 +237,7 @@ applet_fill_cb (PanelApplet * applet, const gchar * iid, gpointer data) if (indicators_loaded == 0) { /* A label to allow for click through */ - GtkWidget * item = gtk_label_new("No Indicators"); + GtkWidget * item = gtk_label_new(_("No Indicators")); gtk_container_add(GTK_CONTAINER(applet), item); gtk_widget_show(item); } else { -- cgit v1.2.3 From ef07f3685c1a0cc6a8b54d922055b385eb20960b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Mar 2009 23:38:21 -0500 Subject: * New upstream version * Changing the text in the license box to make sense. (LP: #346215) * Call GNOME Program Init to initialize all of the ATK and gettext stuff that needs to be initialized for it all to work. Patch from Eitan Isaacson. (LP: #349031) * Give the indicator applet an ATK name so it can be found by the accessibility frameworks. Patch from Eitan Isaacson. (LP: #349031) * Making it so the 'No Indicators' situation uses a label instead of a desensitized menu item to allow right click through. (LP: #346359) * Remove the making of 'Indicator Applet Factory' translatable. (LP: #349540) * Make sure translations get loaded and make the 'No Indicators' error and the license translatable. Patch from Gabor Kelemen. (LP: #349998) --- debian/changelog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/debian/changelog b/debian/changelog index f5dc0ba..c905356 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +indicator-applet (0.1.4-0ubuntu1) UNRELEASED; urgency=low + + * New upstream version + * Changing the text in the license box to make sense. (LP: #346215) + * Call GNOME Program Init to initialize all of the ATK and gettext + stuff that needs to be initialized for it all to work. Patch from + Eitan Isaacson. (LP: #349031) + * Give the indicator applet an ATK name so it can be found by the + accessibility frameworks. Patch from Eitan Isaacson. (LP: #349031) + * Making it so the 'No Indicators' situation uses a label instead of a + desensitized menu item to allow right click through. (LP: #346359) + * Remove the making of 'Indicator Applet Factory' translatable. + (LP: #349540) + * Make sure translations get loaded and make the 'No Indicators' error + and the license translatable. Patch from Gabor Kelemen. (LP: #349998) + + -- Ted Gould Fri, 27 Mar 2009 23:36:00 -0500 + indicator-applet (0.1.3-0ubuntu2) jaunty; urgency=low * debian/control: Add dependency to indicator-messages; the applet is -- cgit v1.2.3 From 3e8de8a4ff6a37fc89f9374c2a78402fa08390a1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Mar 2009 23:39:31 -0500 Subject: debian/control: Adding libgnomeui-dev as a dependency as it was added upstream. --- debian/changelog | 2 ++ debian/control | 1 + 2 files changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index c905356..7b28572 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ indicator-applet (0.1.4-0ubuntu1) UNRELEASED; urgency=low (LP: #349540) * Make sure translations get loaded and make the 'No Indicators' error and the license translatable. Patch from Gabor Kelemen. (LP: #349998) + * debian/control: Adding libgnomeui-dev as a dependency as it was added + upstream. -- Ted Gould Fri, 27 Mar 2009 23:36:00 -0500 diff --git a/debian/control b/debian/control index 6ca0080..7fb1784 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Build-Depends: debhelper (>= 5.0), libpanel-applet2-dev (>= 2.0.0), libdbus-glib-1-dev, gnome-doc-utils, + libgnomeui-dev, libtool, intltool Standards-Version: 3.8.0 -- cgit v1.2.3 From 9a1d935149a055969ae18dc5d80fb0ab11071f30 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 27 Mar 2009 23:42:04 -0500 Subject: Now in jaunty --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7b28572..608d3f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -indicator-applet (0.1.4-0ubuntu1) UNRELEASED; urgency=low +indicator-applet (0.1.4-0ubuntu1) jaunty; urgency=low * New upstream version * Changing the text in the license box to make sense. (LP: #346215) @@ -16,7 +16,7 @@ indicator-applet (0.1.4-0ubuntu1) UNRELEASED; urgency=low * debian/control: Adding libgnomeui-dev as a dependency as it was added upstream. - -- Ted Gould Fri, 27 Mar 2009 23:36:00 -0500 + -- Ted Gould Fri, 27 Mar 2009 23:41:21 -0500 indicator-applet (0.1.3-0ubuntu2) jaunty; urgency=low -- cgit v1.2.3