Thursday, July 24, 2008

Detach now detaches

Detach now detaches. (!) It handles the showing and hiding of an Awn dialog and can also detach. Right-click the applet and click 'Detach', and a new window will popup. The default is the applet icon. Click it to show the dialog, with a transparent background. So far, the only applet converted to use Detach (in C) is the Main Menu Applet. See Screenshot. The are many, many little things that have to be fixed or implemented, such as not hiding the dialog when clicking it, and a few large things, such as attaching.

Get Detach in C at my branch.
bzr co lp:~sharkbaitbobby/awn-extras/awn-detach
./autogen.sh
cd src/libawn-extras
make
sudo make install
cd ../main-menu
make
sudo make install

Here's an example of what the code will look like now:
Detach *d;
d = detach_new(applet);
detach_add(d, widget);
GdkPixbuf *icon = awn_applet_simple_set_awn_icon(applet, APPLET_NAME, APPLET_ICON);
detach_set_pixbuf(d, icon);
detach_add_menu_item(d, detach_menu_item_simple(d));
...
detach_hide_dialog(d); //Would be used to force the dialog to hide, even if focus isn't lost

No comments: