X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=driver%2Fdemo-Gtk.c;h=d1eb3c85089901c9bc840c201580c7dbc711fb85;hp=b4ac7c862f9328e108c3f6591a49f9db30069da2;hb=6b1c86cf395f59389e4ece4ea8f4bea2c332745b;hpb=49f5b54f312fe4ac2e9bc47581a72451bd0e8439 diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c index b4ac7c86..d1eb3c85 100644 --- a/driver/demo-Gtk.c +++ b/driver/demo-Gtk.c @@ -1,5 +1,5 @@ /* demo-Gtk.c --- implements the interactive demo-mode and options dialogs. - * xscreensaver, Copyright (c) 1993-2006 Jamie Zawinski + * xscreensaver, Copyright (c) 1993-2008 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -152,6 +152,13 @@ static void hack_subproc_environment (Window preview_window_id, Bool debug_p); #define countof(x) (sizeof((x))/sizeof((*x))) +/* You might think that to read an array of 32-bit quantities out of a + server-side property, you would pass an array of 32-bit data quantities + into XGetWindowProperty(). You would be wrong. You have to use an array + of longs, even if long is 64 bits (using 32 of each 64.) + */ +typedef long PROP32; + char *progname = 0; char *progclass = "XScreenSaver"; XrmDatabase db; @@ -749,9 +756,9 @@ about_menu_cb (GtkMenuItem *menuitem, gpointer user_data) look as good in the plain-old default Latin1 "C" locale.) */ #ifdef HAVE_GTK2 - sprintf(copy, ("Copyright \xC2\xA9 1991-2006 %s"), s); + sprintf(copy, ("Copyright \xC2\xA9 1991-2008 %s"), s); #else /* !HAVE_GTK2 */ - sprintf(copy, ("Copyright \251 1991-2006 %s"), s); + sprintf(copy, ("Copyright \251 1991-2008 %s"), s); #endif /* !HAVE_GTK2 */ sprintf (msg, "%s\n\n%s", copy, desc); @@ -975,7 +982,7 @@ await_xscreensaver (state *s) the length ISO C89 compilers are required to support" in the following expression... */ # endif - strcat (buf, + strcat (buf, STFU _("You are running as root. This usually means that xscreensaver\n" "was unable to contact your X server because access control is\n" "turned on. Try running this command:\n" @@ -1120,7 +1127,7 @@ force_list_select_item (state *s, GtkWidget *list, int list_elt, Bool scroll_p) if (!was) gtk_widget_set_sensitive (parent, True); #ifdef HAVE_GTK2 model = gtk_tree_view_get_model (GTK_TREE_VIEW (list)); - STFU g_assert (model); + g_assert (model); if (gtk_tree_model_iter_nth_child (model, &iter, NULL, list_elt)) { selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list)); @@ -2338,7 +2345,7 @@ server_current_hack (void) && nitems >= 3 && dataP) { - CARD32 *data = (CARD32 *) dataP; + PROP32 *data = (PROP32 *) dataP; hack_number = (int) data[2] - 1; } @@ -4414,6 +4421,7 @@ g_log_handler (const gchar *log_domain, GLogLevelFlags log_level, the .ad file... */ #endif +STFU static char *defaults[] = { #include "XScreenSaver_ad.h" 0