gedit call to arms

Some days ago lucasr sent an interesting mail to desktop-devel-list pointing out that some modules did not yet release a test version for the next GNOME and suggesting that if the reason was lack of manpower the current developers of the module should post a list of potential tasks in order to attrack new developers.

gedit was in the list that Lucas posted, but that was in part due to the fact that we were working on the gtksourceview 2 port and release was blocking on that. That said, lack of time and manpower is a real issue for gedit these days, so as promised to Lucas here is a list of tasks for gedit.

Note: I am restricting the list to the official gedit tarball, since our third party plugins community is more active than ever and new plugins pop up every day. Beside I am trying to list tasks that are a good fit for new developers, of a size big enough to make the challenge interesting, but without requiring an intimate knowledge of all gedit internals.

  1. GtkPrint port: we would really love to dump the gnome-print dependency and use the gtk print support. However this is not a trivial task: among other things we want to keep printing asynchrounous and we want to keep our custom embedded print preview widget. Muntyan, of gtksourceview fame, has good code implementing print and print preview in his project and he’s willing to share it with us, but it needs quite a bit of refactoring to be used in gedit.
  2. Use Gtk 2.12 features: the next version of gtk will have some very interesting features for gedit and we should take advantage of them. In particular:
    • GtkNotebook should now have all what it is required to replace a good chunk of GeditNotebook
    • Use the new tooltips API throughout the code and remove GeditTooltips
    • Add tooltips to some of the treeviews now that is possible (the tags plugin comes to my mind)
    • GtkRecent has seen some API deprecation and fixes and gedit should be updated
    • Take advantage of GRegex for things like filename filtering in the filebrowser pane
    • GtkBuilder (if it will meet our current needs)
    • probably other stuff I am now forgetting
  3. Enhance the modeline plugin: the modeline plugin is the plugin that allows to set things like tab-indentation etc writing a special line at the top of the file. They should be extended to also allow to specify the language to use for highlighting and I would love to see the plugin extended to also support a .gedit-mode file put in the current dir so that you can drop it in the dir of your project to specify the codestyle to use. Such file should support setting different modes for different languages (e.g. the usual 8-spaces-long tabs for C and four-spaces indent for python)
  4. Refactor DocumentSaver and DocumentLoader: this is a bit difficult since it touches pretty delicate parts of gedit and since it doesn’t led to any visible change, but I’d like to change the Saver and Loader objects to be abstract base classes plus some implementation classes (one for local files, one using gnome-vfs, etc) since this would make our life easier when gvfs will be released or if we want to make gnome-vfs optional
  5. Project Ridley: I’d love to get rid of many of our dependencies and have an almost Gtk only version (GConf would still be there I guess and gnome-vfs is a bit hard to make optional, see point 4). Libgnome(ui) is used for very few things (like session-saving, which has a replacement in libegg). About gnome-print, see point 1 of the list.
  6. Win32 port: ok, this is a bit hard and may in part depend on point 5, but it comes up from time to time so I thought I could mention it

There are probably other things I am forgetting and maybe nud or jessevdk have some more ideas and will blog about them.

There are also gtksourceview tasks, but those are for another time :) for now I’ll limit myself to say that help with new .lang files in gtksourceview 2 for your favourite programming language would be very appreciated.

Should you decide to pick up the challenge and try any of the above tasks, keep in mind the following advices:

  • communicate: drop by on irc, let us know what you are doing, discuss your implementation strategy: given that the problem we are trying to solve is lack of developer manpower, I’d hate to see resources wasted in duplicated efforts.
  • be pro-active: unfortunately, given the lack of time, we will not be able to mentor you as I would like, so you’ll have to be able to learn things by yourself and not stop at the first hurdle… If you don’t know C and gtk quite well, maybe this is not the project for you :-)
  • ask questions: despite what I said in the point above, questions are always a good thing and I’ll try to answer as time permits
  • be patient: as said lack of time is currently an issue for us, so we will not always be able to review your patches in a timely fashion. Beside, we are also very picky with regard to implementation details, so sometimes it may be a bit frustrating to get a patch ready to be committed, but good code always pays off in the end.
Posted in General. 1 Comment »

gedit 2.19.1

First of all, congratulations to Paolo Maggi, who just became father for the second time… I guess that this will leave him little time to work on gedit, but that is surely a more important “release” :-)

I am distchecking gedit 2.19.1 as I write, this will be the first developement release that features the port to the new version of gtksourceview, so to install it you will need gtksourceview 1.90.1 and pygtksourceview 1.90.1

gedit, new highlighting features

Casual gedit users will not probably note any substantial changes, but if you use gedit to code or to write latex or for any other syntax highlighted language you will take advantage of the new features. Chances are that you will also spot some regressions in the highlighting of your favourite language, so please help us improve the .lang files since we do not know the details of all the syntaxes we can currently highlight: lang files are shipped in gtksourceview and are located in $PREFIX/share/gtksourceview-2.0/language-specs.

The .lang file format is documented on the wiki: http://live.gnome.org/GtkSourceView/NewLangFormat

Obviously even if you don’t spot any regression, there are also plenty of improvements that could be made: since most of the lang files have just been converted from the old format, they do not take advantage yet of the new features of gtksourceview. New lang files are also more than welcome.

The gtksourceview upgrade also affects plugins: if you had any plugins using (py)gtksourceview directly, they need to be updated to the new gtksourceview api.

From the UI point of view, the gtksourceview upgrade affects syntax highlighting color configuration: if you ever tried to customize the syntax highlighting colors from the current gedit preference dialog you know how painful that is. You need to set the style seprately for every tag of every language you use… gtksourceview 2 instead supports style scheme files.

At the moment I totally removed the Syntax Highlighting colors configuration page from gedit preference dialog, but we need to put back a way to at least switch style schemes. A style scheme editor would be nice too, but it requires to design a sensible UI… suggestions are welcome. For now you can set the sytle scheme used changing the /apps/gedit-2/preferences/editor/source_style/scheme gconf key and you can add your own style scheme files in $PREFIX/share/gtksourceview-2.0/styles or in ~/.local/share/gtksourceview-2.0/styles.

At the moment just two styles schemes are included in gtksourceview one called ‘gvim‘ (similar to gedit default colors) and one called ‘kate’, similar to kate default colors… I would really love to have at least a dark-background style scheme, a style scheme using the tango palette and an emacs-like style scheme. Please create and share with us your style scheme!

GtkSourceView Licensing: a social networking experiment

GtkSourceView has been living in a licensing limbo for a long time: we want it to be LGPL – most of the code is – but the original version of which only a bunch of lines remain was GPL.
With GtkSourceView 2 finally arriving (I’ll try to write more about that later, see nud‘s blog for now) we felt it was time to bite the bullet and try to get relicensing permission from all the contributors.

If you ever sent a patch to gtksourceview or wrote a .lang file and read this, please get in touch with us.

In fact things have been pretty smooth so far, except for getting in touch with Chris Phelps (chicane on irc), one of the original authors of the first version of gtksourceview, since his email bounces. If you know Chris’ new email address or know any way to get in touch with him please let us know.

Even better, Chris, if you are reading this after googling for your name, please contact us! :-)

By the way, this is my first post from blogs.gnome.org: I’m far from a frequent blogger and advogato always suited my needs, but the new ‘blogo’ is so nice that I couldn’t resist giving it a try. Anyway my entries should still appear on advogato, unless I made some mistakes in the rss configuration.

 Update:  Success!

Just a few hours after this post appeared on the planet, chicane showed up on irc and he agreed with the license change, so next GtkSourceView version will finally be LGPL! Special thanks do dcamp who put me in touch with chicane.