summaryrefslogtreecommitdiff
path: root/capplets/time-admin/src
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/time-admin/src')
-rw-r--r--capplets/time-admin/src/Makefile.am4
-rw-r--r--capplets/time-admin/src/main.c26
-rw-r--r--capplets/time-admin/src/time-zone.c1
3 files changed, 5 insertions, 26 deletions
diff --git a/capplets/time-admin/src/Makefile.am b/capplets/time-admin/src/Makefile.am
index 4bf47c9e..59332519 100644
--- a/capplets/time-admin/src/Makefile.am
+++ b/capplets/time-admin/src/Makefile.am
@@ -11,11 +11,11 @@ mate_time_admin_LDFLAGS = -export-dynamic
AM_CPPFLAGS = \
$(MATECC_CAPPLETS_CFLAGS) \
- -DDATADIR="\"$(datadir)/mate-time-admin/icon/\"" \
+ -DMATELOCALEDIR="\"$(datadir)/locale\""\
-DTIMPZONEDIR="\"$(datadir)/mate-time-admin/map/\""
-CLEANFILES = $(MATECC_CAPPLETS_CLEANFILES)
+CLEANFILES = $(MATECC_CAPPLETS_CLEANFILES)
EXTRA_DIST = time-zones.h
diff --git a/capplets/time-admin/src/main.c b/capplets/time-admin/src/main.c
index dfe934e9..ebd58aa2 100644
--- a/capplets/time-admin/src/main.c
+++ b/capplets/time-admin/src/main.c
@@ -24,8 +24,6 @@
#define LOCKFILE "/tmp/time-admin.pid"
#define TIME_ADMIN_PERMISSION "org.freedesktop.timedate1.set-time"
-#define APPICON "mate-times-admin.png"
-#define ICONFILE DATADIR APPICON
static gboolean CheckClockHealth(gpointer data)
{
@@ -54,20 +52,7 @@ static void ChangeTimeValue(GtkSpinButton *spin_button,
update_apply_timeout(ta);
}
}
-static GdkPixbuf * GetAppIcon(void)
-{
- GdkPixbuf *Pixbuf;
- GError *Error = NULL;
-
- Pixbuf = gdk_pixbuf_new_from_file(ICONFILE,&Error);
- if(!Pixbuf)
- {
- MessageReport(("Get Icon Fail"),Error->message,ERROR);
- g_error_free(Error);
- }
- return Pixbuf;
-}
static gboolean on_window_quit (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
@@ -109,7 +94,6 @@ static void on_permission_changed (GPermission *permission,
static void InitMainWindow(TimeAdmin *ta)
{
GtkWidget *Window;
- GdkPixbuf *AppIcon;
GError *error = NULL;
Window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@@ -125,14 +109,8 @@ static void InitMainWindow(TimeAdmin *ta)
"delete-event",
G_CALLBACK(on_window_quit),
ta);
-
- AppIcon = GetAppIcon();
- if(AppIcon)
- {
- gtk_window_set_icon(GTK_WINDOW(Window),AppIcon);
- g_object_unref(AppIcon);
- }
- ta->Permission = polkit_permission_new_sync (TIME_ADMIN_PERMISSION,
+ gtk_window_set_icon_name (GTK_WINDOW(Window), "preferences-system-time");
+ ta->Permission = polkit_permission_new_sync (TIME_ADMIN_PERMISSION,
NULL,
NULL,
&error);
diff --git a/capplets/time-admin/src/time-zone.c b/capplets/time-admin/src/time-zone.c
index e4782d97..0523b799 100644
--- a/capplets/time-admin/src/time-zone.c
+++ b/capplets/time-admin/src/time-zone.c
@@ -445,6 +445,7 @@ void SetupTimezoneDialog(TimeAdmin *ta)
NULL,
NULL);
gtk_window_set_default_size (GTK_WINDOW (ta->dialog), 730, 520);
+ gtk_window_set_icon_name (GTK_WINDOW(ta->dialog), "preferences-system-time");
ta->TZclose = DialogAddButtonWithIconName(GTK_DIALOG(ta->dialog),
_("Close"),