Archive for 2005

Gedit follow-up

Thursday, June 16th, 2005

This post will answer the questions generated by the previous one (or at least try to).

One of the main concern is “Why use yet another search UI ?”, evince/firefox/epiphany use more or less the same approach, a bottom bar that pops-in causing no reflow of text. Gedit uses a sidebar that cause text to be “pushed” to the right, maybe causing reflow is auto-wrap is activated and the window too small

Here is what Paolo “pbor” Borelli has to say about that:

Did gedit look at the mozilla/evince/epiphany style search popup at all?
Yes, we discussed it a lot, we also discussed it at guadec, and we also tried implementing a search bar before implementing the sidebar, the reasons why a search bar doesn’t work very well for us are:

  • Fitting replace in the bar doesn’t work well
  • Ditto for the varions search options (match case, etc)
  • The search bar at the bottom doesn’t work well with the output window (bottom pane) open
  • And at the top it doesn’t work well with tabs, which I think is the reason why firefox has it at the bottom. In general I’m not very fond of search bars at the bottom… is the last place where my eyes goes
  • The last reason (even if not very important) is that for text,I value vertical space more than horizontal

However we are aware of some of the drawbacks of a side pane search, the most important being that the text is “shifted” to the right, so we decided to stop speculating and try this UI and stick with it until we get enough feedback (note that now search does also find-as-you-type), after having tried it for a while, it’s not that bad. The problem of reflow would also be fixed by having the pane on the right, but we felt that a sidepane on the right is weird.

Now some other points taken from the same IRC discussion:

“new_mdi” [the CVS branch] is almost a rewrite (apart from search, it gets rid of bonobo, has completely async file loading/saving with complete vfs support, new plugin system,etc), but we do not have enough time/manpower, so we are taking our time [This is frightening, quick they need developers, developers, developers !]

I think that our loading/saving code in new_mdi is shaping up really good, we are using xfer too for remote saving, the problem is that we also have to deal with backups which makes things really hard, especially when you have to deal with permissions and symlinks…

We also put special care in avoiding races (like testing perms before writing, which is inherently racy), local files are special cased and the saving algorithm is inspired by vim, also for loading we special cased local files and used mmap which is blazingly fast 🙂

And finally we got rid of the dialogs, dialogs suck in gedit because they block all the tabs… now you can start a slow operation in a tab and do stuff in another one:

Gedit opening a remote file

Concerning other questions:

  • What are the tabs at the bottom of the sidebar?
    It has three tabs, the first one presents a list of opened documents, the second, the search UI.
    The third is in fact added by a plugin, which can now add their tab to the sidebar, here it is the TagList plugin’s list (a list of xhtml tags for examples)
  • Is there a FileBrowser Plugin for gedit, or Project Manager ?
    Yes there will be one, but the plugin interface has been completely rewritten, so it’s not usable yet.
  • Is it possible to reorder tabs manually now? (with drag-and-drop)
    Yes !
  • I don’t see this in CVS yet, or am I missing something ?
    to see this new gedit, you have to specify the “new_mdi” CVS branch, be warned, it is experimental !
    cvs -d co -r new_mdi gedit

Gedit development

Wednesday, June 15th, 2005

Gedit is the gnome text editor, you all know that, i thought i might post some screenies of the latest interface improvements (i just make PR for them, i didn’t really work on it)

Find interface

Here you have on the left, the new find/replace sidebar, allowing a far better search experience than the crappy over-the-top dialog. You can also see the context menu with interesting undo/redo labels, see next screenshot.

Edit menu, undo/redo improvements

Again, the edit menu, showing the undo/redo items, like gnumeric and i suppose other applications, it shows a more comprehensible label than just “Undo” or “Redo”, that’s what i’m working on for the moment, you can follow it in this bugzilla bug, it is implemented in gtksourceview, so anyone using it should be able to have such menu items in his own app.

Unreadable file error

Finally, they are struggling to get rid of all annoying popup messages, this is what happens when an unreadable file is opened. The print preview will also show up in the same tab as the text it previews, much more clear, unfortunatley it appears to be broken right now…

Nautilus, part 2

Saturday, June 11th, 2005

So i made a little progress, now the files being downloaded have an emblem progressively filling up. I made a movie of that, it’s a bit wacky and not fluid, but i don’t know how to do properly (format ogg/theora, 1280×800 so you may need to resize it a bit). It’s buggy (notice i don’t close any window 😉 ) and the code is really hacked-in but this is a proof of concept.

Epiphany-Nautilus integration

Friday, June 10th, 2005

Here is my latest little project, integrate epiphany downloads with nautilus. First a mockup.

Nautilus mockup

This shows the normal nautilus spatial window, but in the corner there is a little addition, a download status bar indicating how many files are being downloaded in that particular folder, as well as the global download progress.

Now, the actual screenshot of a live download in nautilus, the result is the same, but the display needs to be cleaned (showing human-readable file sizes, times, etc)

Nautilus integration

So, the concept is quite simple, forward epiphany download events to nautilus via dbus, since gnome-vfs can’t handle downloads from epiphany at the moment. In nautilus, listen for dbus events and store the various downloads. The nautilus windows that are showing a folder where a download is in progress are notified, and show the progress.

Next step is to show files being downloaded with a special emblem, indicating that they are being downloaded and showing the progress of that file, for example using a pie emblem that fills up, or a vertical bar that grows to 100%. A context menu for these files would allow to pause/cancel/resume/abort the transfer.

The final goal is to use nautilus for the actual download, and epiphany would just forward the url to download, but in the meantime this would provide a working UI. When the change is ready, just change the backend, the UI stays the same.

Now i would like to hear you comments about that..

Update: after reading the first comments, i think i must go a bit further in my explanation. This thing does not happen when you drag and drop from epiphany to nautilus, but when you click on a link in epiphany and choose to download the file. Instead of having the current download manager pop-up, the nautilus window would appear, with that ui.

This has at least 2 avantages over the current system: No pop-ups (well the nautilus folder would appear, but this is an option i don’t know if it’s better to not open it..), the download you view will be related to the folder that you are looking at. Maybe the same UI can then be used for regular file move/copy operations.

Epiphany Auto-Reload extension

Friday, May 27th, 2005

A little new extension between two exams to study 🙂

This one reloads a tab periodically, for the moment every 60 seconds, but it already has the code to adapt itself to page changes:

  • When the page has changed since the last update, reload the page in half the time as before
  • When the page hasn’t changed, reload the page in last reload time + 60 seconds

This isn’t very “smart” but still somehow adapts itself into the page reload rate.

The real problem is to detect when the page changes, there is no easy way, so it will wait a bit.

Epiphany RSS extension

Sunday, April 17th, 2005

Well, another update

This one allows to directly subscribe to a feed when right clicking on it’s link in the page (feature asked by “nud” on IRC)

Beside that I started looking at the epiphany-mono package, to allow mono extensions be easily written for epiphany, the binding is quite complete, but very buggy at the moment, so i’ll help fixing that eventually.

It can be fetched from the gnome cvs:
cvs -d co epiphany-mono

Then the extension itself is something like:

using System;
using Gtk;
using Epiphany;

namespace EphyRssExtension {
	public class RssExtension : GLib.Object, EphyExtension {
		private Hashtable feeds = new Hashtable();

		public RssExtension () : base (IntPtr.Zero) {
			Console.WriteLine ("New EphyRss Extension");

		public void AttachWindow (EphyWindow window)
		    Console.WriteLine ("EphyWindow Attached");
		    //Do anything you like with he window

		public void DetachWindow (EphyWindow window)
			Console.WriteLine ("EphyWindow Detached");
		       //Do anything you like when the window is discarded

		public void DetachTab (EphyWindow window, EphyTab tab)
		    System.Console.WriteLine ("Detach tab");

		    tab.Embed.GeFeedLink -= OnFeedReceived;
		    tab.Embed.GeContentChange -= OnContentChange;

		public void AttachTab (EphyWindow window, EphyTab tab)
		    System.Console.WriteLine ("Attach tab: {0}", tab.DocumentType );

		    feeds[tab.Embed] = new ArrayList();
		    tab.Embed.GeFeedLink += OnFeedReceived;
		    tab.Embed.GeContentChange += OnContentChange;

		private void OnFeedReceived (object o, GeFeedLinkArgs args)
			Console.WriteLine ("Feed {0}: '{1}' @ {2}",
                                                args.Type, args.Title, args.Address);
			IList l = feeds[o] as IList;

			Feed f = new Feed();
			f.Title = args.Title;
			f.Type = args.Type;
			f.Address = args.Address;


		private void OnContentChange  (object obj, EventArgs args)
			(feeds[obj] as IList).Clear ();

		private struct Feed {
			public string Title;
			public string Type;
			public string Address;

Which does pretty much nothing except that it stores in a hashtable the feeds corresponding to each opened tabs. It requires now little effort to make a nice gtk UI, like a dialog or integrating menu items or statusbar icons in epiphany via the GtkUiManager.

Tomboy reminder plugin

Monday, April 11th, 2005

This plugin seems to match the needs of many people ad i always get mails from happy users suggesting things or giving some code.

I released the 0.5 version, which adds time handling !

So you can write somthing like
! 23 april at 3pm
! 11 avril a 23:30

Very useful 😉

Now it’s time to study some mozart/oz for the university..

Epiphany rss-extension

Monday, April 11th, 2005

The extension finally made it into cvs, you can get it by getting a fresh checkout of the epiphany-extensions module on gnome cvs servers.

Last night I also added a context menu on the list of feeds to copy the feed address in clipboard, and allwed to drage the feed in any text entry to get the url too.

Beside that i made a little extension called “file-watch” to will reload a page, if this is a local page and it is modifed, very practical if you develop web-pages locally, just save it in your editor, and epiphany will refredh the view automatically !

Available here
This might well be transformed in the core epiphany package instead of an extension.

Muine Random play

Saturday, April 9th, 2005

I love muine !
When I want to listen to some good music, I fire up muine, then click on the Add Album button. Now what album to choose ? Every time it’s the same thing I just can’t choose an album and play it. I decided to fix that by adding a Random button that will just select and queue for me a random album !

What a pleasure to just let the random magic do its work.

Here is what it looks like
Muine queue random button
Click on random, a random album/song is queued in the playlist and the window stays open so you can click two or three times to have two or three random albums/songs queued.

The patch on the gnome bugzilla

Epiphany hacking

Wednesday, April 6th, 2005

These days I have been hacking on an epiphany extension poetically called “rss”.
It allows to retreive feeds in any page, and register these feeds in your favorite feed reader (so it’s not a firefox-like handling of rss feeds) !

All this can be accomplished using dbus, patching popular feed readers such as straw, liferea or blam (i did that, the patches can be found in their respective bugzillas). I had to patch epiphany and epiphany-extensions, so it is quite bleeding-edge to test.

Here is a screenshot of the thing: feeds feeds, notice the statusbar icons..

a random blog feeds
A random blog feeds, notice that noth atom AND rss are selected, by default rss are selected before atom ones.

The feeds are selected “intelligently” so normally blogs that have atom/rss versions only have one of the two selected, while sites providing more feeds are selected entirely.

To signal that feeds are present, a little icon appears in the status bar, and a menu entry appears to make the dialog appear.