cpw.qulogic.gtk3: f75245c7: don't use GDK_DRAWABLE

malu at pidgin.im malu at pidgin.im
Thu Dec 2 07:38:20 EST 2010


----------------------------------------------------------------------
Revision: f75245c79e2fa2fe7e32ccd1c0e9cf01564e2ff2
Parent:   0edbab908ba60599e47d5c132bd6746c13664250
Author:   malu at pidgin.im
Date:     12/02/10 07:11:26
Branch:   im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/f75245c79e2fa2fe7e32ccd1c0e9cf01564e2ff2

Changelog: 

don't use GDK_DRAWABLE

Changes against parent 0edbab908ba60599e47d5c132bd6746c13664250

  patched  pidgin/gtkblist.c
  patched  pidgin/gtkimhtml.c
  patched  pidgin/gtkplugin.c
  patched  pidgin/gtkroomlist.c
  patched  pidgin/gtkwhiteboard.c

-------------- next part --------------
============================================================
--- pidgin/gtkimhtml.c	de1493d2d17f85d5e083148189def00f85b49e0a
+++ pidgin/gtkimhtml.c	18dfb28c34a6da2a16c54baee4ad09829b86f22c
@@ -499,7 +499,7 @@ gtk_imhtml_tip_paint (GtkIMHtml *imhtml)
 gtk_imhtml_tip_paint (GtkIMHtml *imhtml)
 {
 	PangoLayout *layout;
-	cairo_t *cr = gdk_cairo_create(GDK_DRAWABLE(imhtml->tip_window));
+	cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(imhtml->tip_window));
 
 	g_return_val_if_fail(GTK_IS_IMHTML(imhtml), FALSE);
 
============================================================
--- pidgin/gtkplugin.c	de56762bdecede725242b6b5350e4f645908285e
+++ pidgin/gtkplugin.c	75f6c872f0ad32dade5d21c242bd847a42ecc105
@@ -562,7 +562,7 @@ pidgin_plugins_paint_tooltip(GtkWidget *
 pidgin_plugins_paint_tooltip(GtkWidget *tipwindow, gpointer data)
 {
 	PangoLayout *layout = g_object_get_data(G_OBJECT(tipwindow), "tooltip-plugin");
-  cairo_t *cr = gdk_cairo_create(GDK_DRAWABLE(gtk_widget_get_window(tipwindow)));
+  cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(tipwindow));
   gtk_paint_layout(gtk_widget_get_style(tipwindow), cr, GTK_STATE_NORMAL, FALSE,
 			tipwindow, "tooltip",
 			6, 6, layout);
============================================================
--- pidgin/gtkblist.c	5a7a4a106bb463a0e2a9b1ec4cabc87b41b82cb3
+++ pidgin/gtkblist.c	7b45185295dccd5a97f3038d4aff260b85bf106b
@@ -3028,7 +3028,7 @@ pidgin_blist_paint_tip(GtkWidget *widget
 	for(l = gtkblist->tooltipdata; l; l = l->next)
 	{
 		struct tooltip_data *td = l->data;
-    	cairo_t *cr = gdk_cairo_create(GDK_DRAWABLE(gtk_widget_get_window(gtkblist->tipwindow)));
+    	cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(gtkblist->tipwindow));
       
 		if (td->avatar && pidgin_gdk_pixbuf_is_opaque(td->avatar))
 		{
@@ -3254,8 +3254,8 @@ static gboolean pidgin_blist_expand_time
 		pidgin_blist_expand_contact_cb(NULL, node);
 
 		gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, &gtkblist->contact_rect);
-    gtkblist->contact_rect.width =
-      gdk_window_get_width(GDK_DRAWABLE(gtk_widget_get_window(tv)));
+		gtkblist->contact_rect.width =
+		gdk_window_get_width(gtk_widget_get_window(tv));
 		gtkblist->mouseover_contact = node;
 		gtk_tree_path_down (path);
 		while (gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), &i, path)) {
@@ -5641,22 +5641,22 @@ paint_headline_hbox  (GtkWidget      *wi
 		      GdkEventExpose *event,
 		      gpointer user_data)
 {
-  cairo_t *cr = gdk_cairo_create(GDK_DRAWABLE(widget));
-  GtkAllocation allocation;
+	cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(widget));
+	GtkAllocation allocation;
 
-  gtk_widget_get_allocation(widget, &allocation);
+	gtk_widget_get_allocation(widget, &allocation);
 	gtk_paint_flat_box (gtk_widget_get_style(widget),
-		      cr,
-		      GTK_STATE_NORMAL,
-		      GTK_SHADOW_OUT,
-		      widget,
-		      "tooltip",
-		      allocation.x + 1,
-		      allocation.y + 1,
-		      allocation.width - 2,
-		      allocation.height - 2);
-  cairo_destroy(cr);
-    
+		cr,
+		GTK_STATE_NORMAL,
+		GTK_SHADOW_OUT,
+		widget,
+		"tooltip",
+		allocation.x + 1,
+		allocation.y + 1,
+		allocation.width - 2,
+		allocation.height - 2);
+	cairo_destroy(cr);
+
 	return FALSE;
 }
 
============================================================
--- pidgin/gtkroomlist.c	4e4423de9ea3fa87d4ee62d86d3ac61a0f59fc17
+++ pidgin/gtkroomlist.c	22ab3dd154ce353a5fd520dec4169aeab231c99b
@@ -360,7 +360,7 @@ pidgin_roomlist_paint_tooltip(GtkWidget 
 	int max_text_width;
 	GtkTextDirection dir = gtk_widget_get_direction(GTK_WIDGET(grl->tree));
   cairo_t *cr =
-        gdk_cairo_create(GDK_DRAWABLE(gtk_widget_get_window(grl->tipwindow)));
+        gdk_cairo_create(gtk_widget_get_window(grl->tipwindow));
     
 	style = gtk_widget_get_style(grl->tipwindow);
 
============================================================
--- pidgin/gtkwhiteboard.c	25c85a5ef9385c53cec11dea59ca4061156721a6
+++ pidgin/gtkwhiteboard.c	1d5faca396e58afc865b418a19083f6304a88b8c
@@ -358,8 +358,8 @@ static gboolean pidgin_whiteboard_config
 	PidginWhiteboard *gtkwb = (PidginWhiteboard*)data;
 	GdkPixbuf *pixbuf = gtkwb->pixbuf;
 	cairo_t *cr;
-  GdkWindow *window = gtk_widget_get_window(widget);
-  GtkAllocation allocation;
+	GdkWindow *window = gtk_widget_get_window(widget);
+	GtkAllocation allocation;
     
 	if (pixbuf) {
 		cr = g_object_get_data(G_OBJECT(pixbuf), "cairo-context");
@@ -368,16 +368,15 @@ static gboolean pidgin_whiteboard_config
 		g_object_unref(pixbuf);
 	}
 
-  gtk_widget_get_allocation(widget, &allocation);
+	gtk_widget_get_allocation(widget, &allocation);
     
-  pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,
-                          FALSE,
-                          gdk_visual_get_depth(GDK_VISUAL(window)),
-                          allocation.width, allocation.height);
+	pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,
+    	FALSE, gdk_visual_get_depth(GDK_VISUAL(window)),
+		allocation.width, allocation.height);
                                                     
 	gtkwb->pixbuf = pixbuf;
 
-	cr = gdk_cairo_create(GDK_DRAWABLE(pixbuf));
+	cr = gdk_cairo_create(gtk_widget_get_window(widget));
 	g_object_set_data(G_OBJECT(pixbuf), "cairo-context", cr);
 	gdk_cairo_set_source_color(cr, &gtk_widget_get_style(widget)->white);
 	cairo_rectangle(cr,
@@ -394,7 +393,7 @@ static gboolean pidgin_whiteboard_expose
 	GdkPixbuf *pixbuf = gtkwb->pixbuf;
 	cairo_t *cr;
 
-	cr = gdk_cairo_create(GDK_DRAWABLE(gtk_widget_get_window(widget)));
+	cr = gdk_cairo_create(gtk_widget_get_window(widget));
 	gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0);
 	cairo_rectangle(cr,
 	                event->area.x, event->area.y,


More information about the Commits mailing list