summaryrefslogtreecommitdiff
path: root/capplets/time-admin
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/time-admin')
-rw-r--r--capplets/time-admin/data/Makefile.am17
-rw-r--r--capplets/time-admin/data/hicolor/16x16/apps/mate-times-admin.pngbin2554 -> 0 bytes
-rw-r--r--capplets/time-admin/data/hicolor/22x22/apps/mate-times-admin.pngbin8927 -> 0 bytes
-rw-r--r--capplets/time-admin/data/hicolor/24x24/apps/mate-times-admin.pngbin9326 -> 0 bytes
-rw-r--r--capplets/time-admin/data/hicolor/32x32/apps/mate-times-admin.pngbin5732 -> 0 bytes
-rw-r--r--capplets/time-admin/data/hicolor/48x48/apps/mate-times-admin.pngbin15240 -> 0 bytes
-rw-r--r--capplets/time-admin/data/icon/mate-times-admin.pngbin140768 -> 0 bytes
-rw-r--r--capplets/time-admin/data/mate-time-admin.desktop.in2
-rw-r--r--capplets/time-admin/src/Makefile.am3
-rw-r--r--capplets/time-admin/src/main.c35
-rw-r--r--capplets/time-admin/src/time-map.c41
-rw-r--r--capplets/time-admin/src/time-map.h41
-rw-r--r--capplets/time-admin/src/time-zone.c42
-rw-r--r--capplets/time-admin/src/time-zone.h41
14 files changed, 110 insertions, 112 deletions
diff --git a/capplets/time-admin/data/Makefile.am b/capplets/time-admin/data/Makefile.am
index f7b82e08..c6d7f65b 100644
--- a/capplets/time-admin/data/Makefile.am
+++ b/capplets/time-admin/data/Makefile.am
@@ -23,27 +23,14 @@ map/timezone_12.75_dim.png map/timezone_-3.png map/timezone_-6_dim.png
map/timezone_12.75.png map/timezone_3.png map/timezone_6_dim.png map/timezone_9.png \
map/timezone_12_dim.png map/timezone_-4.5_dim.png map/timezone_-6.png
-icons16dir = $(datadir)/icons/hicolor/16x16/apps
-dist_icons16_DATA = hicolor/16x16/apps/mate-times-admin.png
-icons22dir = $(datadir)/icons/hicolor/22x22/apps
-dist_icons22_DATA = hicolor/22x22/apps/mate-times-admin.png
-icons24dir = $(datadir)/icons/hicolor/24x24/apps
-dist_icons24_DATA = hicolor/24x24/apps/mate-times-admin.png
-icons32dir = $(datadir)/icons/hicolor/32x32/apps
-dist_icons32_DATA = hicolor/32x32/apps/mate-times-admin.png
-icons48dir = $(datadir)/icons/hicolor/48x48/apps
-dist_icons48_DATA = hicolor/48x48/apps/mate-times-admin.png
-
-icondir = $(datadir)/mate-time-admin/icon
-dist_icon_DATA = icon/mate-times-admin.png
-
@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
-desktop_in_files = mate-time-admin.desktop.in
+desktop_in_files = mate-time-admin.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_DATA)
EXTRA_DIST = \
$(desktop_in_files)
+
-include $(top_srcdir)/git.mk
diff --git a/capplets/time-admin/data/hicolor/16x16/apps/mate-times-admin.png b/capplets/time-admin/data/hicolor/16x16/apps/mate-times-admin.png
deleted file mode 100644
index 66760fb4..00000000
--- a/capplets/time-admin/data/hicolor/16x16/apps/mate-times-admin.png
+++ /dev/null
Binary files differ
diff --git a/capplets/time-admin/data/hicolor/22x22/apps/mate-times-admin.png b/capplets/time-admin/data/hicolor/22x22/apps/mate-times-admin.png
deleted file mode 100644
index a661b627..00000000
--- a/capplets/time-admin/data/hicolor/22x22/apps/mate-times-admin.png
+++ /dev/null
Binary files differ
diff --git a/capplets/time-admin/data/hicolor/24x24/apps/mate-times-admin.png b/capplets/time-admin/data/hicolor/24x24/apps/mate-times-admin.png
deleted file mode 100644
index 474eb03f..00000000
--- a/capplets/time-admin/data/hicolor/24x24/apps/mate-times-admin.png
+++ /dev/null
Binary files differ
diff --git a/capplets/time-admin/data/hicolor/32x32/apps/mate-times-admin.png b/capplets/time-admin/data/hicolor/32x32/apps/mate-times-admin.png
deleted file mode 100644
index dd8b8a43..00000000
--- a/capplets/time-admin/data/hicolor/32x32/apps/mate-times-admin.png
+++ /dev/null
Binary files differ
diff --git a/capplets/time-admin/data/hicolor/48x48/apps/mate-times-admin.png b/capplets/time-admin/data/hicolor/48x48/apps/mate-times-admin.png
deleted file mode 100644
index 1f304624..00000000
--- a/capplets/time-admin/data/hicolor/48x48/apps/mate-times-admin.png
+++ /dev/null
Binary files differ
diff --git a/capplets/time-admin/data/icon/mate-times-admin.png b/capplets/time-admin/data/icon/mate-times-admin.png
deleted file mode 100644
index cf6d4e2f..00000000
--- a/capplets/time-admin/data/icon/mate-times-admin.png
+++ /dev/null
Binary files differ
diff --git a/capplets/time-admin/data/mate-time-admin.desktop.in b/capplets/time-admin/data/mate-time-admin.desktop.in
index 0bc57bb3..5f8de5a6 100644
--- a/capplets/time-admin/data/mate-time-admin.desktop.in
+++ b/capplets/time-admin/data/mate-time-admin.desktop.in
@@ -4,7 +4,7 @@ _Comment=Setting the time and date of the local system
Terminal=false
Type=Application
Exec=mate-time-admin
-Icon=mate-times-admin
+Icon=preferences-system-time
StartupNotify=true
Categories=GTK;Settings;HardwareSettings;
Keywords=mate-control-center;MATE;clock;date;time;preferences;
diff --git a/capplets/time-admin/src/Makefile.am b/capplets/time-admin/src/Makefile.am
index 6f62b22c..59332519 100644
--- a/capplets/time-admin/src/Makefile.am
+++ b/capplets/time-admin/src/Makefile.am
@@ -11,12 +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 8ae4986c..fb9e87a2 100644
--- a/capplets/time-admin/src/main.c
+++ b/capplets/time-admin/src/main.c
@@ -17,14 +17,13 @@
#include <glib/gi18n.h>
#include <polkit/polkit.h>
+#include "capplet-util.h"
#include "time-tool.h"
#include "time-zone.h"
#include "time-map.h"
#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)
{
@@ -53,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)
@@ -108,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);
@@ -124,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);
@@ -442,16 +421,12 @@ EXIT:
g_error_free(error);
return FALSE;
}
+
int main(int argc, char **argv)
{
TimeAdmin ta;
- setlocale (LC_ALL, "");
- bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gtk_init(&argc, &argv);
+ capplet_init (NULL, &argc, &argv);
/* Create the main window */
InitMainWindow(&ta);
diff --git a/capplets/time-admin/src/time-map.c b/capplets/time-admin/src/time-map.c
index ad38ef52..0f64a178 100644
--- a/capplets/time-admin/src/time-map.c
+++ b/capplets/time-admin/src/time-map.c
@@ -1,19 +1,28 @@
-/* time-admin
-* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <https://www.gnu.org/licenses/>.
-*/
+/*
+ * Copyright (C) 2019 MATE Developers
+ * Copyright (C) 2018, 2019 zhuyaliang https://github.com/zhuyaliang/
+ * Copyright (C) 2010-2018 The GNOME Project
+ * Copyright (C) 2010 Intel, Inc
+ *
+ * Portions from Ubiquity, Copyright (C) 2009 Canonical Ltd.
+ * Written by Evan Dandrea <[email protected]>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * Author: Thomas Wood <[email protected]>
+ *
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/capplets/time-admin/src/time-map.h b/capplets/time-admin/src/time-map.h
index 979dceaf..bfc73e3f 100644
--- a/capplets/time-admin/src/time-map.h
+++ b/capplets/time-admin/src/time-map.h
@@ -1,19 +1,28 @@
-/* time-admin
-* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <https://www.gnu.org/licenses/>.
-*/
+/*
+ * Copyright (C) 2019 MATE Developers
+ * Copyright (C) 2018, 2019 zhuyaliang https://github.com/zhuyaliang/
+ * Copyright (C) 2010-2018 The GNOME Project
+ * Copyright (C) 2010 Intel, Inc
+ *
+ * Portions from Ubiquity, Copyright (C) 2009 Canonical Ltd.
+ * Written by Evan Dandrea <[email protected]>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * Author: Thomas Wood <[email protected]>
+ *
+ */
#ifndef __TIME_MAP_H__
#define __TIME_MAP_H__
diff --git a/capplets/time-admin/src/time-zone.c b/capplets/time-admin/src/time-zone.c
index b9bc4955..7cb90e62 100644
--- a/capplets/time-admin/src/time-zone.c
+++ b/capplets/time-admin/src/time-zone.c
@@ -1,19 +1,28 @@
-/* time-admin
-* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <https://www.gnu.org/licenses/>.
-*/
+/*
+ * Copyright (C) 2019 MATE Developers
+ * Copyright (C) 2018, 2019 zhuyaliang https://github.com/zhuyaliang/
+ * Copyright (C) 2010-2018 The GNOME Project
+ * Copyright (C) 2010 Intel, Inc
+ *
+ * Portions from Ubiquity, Copyright (C) 2009 Canonical Ltd.
+ * Written by Evan Dandrea <[email protected]>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * Author: Thomas Wood <[email protected]>
+ *
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -434,6 +443,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 = gtk_button_new_with_mnemonic (_("_Close"));
diff --git a/capplets/time-admin/src/time-zone.h b/capplets/time-admin/src/time-zone.h
index 70473b24..fe3a8eb2 100644
--- a/capplets/time-admin/src/time-zone.h
+++ b/capplets/time-admin/src/time-zone.h
@@ -1,19 +1,28 @@
-/* time-admin
-* Copyright (C) 2018 zhuyaliang https://github.com/zhuyaliang/
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, either version 3 of the License, or
-* (at your option) any later version.
-
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <https://www.gnu.org/licenses/>.
-*/
+/*
+ * Copyright (C) 2019 MATE Developers
+ * Copyright (C) 2018, 2019 zhuyaliang https://github.com/zhuyaliang/
+ * Copyright (C) 2010-2018 The GNOME Project
+ * Copyright (C) 2010 Intel, Inc
+ *
+ * Portions from Ubiquity, Copyright (C) 2009 Canonical Ltd.
+ * Written by Evan Dandrea <[email protected]>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * Author: Thomas Wood <[email protected]>
+ *
+ */
#ifndef __TIME_ZONE_H__
#define __TIME_ZONE_H__