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

Jasper Huijsmans <[email protected]>
Newsgroups gmane.comp.desktop.xfce.goodies.devel
Message-ID <[email protected]>
Jasper Huijsmans schreef:
> Jannis Pohlmann schreef:
>> On Sat, 11 Feb 2006 23:50:04 +0900
>> Daichi Kawahata <[email protected]> wrote:
>>
>>> On Sat, 11 Feb 2006 23:39:04 +0900
>>> Daichi Kawahata wrote:
>>>
>>>> Verve causes segfault against the xfce4-panel 4.3.28
>>> No, it was a bus error actually on IRIX 6.5 (big endian)
>>> by verve-plugin 0.1.0 (rev. 1030).
>>
>> So it's not due to a problem in the verve-plugin?
>>
> 
> Why is this an internal plugin? Plugins should be external unless there 
> is a very good reason for it not to be. I specifically created this 
> possibility so that plugins would not crash the panel :(
> 

How about the attached patch? I can commit it if you agree.

	Jasper
verve-external.patch (text/plain, 3 KB)
Index: panel-plugin/verve-plugin.c
===================================================================
--- panel-plugin/verve-plugin.c	(revision 1034)
+++ panel-plugin/verve-plugin.c	(working copy)
@@ -431,6 +431,6 @@
   g_signal_connect (plugin, "size-changed", G_CALLBACK (verve_plugin_update_size), verve);
 }
  
-XFCE_PANEL_PLUGIN_REGISTER_INTERNAL (verve_plugin_construct);
+XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (verve_plugin_construct);
 
 /* vim:set expandtab ts=1 sw=2: */
Index: panel-plugin/Makefile.am
===================================================================
--- panel-plugin/Makefile.am	(revision 1034)
+++ panel-plugin/Makefile.am	(working copy)
@@ -1,16 +1,9 @@
 # $Id$
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libexecdir)/xfce4/panel-plugins
+plugin_PROGRAMS = xfce4-verve-plugin
 
-plugin_LTLIBRARIES =							\
-	libverveplugin.la
-
-libverveplugin_la_LDFLAGS =						\
-	-avoid-version							\
-	-export-dynamic							\
-	-module
-
-libverveplugin_la_SOURCES =						\
+xfce4_verve_plugin_SOURCES =						\
 	verve-plugin.c							\
 	../verve/verve.c						\
 	../verve/verve-db.c						\
@@ -21,31 +14,41 @@
 	../verve/verve-history.h					\
 	../verve/verve-env.h
 
-libverveplugin_la_CFLAGS = 						\
+xfce4_verve_plugin_CFLAGS = 						\
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"				\
 	@LIBEXO_CFLAGS@							\
 	@LIBXFCE4PANEL_CFLAGS@						\
 	@LIBXFCE4UTIL_CFLAGS@						\
 	@LIBPCRE_CFLAGS@						
 
-libverveplugin_la_LIBADD = 						\
+xfce4_verve_plugin_LDFLAGS = 						\
 	@LIBEXO_LIBS@							\
 	@LIBXFCE4PANEL_LIBS@						\
 	@LIBXFCE4UTIL_LIBS@						\
 	@LIBPCRE_LIBS@
 
-%.desktop.in: %.desktop.in.in
-	sed -e "s^@INTERNAL_PLUGIN_PATH@^$(libdir)/xfce4/panel-plugins^"  < $< > $@
-
+# .desktop file
+#
+# Some automake trickery here. Because we cannot use $(libexecdir) in the
+# automake stage, we'll use sed to get the full path into the .desktop file.
+# We also need to let intltool merge the translated fields, so we add an
+# additional level of indirection: a <name>.desktop.in.in file.
+# 
 desktop_in_in_files = verve.desktop.in.in
 desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
-
+	
 desktopdir = $(datadir)/xfce4/panel-plugins
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
-EXTRA_DIST =								\
+EXTRA_DIST = 								\
 	$(desktop_in_in_files)
 
 DISTCLEANFILES =							\
-	$(desktop_DATA) $(desktop_in_files)		
+	$(desktop_DATA) $(desktop_in_files)
+	
+# get full path into .desktop file
+%.desktop.in: %.desktop.in.in
+	sed -e "s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^" \
+		$< > $@
+
Index: panel-plugin/verve.desktop.in.in
===================================================================
--- panel-plugin/verve.desktop.in.in	(revision 1034)
+++ panel-plugin/verve.desktop.in.in	(working copy)
@@ -4,5 +4,5 @@
 _Name=Verve Command Line
 _Comment=Command line interface with auto-completion and history browsing
 Icon=Terminal
-X-XFCE-Module=@INTERNAL_PLUGIN_PATH@/libverveplugin.so
+X-XFCE-Exec=@PLUGIN_PATH@/xfce4-verve-plugin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.