clock applet "fix"



Hey,

Here's a little patch that makes the clock applet an OOP component. 
This way the clock still works even if the panel is hung. :)

Thanks,
James
? panel_jwillcox_clock_oop_v1.diff
? xmldocs.make
? applets/clock/.clock.c.swp
? applets/clock/gnome-clock-applet
? applets/clock/gnome-panel-clock
Index: applets/clock/GNOME_ClockApplet_Factory.server.in.in
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/GNOME_ClockApplet_Factory.server.in.in,v
retrieving revision 1.21
diff -u -r1.21 GNOME_ClockApplet_Factory.server.in.in
--- applets/clock/GNOME_ClockApplet_Factory.server.in.in	8 May 2003 15:26:57 -0000	1.21
+++ applets/clock/GNOME_ClockApplet_Factory.server.in.in	24 Jul 2003 19:37:34 -0000
@@ -1,8 +1,8 @@
 <oaf_info>
 
 <oaf_server iid="OAFIID:GNOME_ClockApplet_Factory"
-	    type="shlib"
-	    location="@APPLET_LIBDIR@/libclock-applet-2">
+	    type="exe"
+	    location="@APPLET_LIBEXECDIR@/gnome-clock-applet">
 
 	<oaf_attribute name="repo_ids" type="stringv">
 		<item value="IDL:Bonobo/GenericFactory:1.0"/>
Index: applets/clock/Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/Makefile.am,v
retrieving revision 1.65
diff -u -r1.65 Makefile.am
--- applets/clock/Makefile.am	14 May 2003 15:03:54 -0000	1.65
+++ applets/clock/Makefile.am	24 Jul 2003 19:37:34 -0000
@@ -26,20 +26,18 @@
 	egg-screen-url.h        \
 	egg-screen-url.c
 
-libclock_applet_2_la_SOURCES = \
+libexec_PROGRAMS = gnome-clock-applet
+
+gnome_clock_applet_SOURCES = \
 	clock.c \
 	$(EGGFILES)
 
-libclock_applet_2_la_LDFLAGS = -module -avoid-version -no-undefined
-libclock_applet_2_la_LIBADD =			\
+gnome_clock_applet_LDADD =			\
 	../../libpanel-applet/libpanel-applet-2.la	\
 	$(CLOCK_LIBS)
 
-appletdir = $(libdir)
-applet_LTLIBRARIES = libclock-applet-2.la
-
 GNOME_ClockApplet_Factory.server.in: GNOME_ClockApplet_Factory.server.in.in
-	sed -e "s|\ APPLET_LIBDIR\@|$(appletdir)|" $< > $@
+	sed -e "s|\ APPLET_LIBEXECDIR\@|$(libexecdir)|" $< > $@
 
 uidir 	= $(datadir)/gnome-2.0/ui
 ui_DATA	= GNOME_ClockApplet.xml	
Index: applets/clock/clock.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/clock/clock.c,v
retrieving revision 1.110
diff -u -r1.110 clock.c
--- applets/clock/clock.c	22 Jul 2003 00:52:45 -0000	1.110
+++ applets/clock/clock.c	24 Jul 2003 19:37:34 -0000
@@ -1636,8 +1636,9 @@
 	return retval;
 }
 
-PANEL_APPLET_BONOBO_SHLIB_FACTORY ("OAFIID:GNOME_ClockApplet_Factory",
-				   PANEL_TYPE_APPLET,
-				   "Clock Applet factory",
-				   clock_factory, NULL);
+PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_ClockApplet_Factory",
+			     PANEL_TYPE_APPLET,
+			     "Clock Applet factory",
+			     VERSION,
+			     clock_factory, NULL);
 


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