CGI Room.nu

Programming, Scripting and Graphics

Roxen Application Launcher 1.2.1

22 November, 2011 by Jakob

There’s a new release of Roxen Application Launcher (come again?) for Linux.

Although the previous release, using GTK3, came quite recently this release has some new things.

GSettings

I dumped the “keyfile” solution for the application settings in favour to GSettings. So the settings is no longer stored in a file in the application directory but rather in the system’s application settings backend. GSettings is part of GIO – the GNOME networking library – and since RAL depends on GIO no new dependency is needed. The upside is that I could put a file of source code in the bin! Plus, it’s fun learning new stuff!

Editors and content types

Previously I have kept an editor – name and command line – for every content type. Anders at Roxen thought it’d be better if editors and content types were separated. I’ve thought about that before but never bothered to do anything about it.

But now, along with GTK3, there’s a new (I think) AppInfo class and the new AppChooserButton and AppChooserDialog widgets so I thought it’d be cool to use those. So selecting an editor for a new content type is way more simple now, and it also looks nicer. Plus we get the icon for the editor in the content type list under the “Applications” tab ;)

Simple logging

I also implemented some simple logging which can be viewed under the new “Logging” tab. This will be worked upon and at the moment not very useful information is written to the log, but at least it’s a start.

Default icons

The icons in the notification popup – which only are three to the number – is now fetched from the user’s default icon theme. They we’re bundled before.

SOUP all the way

Previously I have used a little hack for saving downloaded files to disk. The problem was that the Vapi bindings for libsoup casted the data to a string which totally scrambled binary content like images and such. My solution was to write a simple C-function which took a SoupMessageBody struct as argument and then wrote that to diskt always keeping the uint8[] type of the content.

I bug reported this way back and it’s now fixed in Vala so I dumped my solution and am now using Vala all the way. Gone is one C and one Vapi file.

While at it I changed from using blocking functions in libsoup to the async ones. You never really noticed blocking calls was used before, but right is right. Right?

And that’s that for this time I think!

Roxen Application Launcher 1.2.1

Sources is available at the Roxen Application Launcher Github repository

Filed Under: Applications, Linux, Programming, Roxen Tagged With: gsettings, GTK3, Linux, RAL, Roxen, SOUP, Vala

GTK TreeViewColumn with icon and text

21 November, 2011 by Jakob

The other day I wanted to put both an icon and text in the same GTK+ TreeViewColumn, and I had absolutely no idea how to do that. So I Google’d and Google’d but had trouble finding any examples. I even downloaded the source code of the Gnome System Monitor – where exactly what I wanted exist – but that was mostly written in C++ which I know very little of.

But I’m stubborn, and after a while I found and example in Python which I managed to interpret. Even though I know very little Python it’s not that hard to follow, and the example was short.

In short what’s needed is packing two CellRenderers in the same TreeViewColumn. Quite logical when you know about it. The example below is in Vala:

15 lines of Vala
  1. var tree_view = new TreeView ();
  2. var col = new TreeViewColumn ();
  3. col.title = title;
  4. col.resizable = true;
  5. var crp = new CellRendererPixbuf ();
  6. col.pack_start (crp, false);
  7. col.add_attribute (crp, “pixbuf”, 0);
  8. var crt = new CellRendererText ();
  9. col.pack_start (crt, false);
  10. col.add_attribute (crt, “text”, 1);
  11. tree_view.insert_column (col, –1);

I hacked up a simple application that shows all installed programs – that has a .desktop entry I guess – in a list (the screenshot above). The sources is available at my Github repository.

Happy coding!

Filed Under: Linux, Programming Tagged With: CellRenderer, Gnome, GTK, GTK3, Linux, Python, TreeViewColumn, Vala

Roxen Application Launcher 1.1

9 November, 2011 by Jakob

There’s a new release of Roxen Application Launcher (come again?) for Linux.

I have updated the application launcher to use GTK3 so that it builds on Ubuntu 11.10 and any other Linux distribution using GTK3. This also made it possible to drop the dependency for libunique since Gtk.Application can handle single instance applications.

I also fixed a bug which made it impossible to use the appliction launcher on sites not running on port 80 or 443.

So there’s no new features in this release.

Roxen Application Launcher 1.1

Sources is available at the Roxen Application Launcher Github repository

Filed Under: Applications, Linux, Roxen Tagged With: GTK, GTK3, Linux, RAL, Roxen, Ubuntu, Vala

Roxen Application Launcher 1.0.10

22 June, 2011 by Jakob

This is not the latest version of Roxen Application Launcher. You’ll find the latest version at the download page.

There’s a new release of Roxen Application Launcher (come again?) for Linux.

No big news, but the GTK+ tree view of files is now sortable. The “minimize to tray” function is now actually invoked when the window is minimized rather than closed. A right click in the file list now also let you go the the file’s directory in the Sitebuilder.

Also fixed a bug where the locales didn’t get installed correctly and also fixed a bug which scrambled the configuration file a bit.

Roxen Application Launcher 1.0.10

Sources is available at the Roxen Application Launcher Github repository

Filed Under: Applications, Linux, Roxen Tagged With: GTK, Linux, RAL, Roxen, Vala

Notification area icons in Ubuntu 11.04

3 May, 2011 by Jakob

If you’r an Ubuntu user and have upgraded to 11.04 and use the new desktop environment Unity, you might have noticed that some applications that implement the GTK status icon doesn’t show up in the notification area – or tray or systray as it also may be called.

The reason for this is that Ubuntu now utilise a “whitelist” for which applications can be displayed in the notification area. You can (maybe not that) easily add any application to the whitelist by invoking the command gsettings in the following way:

1 lines of Bash
  1. gsettings set com.canonical.Unity.Panel systray-whitelist [‘app-1’, ‘app-2’, ‘app-3’]

Now, this can be quite a difficult command to remember and since you will need to first grab the whitelist, alter it, and then put it back. Since I’m lame at Bash I thought it would be a nice misson to create a Bash script that makes this interference simpler, just to pick up some more Bash knowledge. So I did!

The script can be used like this:

8 lines of Bash
  1. # Add MyApplication to whitelist
  2. systray-whitelist add MyApplication
  3. # Remove MyApplication from whitelist
  4. systray-whitelist remove MyApplication
  5. # Show applications in whitelist
  6. systray-whitelist show

And that’s that.

Download systray-whitelist 00:05, Wed 04 May 2011 :: 2.5 kB

Filed Under: Linux Tagged With: Bash, gsettings, GTK, Linux, Share, Ubuntu

  • 1
  • 2
  • 3
  • 4
  • Next Page »

Categories

  • Action Script 3
  • Applications
  • Flash Animation
  • Linux
  • Misc
  • News
  • Programming
  • Roxen
  • Tutorials
  • User Science
  • Web Development
  • Xsl/Xslt
Copyright © 2021 CGI Room.nu