Older blog entries for pbor (starting at number 64)

guitar playing on linux

For a change, a post not related to gedit. During the holidays I decided to dust off my electric guitar and have some fun playing. However when I gave up playing some years ago I sold my amplifier, effects and so on and I just kept my Hamer guitar. Since I just want to have some fun playing from time to time, instead of spending lots of money buying all the equipement I just bought a behringer UCG102, a nice small USB device to connect the guitar to the PC.

The device is detected correctly under linux and works great. However when it comes to the software available on linux the situation is not so great… surely not Plug&Play, especially for normal musicians that do not hack the kernel for a living.

First of all there seems to be a total disconnection between the people doing audio on the “desktop” (Pulseaudio, GStreamer, etc) and the applications for musicians, which seems to be mostly tied to the world of Jack. I understand that playing a dvd and professional digital audio recording have different requirements and design tradeoffs, but still, the user experience as of today is pretty bad and it involves manually launching sound daemons and so on. For instance when I try to run pulseadio and jack at the same time as described here, jack hangs.

At the moment, the working setup I have when I want to play, is to kill pulseadio and run jack with qjackctl manually.

Furthermore Jack on its own has its share of problems: leaving alone the UI of qjackctl (read below for even uglier ui issues), my biggest gripe with jack is that it seems to be able to deal with just one device at a time, so I cannot “route” the sound from the usb device to the pc soundcard/speakers/headphones.

Then we get to the applications. What I need the most is some kind of “guitar amplifier emulator” with effects and so on in order to get a nice set of heavy distorsions to play metal, some screaming overdrive to play rock, some elegant chorus to play fusion etc. Ideally this software would expose an “easy” ui where I just can reorder the effects by drag and drop and turn a few knobs to tune my sound.

What I found and which works pretty well is called rakarrack, which is pretty nice and includes some very good preset sounds… however the UI is… how can I say… maybe it’s easier to describe if I show a picture

Rackarrack Main Window

Rakarrack Main Window

I understand that musicians are creative people and that the usual gray UI is boring for them, but isn’t that a bit too much? Also why use fltk when there are nice, widely available, portable and even fancy toolkits that do not look like 1992 and actually take my dpi into account?

Next kind of app I tried are recorders, so far I gave a quick try to jokosher and ardour. Both look really promising. Unfortunately the first at the moment crashes on my system, but the guys in #jokosher have been really helpful and I’ll shortly try it further and report bugs etc; the latter is tad too complicated for me but it looks really professional and advanced. However even if it uses gtk, it suffers from the we-are-too-cool-to-use-the-default-theme sindrome… at least their built in colors are not as bad as rackarrack :)

I know there are a lot guitarists and musicians in gnome and I have been looking at this things just in the last days. Did I miss something obvious?  Are there any beautiful apps I have not yet seen? What do you use daily? Suggestions are more than welcome

Syndicated 2009-01-01 22:35:35 from Club Silencio

gedit on osx

When blogging about the Windows port, I should also have mentioned the thanks to Jesse, gedit trunk also compiles and runs on OSX. Help with the creation of an installable bundle would be warmly appreciated!

gedit on OSX

gedit on OSX

Syndicated 2008-12-28 13:06:40 from Club Silencio

Late Christmas gift for Windows users

In the last days nacho has been doing great work on gedit to finally get it to compile and work on Windows. Today we reached a milestone producing a first working version of the installer. It is an alpha version and obviously still needs many fixes and polishing (for instance python plugins do not work yet), but hey, if you are used to notepad you can’t complain :-)

Give it a try and let us know.

gedit on windows

gedit on windows

Syndicated 2008-12-25 18:57:40 from Club Silencio

gedit ported to gio/gvfs

In the last months I’ve been pretty busy and time for gedit, gtksourceview and GNOME in general has been particularly small. The lack of posts on this page pretty much reflects that.

When reading discussions about decadence I could not help but feel a bit guilty, especially since gedit user base has never been more healthy: new plugins are released, users partecipate on irc and mailing lists, blog posts  about customizing gedit pop up daily on the interweb.

It seemed inevitable that gedit 2.24 would have been pretty much exactly the same as 2.22, but Jesse came to rescue. He first ported the filebrowser side pane to gio and last week he completed the work by also reworking all the gedit internals (especially remote file loading and saving) to use gio instead of gnome-vfs. As of today I committed that work to svn and I will try to make a tarball release as soon as possible.

Since Jesse was on a roll, he also ported all the dialogs from libglade to gtkbuilder, killing yet another dependency.

Please test it, test it, test it and test it again and then report bugs!

Syndicated 2008-08-13 12:00:31 from Club Silencio

better late than never

We finally released a new developement version of gedit that reimplements printing using GTK+ print support. It also includes a custom print preview widget so that we can keep our current UI (print preview embedded in a tab). This means that we do not depend on libgnomeprint and libgnomeprintui anymore… it was about time!

Print Preview screenshot Print Preferences screenshot

Please test it, test it, test it and report any regression or problem!

Syndicated 2008-01-25 13:32:54 from Club Silencio

GtkSourceView 2.1

Today we released GtkSourceView 2.1, the developement release for 2.2 that will be part of the next GNOME. In this cycle we didn’t have much time to work on it, however over the Christmas break we reimplemented two important features that went missing in the big 2.0 release:

  • Marks in the left margin (useful for bookmarks, breakpoints, showing errors etc)
  • Printing

This means that we have reached feature parity with the old GtkSourceView 1.

The API however is different from what was there in gtksourceview 1: in particular printing now integrates with GtkPrint instead of using the old and deprecated gnome-print libraries. GtkPrint is a pretty strange beast (due to the fact that a cross platform printing api is quite challenging), but in the end I think we found a pretty elegant API.

We expose a GtkSourcePrintCompositor class that knows how to draw the text view (including syntax highlighting, line numbers, header and footer): when running a GtkPrintOperation to print, you just need to instanciate a compositor for the current text buffer and delegate to it all the pagination and drawing. Pagination, which for long documents can take quite a bit of time, is async which allows to present a progress bar without blocking the UI.

Here is a simple example showing how to use the new printing API:

static gboolean
paginate (GtkPrintOperation        *operation,
	  GtkPrintContext          *context,
	  GtkSourcePrintCompositor *compositor)
	if (gtk_source_print_compositor_paginate (compositor, context))
		gint n_pages;

		n_pages = gtk_source_print_compositor_get_n_pages (compositor);
		gtk_print_operation_set_n_pages (operation, n_pages);

		return TRUE;

	return FALSE;

draw_page (GtkPrintOperation        *operation,
	   GtkPrintContext          *context,
	   gint                      page_nr,
	   GtkSourcePrintCompositor *compositor)
	gtk_source_print_compositor_draw_page (compositor, context, page_nr);

static void
end_print (GtkPrintOperation        *operation,
	   GtkPrintContext          *context,
	   GtkSourcePrintCompositor *compositor)
	g_object_unref (compositor);

static void
print_source_view (GtkSourceView *view)
	GtkSourcePrintCompositor *compositor;
	GtkPrintOperation *operation;	

	compositor = gtk_source_print_compositor_new_from_view (view);
	operation = gtk_print_operation_new ();

  	g_signal_connect (operation, "paginate",  G_CALLBACK (paginate), compositor);
	g_signal_connect (operation, "draw-page", G_CALLBACK (draw_page), compositor);
	g_signal_connect (operation, "end-print", G_CALLBACK (end_print), compositor);

	gtk_print_operation_run (operation,
				 NULL, NULL);

	g_object_unref (operation);

Syndicated 2008-01-14 21:00:26 from Club Silencio

Bits & Pieces

Last period was fairly busy and I didn’t get much time to hack on gnome related stuff… I hope to be able to catch up a bit in the next weeks, especially to take care of some great patches that are waiting in bugzilla.

GNOME Talk @ IBM Technical Conference

Thanks to Fabio Marzocca I was approached by IBM to give a talk about GNOME and ubuntu at a linux technical conference held at their IBM Forum in Segrate. Despite the fact I am not an experienced presenter the talk went farly well, slides are available here. At the meeting I also had the chance to meet Alessandro Rubini of Linux Device Drivers fame.

Google GHOP GtkSourceView themes

One of the tasks accepted for the Google GHOP program was writing five color schemes for gtksourceview. Will Farrington claimed the task and today delivered five good looking themes. Well done Will!
Check them out at on the wiki page.

I especially like Cobalt, so here is a screenie.gedit cobalt theme

Speaking of Google, this week I also received a Google SoC t-shirt. Thanks Google!

gedit without libgnome

MIkael Hermansson filed a patch in bugzilla to conditionally disable the libgnome dependency of gedit. As mentioned before I really look forward to disabling libgnome uncoditioally and this is definitely a step in the right direction as we work through the remaining issues.

Syndicated 2007-12-09 16:36:07 from Club Silencio

Delivering the killing blow to libgnome

Getting rid of the libgnome[ui] dependency and of all the legacy stuff that it brings in has been a work in progress for many gnome applications. While replacing some old cruft has been very easy as soon as a proper replacement was put into GTK+ itself, there are a bunch of things for which figuring out what to do is not so clear… Now that we are at the start of the 2.22 cycle I’d like to get some feedback on the status of these things.

As you can probably guess I’ll take gedit as a case, but I think it is pretty much the same for many other applications. In order of importance, libgnome is still needed for:

  1. Bug-Buddy integration: gnome-program offers integration with our automated bug reporting infrastructure. This is something we cannot do without. I seem to understand that there has been work to make bug-buddy work as a gtk module or something, but it is absolutely not clear to me what is the current status. Is it already in gnome 2.20? How does it work? Do apps need to do something? Can I just drop gnome-program and things will work?
  2. gnome_authentication_manager_init() is another thing that we cannot absolutely avoid, otherwise remote file access will not work. I guess gio/GVFS comes into the picture here, but once again an executive summary on what to do for applications developers would be nice.
  3. gnome_accelerators_sync(): this may look pretty trivial (and in fact the function itself is pretty simple and easily reimplementable with gtk calls, however it is not clear to me what kind of magic gnome-program does on initialization to restore the edited shortcuts. Any suggestion is welcome.
  4. Displaying the Online Help: as far as I know gnome_help_display() is just a function that spawns yelp with the proper arguments, however it’s a bit silly to manually reimplement that in every app… what are the plans of Yelp/Rarian developers in this area?
  5. gnome_icon_lookup() is used to lookup an icon for a given file/mime type. Once again this fairly easily cut&pasted locally however I think we really need to put it somewhere our library stack: it is a common operation for many apps. GTK+ itself reimplements it internally for the file chooser and the recent manager, though unfortunately for some files it gives different results (as far as I recall libgnome does some special casing for some files).
  6. gnome-session: I know there is a new implementation of session saving in libegg, but it is not clear if it is still developed and targeted at gtk inclusion.

Unless I am missing some other magic feature that gnome-program provides, that is everything that libgnome[ui] is needed for (I am intentionally leaving out migration from gnome-print to gtk print stuff and from gnome-vfs to gvfs, since they are separate issues).

Will we manage to put the nails in libgnome’s coffin for 2.22?

Syndicated 2007-09-24 09:56:06 from Club Silencio

GtkSourceView 2 API frozen

With yesterday night release of GtkSourceView 1.90.5 (which will likely become 2.0 next week) we consider the API frozen and in the future releases only API additions will happen.

Honestly we hoped to have more early adopters so that we could have more feedback on the API changes, but I can understand how painful it is to track a library that it is a bit of a moving target :)

Anyway, now it’s a good time to start porting your app to GtkSourceView 2 and an even better time to bind it to your favourite language (Python bindings are already available). Why? Because you get a way more accurate syntax highlighting and because you get support for style schemes.

I will not go into the details of the API changes (most of it should be straightforward), my advice is just to be careful with the memory management of the LanguageManager and StyleSchemeManager: unless you want to do advanced stuff like a style scheme editor or use two separate highlighting contexts in the same app, you should probably stick to the singletons provided by GtkSourceView itself.

That said, I should also point out that there are a few feature regressions with respect to GtkSourceView 1 and anyone getting ready to port his app should be aware of that:

  • Printing support was dropped: GtkSourceView 1 depended on gnome-print which is now deprecated, this days printing should be done with gtk itself.
  • GtkSourceMarkers were dropped: they were pretty much the only API that is not exercised by gedit and we didn’t feel comfortable enough with the API to set it in stone.

We are more than willing to reintroduce these features back in 2.2 (though printing is a bit of a gray area since bits of it really belong to gtk itself), but we need feedback from the apps using the library to get the API right!

Syndicated 2007-09-11 08:07:22 from Club Silencio

gedit style schemes

Yesterday night I released new developement versions of GtkSourceView, PyGtkSourceView and gedit. With this release of gedit one of the more important features of gtksourceview 2 will be visible: style schemes support.

Style Scheme selector

As you can see from the screenshot the old Syntax Highlighting preferences and the color buttons to set text and background colors are gone, replaced by the selection of the style scheme. A style scheme takes care of all of the syntax highlighting colors and also allows to set some more customizations (for instance the current line highlighting color). The plan was to have a simple style scheme editor to create and tweak style schemes from the GUI, but at this point it looks unlikely for 2.20, also because figuring out the proper UI is not as trivial as one may first think. If the lack of a GUI to edit colors really bothers you, feedback is welcome, especially with patches attached :)

At least I’ll try to add buttons to install and remove schemes from file in the hope that a good collection of third party schemes will be soon available. By the way, if any of the Gnome Online people want to give it a try at creating a service to install Style Schemes from an online collection I surely will not oppose.

Creating a style scheme is very simple: just create yourtheme.xml and drop it in ~/.local/share/gtksourceview-2.0/styles.

The file format is very simple, as you can see from this quick example I put together, a lowcontrast dark style with tango colors: darktango.xml


It is basically a list of:

<style name="element" foreground="color" background="color"/>

Where element can be one of the builtin elements (like “text” or “bracket-match”) or a syntax element specified in the form “language_id:element_id” and color can be either specified directly as #NNNNN or defined in a palette.

“def:element_id” stands for the default style for those kind of elements, since GtkSourceView tries to map the styles to reasonable defaults. Let’s make an example: if I write “while” in a C file, gtksourceview will try to lookup the c:keyword style, if that is not defined it will try to use def:keyword and if that is not defined either it will use def:statement.

The minimal set of styles you need to define are def:comment, def:constant, def:statement, def:identifier, def:type and def:preprocessor, but obviously for good looking schemes some more tweaking is needed, like defining def:error or distinguishing def:string from def:constant etc. You will also probably need to define some language specific things, especially for things like diff files or xml files that do not easily map to those default styles.

As said above we are really looking forward to see style schemes created by our users, thus we started a wiki page to collect them. Beside we are also looking forward including the best ones in GtkSourceView itself: currently we have the classic style (similar to gvim colors) the Kate style (similar to the Kate editor colors) and a Tango style, which however still needs a bit of tweaking since at least in my opinion it looks “too light”. We would like to include a couple more styles in gtksourceview of which at least one for dark backgrounds, so if you come up with a good theme or improve one of the existing ones (in particular tango.xml) do not esitate to tell us!

Syndicated 2007-08-01 11:00:38 from Club Silencio

55 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!