I have been helping out Miranda development by developing some preliminary UI using Glade. Glade is an awesome RAD for developing GUI based on GTK.The user interfaces designed in Glade are saved as XML. Glade provides a clean separation between UI layout (view), model, and its controller. Glade allow developers to bind the XML file using different programming language. We are using python to develop Miranda.
Create Rule Window
This is a prototype of Miranda’s Create Rule window. The screen below shows that user is trying to alphabetize his folder by creating a rule that says “Please move any files that begins with the letter ‘A'” into the ‘A’ folder.
Populating Combo Boxes
I just learn a few things about Glade’s combo box. I would like to share how to populate a combo box.
ruleStore = gtk.ListStore(gobject.TYPE_STRING) ruleStore.append (["ALL"]) ruleStore.append (["ANY"]) ruleCombo = self.builder.get_object("ruleOptionComboBox") ruleCombo.set_model(ruleStore) ruleCell = gtk.CellRendererText() ruleCombo.pack_start(ruleCell, True) ruleCombo.add_attribute(ruleCell, 'text',0) ruleCombo.set_active(0);
01 – 03: We need to create a model that stores the items that we want to put in our combo box
05 – 06: Set the model into the combox
07 – 09: Create a gtk.CellRendererText (an object that renders text into into a gtk.TreeView cell) and sets it into the combo box.
10: select the first item in the combo box as the first active item.
I am impress by how easy it is to produce a working UI using glade. Miranda will be tested against Ubuntu 9.10. Miranda is inspired by Belvedere