Commit 021dceff authored by Alexander Larsson's avatar Alexander Larsson
Browse files

Bring clock applet back to life in gnome 2.

parent 13e1ae75
2001-11-23 Alexander Larsson <alla@lysator.liu.se>
* Makefile.am:
Build gen_util
* gen_util/Makefile.am:
* gen_util/clock.[ch]:
* gen_util/main.c:
Convert to new applet API and gnome 2.
* gen_util/GNOME_GenUtilApplet_Factory.server.in.in:
New oaf file for the applets.
2001-10-17 Kjartan Maraas <kmaraas@gnome.org>
* gen_util/clock_applet.desktop: Use gnome-clock.png as icon.
......
SUBDIRS = \
fish
gen_util \
fish
EXTRA_SUBDIRS = \
applet-dirs \
desk-guide \
gen_util \
tasklist
2001-11-23 Alexander Larsson <alla@lysator.liu.se>
* Makefile.am:
Build gen_util
* gen_util/Makefile.am:
* gen_util/clock.[ch]:
* gen_util/main.c:
Convert to new applet API and gnome 2.
* gen_util/GNOME_GenUtilApplet_Factory.server.in.in:
New oaf file for the applets.
2001-10-17 Kjartan Maraas <kmaraas@gnome.org>
* gen_util/clock_applet.desktop: Use gnome-clock.png as icon.
......
<oaf_info>
<oaf_server iid="OAFIID:GNOME_GenUtilApplet_Factory"
type="shlib"
location="@APPLET_LIBDIR@/libgen_util_applet-2.so">
<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="GenUtil Applet Factory"/>
<oaf_attribute name="description" type="string" value="factory for creating some general applets"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_ClockApplet"
type="factory"
location="OAFIID:GNOME_GenUtilApplet_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Control:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="ClockApplet"/>
<oaf_attribute name="description" type="string" value="Clock Applet"/>
</oaf_server>
</oaf_info>
SUBDIRS = help
#SUBDIRS = help
INCLUDES = -I. -I$(srcdir) \
-I$(top_srcdir)/intl -I$(top_builddir)/intl \
-I$(top_srcdir)/intl \
-I$(top_builddir)/intl \
-I$(srcdir)/../../panel \
-I$(top_builddir)/panel \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-I$(includedir) $(GNOME_INCLUDEDIR)
-I$(includedir) \
$(GNOME_INCLUDEDIR) \
$(WARN_CFLAGS) \
$(PANEL_CFLAGS)
lib_LTLIBRARIES = libgen_util_applet.la
libgen_util_applet_la_SOURCES = \
libgen_util_applet_2_la_SOURCES = \
main.c \
mailcheck.c \
mailcheck.h \
popcheck.c \
popcheck.h \
printer.c \
printer.h \
clock.c \
clock.h \
remote-helper.c \
remote-helper.h
clock.h
PRINTER_BITMAPS = print.xpm
MAILCHECK_BITMAPS = email.png email-e.png tux-anim.png email-eclouds.png \
email-tiny.png eclouds.png
# mailcheck.c \
# mailcheck.h \
# popcheck.c \
# popcheck.h \
# printer.c \
# printer.h \
# remote-helper.c \
# remote-helper.h \
EXTRA_DIST = clock_applet.desktop \
mailcheck_applet.desktop \
mailcheck.soundlist \
printer.desktop \
$(PRINTER_BITMAPS) \
$(MAILCHECK_BITMAPS) \
gen_util.gnorba
libgen_util_applet_2_la_LIBADD = \
../../panel/libpanel-applet-2.la \
$(PANEL_LIBS)
mailcheckbitmapsdir = $(datadir)/pixmaps/mailcheck
mailcheckbitmaps_DATA = $(MAILCHECK_BITMAPS)
appletdir = $(libdir)
applet_LTLIBRARIES = libgen_util_applet-2.la
clocksysdir = $(datadir)/applets/Clocks
clocksys_DATA = clock_applet.desktop
GNOME_GenUtilApplet_Factory.server.in: GNOME_GenUtilApplet_Factory.server.in.in
sed -e "s|\@APPLET_LIBDIR\@|$(appletdir)|" $< > $@
malchecksysdir = $(datadir)/applets/Network
malchecksys_DATA = mailcheck_applet.desktop
PRINTER_BITMAPS = print.xpm
MAILCHECK_BITMAPS = email.png email-e.png tux-anim.png email-eclouds.png \
email-tiny.png eclouds.png
printersysdir = $(datadir)/applets/Utility
printersys_DATA = printer.desktop
EXTRA_DIST = GNOME_GenUtilApplet_Factory.in.in \
$(PRINTER_BITMAPS) \
$(MAILCHECK_BITMAPS)
genutilgnorbadir = $(sysconfdir)/CORBA/servers
genutilgnorba_DATA = gen_util.gnorba
serverdir = $(libdir)/bonobo/servers
server_in_files = GNOME_GenUtilApplet_Factory.server.in
server_DATA = $(server_in_files:.server.in=.server)
soundlistdir = $(sysconfdir)/sound/events
soundlist_DATA = mailcheck.soundlist
@INTLTOOL_SERVER_RULE@
mailcheckbitmapsdir = $(datadir)/pixmaps/mailcheck
mailcheckbitmaps_DATA = $(MAILCHECK_BITMAPS)
This diff is collapsed.
2001-11-23 Alexander Larsson <alla@lysator.liu.se>
* Makefile.am:
Build gen_util
* gen_util/Makefile.am:
* gen_util/clock.[ch]:
* gen_util/main.c:
Convert to new applet API and gnome 2.
* gen_util/GNOME_GenUtilApplet_Factory.server.in.in:
New oaf file for the applets.
2001-10-17 Kjartan Maraas <kmaraas@gnome.org>
* gen_util/clock_applet.desktop: Use gnome-clock.png as icon.
......
<oaf_info>
<oaf_server iid="OAFIID:GNOME_GenUtilApplet_Factory"
type="shlib"
location="@APPLET_LIBDIR@/libgen_util_applet-2.so">
<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="GenUtil Applet Factory"/>
<oaf_attribute name="description" type="string" value="factory for creating some general applets"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_ClockApplet"
type="factory"
location="OAFIID:GNOME_GenUtilApplet_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Control:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="ClockApplet"/>
<oaf_attribute name="description" type="string" value="Clock Applet"/>
</oaf_server>
</oaf_info>
SUBDIRS = help
#SUBDIRS = help
INCLUDES = -I. -I$(srcdir) \
-I$(top_srcdir)/intl -I$(top_builddir)/intl \
-I$(top_srcdir)/intl \
-I$(top_builddir)/intl \
-I$(srcdir)/../../panel \
-I$(top_builddir)/panel \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-I$(includedir) $(GNOME_INCLUDEDIR)
-I$(includedir) \
$(GNOME_INCLUDEDIR) \
$(WARN_CFLAGS) \
$(PANEL_CFLAGS)
lib_LTLIBRARIES = libgen_util_applet.la
libgen_util_applet_la_SOURCES = \
libgen_util_applet_2_la_SOURCES = \
main.c \
mailcheck.c \
mailcheck.h \
popcheck.c \
popcheck.h \
printer.c \
printer.h \
clock.c \
clock.h \
remote-helper.c \
remote-helper.h
clock.h
PRINTER_BITMAPS = print.xpm
MAILCHECK_BITMAPS = email.png email-e.png tux-anim.png email-eclouds.png \
email-tiny.png eclouds.png
# mailcheck.c \
# mailcheck.h \
# popcheck.c \
# popcheck.h \
# printer.c \
# printer.h \
# remote-helper.c \
# remote-helper.h \
EXTRA_DIST = clock_applet.desktop \
mailcheck_applet.desktop \
mailcheck.soundlist \
printer.desktop \
$(PRINTER_BITMAPS) \
$(MAILCHECK_BITMAPS) \
gen_util.gnorba
libgen_util_applet_2_la_LIBADD = \
../../panel/libpanel-applet-2.la \
$(PANEL_LIBS)
mailcheckbitmapsdir = $(datadir)/pixmaps/mailcheck
mailcheckbitmaps_DATA = $(MAILCHECK_BITMAPS)
appletdir = $(libdir)
applet_LTLIBRARIES = libgen_util_applet-2.la
clocksysdir = $(datadir)/applets/Clocks
clocksys_DATA = clock_applet.desktop
GNOME_GenUtilApplet_Factory.server.in: GNOME_GenUtilApplet_Factory.server.in.in
sed -e "s|\@APPLET_LIBDIR\@|$(appletdir)|" $< > $@
malchecksysdir = $(datadir)/applets/Network
malchecksys_DATA = mailcheck_applet.desktop
PRINTER_BITMAPS = print.xpm
MAILCHECK_BITMAPS = email.png email-e.png tux-anim.png email-eclouds.png \
email-tiny.png eclouds.png
printersysdir = $(datadir)/applets/Utility
printersys_DATA = printer.desktop
EXTRA_DIST = GNOME_GenUtilApplet_Factory.in.in \
$(PRINTER_BITMAPS) \
$(MAILCHECK_BITMAPS)
genutilgnorbadir = $(sysconfdir)/CORBA/servers
genutilgnorba_DATA = gen_util.gnorba
serverdir = $(libdir)/bonobo/servers
server_in_files = GNOME_GenUtilApplet_Factory.server.in
server_DATA = $(server_in_files:.server.in=.server)
soundlistdir = $(sysconfdir)/sound/events
soundlist_DATA = mailcheck.soundlist
@INTLTOOL_SERVER_RULE@
mailcheckbitmapsdir = $(datadir)/pixmaps/mailcheck
mailcheckbitmaps_DATA = $(MAILCHECK_BITMAPS)
This diff is collapsed.
......@@ -11,10 +11,10 @@
#ifndef _CLOCK_H_
#define _CLOCK_H_
BEGIN_GNOME_DECLS
G_BEGIN_DECLS
GtkWidget * make_clock_applet(const gchar *goad_id);
BonoboObject *make_clock_applet(void);
END_GNOME_DECLS
G_END_DECLS
#endif
......@@ -16,111 +16,37 @@
#include <dirent.h>
#include <string.h>
#include <time.h>
#include <gnome.h>
#include <gdk/gdkx.h>
#include <applet-widget.h>
#include "mailcheck.h"
#include "clock.h"
#include "printer.h"
static GtkWidget *
make_new_applet(const gchar *goad_id)
{
if(strstr(goad_id,"gen_util_mailcheck"))
return make_mailcheck_applet(goad_id);
else if(strstr(goad_id,"gen_util_printer"))
return make_printer_applet(goad_id);
else if(strstr(goad_id,"gen_util_clock"))
return make_clock_applet(goad_id);
#include <panel-applet.h>
return NULL;
}
#if 1
#include <gtk/gtk.h>
#include <libbonobo.h>
#include <libgnomeui/libgnomeui.h>
#include <libgnome/libgnome.h>
#include <bonobo/bonobo-shlib-factory.h>
static CORBA_Object
activator (PortableServer_POA poa,
const char *goad_id,
const char **params,
gpointer *impl_ptr,
CORBA_Environment *ev)
{
GtkWidget *widget;
widget = make_new_applet (goad_id);
if (widget == NULL) {
g_warning (_("Don't know how to activate `%s'\n"), goad_id);
return CORBA_OBJECT_NIL;
}
return applet_widget_corba_activate (widget, poa, goad_id,
params, impl_ptr, ev);
}
static void
deactivator (PortableServer_POA poa,
const char *goad_id,
gpointer impl_ptr,
CORBA_Environment *ev)
{
applet_widget_corba_deactivate (poa, goad_id, impl_ptr, ev);
}
static const char *repo_id[]={ "IDL:GNOME/Applet:1.0", NULL };
static GnomePluginObject applets_list[] = {
{ repo_id, "gen_util_mailcheck", NULL, "Mailcheck applet",
&activator, &deactivator },
{ repo_id, "gen_util_printer", NULL, "Printer applet",
&activator, &deactivator },
{ repo_id, "gen_util_clock", NULL, "Clock applet",
&activator, &deactivator },
{ NULL }
};
GnomePlugin GNOME_Plugin_info = {
applets_list,
NULL
};
//#include "mailcheck.h"
#include "clock.h"
//#include "printer.h"
#else
/*when we get a command to start a new widget*/
static GtkWidget *
applet_start_new_applet(const gchar *goad_id, const char **params, int nparams)
{
return make_new_applet(goad_id);
}
int
main(int argc, char **argv)
static BonoboObject *
genutil_factory (BonoboGenericFactory *this,
const gchar *iid,
gpointer data)
{
const gchar *goad_id;
/*this is needed for printer applet*/
struct sigaction sa;
sa.sa_handler = SIG_IGN;
sa.sa_flags = SA_NOCLDSTOP;
sigemptyset (&sa.sa_mask);
sigaction (SIGCHLD, &sa, NULL);
BonoboObject *applet = NULL;
/* Initialize the i18n stuff */
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
g_print ("genutil_factory: %s\n", iid);
applet_widget_init("gen_util_applet", VERSION, argc, argv,
NULL, 0, NULL);
applet_factory_new("gen_util_applet", NULL, applet_start_new_applet);
if (!strcmp (iid, "OAFIID:GNOME_ClockApplet"))
applet = make_clock_applet();
goad_id = goad_server_activation_id();
if(!goad_id)
goad_id = "gen_util_clock"; /* badhack */
if(strcmp(goad_id, "gen_util_applet")) /* Only do if factory wasn't requested (odd) */
make_new_applet(goad_id);
return applet;
}
applet_widget_gtk_main();
BONOBO_ACTIVATION_SHLIB_FACTORY ("OAFIID:GNOME_GenUtilApplet_Factory",
"GenUtil Applet factory",
genutil_factory, NULL);
return 0;
}
#endif
2001-11-23 Alexander Larsson <alla@lysator.liu.se>
* Makefile.am:
Build gen_util
* gen_util/Makefile.am:
* gen_util/clock.[ch]:
* gen_util/main.c:
Convert to new applet API and gnome 2.
* gen_util/GNOME_GenUtilApplet_Factory.server.in.in:
New oaf file for the applets.
2001-10-17 Kjartan Maraas <kmaraas@gnome.org>
* gen_util/clock_applet.desktop: Use gnome-clock.png as icon.
......
<oaf_info>
<oaf_server iid="OAFIID:GNOME_GenUtilApplet_Factory"
type="shlib"
location="@APPLET_LIBDIR@/libgen_util_applet-2.so">
<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="GenUtil Applet Factory"/>
<oaf_attribute name="description" type="string" value="factory for creating some general applets"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_ClockApplet"
type="factory"
location="OAFIID:GNOME_GenUtilApplet_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Control:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="ClockApplet"/>
<oaf_attribute name="description" type="string" value="Clock Applet"/>
</oaf_server>
</oaf_info>
SUBDIRS = help
#SUBDIRS = help
INCLUDES = -I. -I$(srcdir) \
-I$(top_srcdir)/intl -I$(top_builddir)/intl \
-I$(top_srcdir)/intl \
-I$(top_builddir)/intl \
-I$(srcdir)/../../panel \
-I$(top_builddir)/panel \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-I$(includedir) $(GNOME_INCLUDEDIR)
-I$(includedir) \
$(GNOME_INCLUDEDIR) \
$(WARN_CFLAGS) \
$(PANEL_CFLAGS)
lib_LTLIBRARIES = libgen_util_applet.la
libgen_util_applet_la_SOURCES = \
libgen_util_applet_2_la_SOURCES = \
main.c \
mailcheck.c \
mailcheck.h \
popcheck.c \
popcheck.h \
printer.c \
printer.h \
clock.c \
clock.h \
remote-helper.c \
remote-helper.h
clock.h
PRINTER_BITMAPS = print.xpm
MAILCHECK_BITMAPS = email.png email-e.png tux-anim.png email-eclouds.png \
email-tiny.png eclouds.png
# mailcheck.c \
# mailcheck.h \
# popcheck.c \
# popcheck.h \
# printer.c \
# printer.h \
# remote-helper.c \
# remote-helper.h \
EXTRA_DIST = clock_applet.desktop \
mailcheck_applet.desktop \
mailcheck.soundlist \
printer.desktop \
$(PRINTER_BITMAPS) \
$(MAILCHECK_BITMAPS) \
gen_util.gnorba
libgen_util_applet_2_la_LIBADD = \
../../panel/libpanel-applet-2.la \
$(PANEL_LIBS)
mailcheckbitmapsdir = $(datadir)/pixmaps/mailcheck
mailcheckbitmaps_DATA = $(MAILCHECK_BITMAPS)
appletdir = $(libdir)
applet_LTLIBRARIES = libgen_util_applet-2.la
clocksysdir = $(datadir)/applets/Clocks
clocksys_DATA = clock_applet.desktop
GNOME_GenUtilApplet_Factory.server.in: GNOME_GenUtilApplet_Factory.server.in.in
sed -e "s|\@APPLET_LIBDIR\@|$(appletdir)|" $< > $@
malchecksysdir = $(datadir)/applets/Network
malchecksys_DATA = mailcheck_applet.desktop
PRINTER_BITMAPS = print.xpm
MAILCHECK_BITMAPS = email.png email-e.png tux-anim.png email-eclouds.png \
email-tiny.png eclouds.png
printersysdir = $(datadir)/applets/Utility
printersys_DATA = printer.desktop
EXTRA_DIST = GNOME_GenUtilApplet_Factory.in.in \
$(PRINTER_BITMAPS) \
$(MAILCHECK_BITMAPS)
genutilgnorbadir = $(sysconfdir)/CORBA/servers
genutilgnorba_DATA = gen_util.gnorba
serverdir = $(libdir)/bonobo/servers
server_in_files = GNOME_GenUtilApplet_Factory.server.in
server_DATA = $(server_in_files:.server.in=.server)
soundlistdir = $(sysconfdir)/sound/events
soundlist_DATA = mailcheck.soundlist
@INTLTOOL_SERVER_RULE@
mailcheckbitmapsdir = $(datadir)/pixmaps/mailcheck
mailcheckbitmaps_DATA = $(MAILCHECK_BITMAPS)
2001-11-23 Alexander Larsson <alla@lysator.liu.se>
* Makefile.am:
Build gen_util
* gen_util/Makefile.am:
* gen_util/clock.[ch]:
* gen_util/main.c:
Convert to new applet API and gnome 2.
* gen_util/GNOME_GenUtilApplet_Factory.server.in.in:
New oaf file for the applets.
2001-10-17 Kjartan Maraas <kmaraas@gnome.org>
* gen_util/clock_applet.desktop: Use gnome-clock.png as icon.
......
......@@ -408,6 +408,7 @@ smproxy/Makefile
pixmaps/Makefile
applets/Makefile
applets/fish/Makefile
applets/gen_util/Makefile
])
dnl panel/config/Makefile
......