From 02564bb45b4a4ceac0bdb27ff80a26e65590d220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= Date: Tue, 18 May 2010 16:57:11 +0200 Subject: [win32] Implement --reinstall, --show-icons, --hide-icons options to be used by windows default application setting dialogue --- shell/main.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'shell/main.c') diff --git a/shell/main.c b/shell/main.c index b3fdc7ad55..f5d9061d1a 100644 --- a/shell/main.c +++ b/shell/main.c @@ -80,6 +80,11 @@ #endif /* Command-line options. */ +#ifdef G_OS_WIN32 +static gboolean reinstall = FALSE; +static gboolean show_icons = FALSE; +static gboolean hide_icons = FALSE; +#endif /* G_OS_WIN32 */ static gboolean express_mode = FALSE; static gboolean start_online = FALSE; static gboolean start_offline = FALSE; @@ -321,6 +326,14 @@ setup_segv_redirect (void) #endif static GOptionEntry entries[] = { +#ifdef G_OS_WIN32 + { "--reinstall", '\0', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &reinstall, + NULL, NULL }, + { "--show-icons", '\0', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &show_icons, + NULL, NULL }, + { "--hide-icons", '\0', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &hide_icons, + NULL, NULL }, +#endif /* G_OS_WIN32 */ { "component", 'c', 0, G_OPTION_ARG_STRING, &requested_view, N_("Start Evolution activating the specified component"), NULL }, { "geometry", 'g', 0, G_OPTION_ARG_STRING, &geometry, @@ -490,6 +503,21 @@ main (gint argc, gchar **argv) _e_win32_register_mailer (); + if (reinstall) { + _e_win32_set_default_mailer (); + exit (0); + } + + if (show_icons) { + _e_win32_set_default_mailer (); + exit (0); + } + + if (hide_icons) { + _e_win32_unset_default_mailer (); + exit (0); + } + if (strcmp (gettext (""), "") == 0) { /* No message catalog installed for the current locale * language, so don't bother with the localisations -- cgit v1.2.3