formatting update

This commit is contained in:
Josh Holtrop 2010-11-24 12:15:46 -05:00
parent f952b92521
commit f698d24c69

61
dwss.c
View File

@ -44,7 +44,8 @@ static gchar *geometry = NULL;
static GOptionEntry options[] = { static GOptionEntry options[] = {
{"geometry", 0, 0, G_OPTION_ARG_STRING, &geometry, {"geometry", 0, 0, G_OPTION_ARG_STRING, &geometry,
N_("The initial size and position of window"), N_("WIDTHxHEIGHT+X+Y")}, N_("The initial size and position of window"),
N_("WIDTHxHEIGHT+X+Y")},
{NULL} {NULL}
}; };
@ -52,49 +53,51 @@ int
main (int argc, main (int argc,
char *argv[]) char *argv[])
{ {
GtkWidget *window; GtkWidget *window;
GtkWidget *drawing_area; GtkWidget *drawing_area;
GtkStateType state; GtkStateType state;
GError *error; GError *error;
error = NULL; error = NULL;
gtk_init_with_args (&argc, &argv, gtk_init_with_args (&argc, &argv,
/* translators: the word "image" here /* translators: the word "image" here
* represents a command line argument * represents a command line argument
*/ */
_("image - floats images around the screen"), _("image - floats images around the screen"),
NULL, NULL, &error); NULL, NULL, &error);
if (error != NULL) if (error != NULL)
{ {
g_printerr (_("%s. See --help for usage information.\n"), g_printerr (_("%s. See --help for usage information.\n"),
_(error->message)); _(error->message));
g_error_free (error); g_error_free (error);
return EX_SOFTWARE; return EX_SOFTWARE;
} }
window = gs_theme_window_new (); window = gs_theme_window_new ();
g_signal_connect (G_OBJECT (window), "delete-event", g_signal_connect (G_OBJECT (window), "delete-event",
G_CALLBACK (gtk_main_quit), NULL); G_CALLBACK (gtk_main_quit), NULL);
drawing_area = gtk_drawing_area_new (); drawing_area = gtk_drawing_area_new ();
gtk_widget_show (drawing_area); gtk_widget_show (drawing_area);
gtk_container_add (GTK_CONTAINER (window), drawing_area); gtk_container_add (GTK_CONTAINER (window), drawing_area);
if ((geometry == NULL) if ((geometry == NULL)
|| !gtk_window_parse_geometry (GTK_WINDOW (window), geometry)) || !gtk_window_parse_geometry (GTK_WINDOW (window), geometry))
gtk_window_set_default_size (GTK_WINDOW (window), 640, 480); {
gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);
}
gtk_widget_show (window); gtk_widget_show (window);
gtk_main (); gtk_main ();
return EX_OK; return EX_OK;
} }