Wednesday, July 30, 2008

Some Updates

Detach
The first version of Detach is out, and is fully functional. Two applets, Awn Main Menu and Awn Terminal Applet, have been converted. The Python bindings unfortunately currently don't work. [Link to Branch] [Screenshot 1] [Screenshot 2]

Wiki
Malept has rewritten the "How to use Bazaar" page on the wiki. It shows how to set up Bazaar for Launchpad. Even if you're not using Bazaar + Launchpad for Awn [Extras], it's worth a look.

Applets
We now have three new applets. The first, "Desktop Switcher," can organize your desktop backgrounds and even cycle through them. The second, Xfce Menu, is a main menu for Xfce users. And the third, Netflix Applet, views the RSS feeds from Netflix.

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

Monday, July 21, 2008

Detach now compiles

The Detach library now compiles. (!) It's written in C and is included in libawn-extras in my branch. This will allow any applet to detach just like to-do, run, and SlickSwitcher do. Unfortunately, there's not too much to see now. You can look at the source code to get an idea of what the it'll be like. Here's some examples:
GObject *d;
d = detach_new(applet);
detach_add(d, widget);
detach_set_icon_type(d,DETACH_ICON_SURFACE);
detach_set_surface(d, surface);
This is only the second thing I've done in C, and, for me, the process has been surprisingly easy. C does seem somewhat intimidating with pointers and type casting, etc., but it's really not that hard. I learned a lot by just looking at Awn's (and -Extras') source code.

Next I'm probably going to do Python bindings for it so I can test it more easily.

Wednesday, July 16, 2008

SlickSwitcher it is!

I recently decided on the name SlickSwitcher... and, um...
You can download it here, however the forum thread will always have the most recent version, until it is included in Awn Extras. :)

Monday, July 14, 2008

Sin Nombre dialog colors

You can now change the colors of the Awn dialog in Sin Nombre, via the Preferences window. Personally, I currently don't use this as I like my black background-blue border dialogs. :)

See Screenshot

In other news, I'm very close to choosing "SlickSwitcher" as the name. isaac_j87 started an Ubuntu Forums thread asking for name suggestions. Most people agreed with SlickSwitch[er], but there are some other suggestions. [Link]

Sunday, July 13, 2008

Awn Icons

moonbeam has been working on a new feature in Awn called awn-icons, which allows users to drag an icon onto the applet itself and change the icon. The user can choose from the applet instance, the applet, or the type of icon for applying. So, if a user drags a new icon onto File Browser Launcher and chooses icon type, all of the applets that use the 'folder' icon will change. (AFAIK, this would require a restart of Awn/ the applets.)
This enables users to change icons for applets that they couldn't before, such as the media icons and MiMenu. Use Ubuntu but want the translucent GNOME logo on MiMenu? Just drag and drop it on MiMenu. Got some nice back, play, and forward icons? Just drag them on to the media icons applets.

Applets that have been converted (note: I'll try my best to keep this updated):
*Affinity
*aRSS
*AWNLib (not an applet, but still)
*Awn Notification Daemon
*Awn Terminal
*Cairo Menu
*Cairo Menu Classic
*Comic
*Comics
*File Browser Launcher
*Main Menu
*Media Control
*Media Icons
*MiMenu
*Mount Applet
*Mobile Meebo
*Pandora
*Places
*Quit Applet
*RTM
*Run (not in Awn Extras)
*Show Desktop
*Tomboy Applet
*TsClient
*Web Applet
IIRC, every applet that should use Awn Icons does. (!)

Several applets distribute icons that aren't found in a normal theme and use them as their icons. One example is the Quit Applet. You have to modify Makefiles to place the icons in the appropriate directory. I'll show the Quit Applet's [Make]files.

src/quit-applet
Makefile.am
quit-applet.py
quit-applet.desktop.in.in
icons/
Makefile.am
application-exit.svg

src/quit-applet/Makefile.am:

SUBDIRS = icons
APPLET_NAME = quit-applet
APPLET_MAIN_FILE = quit-applet.py
include $(top_srcdir)/Makefile.python-applet
dist_applet_DATA = \
COPYING \
$(NULL)

src/quit-applet/quit-applet.desktop.in.in:

[Desktop Entry]
Version=1.0
Name=Quit-Logoff applet
Type=Application
X-AWN-AppletType=Python
Comment=A applet to exit your session
Exec=quit-applet/quit-applet.py
Icon=quit-applet/icons/scalable/apps/application-exit.svg
Name[en_US]=Quit-Logoff applet
X-AWN-AppletCategory=System

src/quit-applet/icons/Makefile.am:

dist_quitapplet_DATA = \
application-exit.svg \
COPYING \
LGPL

quitappletdir = ${prefix}/share/avant-window-navigator/applets/quit-applet/icons/scalable/apps/

You must place the icon[s] in a separate directory named "icons," otherwise this won't work. Note that you can actually omit the instances of "scalable/apps," which would be better if you have only one icon. Also, if your icon is not an SVG image, either change "scalable" or just omit that part.

Now all the quit applet has to do to get the icon is this:
self.set_awn_icon('quit-applet', 'application-exit')

If an applet needs the icon as a Pixbuf, such as for preferences dialogs, etc., the set_awn_icon method returns the Pixbuf. It's owned by awn-icons, so you would want to use the awn-icons API directly, which currently doesn't have Python bindings.


Note: If you are using this as a tutorial for converting these applets and you need anything clarified, etc., just tell me. :)

Friday, July 11, 2008

Confirmation dialogs for To-Do

The To-Do List Applet now includes confirmation dialogs whenever you try to delete an item or category. You can choose whether or not to use these confirmation dialogs. The Preferences dialog now has a better layout and includes the above option.

See Screenshot

Thursday, July 10, 2008

Preferences Dialog for To-Do List

The To-Do List Applet now has a preferences dialog/window, as of r670. You can change the title of the list, which will be displayed when you hover over the applet icon and when you open the dialog. (Not when detached, though) You can also change the color of the icon to:
*one of the Tango Desktop Project colors
*from the current Gtk theme
*custom colors
If you choose custom colors, you can change the outer border, inner border, main color, and text color. You can also choose which type of icon to use:
*standard with number showing number of items
*partial inner border showing progress along with ##% as the number
*both the border of progress and the number of items

See Screenshot


I plan on adding a confirmation dialog when you try to delete an item or category ("Are you sure you want to delete this item?"), with a check box next to "Don't show this again." You'll be able to change the showing of that in the preferences dialog.

Wednesday, July 09, 2008

Sin Nombre


IMO, Sin Nombre is ready for most people to use now. (!) It updates when appropriate, usually doesn't redraw when it's not necessary, resizes correctly, toasts bread, cures cancer, and detaches. (Two of the above mentioned features are in beta.)

Download the latest and greatest here.
See screenshot


As I was writing this, this came to my mind: A network-attached Toaster. Then all those applications that claim to toast bread could tell the truth. :)

Sunday, July 06, 2008

¡Hola, mundo!

Every blog by a developer always starts with some post like this. I work on this... I made this... I use this... Et cetera, et cetera, et cetera... I'd love to have this post somehow be different, but I'm all out of ideas, so...

My name is Matt and I develop some stuff for open-source projects. Really, for now, it's just one (Avant Window Navigator). I made the detachable To-Do List Applet and Run Applet. I also made the File Browser Launcher applet, which is in Awn Extras >= 0.2.4. I'm working on an applet currently named "Sin Nombre," which is a rewrite of the BlingSwitcher applet. It's still a WIP, but it's certainly better than nothing. One thing about my applets (excluding File Browser Launcher) is that they can all detach from the dock, and be just as functional.

I also have a little Launchpad branch, which will allow you to change the colors of Awn's dialogs. [Link] I have another little Launchpad branch, which I use for my applets and other Awn stuff, such as an Awn Emulator. [Link to branch]

Right now, basically all I'm working on is Sin Nombre (it needs a name) and the Run Applet. You might also see me on the Awn Wiki a bit.