31 Mar 2006

It’s great to see gedit plugins pop up on planet gnome. I am already addicted to Richard’s devhelp plugin and seeing actual code for a collaboration plugin is awesome: remote editing is something we have talked about more than once in #gedit, but it looked like a fairly large task so we didn’t investigate the details yet. Leveraging Python and Twisted, jdahlin managed to create a first prototype in a handful of lines of code!

Speaking of plugins, Steve and Jesse agreed to maintain the gedit-plugins module which will contain a collection of useful plugins not included in the main gedit package. Inclusion of plugins in that module will be fairly liberal so feel free to get in touch we them if you want your plugin included[¹].

I feel this is a good time to give some visibility to some of the good plugins that people have developed in the last months:

  • Marcus Leyman developed an awesome FileTree plugin. This is something we really want to include upstream and David Jonas has been working on Leyman’s code to refactor it into a GtkWidget and adding some features to it.
  • Gábor Fekete has a CTags plugin. He is looking for someone to help him out, so if you are interested…
  • Frederic Back created a couple of useful plugins , in particular a python class browser
  • Markus Jonsson has a plugin to export an html file with syntax highlighted code
  • Guillaume Chazarain did a word completion plugin
  • seahorse includes a gedit plugin to encrypt documents
  • Mikael Hermansson has a small collection of plugins
  • Marcus Lunzenauer developed a plugin to add handy editing features like delete line etc
  • Probably more I forgot about… feel free to remind me :)

Thanks to all of you guys!

[1]: you still need to help them maintaining it, they are not superhumans :)

20 Mar 2006

displaying system info

I saw on planet kde a screenshot showing system information when you click on ‘Computer’. I agree that it is nice to offer the user easy access to that information and the screenshot is definately visually pleasing. However I doubt it’s useful to display all that stuff every time I open the ‘Computer’ folder and some of the items in the screenshot look fairly unrelated (e.g. CPU specs and common folders).

I think that a nicer place to put some of that info is in the Properties page that you get when right clicking on ‘Computer’ icon in nautilus, so yesterday evening I put together a quick hack with the awesome nautilus-python to prototype the idea:

Code is here in case anyone would like to play with it. It sure needs some more ‘bling’ (memory info and pretty icons), also I guess it would be better to fetch some of the info from HAL instead of parsing /proc, but hal-device-monitor shows all ‘unknown’ for the CPU on my system so I haven’t tried to use it.

03 Mar 2006

Angedit

clubfan has written a new gtksourceview based editor for anjuta reusing gedit code. I am really happy to see this work and I’ll try it out soon. All the hard work done in the last months to make the gedit code clean and nicely split in GObjects pays off since apparently reusing it for anjuta has been pretty easy. Obviously all the cut&pasting is a subotimal solution since makes sharing fixes harder, but as a first step I am happy that at least we avoided to reinvent the wheel once again.

I also noticed that every object was renamed to the use the “anjuta” prefix… while in general properly namespacing the code is a good thing I would have preferred if the “gedit” prefix was kept: it would be one less problem when it comes to merging bugfixes.
I also suggest to keep a file in cvs with the date of the gedit “snapshot” you used so that you can see more easily what needs updating.

In the future we should really split things in a real library and push some of the bits in lower part of the stack like gtksourceview and gtk itself.

PS: Johannes, the comments are not in spanish, they are in italian and are just a few leftovers from developement discussions we had and that we plan to cleanup as soon as possible :)

27 Feb 2006

Steve Frécinaux wrote an article in the style of davyd’s preview showing all the new stuff that will be in gedit 2.14.

check it out!

In the mean time gedit 2.13.92 was released, bug reports and feedback in bugzilla are more than welcome.

05 Feb 2006

GNOME icons

I totally agree with davyd here. I can understand some of the reasoning behind not using words inside the icons (for instance i18n) and behind the reduction of the total number of icons, but I wonder if we are throwing out the baby with the bathwater.
The recent unilateral icon changes also affect gedit badly: we place an icon of the corresponding mime type in the tab alongside with the filename. However with latest gnome all you see is a “plain text” icon for every file, completely defeating the purpose of the feature and making our work useless.

This may seem a minor detail, but it’s the sort of little detail and polish we put a lot of attention to and that now it is wasted… beside I found the feature pretty useful as it helped me to quickly distinguish different kind of files (typically .c, .h, and Makefiles) when glancing through the tabs.

On the positive side, the new “external tools” plugin by Steve Frécinaux included in gedit 2.13 to replace the aging “shell command” plugin, totally rocks: it allows to run shell scripts from gedit using the current document or document selection as input and placing the output either in the bottom panel or in a document. It also sets some env vars like the current document name and uri so that they can be used in the script. Here is a small gif screencast of gedit using the plugin (written in python) to launch a shell script to launch zenity to display a dialog :)

10 Jan 2006

Search Goodness

No, I am not talking about beagle, I am talking about some really nice polish that went into gedit search interface recently.
paolo added highlighting of the matches and Steve Frécinaux (who by the way has been rocking on the plugin front!) contributed a patch to address some of the problems with the new interactive search UI. Now using it is a real pleasure: you hit ctrl+K, type the some letters (it finds-as-you-type), use arrows (or the mouse wheel) to quickly cycle through the matches and then either hit Esc and return to the original cursor position or Enter to move to the current match. With Shift+Ctrl+K you can clear the highlighting.

For those wondering why we did it this way instead of a firefox-like search bar and why we still have the search dialog and why $(your_question_here) here and…
here are some of the reasons:

  • I don’t like the search bar :)
  • We experimented with many UI variants on the branch, including a bar at the bottom, a bar at the top and a side pane and we were not satisfied with them. Keeping the dialog (which at least is a well known interface) among other things allows us more flexibility in the future since given the time constraints we didn’t want an half-assed UI now and be forced to change it again in the next cycle.
  • Incremental search is very useful, but doesn’t solve all cases and doesn’t work well for search&replace so we need two complimentary UIs
  • The new search may be a bit undiscoverable since it can only be activated through the keyboard, but that’s not too bad given that it is an advanced feature and that for the casual user the search dialog will do just fine. If someone just wants to search a word and uses the Search menu we don’t want to overwhelm him with the choice of which search UI to use.
  • The interactive search doesn’t take any space away from the text, it doesn’t cause unwanted scrolling and reflowing and it doesn’t cover the matched text
  • Did I mention that I don’t like search bars?

By the way, in the screenshot you can see some cairo sweetness courtesy of Jeroen: the right margin alpha overlay… however it seems to cause slowdowns on some videocards/drivers combination, so we are still discussing it.

Update: company sent me this awesome screen record (1.7 MB) of the incremental search done with his brand new screen recorder byzanz.

20 Dec 2005

TextMate, here we come!

I know there are many people who like TextMate quite a bit, especially since it’s featured in the Ruby on Rails screencast. If you scroll down their page you’ll see that one of their killer features is “Expand triggers to full snippets”.

Today jessevdk showed up in #gedit with this super sweet present: a python plugin for gedit that let you do more or less the same, record any snippet and then automatically insert it: a small demo (ogg, 189 Kb, courtesy of Istanbul) it’s worth a thousand words.

14 Dec 2005

Never reject a feature? Never reject a feature request!

Tim’s post is very interesting, but in my opinion should be changed in “Never reject a feature request“, which means that every time a feature is requested, it should not be dubbed as “crack”, but neither accepted as is: we should try hard to understand which problem and use case drives that request and try to come up with a solution to the underlying problem. The solution may or may not be the exact request proposed by the reporter: often who identifies a problem is not the best suited person to find the solution.

After all it’s Linus himself that often says that “the main job of a free software maintainer is to say no”

12 Dec 2005

Murphy’s Law

(Sunday evening, #gedit)

kikidonk: so tomorrow is the big day?
me: yes! after months, tomorrow I am going to merge new_mdi into HEAD
kikidonk: cool!
me: I fixed distcheck errors and I have a test 2.13.0 tarball here... We really want to put a test tarball out in time for gnome 2.13.3. Unless something bad happens, I am going to do the merge tormorrow morning, now I am too tired to deal with last minutes problems. Night.
kikidonk: night

(Monday morning)

me: Hey, fixed the last distcheck problem in the merged tree, I'm going to commit in a bit
...no response...
me: anybody home?
...no response...
me: /me checks connection... Disconnected!

At this point I thoght, “Oh well, no problem. I’ll reconnect in some minutes”. It’s certainly not the first time my adsl line goes down. About an hour later I start to get annoyed and call the help desk and it turns out that the adsl of the whole (small) town is down! Thus defeating also my fallback plan to bring the laptop to the home of one of my friends and do the commit from there.

gedit 2.13.0

Despite the unexpected problems, new_mdi is now merged on HEAD and with gedit 2.13.0 you can taste all the new hotness!
2.13.0 is faster and lighter and features a load of improvements: draggable tabs, vfs saving, new plugins system that allows plugins to be written in python, a new interactive search UI (try ctrl+k) and many other things: see paolo’s mail.
What we really need now is a good deal of feedback and testing since no matter how careful we tried to be, it’s inevitable that some bugs found their way into the codebase. In particular we need help with things like a11y, multi head, bsd, solaris and in general all the things we have not a chance to test ourselves.
Before we get a load of duplicate reports, let me also note that there are a couple of known regressions that we decided to punt in order to get the tarball into gnome 2.13.3: autosave and the ‘shell command’ plugin. The first is already being worked on, while the shell plugin is a bit more complicated… we’ll try to get to it, but if someone is looking for a fun hack and wants to give it a try… :)
This also reminds me that our code for food bounties are still open until the release of 2.14.0 and apart from bugfixes there are many plugins that would be fun to write.

24 Nov 2005

python mysteries

Today I was tracking down a GtkUIManager warning we get in gedit new_mdi when you have two windows open and you close one

 GtkWarning: gtk_container_foreach: assertion `GTK_IS_CONTAINER (container)' failed 

so I take a look at uimanager’s code and see that it does the unmerging in an idle handler, and the idle handler was being run even after the window was gone. Since GtkUImanager properly cancels the idle when finalized, I said, ok, we forgot to unref the ui_manager in window_finalize!
And in fact we did… I add the unref and guess what: warning is still there. Stick a printf in finalize and discover that window_finalize never runs! Its refcount is bumped to the magical number 7. After a bit of fiddling I discover that the culprit are python plugins and in particular

 py_ret = PyObject_CallMethod (object->instance, method, "(N)", pygobject_new (G_OBJECT (window))); 

The refcount of GeditWindow in during gedit_window_destroy it’s always 7 no matter how many python plugins I load and at the moment, given how python ignorant I am, I have no clue how I am supposed to solve that… Dear Lazyweb, any suggestions?