Commit 3c4e2640 authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz
Browse files

make it possible to compile as an in-process applet ditto, and set icons

2006-08-08  Vincent Untz  <vuntz@gnome.org>

	* GNOME_ClockApplet_Factory.server.in.in:
	* Makefile.am: make it possible to compile as an in-process applet
	* clock.c: ditto, and set icons for all dialogs since the default icon
	can only be set if the applet is out of process, also remove useless
	includes
parent f8d4487f
2006-08-08 Vincent Untz <vuntz@gnome.org>
* GNOME_ClockApplet_Factory.server.in.in:
* Makefile.am: make it possible to compile as an in-process applet
* clock.c: ditto, and set icons for all dialogs since the default icon
can only be set if the applet is out of process, also remove useless
includes
==================== 2.15.91 ====================
2006-08-08 Vincent Untz <vuntz@gnome.org>
......
<oaf_info>
<oaf_server iid="OAFIID:GNOME_ClockApplet_Factory"
type="exe"
location="@LIBEXECDIR@/clock-applet">
type="@TYPE@"
location="@LOCATION@">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/GenericFactory:1.0"/>
......
......@@ -20,13 +20,29 @@ CALENDAR_SOURCES = \
calendar-debug.h
endif
clock_applet_SOURCES = clock.c $(CALENDAR_SOURCES)
CLOCK_SOURCES = clock.c $(CALENDAR_SOURCES)
clock_applet_LDADD = \
CLOCK_LDADD = \
../../libpanel-applet/libpanel-applet-2.la \
$(CLOCK_LIBS)
if CLOCK_INPROCESS
APPLET_TYPE = shlib
APPLET_LOCATION = $(libdir)/libclock-applet.so
lib_LTLIBRARIES = libclock-applet.la
libclock_applet_la_SOURCES = $(CLOCK_SOURCES)
libclock_applet_la_LIBADD = $(CLOCK_LDADD)
libclock_applet_la_CFLAGS =
else
APPLET_TYPE = exe
APPLET_LOCATION = $(libexecdir)/clock-applet
libexec_PROGRAMS = clock-applet
clock_applet_SOURCES = $(CLOCK_SOURCES)
clock_applet_LDADD = $(CLOCK_LDADD)
clock_applet_CFLAGS =
endif
uidir = $(datadir)/gnome-2.0/ui
ui_DATA = GNOME_ClockApplet.xml
......@@ -35,8 +51,9 @@ serverdir = $(libdir)/bonobo/servers
server_in_files = GNOME_ClockApplet_Factory.server.in
server_DATA = $(server_in_files:.server.in=.server)
$(server_in_files): $(server_in_files).in
sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
$(server_in_files): $(server_in_files).in Makefile
sed -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
-e "s|\@TYPE\@|$(APPLET_TYPE)|" \
-e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
$< > $@
......
......@@ -54,16 +54,15 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <libbonobo.h>
#include <gconf/gconf-client.h>
#include <libgnomeui/gnome-help.h>
#include <libgnome/gnome-init.h>
#include <libgnomeui/gnome-url.h>
#ifdef HAVE_LIBECAL
#include "calendar-client.h"
#endif
#define CLOCK_ICON "gnome-panel-clock"
#define INTERNETSECOND (864)
#define INTERNETBEAT (86400)
......@@ -1442,6 +1441,7 @@ create_calendar (ClockData *cd,
struct tm *tm;
window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
gtk_window_set_icon_name (window, CLOCK_ICON);
gtk_window_set_screen (window, screen);
frame = gtk_frame_new (NULL);
......@@ -1949,7 +1949,8 @@ try_config_tool (GdkScreen *screen,
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
gtk_window_set_icon_name (GTK_WINDOW (dialog), CLOCK_ICON);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_window_set_screen (GTK_WINDOW (dialog), screen);
......@@ -1986,6 +1987,7 @@ config_date (BonoboUIComponent *uic,
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
gtk_window_set_icon_name (GTK_WINDOW (dialog), CLOCK_ICON);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_window_set_screen (GTK_WINDOW (dialog), screen);
......@@ -2351,7 +2353,9 @@ fill_clock_applet (PanelApplet *applet)
gtk_container_set_border_width (GTK_CONTAINER (cd->toggle), 0);
gtk_container_add (GTK_CONTAINER (cd->applet), cd->toggle);
gtk_window_set_default_icon_name ("gnome-panel-clock");
#ifndef CLOCK_INPROCESS
gtk_window_set_default_icon_name (CLOCK_ICON);
#endif
gtk_widget_show (cd->applet);
/* FIXME: Update this comment. */
......@@ -2589,6 +2593,8 @@ properties_response_cb (GtkWidget *widget,
G_CALLBACK (gtk_widget_destroy),
NULL);
gtk_window_set_icon_name (GTK_WINDOW (dialog),
CLOCK_ICON);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_window_set_screen (GTK_WINDOW (dialog),
gtk_widget_get_screen (cd->applet));
......@@ -2624,6 +2630,7 @@ display_properties_dialog (BonoboUIComponent *uic,
GTK_RESPONSE_CLOSE,
NULL);
gtk_window_set_icon_name (GTK_WINDOW (cd->props), CLOCK_ICON);
gtk_dialog_set_has_separator (GTK_DIALOG (cd->props), FALSE);
gtk_dialog_set_default_response (GTK_DIALOG (cd->props), GTK_RESPONSE_CLOSE);
gtk_window_set_resizable (GTK_WINDOW (cd->props), FALSE);
......@@ -2763,6 +2770,7 @@ display_help_dialog (BonoboUIComponent *uic,
G_CALLBACK (gtk_widget_destroy),
NULL);
gtk_window_set_icon_name (GTK_WINDOW (dialog), CLOCK_ICON);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_window_set_screen (GTK_WINDOW (dialog),
gtk_widget_get_screen (cd->applet));
......@@ -2804,9 +2812,10 @@ display_about_dialog (BonoboUIComponent *uic,
"authors", authors,
"documenters", documenters,
"translator-credits", _("translator-credits"),
"logo-icon-name", "gnome-panel-clock",
"logo-icon-name", CLOCK_ICON,
NULL);
gtk_window_set_icon_name (GTK_WINDOW (cd->about), CLOCK_ICON);
gtk_window_set_wmclass (GTK_WINDOW (cd->about), "clock", "Clock");
gtk_window_set_screen (GTK_WINDOW (cd->about),
gtk_widget_get_screen (cd->applet));
......@@ -2834,9 +2843,17 @@ clock_factory (PanelApplet *applet,
return retval;
}
#ifdef CLOCK_INPROCESS
PANEL_APPLET_BONOBO_SHLIB_FACTORY ("OAFIID:GNOME_ClockApplet_Factory",
PANEL_TYPE_APPLET,
"ClockApplet",
clock_factory,
NULL);
#else
PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_ClockApplet_Factory",
PANEL_TYPE_APPLET,
"ClockApplet",
"0",
clock_factory,
NULL);
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment