Friday, 16 March 2007

Arrfinity ;)

What a week! Its weird how so many things come up at once! I won't bore you with the details, but lets just say that 5 days without a net connection wasn't the worst thing that happended!

Anyway, being without the internet gave me some much-needed time with Awn, the fruits of which you'll see over the coming days! However, it did also push me back a few days with some important stuff, so with out further ado:



Yep, thats really Affinity, no mockups, just real code, which you can get here!

Now, as this is a 0.1 release, I ask you to be gentle ;). Here's a break down of some basic features:

* Front-end to both the Beagle & Tracker desktop search engines.
* Has actions (configurable through Desktop files), which should help to speed up common tasks.
* Has in-built, user-configurable, filters which work in the the entry box, so typing 'pics:london' will only bring up pictures.
* Super-fast application searching through an in-built list of applications.
* Colours can be customised to your taste.
* Lives in the system-tray, but can be called by a global key stroke. Default is Ctrl+Alt+a, but you can change it to anything you like!
* Written in C for minimal impact on your system, but maximum speed!

More info is available on the project page. I have removed 'Favourites' for now as it was a bit unstable, but it should be back in over the weekend.

Please bear in mind that Affinity currently only works on gtk+-2.0 >= 2.10, I am working on 2.8 support. Also, Affinity should work without RGBA (i.e. without Beryl or Compiz), but this has not been extensively tested.

OTH, it shouldn't take down your system or anything ;p. One bug that I do know about is that scrolling up & down fast on the treeview widget will cause artifacts to appear, which disappear when you move your mouse over them or press a key. I'm sure that this is just some teething pains between Gtk + RGBA, but I'll try and fix this ASAP.

Also, an I probably should have blogged about this sooner, shortly after I published the Affinity mockups, I got an email from a person who wanted to make something similar for OS X! Lol...who'da thunk it? The application is called Loro, and is free software. He is working on some really cool ideas, such as Google maps integration, check out his blog for more info.

Anyway, better get to bed, I'll leave you with some more screenshots:

Friday, 9 March 2007

Awn Updates

I've been spending all of my free time on Awn recently, cleaning up the code, adding some missing features, and merging some excellant patches, here's a breakdown:
  • Merged a patch by Chirstian Kirbach which cleans up a lot of warning during compilation
  • Fixed a mem leak caused by applications which change their icon many times (ie. Gimp). Also, on my system, g-s-m reports Awn using only 2.6Mb after several hours usage :).
  • Separator will position itself correctly when adding new launchers
  • Fixed bug when closing lots of windows at once, and Awn getting 'stuck'
  • Merged a patch from James Willcox which makes the icons actually 'bounce' on hover, rather than go up & down. I blame him for wasting the next 30 mins of mine as I sat there watching the icons bouncing ;)!
  • When in auto-hide mode, the bar will pop-up when you are dragging a file
  • Launcher icons will change when you change your theme (GNOME/Gtk)

Last week I was talking about having the ability to add menu items to the popup menu of a task through D-Bus, well, now its here!

I have added another Rhythmbox plugin under the plugins/Rhythmbox directory. It's called awn-menus, and you have to move the awn-menus.rb-plugin & awn-menus folder to your ~/.gnome2/rhythmbox/plugins. Heres a preview:



AddTaskMenuItemByName ("rhythmbox", "gtk-media-previous", " "):
where arg1 is the name of the task, arg2 is optionally a gtk-stock-id, and arg3 is a normal name (if you can't use a stock id).

AddTaskCheckItemByName("rhythmbox", "P_lay", False):
where arg1 is the name of the task, arg2 is a mnemonic name for the item, and arg3 is a bool, as to whether it is 'checked' or not.

Both return an ID integer. You then listen for "MenuItemClicked" & "CheckItemClicked" signals on com.google.code.Awn. The "MenuItemClicked" will come with one arg, which is the ID, so if it matches your ID, you should do something. "CheckItemClicked" will come with two args, the ID, and a bool telling you whether the check is active or not.

You can also use AddTaskCheckItemByName ( name, ID, bool) to set the check from your plugin after you've created it. The rhythmbox plugin is the best example, so have a look at it ;). At the moment, I have put a limit of 5 extra items per task, as I think more than that looks a bit over-the-top. I still need to add the code for removing an item, and disabling an item.

Okay, thats it for now, expect lots more bug fixes over the weekend, and some brand new auto-hide code!

Sunday, 4 March 2007

I'm not even supposed to be here today

I have had practically no time for hacking this weekend. I am somewhat behind on Awn, but I have been bug-fixing in my personal copy, so expect an update tomorrow, when I get the last little problems sorted out, then on to 0.2 :).

In what little time I had, I brought together some ideas which were floating around in my head, and started some preliminary work on them:

Introducing Arena...

...which you could best describe as a tracker-based media browser/player. It will look like this:



At the moment, I have no code to show, as I am constructing the bits and pieces which make up a program of this type, for instance, the all-important tree-based menu structure. What I can tell you is the following few facts:
  • It is more Front Row than MS Media Center, and therefore has no intended support for TV cards and such (at this time). More likely, however, is a built in Internet TV browsing/viewing.
  • I is written in C, using the rock-tastic Clutter.
  • Pictures don't do it justice. I have had a past life as a Flash designer (shock! horror!), and I have been getting to grips with Clutters effect-code, and its hard to describe the feeling of seeing album covers flying around on screen :). I will try and do a screen cast of some of my example code soon.
  • It will be GNOME-based, as is mostly everything that I do, I'll give you no excuses, it just makes my life easier :).
  • I'd like to add support for more media-providers ie. Avahi (zeroconf).
  • It will do its darn-best to honor different layouts of media & the corresponding cover-art stuff, such as cover.jpg, album.jpg etc.
  • UI is not final, but pretty darn close, unless something drastic happens :). I still need to add some more info in places, but on the whole, I want it as simple as possible.
  • I like the look because I don't think its a blind rip-off of any current app, if it is, let me know :).
I think that's it for now, I can hopefully link to some code in the next week. Okay, now I have that out of my system, my head feels lighter! I promise, no more projects, I am all maxed out on time now :).

If you have suggestions/criticisms, leave comments as per usual, and I'll try my best to get back to you. I'll leave you with another mockup (more here):


Friday, 2 March 2007

Hi pgo!

Hi Planet GNOME'ers!

Firstly, let me say thanks to Jeff for adding me so fast :)! My name is Neil J. Patel, I am 23 years old, and am a Pharmacologist (yes, you read correctly) who lives in London, England. I love GNOME and spend my spare time working on a few projects:

Avant Window Navigator
Avant window navigator (Awn) was my first project, it is a Gnome-based dock which, as taken from the website, "sits on the bottom of your desktop in all its composited glory" and handles the launching of applications & active windows. It also has a D-Bus backend which allows applications to control their icons. Some examples are Rhythmbox setting the album art ask its icon, Evolution displaying the number of unread emails on its icon, Firefox showing its progress on its icons, and Gaim showing your status as your icon. A picture says a thousand words, so :


Awn also has a wiki & forum, and you can also catch me on #awn on irc.gnome.org.

Metadata & Desktop Search
Tracker is where the rest of my free time goes! I work on several projects surrounding GNOME regarding metadata & search:
  1. Nautilus & Metadata Integration : I am working with John Stowers on a proposal for including metadata & tagging/emblem support in Nautilus, where by Nautilus can use Beagle/Tracker to pull info regarding a file + display it in a metadata tile, and it can use the FreeDesktop emblem spec for emblems, so you have a uniform experience across the desktop:
  2. libtracker-gtk : This is another effort by John and myself to have a more integrated experience across the desktop, by having a set of reusable widgets which can be easily added to any application. Therefore, you now have a library which will consist of many cool and useful widgets such as a model-view-controller based list of results, a metadata-tile, a GtkEntry with automatic keyword-completion, a tag cloud etc.
  3. A new blingy search tool/media browser/viewer: based somewhat on these mockups, and using a Tracker backend, but more on that later :).
Er, what else? I think that's it for now, I have lots of mockups for different UI ideas which can be found here, I can't bring all of them into reality, but if you want to, let me know if you need help with some of the more extravagant looking Gtk stuff :).

Updates

I've been quite busy recently, but have still managed to do some hacking, so heres some updates:

Awn
  • Awn svn compiles on < gtk+-2.10 :).
  • Lots of small fixes, most should be committed tomorrow.
  • Working on support for notifications above the task.
  • Working on support for adding menu items to a tasks pop-up menu.
Also, I'd just like to point you to a whole bunch of plugins using the DBus backend on our wiki. I have also just used the Gaim plugin which on the wiki, and I have to say, its amazing. Speaking to the author, I know that he is determined to get rid of the need for the gaim-systray plugin, so expect some cool stuff!

Tracker
libtracker-gtk has now committed into tracker svn :), so if you want to include tracker support in your application, be sure to let John Stowers or myself know if there is anything you'd like to see in there to make your life easier!
I have been working on polishing up the metadata-tile & tag bar, and while I was at it, I made this:

Hopefully, if I can fix the little problems that it has, it will be in libtracker-gtk before the next release + it can be the default view when you start tracker-search-tool. Speaking of tracker-search-tool, I added support for D&D-ing emails to the desktop and nautilus. They are basically desktop files which will open evolution viewer :
Anyway, that's it for now, if everything goes to plan, expect some cool stuff tomorrow ;)!

Saturday, 24 February 2007

To Quote Destinys Child...

..."Get on the bus", which, as of revision 125, Awn is on :).

Awn now has a DBus backend! Which brings to life one of my main features for Awn, which was the ability for applications to control their Icons on Awn!

It is *very* new, and I haven't added all of my ideas, but Imy top 3 are now working:

Ability To Change Task Icon
This is especially important for media applications, so they can set the icon to whatever cover-art they have:

Yes, its FutureSex/LoveSounds, and that says alot for my music taste, but leaving that aside for the minute, you'll be happy to know that Mr. Timberlakes cover art is actually the Rhythmbox launcher :).

I basically have hacked the standard artdisplay plugin for Rhythmbox and added support for the cover to be shown on Awn. If there is no cover, it reverts back to the standard icon. I have included it in svn, under the new 'plugins' folder. Installation instructions are also included.

Little Information Bubbles
These would be important for applications such as Evolution, which could show how many unread emails you have:This is not a real-life plugin, its just a demo of what can be done. If I have time, I will make this into a proper plugin.

Progress Information
This is probably my favourite! In-built progress reports into the task icon:

*Update* An example video showing Firefox downloading a file:





This, again, is not a real plugin for Firefox, but demonstrates whats possible.

There is still a lot of work to do, regarding drawing, alignment, etc etc. However, now the basic boilerplate stuff is in, this should be easy to do.

Here are some things that I am going to add over the weekend:
  • Ability to have a small icon composited on the main task icon. Think Epiphany settinging the current favicon onto its task icon.
  • Ability to add menu items over dbus, and listen to their signals if clicked by the user. For instance, menu item for evolution to add a contact, Totem to pause a movie etc.
  • Predefined 'types' of apps, with special buttons, i.e. a MEDIA_TYPE that shows buttons for reverse, play/pause, and forward.
  • Some more styles to display the progress 'bar'.
  • Option to attach a larger pixbuf to the 'tile' which shows on hover. So, Rhythmbox can attach a 400x400px sized album art, which would show with the window title.
Making Your Own
If you want to write a plugin for your favourite app, heres some info that you'll need, the code is in Python, but should be easy to adopt for other languages.

bus = dbus.SessionBus()
obj = bus.get_object("com.google.code.Awn", "/com/google/code/Awn")
awn = dbus.Interface(obj, "com.google.code.Awn")

Gets you the basic awn object.

There are two main ways to get at your task,
  1. By the name of the application (string). This works best for single-instance applications.
  2. By the xid (long), which is best for multi-instance apps , as it will only effect the icon for that window. One way to get the xid is by calling GDK_WINDOW_XID(window->window).
  3. I am adding support for using the pid to reference your application.
Setting Icons
To set the icon for a task, you need to call either SetTaskIconByName or SetTaskIconByXid. In python, it would be :

awn.SetTaskIconByName ("rhythmbox", "/tmp/rhythmbox-album-art.png")

or

awn.SetTaskIconByXid (long(xid), "/tmp/rhythmbox-album-art.png")

Yes, the second argument has to be a /local/path/to/the/image/file. Using /tmp is the best idea, as it will get wiped when you restart.
You have to call awn.SetTaskIconByName/Xid every time you want to update, even you are using the same file name (recommended as to avoid unneccessary junk in /tmp).
If you need to unset the icon, use :

awn.UnsetTaskIconByName ("rhythmbox")

or

awn.UnsetTaskIconByXid (xid)

The name may not always match, I am working on this, so be patient if your fav app does not work :).

Setting Information
Setting information is easy:
awn.SetInfoByName ("evolution", "23")

or

awn.SetInfoByXid (xid, "23")

Unset using:
awn.UnsetInfoByName ("evolution")

or

awn.UnsetInfoByXid (xid)

Setting Progress
This is very easy:
awn.SetProgressByName ("firefox", 60)

or

awn.SetProgressByXid (xid, 60)

There is no 'unset' function, just set the progress to 100 to clear the icon of the progress meter.


If you need any help, or need better API, just drop me a line. Also, we have a forum, thanks to Mike Jones (searayman), so if you do make anything based on the DBus backend, post it there so we can all have a look! I'll probably include some plugins with the main tarball, so let me know if you make something.

*Update* The forum seems to be down at the moment, so I recommend using the wiki to upload your creations. Just add a page under the 'DBus Plugins' page, you can also attach files to the pages you create. I have added the Rhythmbox plugin as an example.

*Update 2* Just to annoy me, the forum is actually back up again. So its up to you where you want to post your plugins, forum or wiki, whichever suits you best.

And Finally
I am going to do mass amounts of bug fixing over the next few days, and therefore expect svn to be in a bit of a flux as I sort some things out.

Tuesday, 20 February 2007

Where'd You Go...

...not that far actually, just been very busy at home!

I have, however, had time to straighten up some cool tracker stuff!

Nautilus Metadata Tile
After speaking to Alex in #nautilus, it seems that we could really make something very cool, utilizing nautilus & tracker/beagle. He has given me direction regarding what would be accepted into Nautilus. He had some sweet ideas regarding file previews etc. As far as I know, no other OS has these capabilities. I am going to dedicate a whole entry to it later on in the week, with mockups etc.

Tracker Search Tool (TST)
I have been adding the code from Nautilus Metadata Tile into TST recently, trying to get it in before the 0.6 release of tracker (at the time of writing I still don't know whether it will make it) :(. However, to whet your appetite, I can show you some early screenshots :


As you can see, it works quite well :). The tags bit is my favourite, because it is really simple to add/remove tags:
  • Clicking the "add" button shows you a GtkEntry, where you type in tags separated by spaces, then click "apply" to apply or "cancel" to, er, cancel.
  • The tags themselves are clickable, so they will launch a new TST, and set it to search for the tag.
  • Right clicking the tag gives you a popup, letting you search for the tag, or delete it.
I am going to send the patch tomorrow, and hopefully, Jamie can add it to tracker svn ASAP (if I, you know, haven't broken every single coding rule known to man).

Avant Window Navigator
I have been a bit short of time regarding Awn, but I am dedicating tomorrow to it, so expect some cool stuff (as per usual), and thanks to everyone who has been bug reporting, sending translations and sending patches! Translations and patches will be merged tomorrow. Also, I have a little ace up my sleeve...only thing I can say is that it concerns setting up an array of pixbufs at incremental sizes for the launchers & tasks ;).