Mercurial > pidgin
comparison src/dnd-hints.c @ 4793:677d3cb193a1
[gaim-migrate @ 5113]
this removes all the remaining deprecated glib, gdk, gdk-pixbuf, and gtk
function calls. Hopefully I didn't break anything.
Most of this is due to the deprecation of g_strcasecmp and g_strncasecmp.
Two functions I never thought would be deprecated, but apparently they're
no good at comparing utf8 text. g_ascii_str{,n}casecmp is OK when you're
sure that it's ASCII. Otherwise, we're supposed to use g_utf8_collate(),
except that it is case sensitive. Since glib doesn't currently have a
case-insensitive one, I wrote one. If you need to compare utf8 text, you
can use gaim_utf8_strcasecmp().
I have to go do dishes now.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 16 Mar 2003 00:01:49 +0000 |
parents | 42d53c416bb9 |
children | fa6395637e2c |
comparison
equal
deleted
inserted
replaced
4792:9212d1c5b7dc | 4793:677d3cb193a1 |
---|---|
59 | 59 |
60 pixbuf = gdk_pixbuf_new_from_file(fname, NULL); | 60 pixbuf = gdk_pixbuf_new_from_file(fname, NULL); |
61 g_return_val_if_fail(pixbuf, NULL); | 61 g_return_val_if_fail(pixbuf, NULL); |
62 | 62 |
63 gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, &bitmap, 128); | 63 gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, &bitmap, 128); |
64 gdk_pixbuf_unref(pixbuf); | 64 g_object_unref(G_OBJECT(pixbuf)); |
65 | 65 |
66 gtk_widget_push_colormap(gdk_rgb_get_cmap()); | 66 gtk_widget_push_colormap(gdk_rgb_get_colormap()); |
67 win = gtk_window_new(GTK_WINDOW_POPUP); | 67 win = gtk_window_new(GTK_WINDOW_POPUP); |
68 pix = gtk_image_new_from_pixmap(pixmap, bitmap); | 68 pix = gtk_image_new_from_pixmap(pixmap, bitmap); |
69 gtk_widget_realize(win); | 69 gtk_widget_realize(win); |
70 gtk_container_add(GTK_CONTAINER(win), pix); | 70 gtk_container_add(GTK_CONTAINER(win), pix); |
71 gtk_widget_shape_combine_mask(win, bitmap, 0, 0); | 71 gtk_widget_shape_combine_mask(win, bitmap, 0, 0); |
72 gtk_widget_pop_colormap(); | 72 gtk_widget_pop_colormap(); |
73 | 73 |
74 gdk_pixmap_unref(pixmap); | 74 g_object_unref(G_OBJECT(pixmap)); |
75 gdk_bitmap_unref(bitmap); | 75 g_object_unref(G_OBJECT(bitmap)); |
76 | 76 |
77 gtk_widget_show_all(pix); | 77 gtk_widget_show_all(pix); |
78 | 78 |
79 return win; | 79 return win; |
80 } | 80 } |
93 width = w->allocation.width; | 93 width = w->allocation.width; |
94 } | 94 } |
95 else | 95 else |
96 { | 96 { |
97 gdk_window_get_origin(w->window, &ox, &oy); | 97 gdk_window_get_origin(w->window, &ox, &oy); |
98 gdk_window_get_size(w->window, &width, &height); | 98 gdk_drawable_get_size(w->window, &width, &height); |
99 } | 99 } |
100 | 100 |
101 if (x1) *x1 = ox; | 101 if (x1) *x1 = ox; |
102 if (y1) *y1 = oy; | 102 if (y1) *y1 = oy; |
103 if (x2) *x2 = ox + width; | 103 if (x2) *x2 = ox + width; |