Developing with gmould - reason of action group.

What is it ?
Developing with GUI is different from bash straight processing. GUI is event based, bash should ready to run whatever function or event. Consolidating these action into gtkdialog definition is now should be a breeze. Lets look at how things will work. We just use a simple example to see how this work, In real dev, it might be different case but still the concept is still the same - modularity.
Exampli gratia
Once upon a time you make a fictional app - App to run browser. You start small and decide to add things later.
First - you create a button, its will run firefox, later on you add a menu - run firefox &, more functionality yeah ? after few weeks, you decided to add toolbar, still do the same thing - run firefox &. All do 1 thing in common - firefox &. Works great. Lets add a button to run IE ?. After editing 3 places you have IE button, menu and toolbar. Great.
The problem
Suddenly, you decided, if user ran firefox, they don't want IE anymore and vice versa. You have to disable the other. There are 6 different place you have to edit there buddy...... or would you like to edit 2 line only ?
What if later you want the command have arguments ? 6 place or 2 line ?
or bring up a messagebox informing browser is/already running ? 6 place or 2 line ?
It add up to more dev time.
Get it ?
With gmould, you simply create a button and assign it an .action file. Later, add a menu and use THE SAME action file, and so on with toolbar. For IE, you repeat but with a different .action file. Any change in the action file will be reliase in ALL widget that use it.
Edit 2 line and you are editing 6 widget, is that productive or not ?
Oh I see...
This is the reason action are grouped. Same task performed by different widget and its easily modifiable. For customized behavior I do have the idea of chaining action files, but that will make gmould more complex.
If chaining action applied, we can have a lot more flexibility, but of course it come with complexity :).  For now, lets stick with the basic.

TabMenu aka The Ribbon

Today I did have time to work on the TabMenu. The icons constants need to be completed, but with new dialog, I always found a better way to do it, but to do it within gtkdialog is very hard. Not because of code, but lack of it.
gtkdialog problem - There is no established components.

Thats is the point to create gmould. To heighten gtkdialog up to - usable toolkit. Enough ramblings, here the TabMenu aka Ribbon menu. New revamped icons too, lots of icons missing, soon they will be defined in constant.h and headache go away - a bit.

During my research about the ribbon, I found out the best for gtk is like this...
If its only a button - 48 pixel
2 button - 32 pixel
3 button - 16 pixel
4 button - go find a ribbon screenshot showing 4 layer of button and tell me
6 button - 16 pixel, icon only, no text

I'm thinking of building the TabMenu component, but MS Ribbon seems to have lots more of widget instead of only buttons. Maybe later I guess. Icon reorganise is more important. Oh and then theres, the gridview and then the list exchanger and toolbar creator and hbox/vbox creator and...

as I said - No established component.

I DO create better "treeview" component however :). Treeview and Ribbon menu below, also the collapsible panel is seen there


How it all began


Everyday we progress forward...
Around last year, a lightning struck a coconut tree behind my house, it snap through the roof and reach my telephone line. It was burnt and the wires reach my modem, Internet was out, at least I still can use the computer, still OK. I cant repair, its cost quite some big bucks to do the rewiring.

and gets better...
Few days later, my laptop processor fan get slower and eventually stop working, 15 minutes  of Windows7 available before temperature too high and it hang, can use despite computer for few minutes only, still OK. I cant get it to repair, did I said I'm poor ?

...and getting much more nicer
After tens of 15 minutes and half an hour cooling down routine (one will get used to something if it cannot be avoided), the hard disk start failing, and Windows7 wont boot anymore, it lingers and its now 15 mins of boot before temp get another high peak. I cant use the computer anymore. There is no recovery CD, its preinstalled on the computer and worse, even if I got one, temp still skyrocket too high to do anything, its pretty much unusable, no more 15 minutes, no more mousing or typing. Its to the point of being a big hot paper weight with mouse and cables attached to it, this is not acceptable anymore.

...until...
All hope goes with the lightning, act of god as insurance says.
diagnosis
The hard disk develop bad sector due to high temperature and multiple sudden power off due to the fan not churning thus making Windows7 takes 15 more or less minutes to boot.

puppy power to the rescue
 Then I remember, I got a 1GB  Campbell soup free thumb-drive (did I said I'm jobless and poor ?) with pupplylinux in it.

Plug it in, boot USB and it boot and works! Accustomed to 15 minutes routine, I shutdown after salvaging few bits of Windows7 data. Yay, finally, silver lining.

Few days later, lets try see if it can handle the temperature, after all its booting from USB and in RAM only, no harm I guess. For hours and hours without processor fan, only hand fan sometime and still no crash, whew, puppylinux on RAM is darn COOL.

afterglow
Cut story short, I manage to salvage, partition, reinstall, protect etc etc all because of the 1GB thumb-drive and puppylinux. Now I use lxpup
and it boot permanent, frugal and on 3 USB stick as precaution and "briefcase". It really deserve it. I did try Ubuntu, mint, and other major
linux distro, almost all heat up the the processor, dustbin. Puppylinux wins and get the partition and won the boot ranking order on my pc.

So after tinkering a while, I saw puppylinux use gtkdialog here and there and it look a bit clunky. Still, puppylinux use gtkdialog as the ui for some of its stuff. Turns out its just
bash script "addon". So...lets make it better.

its quite fun to use bash
As a thank you and to fill time on being jobless here it is - gmould. Its not usable, but slowly becoming better.
gmould is a user interface editor for gtkdialog. Its still in infancy, so please have patience :). Its a thank you gift to puppylinux, the community use it or not is up to them :) . Below is some screen shots for you to view and comment. I still didnt upload gmould, quite busy developing and improving gmould.

Oh did I mention
I still dont have the processor fan replaced ? Damn I'm poor. If you make software using gmould later, ask them to donate to me, OK ? Need (instead of want) new processor fan :):). Seriously its just to know somebody appreciate and USE the software, its an urge for us coders to code. We got real life too instead of sitting coding. I'll write about this later I guess.



I appreciate any comments or whatsoever, just drop a line.




gmould development blog is available at http://gmould.blogspot.com/
gmould code repositroy is available at http://code.google.com/p/gmould/
I still did not upload yet, it takes time to learn all these blogging and git stuff.

this bloggin stuff is tiring me, its not productive.