aboutsummaryrefslogtreecommitdiffstats
path: root/packages/gpe-bluetooth/gpe-bluetooth-0.37/icon-resize.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/gpe-bluetooth/gpe-bluetooth-0.37/icon-resize.patch
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
downloadopenembedded-c8e5702127e507e82e6f68a4b8c546803accea9d.tar.gz
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/gpe-bluetooth/gpe-bluetooth-0.37/icon-resize.patch')
-rw-r--r--packages/gpe-bluetooth/gpe-bluetooth-0.37/icon-resize.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/packages/gpe-bluetooth/gpe-bluetooth-0.37/icon-resize.patch b/packages/gpe-bluetooth/gpe-bluetooth-0.37/icon-resize.patch
index e69de29bb2..2580d9c3c8 100644
--- a/packages/gpe-bluetooth/gpe-bluetooth-0.37/icon-resize.patch
+++ b/packages/gpe-bluetooth/gpe-bluetooth-0.37/icon-resize.patch
@@ -0,0 +1,43 @@
+diff -u -r1.52 main.c
+--- gpe-bluetooth/main.c 7 Sep 2004 00:01:17 -0000 1.52
++++ gpe-bluetooth/main.c 19 Oct 2004 08:16:27 -0000
+@@ -503,6 +503,22 @@
+ g_timeout_add (time, (GSourceFunc) cancel_dock_message, (gpointer)id);
+ }
+
++gboolean
++configure_event (GtkWidget *window, GdkEventConfigure *event, GdkBitmap *bitmap)
++{
++ GdkPixbuf *buf;
++ int xoff, yoff;
++
++ buf = gpe_find_icon ("bt-off");
++
++ xoff = (event->width - gdk_pixbuf_get_width (buf)) / 2;
++ yoff = (event->height - gdk_pixbuf_get_height (buf)) / 2;
++
++ gtk_widget_shape_combine_mask (window, bitmap, xoff, yoff);
++
++ return FALSE;
++}
++
+ int
+ main (int argc, char *argv[])
+ {
+@@ -572,14 +588,14 @@
+ icon = gtk_image_new_from_pixbuf (gpe_find_icon (radio_is_on ? "bt-on" : "bt-off"));
+ gtk_widget_show (icon);
+ gdk_pixbuf_render_pixmap_and_mask (gpe_find_icon ("bt-off"), NULL, &bitmap, 255);
+- gtk_widget_shape_combine_mask (window, bitmap, 2, 0);
+- gdk_bitmap_unref (bitmap);
++ gtk_widget_shape_combine_mask (window, bitmap, 0, 0);
+
+ gpe_set_window_icon (window, "bt-on");
+
+ tooltips = gtk_tooltips_new ();
+ gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), window, _("This is the Bluetooth control.\nTap here to turn the radio on and off, or to see a list of Bluetooth devices."), NULL);
+
++ g_signal_connect (G_OBJECT (window), "configure-event", G_CALLBACK (configure_event), bitmap);
+ g_signal_connect (G_OBJECT (window), "button-press-event", G_CALLBACK (clicked), NULL);
+ gtk_widget_add_events (window, GDK_BUTTON_PRESS_MASK);
+