20 Aug 2010 federico   » (Master)

Fri 2010/Aug/20

  • Which document is open in a window?

    Yesterday I mentioned a patch for Evince to add an "Open Containing Folder" command. In the bug that tracks the patch, Milan Bouchet-Valat asked about having an X window property that apps could set to let the environment know the URI that is being shown in a window.

    This sounds pretty useful. I told the Zeitgeist hackers about this, and Michal Hruby told me about exactly the same proposal, which had some discussion in the wm-spec-list.

    The basic idea is to add a _NET_WM_CURRENT_URI property to windows, whose value is a string with the URI of the document being viewed. From the application programmer's viewpoint, this would be something like gtk_window_set_current_uri&nbsp(window, string). You would call that function when you load a document.

    Gnome-shell and window managers could use this information to do several things — offer the "show in file manager" command themselves, provide information to Zeitgeist about the documents that are open at any one time, etc.

    The discussion has an interesting mail from Luboš Luňák. It seems that KDE has already been considering something similar.

    Extending the idea a bit further, gnome-shell has mockups to show a list of tabs that are open in your web browser. If you make that window property be a list of URIs (for all the open documents) instead of a single URI, then the window manager can list the open web pages easily. You would need a human-readable list of document titles (and possibly favicons and other nasties), but details, details...

    I think we would also need some sort of message that the window manager can send to windows, like "focus this document" for when you select your tabbed web page in gnome-shell's lists. This message should be the only command that we add to communicate from the window manager to apps; in theory you should be able to do everything else from the app itself, once you have focused the documents — close the document, move it, etc.; there is no need to complicate the window manager with that knowledge.

  • For my Mexican friends — correlación entre municipios PANistas y violencia.

Syndicated 2010-08-20 15:09:00 (Updated 2010-08-20 22:04:52) from Federico Mena-Quintero - Activity Log

Latest blog entries     Older blog 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!