summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
Diffstat (limited to 'capplets')
-rw-r--r--capplets/display/xrandr-capplet.c8
-rw-r--r--capplets/keybindings/mate-keybinding-properties.c8
-rw-r--r--capplets/network/mate-network-properties.c6
-rw-r--r--capplets/time-admin/src/main.c9
-rw-r--r--capplets/windows/mate-window-properties.c6
5 files changed, 9 insertions, 28 deletions
diff --git a/capplets/display/xrandr-capplet.c b/capplets/display/xrandr-capplet.c
index 3dddb784..42b6b9b4 100644
--- a/capplets/display/xrandr-capplet.c
+++ b/capplets/display/xrandr-capplet.c
@@ -36,6 +36,8 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
+#include "capplet-util.h"
+
typedef struct App App;
typedef struct GrabInfo GrabInfo;
@@ -2554,11 +2556,7 @@ main (int argc, char **argv)
{
App *app;
- bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gtk_init (&argc, &argv);
+ capplet_init (NULL, &argc, &argv);
app = g_new0 (App, 1);
diff --git a/capplets/keybindings/mate-keybinding-properties.c b/capplets/keybindings/mate-keybinding-properties.c
index 9504af77..6b480ef5 100644
--- a/capplets/keybindings/mate-keybinding-properties.c
+++ b/capplets/keybindings/mate-keybinding-properties.c
@@ -1978,13 +1978,7 @@ main (int argc, char *argv[])
GtkBuilder *builder;
GSettings *marco_settings;
- gtk_init (&argc, &argv);
-
- bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gtk_init (&argc, &argv);
+ capplet_init (NULL, &argc, &argv);
activate_settings_daemon ();
diff --git a/capplets/network/mate-network-properties.c b/capplets/network/mate-network-properties.c
index c2243fb3..af17495b 100644
--- a/capplets/network/mate-network-properties.c
+++ b/capplets/network/mate-network-properties.c
@@ -459,11 +459,7 @@ main (int argc, char **argv)
"delete_button_img", NULL};
GtkWidget *widget;
- bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gtk_init (&argc, &argv);
+ capplet_init (NULL, &argc, &argv);
builder = gtk_builder_new ();
if (gtk_builder_add_objects_from_resource (builder, "/org/mate/mcc/network/mate-network-properties.ui",
diff --git a/capplets/time-admin/src/main.c b/capplets/time-admin/src/main.c
index fe16b7c7..dfe934e9 100644
--- a/capplets/time-admin/src/main.c
+++ b/capplets/time-admin/src/main.c
@@ -17,6 +17,7 @@
#include <glib/gi18n.h>
#include <polkit/polkit.h>
+#include "capplet-util.h"
#include "time-tool.h"
#include "time-zone.h"
#include "time-map.h"
@@ -433,16 +434,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/windows/mate-window-properties.c b/capplets/windows/mate-window-properties.c
index ae059ae8..3d27b35e 100644
--- a/capplets/windows/mate-window-properties.c
+++ b/capplets/windows/mate-window-properties.c
@@ -329,11 +329,7 @@ main (int argc, char **argv)
const char *current_wm;
int i;
- bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gtk_init (&argc, &argv);
+ capplet_init (NULL, &argc, &argv);
screen = gdk_display_get_default_screen (gdk_display_get_default ());
current_wm = gdk_x11_screen_get_window_manager_name (screen);