]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/gpe-bluetooth/gpe-bluetooth-0.37/icon-resize.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / gpe-bluetooth / gpe-bluetooth-0.37 / icon-resize.patch
1 diff -u -r1.52 main.c
2 --- gpe-bluetooth/main.c        7 Sep 2004 00:01:17 -0000       1.52
3 +++ gpe-bluetooth/main.c        19 Oct 2004 08:16:27 -0000
4 @@ -503,6 +503,22 @@
5    g_timeout_add (time, (GSourceFunc) cancel_dock_message, (gpointer)id);
6  }
7  
8 +gboolean 
9 +configure_event (GtkWidget *window, GdkEventConfigure *event, GdkBitmap *bitmap)
10 +{
11 +  GdkPixbuf *buf;
12 +  int xoff, yoff;
13 +
14 +  buf = gpe_find_icon ("bt-off");
15 +
16 +  xoff = (event->width - gdk_pixbuf_get_width (buf)) / 2;
17 +  yoff = (event->height - gdk_pixbuf_get_height (buf)) / 2;
18 +
19 +  gtk_widget_shape_combine_mask (window, bitmap, xoff, yoff);
20
21 +  return FALSE;
22 +}
23 +
24  int
25  main (int argc, char *argv[])
26  {
27 @@ -572,14 +588,14 @@
28    icon = gtk_image_new_from_pixbuf (gpe_find_icon (radio_is_on ? "bt-on" : "bt-off"));
29    gtk_widget_show (icon);
30    gdk_pixbuf_render_pixmap_and_mask (gpe_find_icon ("bt-off"), NULL, &bitmap, 255);
31 -  gtk_widget_shape_combine_mask (window, bitmap, 2, 0);
32 -  gdk_bitmap_unref (bitmap);
33 +  gtk_widget_shape_combine_mask (window, bitmap, 0, 0);
34  
35    gpe_set_window_icon (window, "bt-on");
36  
37    tooltips = gtk_tooltips_new ();
38    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);
39  
40 +  g_signal_connect (G_OBJECT (window), "configure-event", G_CALLBACK (configure_event), bitmap);
41    g_signal_connect (G_OBJECT (window), "button-press-event", G_CALLBACK (clicked), NULL);
42    gtk_widget_add_events (window, GDK_BUTTON_PRESS_MASK);
43