[evolution/gnome-2-30] [win32] add --register-handlers and --unregister-handlers options and don't tamper with registry unl
- From: Fridrich Strba <strba src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-30] [win32] add --register-handlers and --unregister-handlers options and don't tamper with registry unl
- Date: Fri, 18 Jun 2010 11:09:09 +0000 (UTC)
commit 4f1d334031158b9992485245a7752abd2be604d6
Author: Fridrich Å trba <fridrich strba bluewin ch>
Date: Fri Jun 18 12:57:24 2010 +0200
[win32] add --register-handlers and --unregister-handlers options
and don't tamper with registry unless asked for it explicitely.
e-util/e-win32-defaults.c | 10 ++++++++++
e-util/e-win32-defaults.h | 1 +
shell/main.c | 19 ++++++++++++++++---
3 files changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/e-util/e-win32-defaults.c b/e-util/e-win32-defaults.c
index 8fb2bc3..14dd101 100644
--- a/e-util/e-win32-defaults.c
+++ b/e-util/e-win32-defaults.c
@@ -43,6 +43,11 @@ _e_win32_sanitize_path (gchar *path)
return path;
}
+
+/*
+ * Mail Client registration
+ */
+
static void
_e_register_mailto_structure (HKEY hKey)
{
@@ -212,6 +217,11 @@ _e_win32_register_mailer (void)
_e_win32_register_mailer_impl (FALSE);
}
+void
+_e_win32_unregister_mailer (void)
+{
+}
+
static void
_e_win32_set_default_mailer_impl (WINBOOL system)
{
diff --git a/e-util/e-win32-defaults.h b/e-util/e-win32-defaults.h
index bebc84c..767d031 100644
--- a/e-util/e-win32-defaults.h
+++ b/e-util/e-win32-defaults.h
@@ -28,6 +28,7 @@
G_BEGIN_DECLS
void _e_win32_register_mailer (void);
+void _e_win32_unregister_mailer (void);
void _e_win32_set_default_mailer (void);
void _e_win32_unset_default_mailer (void);
diff --git a/shell/main.c b/shell/main.c
index 41ca79e..f8fd71a 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -81,9 +81,11 @@
/* Command-line options. */
#ifdef G_OS_WIN32
+static gboolean register_handlers = FALSE;
static gboolean reinstall = FALSE;
static gboolean show_icons = FALSE;
static gboolean hide_icons = FALSE;
+static gboolean unregister_handlers = FALSE;
#endif /* G_OS_WIN32 */
static gboolean express_mode = FALSE;
static gboolean start_online = FALSE;
@@ -327,12 +329,16 @@ setup_segv_redirect (void)
static GOptionEntry entries[] = {
#ifdef G_OS_WIN32
+ { "register-handlers", '\0', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, ®ister_handlers,
+ NULL, NULL },
{ "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 },
+ { "unregister-handlers", '\0', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &unregister_handlers,
+ NULL, NULL },
#endif /* G_OS_WIN32 */
{ "component", 'c', 0, G_OPTION_ARG_STRING, &requested_view,
N_("Start Evolution activating the specified component"), NULL },
@@ -500,9 +506,11 @@ main (gint argc, gchar **argv)
g_warning ("Could not set PATH for Evolution and its child processes");
g_free (path);
-
- _e_win32_register_mailer ();
-
+
+ if (register_handlers || reinstall || show_icons) {
+ _e_win32_register_mailer ();
+ }
+
if (reinstall) {
_e_win32_set_default_mailer ();
exit (0);
@@ -517,6 +525,11 @@ main (gint argc, gchar **argv)
_e_win32_unset_default_mailer ();
exit (0);
}
+
+ if (unregister_handlers) {
+ _e_win32_unregister_mailer();
+ exit (0);
+ }
if (strcmp (gettext (""), "") == 0) {
/* No message catalog installed for the current locale
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]