[gnome-pilot/gtk3: 6/6] Convert applet from bonobo to dbus/gtk3/libpanelapplet-4. Unstable!



commit 37014cac2d93cd07f4cfccc792bddb122e114ba1
Author: Matt Davey <mcdavey mrao cam ac uk>
Date:   Sun Mar 13 18:10:26 2011 +0000

    Convert applet from bonobo to dbus/gtk3/libpanelapplet-4.  Unstable!

 Makefile.am                                        |    2 +
 applet/GNOME_PilotApplet.server.in.in              |   33 ----
 applet/Makefile.am                                 |   38 ++++-
 ...rg.gnome.applets.PilotApplet.panel-applet.in.in |   16 ++
 ...nome.panel.applet.PilotAppletFactory.service.in |    3 +
 applet/pilot.c                                     |  175 ++++++++++----------
 configure.ac                                       |   14 +-
 po/POTFILES.in                                     |    5 +
 8 files changed, 151 insertions(+), 135 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 95c9811..c3b6f25 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,6 +3,7 @@ ACLOCAL_AMFLAGS=-I macros
 SUBDIRS = 			\
 	po 			\
 	gpilotd 		\
+	applet 			\
 	capplet 		\
 	conduits 		\
 	utils			\
@@ -16,6 +17,7 @@ distuninstallcheck_listfiles = find . -type f -print | grep -v \
  '^\./var/scrollkeeper'
 
 changelogs =				\
+	applet/OChangeLog		\
 	capplet/OChangeLog		\
 	conduits/backup/OChangeLog	\
 	conduits/OChangeLog		\
diff --git a/applet/Makefile.am b/applet/Makefile.am
index 130f13b..34a55b9 100644
--- a/applet/Makefile.am
+++ b/applet/Makefile.am
@@ -23,7 +23,7 @@ gpilot_applet_SOURCES =		\
 gpilot_applet_LDADD = 				\
 	$(GNOME_PILOT_LIBS)			\
 	$(PILOT_APPLET_LIBS)		\
-	$(top_builddir)/gpilotd/libgpilotd.la
+	$(top_builddir)/gpilotd/libgpilotd-3.0.la
 
 #lib_LTLIBRARIES=libpilot_applet.la
 
@@ -49,11 +49,29 @@ ui_DATA = pilot-applet.ui
 pixmapdir = $(datadir)/pixmaps
 pixmap_DATA = sync_paused.png sync_broken.png sync_icon.png syncing_icon.png
 
-serverdir = $(libdir)/bonobo/servers
-server_in_files = GNOME_PilotApplet.server.in.in
-server_DATA = $(server_in_files:.server.in.in=.server)
- GP_SERVER_RULE@
- INTLTOOL_SERVER_RULE@
+# panel-applet file
+appletdir       = $(LIBPANEL_APPLET_DIR)
+applet_in_files = org.gnome.applets.PilotApplet.panel-applet.in
+applet_DATA     = $(applet_in_files:.panel-applet.in=.panel-applet)
+
+$(applet_in_files): $(applet_in_files).in Makefile
+	$(AM_V_GEN)sed \
+	-e "s|\ LIBEXECDIR\@|$(libexecdir)|" \
+	-e "s|\ VERSION\@|$(PACKAGE_VERSION)|" \
+	$< > $@
+
+%.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+# D-Bus service file
+servicedir       = $(datadir)/dbus-1/services
+service_in_files = org.gnome.panel.applet.PilotAppletFactory.service.in
+service_DATA     = $(service_in_files:.service.in=.service)
+
+org.gnome.panel.applet.PilotAppletFactory.service: $(service_in_files)
+	$(AM_V_GEN)sed \
+	-e "s|\ LOCATION\@|$(APPLET_LOCATION)|" \
+	$< > $@
+
 
 schemasdir       = $(GCONF_SCHEMA_FILE_DIR)
 schemas_in_files = pilot.schemas.in
@@ -69,13 +87,15 @@ install-data-local:
 	fi
 
 EXTRA_DIST = 				\
+	org.gnome.applets.PilotApplet.panel-applet.in.in \
 	$(pixmap_DATA) 			\
 	$(ui_DATA) 			\
 	$(gobfiles)			\
-	$(server_in_files)		\
+	$(service_in_files)		\
 	$(schemas_in_files)		\
 	$(NULL)
 
-BUILT_SOURCES = $(GOB_BUILT_SRCS) $(schemas_DATA) $(server_DATA)
+BUILT_SOURCES = $(GOB_BUILT_SRCS) $(schemas_DATA) $(service_DATA) $(applet_DATA) $(applet_DATA).in
+
+CLEANFILES = $(schemas_DATA) $(applet_DATA) $(applet_DATA).in $(service_DATA)
 
-CLEANFILES = $(schemas_DATA) $(server_DATA)
diff --git a/applet/org.gnome.applets.PilotApplet.panel-applet.in.in b/applet/org.gnome.applets.PilotApplet.panel-applet.in.in
new file mode 100644
index 0000000..d1da243
--- /dev/null
+++ b/applet/org.gnome.applets.PilotApplet.panel-applet.in.in
@@ -0,0 +1,16 @@
+[Applet Factory]
+Id=PilotAppletFactory
+Location= LIBEXECDIR@/gpilot-applet
+_Name=PilotApplet Factory
+_Description=Factory for the gnome-pilot applet
+
+[PilotApplet]
+_Name=Pilot Applet
+_Description=Synchronize your data on PalmOS devices
+Icon=palm-pilot-sync.png
+BonoboId=OAFIID:GNOME_PilotApplet
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=gnome-pilot
+X-GNOME-Bugzilla-Component=applet
+X-GNOME-Bugzilla-Version= VERSION@
+X-GNOME-Bugzilla-OtherBinaries=gpilotd
diff --git a/applet/org.gnome.panel.applet.PilotAppletFactory.service.in b/applet/org.gnome.panel.applet.PilotAppletFactory.service.in
new file mode 100644
index 0000000..20d1dec
--- /dev/null
+++ b/applet/org.gnome.panel.applet.PilotAppletFactory.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.panel.applet.PilotAppletFactory
+Exec= LIBEXECDIR@/gpilot-applet
diff --git a/applet/pilot.c b/applet/pilot.c
index c83e4bd..8b09996 100644
--- a/applet/pilot.c
+++ b/applet/pilot.c
@@ -28,6 +28,7 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <gtk/gtk.h>
+#include <glib/gi18n-lib.h>
 #include <panel-applet-gconf.h>
 
 #include <signal.h>
@@ -114,7 +115,7 @@ static void response_cb (GtkDialog *dialog, gint id, gpointer data);
 
 static gboolean timeout (PilotApplet *self);
 
-#define GPILOTD_DRUID "gpilotd-control-applet --druid"
+#define GPILOTD_DRUID "gpilotd-control-applet --assistant"
 #define GPILOTD_CAPPLET "gpilotd-control-applet"
 #define CONDUIT_CAPPLET "gpilotd-control-applet --cap-id=1"
 
@@ -145,14 +146,13 @@ gpilotd_connect_cb (GnomePilotClient *client,
 		    const GNOME_Pilot_UserInfo *user,
 		    gpointer user_data)
 {
-	GdkColormap *colormap;
 	gchar *buf;
 	GError *error = NULL;
 	PilotApplet *applet = PILOT_APPLET (user_data);
 
-	gtk_widget_set_tooltip_text(GTK_WIDGET(applet->applet), _("Synchronizing..."));
+	gtk_widget_set_tooltip_text(GTK_WIDGET(applet->applet), ("Synchronizing..."));
   
-	if (!GTK_WIDGET_REALIZED (applet->image)) {
+	if (!gtk_widget_get_realized (GTK_WIDGET (applet->image))) {
 		g_warning ("! realized");
 		return;
 	}
@@ -176,7 +176,7 @@ gpilotd_connect_cb (GnomePilotClient *client,
 		applet->message_buffer       = gtk_text_view_get_buffer(
 				GTK_TEXT_VIEW(applet->message_area));
 
-		g_signal_connect   (GTK_OBJECT (applet->cancel_button),"clicked",
+		g_signal_connect   (G_OBJECT (applet->cancel_button),"clicked",
 				   G_CALLBACK (cancel_cb),applet);
 	} else {
 		gtk_text_buffer_set_text (applet->message_buffer, "", -1);
@@ -197,9 +197,7 @@ gpilotd_connect_cb (GnomePilotClient *client,
 		applet->conduit_progress_bar));
 	gpilot_applet_progress_start (applet->c_progress);
 
-	colormap = gdk_drawable_get_colormap (applet->message_area->window);
 	gdk_color_parse ("red",&(applet->errorColor));
-	gdk_colormap_alloc_color (colormap,&(applet->errorColor),FALSE,TRUE);
 }
 
 static void 
@@ -221,47 +219,47 @@ gpilotd_disconnect_cb (GnomePilotClient *client,
 }
 
 /* taken from http://live.gnome.org/GnomeLove/PanelAppletTutorial */
-static void
-applet_back_change (PanelApplet			*a,
-		    PanelAppletBackgroundType	type,
-		    GdkColor			*color,
-		    GdkPixmap			*pixmap,
-		    PilotApplet			*applet) 
-{
-        GtkRcStyle *rc_style;
-        GtkStyle *style;
-
-        /* reset style */
-        gtk_widget_set_style (GTK_WIDGET (applet->applet), NULL);
-        rc_style = gtk_rc_style_new ();
-        gtk_widget_modify_style (GTK_WIDGET (applet->applet), rc_style);
-        g_object_unref (rc_style);
-
-        switch (type) {
-                case PANEL_COLOR_BACKGROUND:
-                        gtk_widget_modify_bg (GTK_WIDGET (applet->applet),
-                                        GTK_STATE_NORMAL, color);
-                        break;
-
-                case PANEL_PIXMAP_BACKGROUND:
-                        style = gtk_style_copy (GTK_WIDGET (
-						applet->applet)->style);
-                        if (style->bg_pixmap[GTK_STATE_NORMAL])
-                                g_object_unref
-                                        (style->bg_pixmap[GTK_STATE_NORMAL]);
-                        style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref
-                                (pixmap);
-                        gtk_widget_set_style (GTK_WIDGET (applet->applet),
-                                        style);
-                        g_object_unref (style);
-                        break;
-
-                case PANEL_NO_BACKGROUND:
-                default:
-                        break;
-        }
-
-}
+/* static void */
+/* applet_back_change (PanelApplet			*a, */
+/* 		    PanelAppletBackgroundType	type, */
+/* 		    GdkColor			*color, */
+/* 		    GdkPixmap			*pixmap, */
+/* 		    PilotApplet			*applet)  */
+/* { */
+/*         GtkRcStyle *rc_style; */
+/*         GtkStyle *style; */
+
+/*         /\* reset style *\/ */
+/*         gtk_widget_set_style (GTK_WIDGET (applet->applet), NULL); */
+/*         rc_style = gtk_rc_style_new (); */
+/*         gtk_widget_modify_style (GTK_WIDGET (applet->applet), rc_style); */
+/*         g_object_unref (rc_style); */
+
+/*         switch (type) { */
+/*                 case PANEL_COLOR_BACKGROUND: */
+/*                         gtk_widget_modify_bg (GTK_WIDGET (applet->applet), */
+/*                                         GTK_STATE_NORMAL, color); */
+/*                         break; */
+
+/*                 case PANEL_PIXMAP_BACKGROUND: */
+/*                         style = gtk_style_copy (GTK_WIDGET ( */
+/* 						applet->applet)->style); */
+/*                         if (style->bg_pixmap[GTK_STATE_NORMAL]) */
+/*                                 g_object_unref */
+/*                                         (style->bg_pixmap[GTK_STATE_NORMAL]); */
+/*                         style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref */
+/*                                 (pixmap); */
+/*                         gtk_widget_set_style (GTK_WIDGET (applet->applet), */
+/*                                         style); */
+/*                         g_object_unref (style); */
+/*                         break; */
+
+/*                 case PANEL_NO_BACKGROUND: */
+/*                 default: */
+/*                         break; */
+/*         } */
+
+/* } */
 
 static void gpilotd_scroll_to_insert_mark(PilotApplet *applet)
 {
@@ -456,8 +454,7 @@ handle_client_error (PilotApplet *self)
 }
 
 static void
-about_cb(BonoboUIComponent *uic, PilotApplet *pilot, const gchar *verbname)
-
+about_cb(GtkAction *action, PilotApplet *pilot)
 {
 	GError *error = NULL;
 
@@ -525,12 +522,12 @@ static void
 toggle_notices_cb (GtkWidget *toggle, gpointer data)
 {
 	PilotApplet *self = data;
-	self->properties.popups = GTK_TOGGLE_BUTTON (toggle)->active;
+	self->properties.popups = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (toggle));
 	save_properties (self);
 }
 
 static void
-properties_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname)
+properties_cb (GtkAction *action, gpointer user_data)
 {
 	PilotApplet *self = user_data;
 	GtkWidget *button, *entry, *dialog;
@@ -544,18 +541,18 @@ properties_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname
 	entry = get_widget (ui,"exec_entry");
 	if (self->properties.exec_when_clicked)
 		gtk_entry_set_text (GTK_ENTRY (entry), self->properties.exec_when_clicked);
-	g_signal_connect   (GTK_OBJECT (entry), "focus-out-event",
+	g_signal_connect   (G_OBJECT (entry), "focus-out-event",
 			    G_CALLBACK (exec_on_click_changed_cb),
 			    self);
 
   
 	button = get_widget (ui,"notices_button");
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), self->properties.popups);
-	g_signal_connect   (GTK_OBJECT (button), "toggled",
+	g_signal_connect   (G_OBJECT (button), "toggled",
 			    G_CALLBACK (toggle_notices_cb),
 			    self);
 
-	g_signal_connect (GTK_OBJECT (dialog), "response",
+	g_signal_connect (G_OBJECT (dialog), "response",
 			  G_CALLBACK (response_cb),
 			  NULL);
 
@@ -566,7 +563,7 @@ properties_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname
 }
 
 static void
-help_cb(BonoboUIComponent *uic, gpointer user_data, const gchar *verbname)
+help_cb(GtkAction *action, gpointer user_data)
 {
 	PilotApplet *applet = user_data;
 	GError *error = NULL;
@@ -646,7 +643,7 @@ complete_restore (GnomePilotClient* client, const gchar *id,
 }
 
 static void
-restore_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname)
+restore_cb (GtkAction *action, gpointer user_data)
 {
 	PilotApplet *applet = user_data;
 	int handle,i;
@@ -770,7 +767,7 @@ restore_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname)
 }
 
 static void
-state_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname)
+state_cb (GtkAction *action, gpointer user_data)
 {
 	PilotApplet *applet = user_data;
 	GnomePilotClient *gpc = applet->gpc;
@@ -794,7 +791,7 @@ state_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname)
 
 
 static void
-restart_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname)
+restart_cb (GtkAction *action, gpointer user_data)
 {
 	PilotApplet *applet = user_data;
 	GtkWidget *dialog;
@@ -824,7 +821,7 @@ restart_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname)
 }
 
 static void
-log_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname)
+log_cb (GtkAction *action, gpointer user_data)
 {
 	PilotApplet *applet = user_data;
 	
@@ -838,21 +835,20 @@ log_cb (BonoboUIComponent *uic, gpointer user_data, const gchar *verbname)
 	}
 }
 
-static const BonoboUIVerb pilot_applet_menu_verbs [] = {
-	BONOBO_UI_VERB ("Restore", restore_cb),
-	BONOBO_UI_VERB ("State", state_cb),
-	BONOBO_UI_VERB ("Restart", restart_cb),
-	BONOBO_UI_VERB ("Log", log_cb),
-	BONOBO_UI_VERB ("Props", properties_cb),
-	BONOBO_UI_VERB ("Help", help_cb),
-	BONOBO_UI_UNSAFE_VERB ("About", about_cb),
-	
-	BONOBO_UI_VERB_END
+static const GtkActionEntry pilot_applet_menu_actions [] = {
+    { "Restore", NULL, N_("_Restore"), NULL, NULL, G_CALLBACK (restore_cb) },
+    { "State", GTK_STOCK_INFO, N_("_State"), NULL, NULL, G_CALLBACK (state_cb) },
+    { "Restart", NULL, N_("R_estart"), NULL, NULL, G_CALLBACK (restart_cb) },
+    { "Log", GTK_STOCK_INFO, N_("_Log"), NULL, NULL, G_CALLBACK (log_cb) },
+    { "Props", GTK_STOCK_PROPERTIES, N_("_Props"), NULL, NULL, G_CALLBACK (properties_cb) },
+    { "Help", GTK_STOCK_HELP, N_("_Help"), NULL, NULL, G_CALLBACK (help_cb) },
+    { "About", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, G_CALLBACK (about_cb) },
 };
 
 static void
 install_popup_menu (PilotApplet *self, gboolean on_off)
 {
+	GtkActionGroup *action_group;        
 	char *menu_xml;
 	/* ensure the label strings are extracted by intltool.  This list of
 	 * strings should match the list in the menu_template below
@@ -861,7 +857,6 @@ install_popup_menu (PilotApplet *self, gboolean on_off)
            _("Preferences...") _("Help") _("About")
 #undef FOO_STRING
 	const char *menu_template = 
-		"<popup name=\"button3\">"
 		"<menuitem name=\"Restore\" verb=\"Restore\" _label=\"Restore...\""
 		"          pixtype=\"stock\" pixname=\"gtk-properties\"/>"
 		"<menuitem name=\"State\" verb=\"State\" _label=\"%s\""
@@ -876,20 +871,24 @@ install_popup_menu (PilotApplet *self, gboolean on_off)
 		"<menuitem name=\"Item 2\" verb=\"Help\" _label=\"Help\""
 		"          pixtype=\"stock\" pixname=\"gtk-help\"/>"
 		"<menuitem name=\"Item 3\" verb=\"About\" _label=\"About\""
-		"          pixtype=\"stock\" pixname=\"gnome-stock-about\"/>"
-		"</popup>";
+		"          pixtype=\"stock\" pixname=\"gnome-stock-about\"/>";
 
 	if (on_off)
 		menu_xml = g_strdup_printf (menu_template, _("Continue"), "refresh");
 	else
 		menu_xml = g_strdup_printf (menu_template, _("Pause Daemon"), "stop");
 
-	panel_applet_setup_menu ( self->applet,
-				  menu_xml,
-				  pilot_applet_menu_verbs,
-				  self);
 
+	action_group = gtk_action_group_new ("GnomePilotApplet Actions");
+	gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE);
+	gtk_action_group_add_actions (action_group,
+	    pilot_applet_menu_actions,
+	    G_N_ELEMENTS (pilot_applet_menu_actions),
+	    self);
+	panel_applet_setup_menu (PANEL_APPLET (self->applet),
+	    menu_xml, action_group);
 	g_free (menu_xml);
+	g_object_unref (action_group);
 }
 
 static void
@@ -1005,7 +1004,7 @@ file_size (char *name)
 static void 
 pilot_draw (PilotApplet *self)
 {
-	if (!GTK_WIDGET_REALIZED (self->image)) {
+    if (!gtk_widget_get_realized (GTK_WIDGET (self->image))) {
 		g_warning ("pilot_draw ! realized");
 		return;
 	}
@@ -1331,7 +1330,7 @@ dnd_drop_internal (GtkWidget        *widget,
 	switch (info)
 	{
 	case TARGET_URI_LIST:
-		names = extract_uris ((gchar *) selection_data->data);
+	    names = extract_uris ((gchar *) gtk_selection_data_get_data(selection_data));
 		for (idx=0; names[idx]; idx++) {
 			/*
 			  if (strstr (file_type (ptr),"text")) {
@@ -1389,7 +1388,7 @@ create_pilot_widgets (GtkWidget *widget, PilotApplet *self)
 	*/
 	self->image = gtk_image_new_from_file (pixmaps[self->curstate]); 
 
-	g_signal_connect   (GTK_OBJECT (widget), "button-press-event", 
+	g_signal_connect   (G_OBJECT (widget), "button-press-event", 
 			    G_CALLBACK (pilot_clicked_cb), self); 
 
 
@@ -1399,11 +1398,11 @@ create_pilot_widgets (GtkWidget *widget, PilotApplet *self)
 
 	self->timeout_handler_id = g_timeout_add (1000,(GSourceFunc)timeout,self); 
 
-	g_signal_connect   (GTK_OBJECT (widget),"destroy", 
+	g_signal_connect   (G_OBJECT (widget),"destroy", 
 			    G_CALLBACK (applet_destroy),self); 
 
-	g_signal_connect   (GTK_OBJECT (widget),"change_background", 
-			    G_CALLBACK (applet_back_change),self); 
+	/* g_signal_connect   (G_OBJECT (widget),"change_background",  */
+	/* 		    G_CALLBACK (applet_back_change),self);  */
 
 	/* FIXME */
 	/* XXX change_orient */
@@ -1416,7 +1415,7 @@ create_pilot_widgets (GtkWidget *widget, PilotApplet *self)
 			   GDK_ACTION_COPY); 
 
 
-	g_signal_connect   (GTK_OBJECT (self->image), 
+	g_signal_connect   (G_OBJECT (self->image), 
 			    "drag_data_received", 
 			    G_CALLBACK (dnd_drop_internal), 
 			    self); 
@@ -1512,15 +1511,13 @@ pilot_applet_factory ( PanelApplet *applet,
 {
 	gboolean retval = FALSE;
 	
-	if (!strcmp (iid, "OAFIID:GNOME_PilotApplet"))
+	if (!strcmp (iid, "PilotApplet"))
 		retval = pilot_applet_fill (applet);
 
 	return retval;
 }
-PANEL_APPLET_BONOBO_FACTORY( "OAFIID:GNOME_PilotApplet_Factory",
+PANEL_APPLET_OUT_PROCESS_FACTORY( "PilotAppletFactory",
 			     PANEL_TYPE_APPLET,
-			     "gnome-pilot",
-			     "0",
-			     (PanelAppletFactoryCallback) pilot_applet_factory,
+			     pilot_applet_factory,
 			     NULL)
 			     
diff --git a/configure.ac b/configure.ac
index f69e559..94bc068 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,8 +2,8 @@ dnl ******************************
 dnl Version
 dnl ******************************
 m4_define([gnome_pilot_major], [2])
-m4_define([gnome_pilot_revision], [95])
-m4_define([gnome_pilot_patchlevel], [5])
+m4_define([gnome_pilot_revision], [91])
+m4_define([gnome_pilot_patchlevel], [91])
 m4_define([gnome_pilot_version], 
 	[gnome_pilot_major.gnome_pilot_revision.gnome_pilot_patchlevel])
 
@@ -119,12 +119,17 @@ dnl ******************************
 LIBXML_REQUIRED="libxml-2.0"
 LIBGTK_REQUIRED="gtk+-3.0 >= 2.99.2"
 DBUS_GLIB_REQUIRED="dbus-glib-1 >= 0.74"
-LIBPANELAPPLET_REQUIRED="libpanelapplet-2.0 >= 2.0.6"
+LIBPANELAPPLET_REQUIRED="libpanelapplet-4.0"
 GCONF_REQUIRED="gconf-2.0"
 GUDEV_REQUIRED="gudev-1.0"
 DBUS_REQUIRED="dbus-glib-1 >= 0.31"
 
-
+dnl *********************************
+dnl take panel_applet_dir, but make it relocateable for 'make distcheck'...
+dnl this is pretty hacky, and assumes libpanel_applet_dir is ...../share/...
+dnl *********************************
+LIBPANEL_APPLET_DIR_SUFFIX=`$PKG_CONFIG --variable=libpanel_applet_dir libpanelapplet-4.0 | sed -re 's#^.+/share##' `
+AC_SUBST(LIBPANEL_APPLET_DIR_SUFFIX)
 
 PKG_CHECK_MODULES(GNOME_PILOT, 
 [
@@ -237,6 +242,7 @@ dnl Create files.
 AC_CONFIG_FILES([
 Makefile 
 gpilotd/Makefile
+applet/Makefile
 conduits/Makefile
 conduits/backup/Makefile
 conduits/evolution-data-server/Makefile
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6c29702..5001c5f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,10 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
+[type: gettext/glade]applet/pilot-applet.ui
+applet/org.gnome.panel.applet.PilotAppletFactory.service.in
+applet/org.gnome.applets.PilotApplet.panel-applet.in.in
+applet/pilot.c
+applet/pilot.schemas.in
 capplet/gnome-pilot-capplet.c
 capplet/gnome-pilot-cdialog.c
 capplet/gnome-pilot-assistant.c



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]