Up North

Personal blog of Mikael Hallendal
  • Home
  • About

GtkStatusIcon support in Mac OS X

Published by Mikael Hallendal on December 19, 2006 02:14 am under Programming

Have been sick the last few days but today I felt good enough to get some hacking done. I started hacking on GtkStatusIcon support in the Mac OS X port and is pretty happy with the result of todays hacking. 

Showing Gossip with status icon in the Mac OS X menu bar
 It’s fairly complete, only need to add support to hide the status icon and clean up the code a bit. However, the Mac OS X NSStatusItem API doesn’t support everything we support in GtkStatusIcon so there will be some restrictions on what you can do but I think that is true for the Windows port as well.From what I can see you can either get it to signal that the user left-clicked on the icon or that he double clicked. Not both at the same time. More over would it be nice to be able to set an NSMenu instead of showing a Gtk menu, it would make it integrate better.Most of it was pretty straight forward but I had to fix an assumption in the event system causing a crash since Gdk assumed that all windows where created by Gdk.

Share This

7 Comments so far

  1. Phrodo_00 on December 19th, 2006

    OMG! won’t hordes of mac fanboys go there and haunt you down for putting colored stuuf into their notification area!!?? Besides of the risk of your personal integrity, the thing looks really nice, I wonder how it works with gtk directly over quartz, or is that it?

  2. Remko Tronçon on December 19th, 2006

    Too bad the menu itself still looks non-native. But that’s X11 I suppose.

  3. Mikael Hallendal on December 19th, 2006

    Phrodo, having non-colored icons there is by convention rather than forced (the GMail icon gets colored when you mail). If we released Gossip like this for Mac we probably would get people complain yes.

    Remko, the menu is a natively (no-X) rendered Gtk+ menu. As I mentioned in my post, it would be nice to add support for setting a Cocoa menu instead of using a Gtk+ menu for better integration.

  4. Dave on December 19th, 2006

    Wow! Thats awesome. I can’t wait to get GTK apps compiling nativly on osx. I hate having to run X11.app in order to play with inkscape, gimp and ethereal.

    Great job :)

  5. Øivind on December 20th, 2006

    I love you lot!

    Wonderful work. Can’t wait for a finished gtk+ port :)

  6. Oskar L-B on December 20th, 2006

    Snyggt jobbat! Hej då X11.

    (Stolt svensk Chalmerist tillika Mac:are önskar God Jul.)

  7. Daniel on December 22nd, 2006

    Great to hear about it. As Dave, I would like to have a native Gtk+ port too. X11 is no solution for the future. Theming can be done later on.

    Thanks for that and keep on the good work!

Posting your comment.


  • Categories

    • Community (3)
    • Imendio (26)
    • Life (13)
    • Photography (1)
    • Programming (36)
    • Software (15)
    • Tips (8)
    • Uncategorized (180)
  • Most Popular Posts

    • Gtk+ natively on Mac OS X
    • Removing a remote branch in Git
    • GTK+ 3.0, enabling incrementalism
    • New Movable Type Theme
    • Google Calendar and Prism
  • Popular Tags

    c conference git gnome gossip gtk+ guadec Imendio linux loudmouth macosx ruby screencast web xmpp
  • My latest tweets

    • Think I might be catching a cold with sour throat and voice of a whisky drinker. 3 days ago
    • Been to pick up my Wrath of the Lich King DVD and lunch with a friend. 1 week ago
    • Productive evening, refreshed some guitar theory as well as added rspec to my little spare time project 1 week ago
    • More updates...
  • Feeds

    • Entries
    • Comments

Copyright © 2008 Mikael Hallendal
WordPress Theme based on Light Theme

Close
  • Social Web
  • E-mail
  • del.icio.us
  • Digg
  • Furl
  • Yahoo! My Web
  • StumbleUpon
  • Google Bookmarks
  • Technorati
  • BlinkList
  • Newsvine
  • ma.gnolia
  • reddit
  • Tailrank
  • 9rules Clips
E-mail It