[Pidgin] #2629: Modifications needed for building with native GTK on MacOSX + docklet using GtkStatusIcon

Pidgin trac at pidgin.im
Mon Aug 27 19:58:49 EDT 2007


#2629: Modifications needed for building with native GTK on MacOSX + docklet using
GtkStatusIcon
---------------------------+------------------------------------------------
  Reporter:  nevil         |       Owner:  seanegan         
      Type:  patch         |      Status:  assigned         
  Priority:  minor         |   Milestone:  2.2.0            
 Component:  pidgin (gtk)  |     Version:                   
Resolution:                |    Keywords:  MacOSX gtk native
   Pending:  0             |  
---------------------------+------------------------------------------------
Comment (by nevil):

 Replying to [comment:9 seanegan]:

 Regarding the icon sizes, I fixed it for Mac by changing the size in
 pidginstock.c from GTK_ICON_SIZE_MENU to GTK_ICON_SIZE_SMALL_TOOLBAR.

 {{{
 #if defined(__APPLE__) && !defined(HAVE_X11)
     gtk_icon_source_set_size(source, GTK_ICON_SIZE_SMALL_TOOLBAR);
 #else
     gtk_icon_source_set_size(source, GTK_ICON_SIZE_MENU);
 #endif
 }}}

 It worked but is a bit hacky so I didn't do this change for other than
 Mac.
 You are correct in that GtkStatusIcon only looks for stock icons in the
 exact size you tell it to.
 However, it will rescale the icon to the correct size anyway so it works.

 Regarding the left click not working, I was kind of expecting that. I've
 had no way of testing which id's are returned in the callback.
 [http://library.gnome.org/devel/gtk/unstable/GtkStatusIcon.html
 #GtkStatusIcon-popup-menu]

 The problem is that the button id's received in
 docklet_gtk_status_clicked_cb doesn't match what pidgin_docklet_clicked()
 is expecting.

 I can check the source of Gtk tonight after work to create a mapping that
 works for X11 too. (It doesn't seem to be in the documentation...)

-- 
Ticket URL: <http://developer.pidgin.im/ticket/2629#comment:10>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list