Feb 18, 2006

Successful build of Gnome 2.13.91 using jhbuild

Well after a little bit of fluffing around, but an otherwise streamlined build process I got a installation of Gnome 2.13.91 going. Thanks a lot to the following links

https://wiki.ubuntu.com/LiveCDCustomizationHowTo http://live.gnome.org/GnomeLiveCd_2fHowTo

2.13.91 Desktop

The first thing I notice about the new version: fast! Nautilus and startup have become a lot faster. I really like the eog simplification that has gone on, and the fusa stuff seems to work really well. I will go and file a few bugs about the operation of nautilus and the blinging new search feature. Now I can move onto the next step of my "automated livecd using jhbuild master plan"

Mar 13, 2008

Summer of Code

Work on Conduit is progressing nicely, squashing bugs that have appeared when interacting with the new versions of GNOME applications. I have kind of been tracking the GNOME release schedule (congratulations on the latest release BTW), so I expect to put out another Conduit release this week.

I intend to keep making stable bug fix releases until there are Python GIO bindings. At that time it would probably make sense to branch so that I can begin targeting 2.24, and have the opportunity to land some more invasive changes.

The current bugs that are being hacked on (i.e. have patches), depending on how the implementation turns out, may appear in $NEXT_STABLE_RELEASE, or in $FUTURE_RELEASE.

Summer of Code Projects I create this page on the GNOME wiki which includes some summer of code ideas for Conduit (and by extension, synchronization in the GNOME desktop).

Disclaimers:

  1. I am eligible, and will be applying to participate in summer of code this year.

  2. I wont be offended if people apply to do the same tasks that I am going to be proposing. The more the merrier!

  3. Im not sure how the whole mentoring regulations work. Can I mentor and be a student?, are there mentors in the GNOME community who would like to champion Conduit integration in their application?

Feb 15, 2006

Tango Icon Internals and Statistics

So I have been trying to think of a way to change the appearance of all the tango icons in one go. I envision being able to do the following- "Hmm I dont like tango, its a bit blue. What if I replace all the tango blue colours with lighter ones". My understanding is that SVG (or maybe inkscapes's implementation, im not sure) cannot define external stylesheets or palettes for svg files, so if you want to change something in lots of svg files en-masse then you have to grep/sed it.

So my first investigation was to find out how may colours esist in the tango icon theme (remember that the icon palette supplied has just 27 colours)

john@nzjrs-desktop:~/src/tango$ find /home/john/src/tango/tango-icon-theme -name ".svg" -exec egrep -o 'fill:#[a-f0-9]{6,6}' {} \; | sort | uniq | wc -l 151 john@nzjrs-desktop:~/src/tango$ find /home/john/src/tango/tango-icon-theme -name ".svg" -exec egrep -o '#[a-f0-9]{6,6}' {} \; | sort | uniq | wc -l 749

Hmm, this is going to be harder than I thought!

Feb 16, 2006

Mono and jhbuild

Well today I spent time trying to package up a jhbuild moduleset for mono. I got a bit distracted and wrote a helper script, when given the mono base url, spiders the download page for tar.gz releases, downloads and md5sums them, and updates the moduleset accordingly. Hopefully this will make it easier to keep the moduleset update because the script should do all the work.

Anyway it was fun to do a bit in python with xml.dom

Dec 6, 2007

The Big Move

The short news is that Conduit now lives in GNOME SVN. The move took a little longer than I would have hoped, but thats largely my fault. I would like to express my thanks to Olav Vitters for importing the SVN repository, his excellent response time to my emails, and the awesome mango system he created.

Whats Good

Conduit trunk is now pretty much feature frozen. It feels really good to finally cross off the TODO list and fix some of the bugs that I created (due to some poor choices when I started the project). While I will blog again soon about the shiny new features for the moment I will talk about one useful piece of code that I am proud of, and that may be useful to others.

Initially I used an in-memory python dictionary based database to store the object mappings which represent a sync relationship between two pieces of data (the mapping DB). I pickled this to disk when conduit closed. Unfortunately this was not only horribly gross (memory usage was huge), it was embarrassingly short sighted, as the one place I care most about types is this code path. We use dictionaries and object hashes extensively in the sync logic and its really hard to debug sync problems when you (for example) don't notice that a dataprovider returns the wrong type until you unpickle it a few days later.

To remedy this I needed (wanted) to use a database that had few or no external dependencies, that was a bit tougher on type safety, and that was usable from multiple threads. After a while I decided that because sqlite was now part of python2.5 this would be a good choice, and that I could get around the threading issues some other way.

Not wanting to re-invent the wheel completely I started with a few existing pieces of code

I glued these together and created a really nifty (yet another) DB abstraction layer that can be used in either single or multiple threaded applications, and then displayed in a Gtk.TreeView with NO additional effort. Whats more, the DB also has a LRU cache that dramatically reduces the number of calls into the DB when displayed in a Gtk.TreeView. For more information check out the following

All of this has been really heavily tested and everything seems to work as expected*........ except for the LRU cache, which I broke somewhere - hmm. I should really fix that.

Feb 18, 2008

They come in pairs

Following the tradition of the last Conduit release, I realized that I shipped Conduit 0.3.7 with a stupid build issue that broke all the Gmail/Google/Picasa support for people. Following in that tradition here is Conduit 0.3.8 which fixes that, and also features updated icons contributed by mejogid.

New Conduit Icons

For more information:

Conduit developer John Carr has also setup a Ubuntu PPA for Conduit. Check it out if you are interested in running the Latest and Greatest for Ubuntu Gutsy and Hardy.

Mar 12, 2007

Threading and (py)Gtk

At the request of a few people I have made a demo to share, showing how I do threading in a pygtk application (Conduit). I find the following approach seems to work reliably and requires little code. Other approaches can be found here and here.

This approach takes advantage of the fact that signal emission in glib has been threadsafe since glib 2.8 (IIRC). All communication with the GUI is done via gobject signals. There is definitely a compromise in the level of GUI fiddling that you can do, particularly when compared with the threads_enter/leave approach. However, I have found this signal based approach sufficent in my case, and that it encourages me to decouple the slow blocking tasks from the GUI.

A lot of the tasks in conduit take a long time (network limited), and there is no real need for extensive GUI interaction with them once they have been started. I am really only interested in their progress, and when they complete. With this in mind I have implemented the following approach;

  • FooThreadManager This class is the entry point for starting threads (the make_thread() method) . Its basically just a threadpool that starts threads with the appropriate arguments, while restricting the number of concurrent running threads below a user defined limit. It also connects the threads to the supplied user callbacks.

  • _IdleObject Like a normal gobject.GObject but emits all signals in the main thread

  • __FooThread_ A simple class which derives from both threading.Thread and _IdleObject. All work is done in run() and a signals are emitted when the thread completes and to show progress

  • Demo A simple demo (see screenshot) which can start a whole bunch of threads and receive notification when they complete.

FooThread Test Program

Anyway, the Example Code is a bit contrived and will certainly need some customization by the user but nonetheless may still be useful to others.

Update: Thanks to comments I fixed up a thread-safety issue. I had misunderstood that signal handlers get run immediately in emit(). Now the code emit()s on an idle_handler so all signals and callbacks are run in the main thread. As i mentioned, I use this approach in situations where the threads may run and block for a long time, so the burden of processing all the signals in the main thread is not a big deal as they do not occur frequently.

Update 2: Added progress reporting

Sep 24, 2013

GNOME Tweak Tool 3.10 Improvements

In collaboration with GSOC student Alex Muñoz and designer Allan Day, GNOME Tweak Tool has seen many improvements this cycle, both 'under the hood', and most noticeably, in the form of a modern GNOME3 UI design. The difference is stark; compare the old and the new versions below;

New UI

Old UI

In addition to the use of new widgets (Gtk.HeaderBar, Gtk.Application, Gtk.Stack, Gtk.SearchBar) the organisation of tweaks into categories has been updated. This should make many settings easier to find, especially in conjunction with new translations for many tweak names and descriptions.

Historically, the tweak tool UI was mostly auto-generated, resulting in a rather uniform and boring look, and more importantly the inability to easily group tweaks together to show causality (such as turning off desktop icons makes the options to show specific types of icons on the desktop redundant). This architectural limitation has now been fixed, and in addition, specialized UI elements have been created for certain tweaks; startup applications, shell extensions, desktop icons, the shell top bar, etc.

Desktop Icon Options

Other highlights of 3.10 include;

  • Allow updating GNOME Shell extensions from inside tweak tool
  • Startup application management
  • Offer to logout user when tweaks require the session restarted
  • GNOME style sidebar and search
  • Ability to disable middle-click paste (great for designers!)
  • Show text in tooltip when label is ellipsized, and make window maximizable and resizable.
  • Better tweak names and descriptions (manage our own translations instead of getting all from gsettings)

Startup Applications

Unfortunately, not all features I wanted to implement were completed. Things I will be working on in 3.12 include;

  • Hidpi tweak (this will land in 3.10.1)
  • Better search interaction (focus stealing and search-results layout fixes)
  • Improved layout when the window is maximized
  • Resurrect the wacom panel (this was generously contributed at the start of the cycle, but I had no time to port it to the new design, nor any way to test it)
  • Privileged helper for operations requiring root permissions (power management options, installing system wide themes)
  • Keyboard layout specialized UI
  • Theme management UI

For more information on GNOME 3.10 and GNOME Tweak Tool 3.10 check out world of gnome here, here, and here again, and wiki.gnome.org. Hope you all enjoy the release.

Mar 13, 2006

Ubuntu Dapper Flight5

Just upgraded to flight 5 and feeling quite positive about the state of ubuntu. Suspend is working agin on my laptop, and so is the SD card slot. I have included a screenshot below.

Screenshot of Dapper Flight 5

Also I plan to do a review of my laptop at some stage in the near future (Panasonic CF-R4).

Oct 6, 2007

Unintended Uses

I just returned to my computer to find that nautilus crashed somewhere in the midst of copying my 50GB (1000 odd holiday videos) from my external hard disk to my NAS via FTP. Not wanting to work out where exactly the crash happened and what files were incomplete or still needing to be copied I thought 'hey, I could use Conduit to do a one way sync'. So I did, and it worked.

Its always cool when software you have written manages to scratch an itch that you didn't design it for!

← Previous Next → Page 9 of 10