diff options
-rw-r--r-- | capplet/gkbd-indicator-plugins-capplet.c | 24 | ||||
-rw-r--r-- | test/gkbd-keyboard-drawing-test.c | 59 |
2 files changed, 45 insertions, 38 deletions
diff --git a/capplet/gkbd-indicator-plugins-capplet.c b/capplet/gkbd-indicator-plugins-capplet.c index c5628b0..6d94ffe 100644 --- a/capplet/gkbd-indicator-plugins-capplet.c +++ b/capplet/gkbd-indicator-plugins-capplet.c @@ -242,19 +242,25 @@ CappletResponse (GtkDialog * dialog, gint response) GError *error = NULL; GdkAppLaunchContext *ctx = gdk_app_launch_context_new (); - g_app_info_launch_default_for_uri("ghelp:gkbd?gkb-indicator-applet-plugins", - G_APP_LAUNCH_CONTEXT (ctx), &error); + g_app_info_launch_default_for_uri + ("ghelp:gkbd?gkb-indicator-applet-plugins", + G_APP_LAUNCH_CONTEXT (ctx), &error); if (error) { GtkWidget *d = NULL; d = gtk_message_dialog_new (GTK_WINDOW (dialog), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, - _("Unable to open help file")); - gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (d), - "%s", error->message); - g_signal_connect (d, "response", G_CALLBACK (gtk_widget_destroy), NULL); + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + _ + ("Unable to open help file")); + gtk_message_dialog_format_secondary_text + (GTK_MESSAGE_DIALOG (d), "%s", error->message); + g_signal_connect (d, "response", + G_CALLBACK (gtk_widget_destroy), + NULL); gtk_window_present (GTK_WINDOW (d)); g_error_free (error); @@ -349,7 +355,7 @@ main (int argc, char **argv) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); memset (&gipc, 0, sizeof (gipc)); - gtk_init_with_args (&argc, &argv, "gkbd", NULL, NULL, NULL); + gtk_init_with_args (&argc, &argv, "gkbd", NULL, NULL, NULL); if (!gconf_init (argc, argv, &gconf_error)) { g_warning (_("Failed to init GConf: %s\n"), gconf_error->message); diff --git a/test/gkbd-keyboard-drawing-test.c b/test/gkbd-keyboard-drawing-test.c index 47b6efa..4e89310 100644 --- a/test/gkbd-keyboard-drawing-test.c +++ b/test/gkbd-keyboard-drawing-test.c @@ -39,34 +39,35 @@ static gboolean track_modifiers = FALSE; static gboolean program_version = FALSE; static const GOptionEntry options[] = { - { "groups", '\0', 0, G_OPTION_ARG_STRING, &groups, - "Keyboard groups to display, from 1-4. Up to four groups only may be " - "displayed. Examples: --groups=3 or --groups=1,2,1,2", - "group1[,group2[,group3[,group4]]]" }, - { "levels", '\0', 0, G_OPTION_ARG_STRING, &levels, - "Keyboard shift levels to display, from 1-64. Up to four shift levels " - "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2", - "level1[,level2[,level3[,level4]]]" }, - { "symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols, - "Symbols component of the keyboard. If you omit this option, it is " - "obtained from the X server; that is, the keyboard that is currently " - "configured is drawn. Examples: --symbols=us or " - "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL }, - { "keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes, - "Keycodes component of the keyboard. If you omit this option, it is " - "obtained from the X server; that is, the keyboard that is currently" - " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)", NULL }, - { "geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry, - "Geometry xkb component. If you omit this option, it is obtained from the" - " X server; that is, the keyboard that is currently configured is drawn. " - "Example: --geometry=kinesis", NULL }, - { "track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers, - "Track the current modifiers", NULL }, - { "track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config, - "Track the server XKB configuration", NULL }, - { "version", '\0', 0, G_OPTION_ARG_NONE, &program_version, - "Show current version", NULL }, - { NULL }, + {"groups", '\0', 0, G_OPTION_ARG_STRING, &groups, + "Keyboard groups to display, from 1-4. Up to four groups only may be " + "displayed. Examples: --groups=3 or --groups=1,2,1,2", + "group1[,group2[,group3[,group4]]]"}, + {"levels", '\0', 0, G_OPTION_ARG_STRING, &levels, + "Keyboard shift levels to display, from 1-64. Up to four shift levels " + "only may be displayed. Examples: --levels=3 or --levels=1,2,1,2", + "level1[,level2[,level3[,level4]]]"}, + {"symbols", '\0', 0, G_OPTION_ARG_STRING, &symbols, + "Symbols component of the keyboard. If you omit this option, it is " + "obtained from the X server; that is, the keyboard that is currently " + "configured is drawn. Examples: --symbols=us or " + "--symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)", NULL}, + {"keycodes", '\0', 0, G_OPTION_ARG_STRING, &keycodes, + "Keycodes component of the keyboard. If you omit this option, it is " + "obtained from the X server; that is, the keyboard that is currently" + " configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)", + NULL}, + {"geometry", '\0', 0, G_OPTION_ARG_STRING, &geometry, + "Geometry xkb component. If you omit this option, it is obtained from the" + " X server; that is, the keyboard that is currently configured is drawn. " + "Example: --geometry=kinesis", NULL}, + {"track-modifiers", '\0', 0, G_OPTION_ARG_NONE, &track_modifiers, + "Track the current modifiers", NULL}, + {"track-config", '\0', 0, G_OPTION_ARG_NONE, &track_config, + "Track the server XKB configuration", NULL}, + {"version", '\0', 0, G_OPTION_ARG_NONE, &program_version, + "Show current version", NULL}, + {NULL}, }; static gboolean @@ -177,7 +178,7 @@ main (gint argc, gchar ** argv) g_option_context_free (context); if (program_version) { - g_print("kbdraw %s\n", VERSION); + g_print ("kbdraw %s\n", VERSION); exit (0); } |