Transparent icons, continued



Apparently, there's no good way to make things work with background
pixmaps yet (will be in Gnome 2.0) so here's the back_change patch.

-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
Catproof is an oxymoron, childproof nearly so.

? gnome-pilot-config
? gnome-pilot.spec
cvs server: Diffing .
cvs server: Diffing Documentation
cvs server: Diffing Documentation/conduit-SyncAbs-impl
cvs server: Diffing Documentation/conduits
cvs server: Diffing admin
cvs server: Diffing applet
Index: applet/ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-pilot/applet/ChangeLog,v
retrieving revision 1.5
diff -c -r1.5 ChangeLog
*** applet/ChangeLog	1999/11/04 15:01:20	1.5
--- applet/ChangeLog	1999/11/05 14:25:24
***************
*** 1,3 ****
--- 1,8 ----
+ 1999-11-04  Alan Shutko  <ats@acm.org>
+ 
+ 	* pilot.c (create_pilot_widget): Put pixmap in an event_box, to
+ 	handle the click event.
+ 
  1999-11-03  Alan Shutko  <ats@acm.org>
  
  	* pilot.c (create_pilot_widget): Added space to tooltip.
Index: applet/pilot.c
===================================================================
RCS file: /cvs/gnome/gnome-pilot/applet/pilot.c,v
retrieving revision 1.30
diff -c -r1.30 pilot.c
*** applet/pilot.c	1999/11/04 15:01:20	1.30
--- applet/pilot.c	1999/11/05 14:25:24
***************
*** 579,585 ****
  static GtkWidget *
  create_pilot_widget(GtkWidget *window)
  {
-   GtkWidget *frame;
    GtkWidget *event_box;
    GtkStyle *style;
    int i;
--- 579,584 ----
***************
*** 600,618 ****
    for (i = 0; i < sizeof(pixmaps)/sizeof(pixmaps[0]); i++)
        pixmaps[i] = gnome_unconditional_pixmap_file(pixmaps[i]);
    
    pixmap = gnome_pixmap_new_from_file(pixmaps[curstate]);
  
!   gtk_widget_set_events(pixmap, gtk_widget_get_events(pixmap) |
  			GDK_BUTTON_PRESS_MASK);
!   gtk_signal_connect(GTK_OBJECT(pixmap), "button-press-event",
  		     GTK_SIGNAL_FUNC(pilot_clicked_cb), NULL);
  
  
    gtk_widget_show(pixmap);  
! 
!   frame = gtk_frame_new(NULL);
!   gtk_frame_set_shadow_type(GTK_FRAME(frame),GTK_SHADOW_NONE);
!   gtk_container_add(GTK_CONTAINER(frame),pixmap);
  
    timeout_handler_id = gtk_timeout_add(1000,timeout,pixmap);
    
--- 599,617 ----
    for (i = 0; i < sizeof(pixmaps)/sizeof(pixmaps[0]); i++)
        pixmaps[i] = gnome_unconditional_pixmap_file(pixmaps[i]);
    
+   event_box = gtk_event_box_new();
+   
    pixmap = gnome_pixmap_new_from_file(pixmaps[curstate]);
  
!   
!   gtk_widget_set_events(event_box, gtk_widget_get_events(applet) |
  			GDK_BUTTON_PRESS_MASK);
!   gtk_signal_connect(GTK_OBJECT(event_box), "button-press-event",
  		     GTK_SIGNAL_FUNC(pilot_clicked_cb), NULL);
  
  
    gtk_widget_show(pixmap);  
!   gtk_container_add(GTK_CONTAINER(event_box), pixmap);
  
    timeout_handler_id = gtk_timeout_add(1000,timeout,pixmap);
    
***************
*** 654,660 ****
  		     NULL);
  
  
!   return frame;
  }
  
  static GtkWidget * applet_start_new_applet(const gchar *goad_id, const char **params, int nparams) {
--- 653,659 ----
  		     NULL);
  
  
!   return event_box;
  }
  
  static GtkWidget * applet_start_new_applet(const gchar *goad_id, const char **params, int nparams) {
cvs server: Diffing capplet
cvs server: Diffing conduits
cvs server: Diffing conduits/address
cvs server: Diffing conduits/backup
cvs server: Diffing conduits/calendar
cvs server: Diffing conduits/email
cvs server: Diffing conduits/file
cvs server: Diffing conduits/memo
cvs server: Diffing conduits/memo_file
cvs server: Diffing drafts
cvs server: Diffing drafts/idl
cvs server: Diffing drafts/mvachhar
cvs server: Diffing gpilot-fileman
cvs server: Diffing gpilotd
cvs server: Diffing idl
cvs server: Diffing macros
cvs server: Diffing po
cvs server: Diffing utils



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]