← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~mterry/indicator-applet/libpanel-applet-3 into lp:indicator-applet

 

Michael Terry has proposed merging lp:~mterry/indicator-applet/libpanel-applet-3 into lp:indicator-applet.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)
Related bugs:
  #671477 should stop using a bonobo applet
  https://bugs.launchpad.net/bugs/671477

-- 
https://code.launchpad.net/~mterry/indicator-applet/libpanel-applet-3/+merge/40564
Your team ayatana-commits is subscribed to branch lp:indicator-applet.
=== modified file 'configure.ac'
--- configure.ac	2010-10-07 16:02:37 +0000
+++ configure.ac	2010-11-10 18:30:06 +0000
@@ -26,13 +26,12 @@
 ###########################
 
 GTK_REQUIRED_VERSION=2.12
-PANEL_REQUIRED_VERSION=2.0.0
-DBUS_REQUIRED_VERSION=0.76
 INDICATOR_REQUIRED_VERSION=0.3.14
 
 PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
-                          libpanelapplet-2.0 >= $PANEL_REQUIRED_VERSION
-						  indicator >= $INDICATOR_REQUIRED_VERSION)
+                          x11
+                          libpanelapplet-3.0
+                          indicator >= $INDICATOR_REQUIRED_VERSION)
 AC_SUBST(APPLET_CFLAGS)
 AC_SUBST(APPLET_LIBS)
 

=== modified file 'data/Makefile.am'
--- data/Makefile.am	2010-10-07 16:02:37 +0000
+++ data/Makefile.am	2010-11-10 18:30:06 +0000
@@ -1,26 +1,41 @@
 # This file will be processed with automake to create Makefile.in
 
 ##############################
-# Bonobo .server
-##############################
-
-serverdir =					\
-	$(libdir)/bonobo/servers
-server_in_files =				\
-	GNOME_IndicatorApplet.server.in \
-	GNOME_IndicatorAppletComplete.server.in \
-	GNOME_IndicatorAppletAppmenu.server.in \
-	GNOME_FastUserSwitchApplet.server.in
-server_DATA =					\
-	$(server_in_files:.server.in=.server)
-
-%.server.in: %.server.in.in
-	sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" -e "s|\@VERSION\@|$(VERSION)|" $< > $@
-
-server_in_in_files = \
-	$(server_in_files:.server.in=.server.in.in)
-
-@INTLTOOL_SERVER_RULE@
+# Applets
+##############################
+
+appletdir       = $(datadir)/gnome-panel/applets
+applet_in_files = \
+	org.ayatana.panel.IndicatorApplet.panel-applet.in \
+	org.ayatana.panel.IndicatorAppletComplete.panel-applet.in \
+	org.ayatana.panel.IndicatorAppletAppmenu.panel-applet.in \
+	org.ayatana.panel.FastUserSwitchApplet.panel-applet.in
+applet_DATA     = $(applet_in_files:.panel-applet.in=.panel-applet)
+
+%.panel-applet.in: %.panel-applet.in.in Makefile
+	$(AM_V_GEN)sed \
+	    -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
+	    $< > $@
+
+%.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(AM_V_GEN) LC_ALL=C $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+
+##############################
+# DBus Services
+##############################
+
+servicedir       = $(datadir)/dbus-1/services
+service_in_files = \
+	org.gnome.panel.applet.IndicatorAppletFactory.service.in \
+	org.gnome.panel.applet.IndicatorAppletCompleteFactory.service.in \
+	org.gnome.panel.applet.IndicatorAppletAppmenuFactory.service.in \
+	org.gnome.panel.applet.FastUserSwitchAppletFactory.service.in
+service_DATA     = $(service_in_files:.service.in=.service)
+
+%.service: %.service.in Makefile
+	$(AM_V_GEN)sed \
+	    -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
+	    $< > $@
 
 
 ##############################
@@ -50,15 +65,15 @@
 ##############################
 
 CLEANFILES =					\
-	$(server_in_files)			\
-	$(server_DATA)				\
-	$(schema_DATA)				\
+	$(applet_in_files)			\
+	$(applet_DATA)				\
+	$(service_DATA)				\
 	*.bak
 
 EXTRA_DIST =					\
-	$(icons_DATA) \
-	$(server_in_in_files) \
-	$(schema_in_files)
+	$(icons_DATA)				\
+	$(applet_in_files:.in=.in.in)		\
+	$(service_in_files)
 
 MAINTAINERCLEANFILES =				\
 	Makefile.in

=== renamed file 'data/GNOME_FastUserSwitchApplet.server.in.in' => 'data/org.ayatana.panel.FastUserSwitchApplet.panel-applet.in.in'
--- data/GNOME_FastUserSwitchApplet.server.in.in	2009-08-18 15:49:06 +0000
+++ data/org.ayatana.panel.FastUserSwitchApplet.panel-applet.in.in	2010-11-10 18:30:06 +0000
@@ -1,28 +1,11 @@
-<oaf_info>
-  <oaf_server iid="OAFIID:GNOME_FastUserSwitchApplet_Factory" type="exe"
-              location="@LIBEXECDIR@/indicator-applet-session">
-
-    <oaf_attribute name="repo_ids" type="stringv">
-      <item value="IDL:Bonobo/GenericFactory:1.0"/>
-      <item value="IDL:Bonobo/Unknown:1.0"/>
-    </oaf_attribute>
-    <oaf_attribute name="name" type="string" value="Indicator Applet Factory"/>
-    <oaf_attribute name="description" type="string" value="Indicator Applet Factory"/>
-    <oaf_attribute name="bonobo:environment" type="stringv">
-       <item value="DBUS_SESSION_BUS_ADDRESS"/>
-    </oaf_attribute>
-  </oaf_server>
-
-  <oaf_server iid="OAFIID:GNOME_FastUserSwitchApplet" type="factory"
-              location="OAFIID:GNOME_FastUserSwitchApplet_Factory">
-
-    <oaf_attribute name="repo_ids" type="stringv">
-      <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
-      <item value="IDL:Bonobo/Control:1.0"/>
-      <item value="IDL:Bonobo/Unknown:1.0"/>
-    </oaf_attribute>
-    <oaf_attribute name="name" type="string" _value="Indicator Applet Session"/>
-    <oaf_attribute name="description" type="string" _value="A place to adjust your status, change users or exit your session."/>
-    <oaf_attribute name="panel:icon" type="string" value="indicator-applet"/>
-  </oaf_server>
-</oaf_info>
+[Applet Factory]
+Id=FastUserSwitchAppletFactory
+Location=@LIBEXECDIR@/indicator-applet-session
+Name=Indicator Applet Factory
+Description=Indicator Applet Factory
+
+[FastUserSwitchApplet]
+_Name=Indicator Applet Session
+_Description=A place to adjust your status, change users or exit your session.
+Icon=indicator-applet
+BonoboId=OAFIID:GNOME_FastUserSwitchApplet

=== renamed file 'data/GNOME_IndicatorApplet.server.in.in' => 'data/org.ayatana.panel.IndicatorApplet.panel-applet.in.in'
--- data/GNOME_IndicatorApplet.server.in.in	2009-03-27 19:41:02 +0000
+++ data/org.ayatana.panel.IndicatorApplet.panel-applet.in.in	2010-11-10 18:30:06 +0000
@@ -1,28 +1,11 @@
-<oaf_info>
-  <oaf_server iid="OAFIID:GNOME_IndicatorApplet_Factory" type="exe"
-              location="@LIBEXECDIR@/indicator-applet">
-
-    <oaf_attribute name="repo_ids" type="stringv">
-      <item value="IDL:Bonobo/GenericFactory:1.0"/>
-      <item value="IDL:Bonobo/Unknown:1.0"/>
-    </oaf_attribute>
-    <oaf_attribute name="name" type="string" value="Indicator Applet Factory"/>
-    <oaf_attribute name="description" type="string" value="Indicator Applet Factory"/>
-    <oaf_attribute name="bonobo:environment" type="stringv">
-       <item value="DBUS_SESSION_BUS_ADDRESS"/>
-    </oaf_attribute>
-  </oaf_server>
-
-  <oaf_server iid="OAFIID:GNOME_IndicatorApplet" type="factory"
-              location="OAFIID:GNOME_IndicatorApplet_Factory">
-
-    <oaf_attribute name="repo_ids" type="stringv">
-      <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
-      <item value="IDL:Bonobo/Control:1.0"/>
-      <item value="IDL:Bonobo/Unknown:1.0"/>
-    </oaf_attribute>
-    <oaf_attribute name="name" type="string" _value="Indicator Applet"/>
-    <oaf_attribute name="description" type="string" _value="An indicator of something that needs your attention on the desktop"/>
-    <oaf_attribute name="panel:icon" type="string" value="indicator-applet"/>
-  </oaf_server>
-</oaf_info>
+[Applet Factory]
+Id=IndicatorAppletFactory
+Location=@LIBEXECDIR@/indicator-applet
+Name=Indicator Applet Factory
+Description=Indicator Applet Factory
+
+[IndicatorApplet]
+_Name=Indicator Applet
+_Description=An indicator of something that needs your attention on the desktop
+Icon=indicator-applet
+BonoboId=OAFIID:GNOME_IndicatorApplet

=== renamed file 'data/GNOME_IndicatorAppletAppmenu.server.in.in' => 'data/org.ayatana.panel.IndicatorAppletAppmenu.panel-applet.in.in'
--- data/GNOME_IndicatorAppletAppmenu.server.in.in	2010-04-26 15:51:08 +0000
+++ data/org.ayatana.panel.IndicatorAppletAppmenu.panel-applet.in.in	2010-11-10 18:30:06 +0000
@@ -1,28 +1,11 @@
-<oaf_info>
-  <oaf_server iid="OAFIID:GNOME_IndicatorAppletAppmenu_Factory" type="exe"
-              location="@LIBEXECDIR@/indicator-applet-appmenu">
-
-    <oaf_attribute name="repo_ids" type="stringv">
-      <item value="IDL:Bonobo/GenericFactory:1.0"/>
-      <item value="IDL:Bonobo/Unknown:1.0"/>
-    </oaf_attribute>
-    <oaf_attribute name="name" type="string" value="Indicator Applet Appmenu Factory"/>
-    <oaf_attribute name="description" type="string" value="Indicator Applet Appmenu Factory"/>
-    <oaf_attribute name="bonobo:environment" type="stringv">
-       <item value="DBUS_SESSION_BUS_ADDRESS"/>
-    </oaf_attribute>
-  </oaf_server>
-
-  <oaf_server iid="OAFIID:GNOME_IndicatorAppletAppmenu" type="factory"
-              location="OAFIID:GNOME_IndicatorAppletAppmenu_Factory">
-
-    <oaf_attribute name="repo_ids" type="stringv">
-      <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
-      <item value="IDL:Bonobo/Control:1.0"/>
-      <item value="IDL:Bonobo/Unknown:1.0"/>
-    </oaf_attribute>
-    <oaf_attribute name="name" type="string" _value="Indicator Applet Appmenu"/>
-    <oaf_attribute name="description" type="string" _value="A applet containing the application menus."/>
-    <oaf_attribute name="panel:icon" type="string" value="indicator-applet"/>
-  </oaf_server>
-</oaf_info>
+[Applet Factory]
+Id=IndicatorAppletAppmenuFactory
+Location=@LIBEXECDIR@/indicator-applet-appmenu
+Name=Indicator Applet Appmenu Factory
+Description=Indicator Applet Appmenu Factory
+
+[IndicatorAppletAppmenu]
+_Name=Indicator Applet Appmenu
+_Description=A applet containing the application menus.
+Icon=indicator-applet
+BonoboId=OAFIID:GNOME_IndicatorAppletAppmenu

=== renamed file 'data/GNOME_IndicatorAppletComplete.server.in.in' => 'data/org.ayatana.panel.IndicatorAppletComplete.panel-applet.in.in'
--- data/GNOME_IndicatorAppletComplete.server.in.in	2010-01-04 20:35:15 +0000
+++ data/org.ayatana.panel.IndicatorAppletComplete.panel-applet.in.in	2010-11-10 18:30:06 +0000
@@ -1,28 +1,11 @@
-<oaf_info>
-  <oaf_server iid="OAFIID:GNOME_IndicatorAppletComplete_Factory" type="exe"
-              location="@LIBEXECDIR@/indicator-applet-complete">
-
-    <oaf_attribute name="repo_ids" type="stringv">
-      <item value="IDL:Bonobo/GenericFactory:1.0"/>
-      <item value="IDL:Bonobo/Unknown:1.0"/>
-    </oaf_attribute>
-    <oaf_attribute name="name" type="string" value="Indicator Applet Complete Factory"/>
-    <oaf_attribute name="description" type="string" value="Indicator Applet Complete Factory"/>
-    <oaf_attribute name="bonobo:environment" type="stringv">
-       <item value="DBUS_SESSION_BUS_ADDRESS"/>
-    </oaf_attribute>
-  </oaf_server>
-
-  <oaf_server iid="OAFIID:GNOME_IndicatorAppletComplete" type="factory"
-              location="OAFIID:GNOME_IndicatorAppletComplete_Factory">
-
-    <oaf_attribute name="repo_ids" type="stringv">
-      <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
-      <item value="IDL:Bonobo/Control:1.0"/>
-      <item value="IDL:Bonobo/Unknown:1.0"/>
-    </oaf_attribute>
-    <oaf_attribute name="name" type="string" _value="Indicator Applet Complete"/>
-    <oaf_attribute name="description" type="string" _value="A unified applet containing all of the indicators."/>
-    <oaf_attribute name="panel:icon" type="string" value="indicator-applet"/>
-  </oaf_server>
-</oaf_info>
+[Applet Factory]
+Id=IndicatorAppletCompleteFactory
+Location=@LIBEXECDIR@/indicator-applet-complete
+Name=Indicator Applet Complete Factory
+Description=Indicator Applet Complete Factory
+
+[IndicatorAppletComplete]
+_Name=Indicator Applet Complete
+_Description=A unified applet containing all of the indicators.
+Icon=indicator-applet
+BonoboId=OAFIID:GNOME_IndicatorAppletComplete

=== added file 'data/org.gnome.panel.applet.FastUserSwitchAppletFactory.service.in'
--- data/org.gnome.panel.applet.FastUserSwitchAppletFactory.service.in	1970-01-01 00:00:00 +0000
+++ data/org.gnome.panel.applet.FastUserSwitchAppletFactory.service.in	2010-11-10 18:30:06 +0000
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.panel.applet.FastUserSwitchAppletFactory
+Exec=@LIBEXECDIR@/indicator-applet-session

=== added file 'data/org.gnome.panel.applet.IndicatorAppletAppmenuFactory.service.in'
--- data/org.gnome.panel.applet.IndicatorAppletAppmenuFactory.service.in	1970-01-01 00:00:00 +0000
+++ data/org.gnome.panel.applet.IndicatorAppletAppmenuFactory.service.in	2010-11-10 18:30:06 +0000
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.panel.applet.IndicatorAppletAppmenuFactory
+Exec=@LIBEXECDIR@/indicator-applet-appmenu

=== added file 'data/org.gnome.panel.applet.IndicatorAppletCompleteFactory.service.in'
--- data/org.gnome.panel.applet.IndicatorAppletCompleteFactory.service.in	1970-01-01 00:00:00 +0000
+++ data/org.gnome.panel.applet.IndicatorAppletCompleteFactory.service.in	2010-11-10 18:30:06 +0000
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.panel.applet.IndicatorAppletCompleteFactory
+Exec=@LIBEXECDIR@/indicator-applet-complete

=== added file 'data/org.gnome.panel.applet.IndicatorAppletFactory.service.in'
--- data/org.gnome.panel.applet.IndicatorAppletFactory.service.in	1970-01-01 00:00:00 +0000
+++ data/org.gnome.panel.applet.IndicatorAppletFactory.service.in	2010-11-10 18:30:06 +0000
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.panel.applet.IndicatorAppletFactory
+Exec=@LIBEXECDIR@/indicator-applet

=== modified file 'po/POTFILES.in'
--- po/POTFILES.in	2010-10-07 16:02:37 +0000
+++ po/POTFILES.in	2010-11-10 18:30:06 +0000
@@ -1,6 +1,6 @@
 [encoding: UTF-8]
-data/GNOME_IndicatorApplet.server.in.in
-data/GNOME_IndicatorAppletAppmenu.server.in.in
-data/GNOME_IndicatorAppletComplete.server.in.in
-data/GNOME_FastUserSwitchApplet.server.in.in
+[type: gettext/keys]data/org.ayatana.panel.IndicatorApplet.panel-applet.in.in
+[type: gettext/keys]data/org.ayatana.panel.IndicatorAppletComplete.panel-applet.in.in
+[type: gettext/keys]data/org.ayatana.panel.IndicatorAppletAppmenu.panel-applet.in.in
+[type: gettext/keys]data/org.ayatana.panel.FastUserSwitchApplet.panel-applet.in.in
 src/applet-main.c

=== modified file 'po/POTFILES.skip'
--- po/POTFILES.skip	2010-04-27 22:02:31 +0000
+++ po/POTFILES.skip	2010-11-10 18:30:06 +0000
@@ -1,5 +1,4 @@
-data/GNOME_FastUserSwitchApplet.server.in.in
-data/GNOME_IndicatorApplet.server.in.in
-data/GNOME_IndicatorAppletAppmenu.server.in.in
-data/GNOME_IndicatorAppletComplete.server.in.in
-
+data/org.ayatana.panel.IndicatorApplet.panel-applet.in
+data/org.ayatana.panel.IndicatorAppletComplete.panel-applet.in
+data/org.ayatana.panel.IndicatorAppletAppmenu.panel-applet.in
+data/org.ayatana.panel.FastUserSwitchApplet.panel-applet.in

=== modified file 'src/applet-main.c'
--- src/applet-main.c	2010-09-19 18:07:34 +0000
+++ src/applet-main.c	2010-11-10 18:30:06 +0000
@@ -21,7 +21,9 @@
 */
 
 #include <stdlib.h>
+#include <string.h>
 #include <config.h>
+#include <glib/gi18n.h>
 #include <panel-applet.h>
 #include <gdk/gdkkeysyms.h>
 
@@ -59,27 +61,27 @@
  * ***********/
 
 #ifdef INDICATOR_APPLET
-PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_IndicatorApplet_Factory",
+PANEL_APPLET_OUT_PROCESS_FACTORY ("IndicatorAppletFactory",
                PANEL_TYPE_APPLET,
-               "indicator-applet", "0",
+               "indicator-applet",
                applet_fill_cb, NULL);
 #endif
 #ifdef INDICATOR_APPLET_SESSION
-PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_FastUserSwitchApplet_Factory",
+PANEL_APPLET_OUT_PROCESS_FACTORY ("FastUserSwitchAppletFactory",
                PANEL_TYPE_APPLET,
-               "indicator-applet-session", "0",
+               "indicator-applet-session",
                applet_fill_cb, NULL);
 #endif
 #ifdef INDICATOR_APPLET_COMPLETE
-PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_IndicatorAppletComplete_Factory",
+PANEL_APPLET_OUT_PROCESS_FACTORY ("IndicatorAppletCompleteFactory",
                PANEL_TYPE_APPLET,
-               "indicator-applet-complete", "0",
+               "indicator-applet-complete",
                applet_fill_cb, NULL);
 #endif
 #ifdef INDICATOR_APPLET_APPMENU
-PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_IndicatorAppletAppmenu_Factory",
+PANEL_APPLET_OUT_PROCESS_FACTORY ("IndicatorAppletAppmenuFactory",
                PANEL_TYPE_APPLET,
-               "indicator-applet-appmenu", "0",
+               "indicator-applet-appmenu",
                applet_fill_cb, NULL);
 #endif
 
@@ -504,9 +506,8 @@
 }
 
 static void
-about_cb (BonoboUIComponent *ui_container G_GNUC_UNUSED,
-	  gpointer           data G_GNUC_UNUSED,
-	  const gchar       *cname G_GNUC_UNUSED)
+about_cb (GtkAction *action G_GNUC_UNUSED,
+          gpointer   data G_GNUC_UNUSED)
 {
 	static const gchar *authors[] = {
 		"Ted Gould <ted@xxxxxxxxxxxxx>",
@@ -687,18 +688,15 @@
 applet_fill_cb (PanelApplet * applet, const gchar * iid G_GNUC_UNUSED,
                 gpointer data G_GNUC_UNUSED)
 {
-	static const BonoboUIVerb menu_verbs[] = {
-		BONOBO_UI_VERB ("IndicatorAppletAbout", about_cb),
-		BONOBO_UI_VERB_END
+	static const GtkActionEntry menu_actions[] = {
+		{"About", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, G_CALLBACK(about_cb)}
 	};
-	static const gchar * menu_xml =
-		"<popup name=\"button3\">"
-			"<menuitem name=\"About Item\" verb=\"IndicatorAppletAbout\" _label=\"" N_("_About") "\" pixtype=\"stock\" pixname=\"gtk-about\"/>"
-		"</popup>";
+	static const gchar *menu_xml = "<menuitem name=\"About\" action=\"About\"/>";
 
 	static gboolean first_time = FALSE;
 	GtkWidget *menubar;
 	gint indicators_loaded = 0;
+	GtkActionGroup *action_group;
 
 #ifdef INDICATOR_APPLET_SESSION
 	/* check if we are running stracciatella session */
@@ -733,7 +731,13 @@
 	gtk_container_set_border_width(GTK_CONTAINER (applet), 0);
 	panel_applet_set_flags(applet, PANEL_APPLET_EXPAND_MINOR);
 	menubar = gtk_menu_bar_new();
-	panel_applet_setup_menu(applet, menu_xml, menu_verbs, menubar);
+	action_group = gtk_action_group_new ("Indicator Applet Actions");
+	gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
+	gtk_action_group_add_actions (action_group, menu_actions,
+	                              G_N_ELEMENTS (menu_actions),
+	                              menubar);
+	panel_applet_setup_menu(applet, menu_xml, action_group);
+	g_object_unref(action_group);
 #ifdef INDICATOR_APPLET
 	atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (applet)),
 	                     "indicator-applet");


Follow ups