]> Pileus Git - ~andy/gtk/commitdiff
2 to 3 migration should say gtk_widget_set_visual
authorChristian Dywan <christian@twotoasts.de>
Tue, 11 Jan 2011 15:36:19 +0000 (16:36 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 11 Jan 2011 15:36:19 +0000 (16:36 +0100)
docs/reference/gtk/migrating-2to3.xml

index 70d9419f24aefeb707f9d34a8bc45361778b8310..d9bb6a3c311e60ea8a0b048c022a1378617ca1fb 100644 (file)
@@ -704,7 +704,7 @@ g_object_unref (pixbuf);
       in 'native' surfaces. Therefore, #GdkColormap and related functions
       have been removed in GTK+ 3, and visuals are used instead. The
       colormap-handling functions of #GtkWidget (gtk_widget_set_colormap(),
-      etc) have been removed and gtk_window_set_visual() has been added.
+      etc) have been removed and gtk_widget_set_visual() has been added.
     </para>
     <example><title>Setting up a translucent window</title>
     <para>You might have a screen-changed handler like the following
@@ -740,7 +740,7 @@ on_alpha_screen_changed (GtkWindow *window,
   if (visual == NULL)
     visual = gdk_screen_get_system_visual (screen);
 
-  gtk_window_set_visual (window, visual);
+  gtk_widget_set_visual (window, visual);
 }
     </programlisting>
     </example>