Do I really ever have to write another treeview again ?

You havent seen me blog in a long time, but that doesnt mean I havent been busy doing gnome stuff πŸ™‚

there was alot of demand this year for a Glade that eats up and spits out GtkBuilder format ui definitions, this was undoubtedly hard for me to dish out so I missed the last stable release, but now we’ve got the mechanics in place plus a hand full of new toys to share. So heres a sneak peek at whats available in Glade for todays GNOME development release…

First of all, GtkBuilder – in general if you open a GtkBuilder file you just edit it in its format, if you need to convert your glade file, you need to pass through the project preferences dialog (Edit->Preferences):

Project Preferences

Setting the project format is undoable, and along with project target versions, will effect how the editors will react in glade (unavailable or warning highlighted widgets/properties by format and targetted version), I got a little carried away and brought you a fancy naming scheme control on the side. You’ll notice alot of the more commonly used editors have nicer formatting, we now have an iface that lets us format editor layouts by widget class (mostly we just add radio buttons with this), it also sports some ui candy; wrappy labels: long editor, short editor.

Another thing I had to do to get the show on the road was fix menus in gtk+ so that they would
build normally from GtkBuilder file input, I might be guilty of spreading roomers but there is a chance we’ll see that in a gtk+ stable release for GNOME 2.26… (currently native menus created by Glade will be depending on that release), oh yeah, we also have a simple editor in glade that applies pango attributes globally on your labels (without putting markup in translatable strings…)

Its worth noting what remarkable things you can do with GtkIconFactory, just create a factory, add icon sources to it, then use the newly created stock icons as stock ids in your widgets (its hard to make this feature obvious in Glade, it would really really rock if someone volunteered to write user documentation for Glade 3.6…), this feature allows you to define alternate graphics for your icon in different widget states, text directions etc (anyway, I was surprised by the obvious leverage after integrating that).

So I think the real question is “Do I really have to write yet another freakn treeview by hand ever ever again ?” … hehe, no I didnt mean to scare you, dont worry, you’ll never have to write one of those by hand again in your life πŸ™‚ heres a shot of the whole app with some views and a model:

Several views attached to a single model
Several views attached to a single model

Editing treeviews/iconviews/comboboxes takes a few steps, you have to create a data store, create cell renderers and sometimes columns, you have to define column types and optionally data in the store and finally you have to assing renderer attributes either to hard coded values or to indexes in the data store – I did my best to unify all of this into a single 2 tab editor, its totally based on Juan Pablo’s original menu editor, so it supports dynamic type changing of cell renderers, and drag’n’drop of renderers in a treeview to reorder them or drop them into other columns, on the face page it has the editor for the toplevel view widget embedded on the left, and the associated treemodel editor on the right that allows you to add columns to your data store and add and edit data in the store. On the second page it allows for adding and removing cell renderers, and editing thier attiributes:

set attributes to columns by name
set attributes to columns by name

This one will let you choose columns by name/type from the model for use as cell renderer attributes, I’m still having problems laying these properties out coherently, I would also like the combo box to stay small while the menu resizes to display the whole value (I’m using ellipsize=end when the combo menu is not popped down, and displaying the full text only in the menu)… anyway, this part is highly functional but needs some work in the ui πŸ˜‰

So that was a long time no see update on Glade and what we’ve been doing to it, in other news I have time on my hands so Im looking for some work (its pretty cold without a plane ticket in canada this time of year so I figured some planet roaming was in order) I put my text mode resume online today, in the mean time I got a great job helping the butcher at the supermarket shredding up meat all day, its spiritually calming honest grunt work and it sure beats relocating permanantly to california ;-D

dawn of the builder

Its been a long week, I went ahead and rewrote the parser code in Glade from the ground up, and then moved on to support dual formats, Im a little ashamed to say that this huge hacking experience was brought to you by coffee and cigarettes, for lack of *cough* other illicit substances that may have done better for my health, all grievances aside, it really is a nice piece of work I’d like to share with you all (its 7:15am Sao Paulo time and I’m blogging while cooling down and getting ready to sleep).

So lets see, what do we have ?

Well the new parser supports what Ive been calling class level definitions of xml layouts, in other words your widget library plugin is allowed to define, read and write properties and children in customizable ways, this was ofcourse needed to support the different formats that some widget classes are loaded from using GtkBuilder. We’ve also added an option, available in Glade’s edit menu, to decide which format your project will be saved in, Libglade or GtkBuilder.

Currently all widgets and properties formerly supported by Glade can now be saved and loaded in both formats. We dont yet have any support for the fancy GObjects now supported by GtkBuilder but VERY thankfully Johan has already provided a first try patch to get UIManager, our most awkward exception to load, this also must have been alot of work (and we may still need a few minor tweaks in the core to get it running). Other exciting things such as liststores and sizegroups should follow suit without too much of a headache. Another caveat is that Glade still has no idea what widgets are deprecated in the new builder format, which should be easy enough to remedy (glade will currently just save any widgets in the new format regardless).

This work is now available in trunk, and I do sincerely hope you all enjoy πŸ˜‰

newsflash

Well, incase you’ve been wondering what the hell happened to me, I am alive and well – finally I am unemployed – hoping I wont have to use the software hobby alter-ego as a crutch again anytime soon… man I am free can you believe it ?

So, with this newfound freedom I decided to aimlessly tread the earth, I am now in the beautiful huge crazy city of Sao Paolo in Brazil, comming from montreal canada thats quite a long shot (10 hrs one the plane !), the weather is a little dreary at the moment but promises well, the people are very hospitable and the women beautiful and abundant, oh and this great hostel that I highly recommend is sporting an Ubuntu system for its guests, wow !

Glade is due for a tarball soon, I guess I’ll roll one as soon there are a couple more fixes, I guess it goes without saying that I wont be actively hacking for at least a couple of months, but thanks to hostels in south america running solid ubuntu systems I’m still reachable in the virtual tube of your desktop.

who knows maybe I’ll even run into some gnomers down here πŸ˜‰

Some popular features …

… that I finally managed to add to glade trunk today

So I finally applied a refit version of Yevgen Muntyan’s patch

One common source of frustration about glade 3 has been that, sure you can add your own widgets to the runtime but, you gotta write that catalog, install a support module, or struggle with your setup so that we can load the type from the widget library, but you dont want to write a widget library just for that one widget you got in your app so, here’s the solution:

you make a catalog that looks like this one note the “parent” element from the “glade-widget-class” definition, it choses which widget class your “fake” widget class will derive from.

then, since we now have user defined search paths for catalogs and modules; you put it wherever you want (it has to keep the .xml extention though), lets say ~/mycatalogs

then you fire up glade like so:

GLADE_CATALOG_PATH=~/mycatalogs glade-3

And voila ! you got your widget in the glade runtime.

Happy Glading !

Long time no blog

Hey hey, long time no blog, my hacker alter-ego takes the back seat as much as possible but sometimes I have to pop out of the woodworks and say BOO !

As you all know from Johan’s recent post the infamous builder is on the rise, this means people will be desiring UI designers to produce UI description files that can be interpreted by the builder.

I dont expect to have any support for GtkBuilder files available for Glade 3.4 but that’s yet to be seen, we’re still a good month ahead of string freeze. We’ve scheduled a meeting on monday to discuss where all that is going – as usual we’ve got lots of blockers and only a few hands on deck (hint ;-D)

So on that note, I wish you all plenty of sunshine, tequila, hot babes on the beach & booming beats to dance to… if you’re not all that lucky, you can always put on your hacker alter-ego and hack away on gnome !

Why compute ?

So, here’s a question I’d like to put to all you hackers out there that do all the great things that I think gnome is, gnome and the free software movement in general is something that has tought me alot about communicating and compromising with people and I think its important first to take into account some of the positive things about computing in general before I go and question it… I guess I only feel that way because I’ve invested a small handfull of the limited years of my life into computing and I dont believe in regrets – so there must be something or some reason for me to have spent all that time computing.

Well, back to the real question… “Why do we do it ?”, well here are my personal reasons for better or worse:

  • Jukeboxes: I’ve been writing jukeboxes for over 6 years now, at first I was just an uneducated street kid with a talent for problem solving that took up computing as a hobby. Later I think I was attracted to the sheer ambition of it – in short, all the wrong reasons… I did it for money, for recognition from my familly & community around me… the one reward is after a long night of coffee & cigarettes I could get a moment of “Eurika !”
  • Glade: Well free software is a different story – I got into contributing to free software just because I think its a great way for people to rebel, “we the people who refuse to feed the machine will make it on our own thankyou” – these dreams of mine are unfortunately not very well recieved, many free software groups are so tightly bound to huge evil moneymaking corporations that I get the feeling the difference between open source and free software is a line that is getting more and more blurry. That doesnt mean the battle is lost, but it also doesnt mean that free software is of any more practicle use to the world then proprietary software – its just software and thus is most probably a waste of time.
  • Breakdance: I know I’m a pure bboy through and through because I do it purely for the love of the art – this gives me meaning in life because I can teach by example, I express myself and through my own expressions I can show people thier own true potential through myself – standing up for your own beliefs and not being scared to express them is of the highest personal value – this is the sole responsability that comes with being human; one man cant change the whole world but at least he can express his beliefs… even if it costs him his livelyhood or “prestigous reputations”.

So – I think we can all agree that Jukeboxes arent going to make the world a better place, I can tell you straight up that they’re not helping global warming – they also support record labels – which is just another means of massmarketing art – that means everyone gets to listen to one artist on thier CD player – and all the other artists starve – people hardly go to see local artists at shows, and as a further result – people dont meet one another at shows/plays/operas because now they can all have the luxury of drowning their brain on their own tv set

How about the desktop PC ? what is the desktop doing to stop global warming ? not to mention video games – i.e. the successor of what used to be the child’s imagination, what will become of our next generation as a result of our mindless obsession with these boxes hooked up to screens just plugging us into web ? (or plugging us “out of the real world”) ?

I’m writing this and posting it because I’m sitting here at my workplace trying to figure out what kind of moral justifications I have for being at this job, I do indeed feel guilty for sitting here and doing absolutely nothing usefull/helpfull to the world, so what will I do ? can you convince me that there is some point to computing ?

I’m in fort lauderdale !!!

its really really windy, its 2:40am and I’m in florida.
I didnt get a bed because the guy in charge at this hostel
is sleeping, thankfully some dude in yard let me hang out
in the lounge – bumped into some fly women in the taxi on
the way over – I already like it here πŸ™‚

So I saw the ocean for the first time in years, its roaring
right behind me as I type but I wont go and touch it for fear
of not being let back in… my my is it tempting. palm trees
everywhere !

Alone on a trip to a far away land, middle of the night,
what better time to blog ?

Its release day !

Whew, its been a rocky road trying to wrap things up in
time for gnome-2-18, but with one
string freeze break
and one remaining
crasher,
Glade
is pretty much ready for the show

Incase you wonder what we’ve been doing in 3.1 πŸ˜‰ well aside from
ironing out bugs in the framework as usual, we’ve been working on
the first version of the embedded workspace/one-window UI, which is
crash free except for the one I mentioned above, lets hope to see it
dissapear by 2.18.1… Juan has also been working on this bindings
framework – which is really a work in progress but proves that we
can easily load objects written in python and edit/serialize their
properties, C++ otoh proves to be a challenge…

Interestingly, I’m going to miss out on all the initial feedback
(complaints or otherwise ;-)) from the release… because I’ll be
chillaxing with the palm trees in florida for 5 days ! where
I’ll be attending one of the worlds biggest
breakdance competitions; so have fun untill then, I’ll be back
on the 19th ;-D