[disclaimer]


This is a personal blog. The opinions expressed here represent my own and not those of any of my employers or customers.

Except if stated otherwise, all the code shared is reusable under a MIT/X11 licence. If a picture is missing a copyright notice, it's probably because I'm owning it.
Showing posts with label gnome3. Show all posts
Showing posts with label gnome3. Show all posts

Saturday, October 31, 2009

Mono-ifying Gnome3, one dependency at a time

2 quick announcements:

libunique now has a managed binding, Unique#. As the mapping is already feature complete and API stable, the code is tagged 1.0.0. It's simple, it's as easy and obvious to use as the native libunique, it doesn't have funky dependency (except, well, for libunique 1.0.0), it installs itself in the GAC...

The code is hosted on gitorious http://gitorious.org/unique-sharp/unique-sharp and patches are welcome. There's no tarball so far, but if you need one, ask and you might receive.

F-Spot got yet another bugfix release (0.6.1.4) I worked on during the weekend, fixing an X issue on some screens. Unfortunately, the Karmic release of Ubuntu (congrats guys) unleashed a new horde of avid testers, and they were able to find an issue in the --view mode (the same issue, for the same widget, was reported for the facebook exporter too). I'll look at it this weekend, in the meantime the workaround is to run f-spot --view with GDK_NATIVE_WINDOWS=true.

[Update 2009/10/31: bug fixed]

Friday, August 28, 2009

GtkBuilder on IronPython

Someone asked me if I could add the missing parts of GtkBuilder in Gtk#Beans so he could use it with IronPython on mono.

Hey, it looks there's no missing parts ! It all works fine since day one. Here's the the trick:

import clr
clr.AddReference('glib-sharp')
clr.AddReference('gtk-sharp')
clr.AddReference('gtk-sharp-beans')
import Gtk
import GLib
import GtkBeans
import System.IO

def PyBuilderAutoconnect(builder, target):
def _connect(builder, object, signal_name, handler_name, connect_object, flags):
name = ''.join([frag.title() for frag in signal_name.split('_')])
event = getattr(object, name)
event += getattr(target, handler_name)

for object in builder.Objects:
setattr(target, object.Name, object)
builder.ConnectSignalsFull (_connect)

class Application:
def __init__(self):
builder = GtkBeans.Builder (System.IO.FileStream ('ui.ui', System.IO.FileMode.Open))
#use this ctor if you don't like FileStream
#builder = GtkBeans.Builder ()
#builder.AddFromFile ('./ui.ui')

PyBuilderAutoconnect (builder, self)
self.window1.ShowAll ()

def onbuttonclicked(self, o, args):
Gtk.Application.Quit()

Gtk.Application.Init ()
app = Application ()
Gtk.Application.Run ()
Now your IronPython skills are ready to rock Gnome3!