--- a/aisleriot/window.c 2008-05-07 17:23:08.000000000 -0400 +++ b/aisleriot/window.c 2008-05-07 17:23:11.000000000 -0400 @@ -2311,6 +2311,8 @@ GtkStatusbar *statusbar; GtkWidget *statusbar_hbox,*label, *time_box; #endif + GdkScreen *screen; + GdkColormap *colormap; g_assert (G_N_ELEMENTS (names) == LAST_ACTION); @@ -2494,6 +2496,14 @@ /* Now set up the widgets */ main_vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), main_vbox); + /* Set the colour map */ + screen = gtk_widget_get_screen (main_vbox); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ + gtk_widget_show (main_vbox); #ifdef HAVE_HILDON --- a/aisleriot/board.c.orig 2008-05-07 18:38:17.000000000 -0400 +++ b/aisleriot/board.c 2008-05-07 19:30:18.000000000 -0400 @@ -400,6 +400,7 @@ /* FIXMEchpe: if we ever use a baize with an alpha channel, * clear the pixmap first! */ + gdk_draw_rectangle(pixmap,gc,TRUE,0,0,width,height); gdk_draw_pixbuf (pixmap, NULL, pixbuf, 0, 0, 0, 0, width, height, GDK_RGB_DITHER_NORMAL, 0, 0); --- a/mahjongg/mahjongg.c 2008-05-07 20:45:48.000000000 -0400 +++ b/mahjongg/mahjongg.c 2008-05-08 23:39:59.000000000 -0400 @@ -1420,6 +1420,9 @@ main (int argc, char *argv[]) GError *error = NULL; #endif + GdkScreen *screen = NULL; + GdkColormap *colormap = NULL; + #if defined(HAVE_GNOME) || defined(HAVE_RSVG_GNOMEVFS) /* If we're going to use gnome-vfs, we need to init threads before * calling any glib functions. @@ -1488,6 +1491,14 @@ main (int argc, char *argv[]) /* Statusbar for a chrono, Tiles left and Moves left */ status_box = gtk_hbox_new (FALSE, 10); + /* Set the colour map */ + screen = gtk_widget_get_screen (status_box); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ + group_box = gtk_hbox_new (FALSE, 0); tiles_label = gtk_label_new (_("Tiles Left:")); gtk_box_pack_start (GTK_BOX (group_box), tiles_label, FALSE, FALSE, 0); --- a/gnometris/tetris.cpp 2008-05-07 17:26:37.000000000 -0400 +++ b/gnometris/tetris.cpp 2008-05-08 23:57:19.000000000 -0400 @@ -92,6 +92,8 @@ Tetris::Tetris(int cmdlLevel): GtkWidget *aspect_frame; GtkWidget *menubar; gint width, height; + GdkScreen *screen; + GdkColormap *colormap; gchar *outdir; const GtkTargetEntry targets[] = {{"text/uri-list", 0, URI_LIST}, @@ -202,6 +204,15 @@ Tetris::Tetris(int cmdlLevel): GtkWidget * hb = gtk_hbox_new(FALSE, 0); + /* Set the colour map */ + screen = gtk_widget_get_screen (hb); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ + + vbox = gtk_vbox_new (FALSE, 0); gnome_app_set_contents (GNOME_APP (w), vbox); gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0); --- a/blackjack/src/blackjack.cpp 2008-04-08 16:12:56.000000000 -0400 +++ b/blackjack/src/blackjack.cpp 2008-05-09 10:59:35.000000000 -0400 @@ -284,6 +284,8 @@ create_main_window (void) gint width, height; char *label_string; GtkActionGroup *actions; + GdkScreen *screen = NULL; + GdkColormap *colormap = NULL; static const char ui_definition[] = "" @@ -376,6 +378,14 @@ create_main_window (void) gtk_window_add_accel_group (GTK_WINDOW (toplevel_window), gtk_ui_manager_get_accel_group (ui)); vbox = gtk_vbox_new (FALSE, 0); + // Set the colour map + screen = gtk_widget_get_screen (vbox); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + // End Set colour map + gtk_container_add (GTK_CONTAINER (toplevel_window), vbox); gtk_box_pack_start (GTK_BOX (vbox), gtk_ui_manager_get_widget (ui, "/MenuBar"), FALSE, FALSE, 0); --- a/gnibbles/main.c 2008-04-08 16:13:23.000000000 -0400 +++ b/gnibbles/main.c 2008-05-09 11:37:04.000000000 -0400 @@ -876,6 +876,8 @@ setup_window (void) GtkWidget *menubar; GtkUIManager *ui_manager; GtkAccelGroup *accel_group; + GdkScreen *screen = NULL; + GdkColormap *colormap = NULL; window = gnome_app_new ("gnibbles", "Nibbles"); @@ -891,6 +893,13 @@ setup_window (void) gtk_widget_realize (window); vbox = gtk_vbox_new (FALSE, 0); + /* Set the colour map */ + screen = gtk_widget_get_screen (vbox); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ games_stock_init (); ui_manager = gtk_ui_manager_new (); --- a/gnect/src/main.c 2008-04-08 16:13:37.000000000 -0400 +++ b/gnect/src/main.c 2008-05-09 11:31:39.000000000 -0400 @@ -1393,6 +1393,8 @@ create_app (void) GtkWidget *vbox; GtkWidget *vpaned; GtkUIManager *ui_manager; + GdkScreen *screen = NULL; + GdkColormap *colormap = NULL; app = gnome_app_new (APPNAME, _("Four-in-a-Row")); gtk_window_set_default_size (GTK_WINDOW (app), DEFAULT_WIDTH, DEFAULT_HEIGHT); @@ -1418,6 +1420,13 @@ create_app (void) vbox = gtk_vbox_new (FALSE, 0); gridframe = games_grid_frame_new (7, 7); + /* Set the colour map */ + screen = gtk_widget_get_screen (vbox); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ gtk_paned_pack1 (GTK_PANED (vpaned), gridframe, TRUE, FALSE); --- a/gnomine/gnomine.c 2008-04-08 16:12:52.000000000 -0400 +++ b/gnomine/gnomine.c 2008-05-09 12:58:37.000000000 -0400 @@ -955,6 +955,8 @@ main (int argc, char *argv[]) GnomeClient *client; GtkUIManager *ui_manager; GtkAccelGroup *accel_group; + GdkScreen *screen; + GdkColormap *colormap; static const GOptionEntry options[] = { {"width", 'x', 0, G_OPTION_ARG_INT, &xsize, N_("Width of grid"), N_("X")}, @@ -1037,6 +1039,13 @@ main (int argc, char *argv[]) G_CALLBACK (window_state_callback), NULL); all_boxes = gtk_vbox_new (FALSE, 0); + /* Set the colour map */ + screen = gtk_widget_get_screen (all_boxes); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ gnome_app_set_contents (GNOME_APP (window), all_boxes); ui_manager = create_ui_manager ("GnomineActions"); --- a/iagno/gnothello.c 2008-04-08 16:13:35.000000000 -0400 +++ b/iagno/gnothello.c 2008-05-09 14:32:11.000000000 -0400 @@ -421,6 +421,8 @@ load_pixmaps (void) GError *error = NULL; gchar *tmp; gchar *fname; + GdkScreen *screen = NULL; + GdkColormap *colormap = NULL; g_return_if_fail (tile_set != NULL && tile_set[0] != '0'); @@ -448,11 +450,24 @@ load_pixmaps (void) error = NULL; } + screen = gtk_widget_get_screen (window); + if (screen == NULL) + { + colormap = gdk_colormap_get_system(); + } + else + { + colormap = gdk_screen_get_rgba_colormap (screen); + if (colormap == NULL) + colormap = gdk_colormap_get_system(); + } + gdk_pixbuf_render_pixmap_and_mask_for_colormap (image, - gdk_colormap_get_system (), + colormap, &tiles_pixmap, &tiles_mask, 127); + gdk_pixbuf_unref (image); g_free (fname); } @@ -617,15 +632,26 @@ void create_window (void) { GtkWidget *table; + GdkScreen *screen; + GdkColormap *colormap; window = gnome_app_new ("iagno", _(APP_NAME_LONG)); games_conf_add_window (GTK_WINDOW (window), NULL); notebook = gtk_notebook_new (); + /* Set the colour map */ + screen = gtk_widget_get_screen (notebook); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ + gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); gtk_widget_realize (window); + gtk_window_set_resizable (GTK_WINDOW (window), FALSE); g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (quit_game_cb), NULL); --- a/gtali/gyahtzee.c 2008-04-08 16:12:56.000000000 -0400 +++ b/gtali/gyahtzee.c 2008-05-09 13:27:09.000000000 -0400 @@ -764,6 +764,8 @@ GyahtzeeCreateMainWindow (void) GtkWidget *menubar; GtkAccelGroup *accel_group; GtkUIManager *ui_manager; + GdkScreen *screen; + GdkColormap *colormap; int i, j; window = gnome_app_new (appID, appName); @@ -782,6 +784,14 @@ GyahtzeeCreateMainWindow (void) gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), FALSE); games_stock_prepare_for_statusbar_tooltips (ui_manager, statusbar); + /* Set the colour map */ + screen = gtk_widget_get_screen (window); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ + /*---- Menus ----*/ create_menus (ui_manager); accel_group = gtk_ui_manager_get_accel_group (ui_manager); --- a/gnotravex/gnotravex.c 2008-04-08 16:13:00.000000000 -0400 +++ b/gnotravex/gnotravex.c 2008-05-09 13:18:39.000000000 -0400 @@ -418,6 +418,8 @@ main (int argc, char **argv) gboolean retval; GError *error = NULL; #endif + GdkScreen *screen; + GdkColormap *colormap; #if defined(HAVE_GNOME) || defined(HAVE_RSVG_GNOMEVFS) /* If we're going to use gnome-vfs, we need to init threads before @@ -494,7 +496,9 @@ main (int argc, char **argv) menubar = create_menu (ui_manager); + vbox = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (window), vbox); gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0); @@ -524,6 +528,13 @@ main (int argc, char **argv) gtk_widget_show (space); + /* Set the colour map */ + screen = gtk_widget_get_screen (space); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ if (session_xpos >= 0 && session_ypos >= 0) gtk_window_move (GTK_WINDOW (window), session_xpos, session_ypos); @@ -531,6 +542,7 @@ main (int argc, char **argv) gtk_widget_show_all (window); create_mover (); + gtk_action_activate (new_game_action); gtk_action_activate (size_action[size - 2]); --- a/gnobots2/gnobots.c 2008-04-08 16:13:36.000000000 -0400 +++ b/gnobots2/gnobots.c 2008-05-09 11:40:22.000000000 -0400 @@ -193,6 +193,8 @@ main (int argc, char *argv[]) GOptionContext *option_context; struct timeval tv; gint i; + GdkScreen *screen = NULL; + GdkColormap *colormap = NULL; bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); @@ -269,6 +271,14 @@ main (int argc, char *argv[]) gtk_container_add (GTK_CONTAINER (gridframe), game_area); vbox = gtk_vbox_new (FALSE, 0); + /* Set the colour map */ + screen = gtk_widget_get_screen (vbox); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ + gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), gridframe, TRUE, TRUE, 0); --- a/gnotski/gnotski.c 2008-04-08 16:13:01.000000000 -0400 +++ b/gnotski/gnotski.c 2008-05-09 13:21:44.000000000 -0400 @@ -561,6 +561,8 @@ main (int argc, char **argv) gboolean retval; GError *error = NULL; #endif + GdkScreen *screen; + GdkColormap *colormap; #if defined(HAVE_GNOME) || defined(HAVE_RSVG_GNOMEVFS) /* If we're going to use gnome-vfs, we need to init threads before @@ -649,6 +651,14 @@ main (int argc, char **argv) if (session_xpos >= 0 && session_ypos >= 0) gtk_window_move (GTK_WINDOW (window), session_xpos, session_ypos); + /* Set the colour map */ + screen = gtk_widget_get_screen (window); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ + gtk_widget_show_all (window); new_game (startup_level); --- a/glines/glines.c 2008-04-08 16:13:19.000000000 -0400 +++ b/glines/glines.c 2008-05-09 11:07:22.000000000 -0400 @@ -1802,6 +1802,8 @@ main (int argc, char *argv[]) gboolean retval; GError *error = NULL; #endif + GdkScreen *screen = NULL; + GdkColormap *colormap = NULL; #if defined(HAVE_GNOME) || defined(HAVE_RSVG_GNOMEVFS) /* If we're going to use gnome-vfs, we need to init threads before @@ -1886,6 +1888,14 @@ main (int argc, char *argv[]) gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), FALSE); vbox = gtk_vbox_new (FALSE, 0); + /* Set the colour map */ + screen = gtk_widget_get_screen (vbox); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ + gtk_container_add (GTK_CONTAINER (app), vbox); create_menus (ui_manager); --- a/same-gnome/ui.c 2008-04-08 16:13:27.000000000 -0400 +++ b/same-gnome/ui.c 2008-05-09 14:00:40.000000000 -0400 @@ -531,6 +531,8 @@ build_gui (void) GtkWidget *vbox; GtkUIManager *ui_manager; GtkActionGroup *action_group; + GdkScreen *screen; + GdkColormap *colormap; gtk_window_set_default_icon_name ("gnome-samegnome"); @@ -584,6 +586,14 @@ build_gui (void) gtk_ui_manager_get_widget (ui_manager, "/MainMenu"), FALSE, FALSE, 0); + /* Set the colour map */ + screen = gtk_widget_get_screen (vbox); + colormap = gdk_screen_get_rgba_colormap (screen); + + if (colormap) + gtk_widget_set_default_colormap (colormap); + /* End Set colour map */ + gridframe = games_grid_frame_new (board_width, board_height); games_grid_frame_set_padding (GAMES_GRID_FRAME (gridframe), 1, 1); gtk_box_pack_start (GTK_BOX (vbox), gridframe, TRUE, TRUE, 0);