libegg r912 - trunk/libegg/smclient



Author: chpe
Date: Fri Oct 17 19:14:03 2008
New Revision: 912
URL: http://svn.gnome.org/viewvc/libegg?rev=912&view=rev

Log:
No need to make the GOptionEntry struct global static. Improve option
group description.

Modified:
   trunk/libegg/smclient/ChangeLog
   trunk/libegg/smclient/eggsmclient.c

Modified: trunk/libegg/smclient/eggsmclient.c
==============================================================================
--- trunk/libegg/smclient/eggsmclient.c	(original)
+++ trunk/libegg/smclient/eggsmclient.c	Fri Oct 17 19:14:03 2008
@@ -38,7 +38,7 @@
   LAST_SIGNAL
 };
 
-static guint signals[LAST_SIGNAL] = { 0 };
+static guint signals[LAST_SIGNAL];
 
 struct _EggSMClientPrivate {
   GKeyFile *state_file;
@@ -179,23 +179,6 @@
 static char *sm_client_state_file = NULL;
 static char *sm_client_id = NULL;
 
-static GOptionEntry entries[] = {
-  { "sm-client-disable", 0, 0,
-    G_OPTION_ARG_NONE, &sm_client_disable,
-    N_("Disable connection to session manager"), NULL },
-  { "sm-client-state-file", 0, 0,
-    G_OPTION_ARG_FILENAME, &sm_client_state_file,
-    N_("Specify file containing saved configuration"), N_("FILE") },
-  { "sm-client-id", 0, 0,
-    G_OPTION_ARG_STRING, &sm_client_id,
-    N_("Specify session management ID"), N_("ID") },
-  /* Compatibility options */
-  { "sm-disable", 0, G_OPTION_FLAG_HIDDEN,
-    G_OPTION_ARG_NONE, &sm_client_disable,
-    NULL, NULL },
-  { NULL }
-};
-
 static gboolean
 sm_client_post_parse_func (GOptionContext  *context,
 			   GOptionGroup    *group,
@@ -235,6 +218,22 @@
 GOptionGroup *
 egg_sm_client_get_option_group (void)
 {
+  const GOptionEntry entries[] = {
+    { "sm-client-disable", 0, 0,
+      G_OPTION_ARG_NONE, &sm_client_disable,
+      N_("Disable connection to session manager"), NULL },
+    { "sm-client-state-file", 0, 0,
+      G_OPTION_ARG_FILENAME, &sm_client_state_file,
+      N_("Specify file containing saved configuration"), N_("FILE") },
+    { "sm-client-id", 0, 0,
+      G_OPTION_ARG_STRING, &sm_client_id,
+      N_("Specify session management ID"), N_("ID") },
+    /* Compatibility options */
+    { "sm-disable", 0, G_OPTION_FLAG_HIDDEN,
+      G_OPTION_ARG_NONE, &sm_client_disable,
+      NULL, NULL },
+    { NULL }
+  };
   GOptionGroup *group;
 
   /* Use our own debug handler for the "EggSMClient" domain. */
@@ -242,8 +241,8 @@
 		     egg_sm_client_debug_handler, NULL);
 
   group = g_option_group_new ("sm-client",
-			      _("Session Management Options"),
-			      _("Show Session Management options"),
+			      _("Session management options:"),
+			      _("Show session management options"),
 			      NULL, NULL);
   g_option_group_add_entries (group, entries);
   g_option_group_set_parse_hooks (group, NULL, sm_client_post_parse_func);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]