Re: ANNOUNCE: Verve 0.1.0 - A panel command line plugin

Daichi Kawahata <[email protected]> Wed, 15 Feb 2006 07:03:07 +0900
Newsgroups gmane.comp.desktop.xfce.goodies.devel
Message-ID <[email protected]>
On Tue, 14 Feb 2006 22:00:56 +0100
Jannis Pohlmann wrote:

> > > > and a property dialog keeps showing English as-is (confirmed
> > > > GETTEXT_PACKAGE is "verve-plugin", a message object located
> > > > in the "/usr/local/share/locale/ja/LC_MESSAGES/verve-plugin.mo").
> > > 
> > > I'm still having this problem, too. Any ideas what might cause
> > > this? Do I have to call g_set_application_name or something like
> > > that when running it as an external plugin?
> > 
> > You forgot to include <config.h>
> 
> True. But after adding it to verve-plugin.c, nothing changed. I still
> don't get the correct translation.

Hmm, by including that missing header, it gets worked here (verve.jpg),
thanks Jasper. For what it's worth, I attach a patch just being added
a function xfce_panel_plugin_menu_show_configure() in it (ignore the
others, nothing but a style change).

Regards,
-- 
Daichi

Language Codes: http://www.w3.org/WAI/ER/IG/ert/iso639.htm
Country Codes: http://www.ics.uci.edu/pub/ietf/http/related/iso3166.txt
verve.jpg (image/jpeg, 9.2 KB) - not displayed
verve.patch (text/x-patch, 1.7 KB)
Index: panel-plugin/verve-plugin.c
===================================================================
--- panel-plugin/verve-plugin.c	(revision 1055)
+++ panel-plugin/verve-plugin.c	(working copy)
@@ -22,6 +22,10 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <glib.h>
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
@@ -398,19 +402,21 @@
 static void
 verve_plugin_construct (XfcePanelPlugin *plugin)
 {
- 	xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
  	
- 	VervePlugin *verve = verve_plugin_new (plugin);
+  VervePlugin *verve = verve_plugin_new (plugin);
 
+  xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
+
   verve_plugin_read_rc_file (plugin, verve);
  
- 	gtk_container_add (GTK_CONTAINER (plugin), verve->event_box);
+  gtk_container_add (GTK_CONTAINER (plugin), verve->event_box);
   
- 	xfce_panel_plugin_add_action_widget (plugin, verve->event_box);
+  xfce_panel_plugin_add_action_widget (plugin, verve->event_box);
   xfce_panel_plugin_menu_show_configure (plugin);
  
- 	g_signal_connect (plugin, "save", G_CALLBACK (verve_plugin_write_rc_file), verve);
- 	g_signal_connect (plugin, "free-data", G_CALLBACK (verve_plugin_free), verve);
+  g_signal_connect (plugin, "save", G_CALLBACK (verve_plugin_write_rc_file), verve);
+  g_signal_connect (plugin, "free-data", G_CALLBACK (verve_plugin_free), verve);
+  xfce_panel_plugin_menu_show_configure(plugin);
   g_signal_connect (plugin, "configure-plugin", G_CALLBACK (verve_plugin_properties), verve);
   g_signal_connect (plugin, "size-changed", G_CALLBACK (verve_plugin_update_size), verve);
 }