Miranda for Ubuntu: Defining Rule

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")
ruleCell = gtk.CellRendererText()
ruleCombo.pack_start(ruleCell, True)
ruleCombo.add_attribute(ruleCell, 'text',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



About zainul franciscus

Hi, I am a software developer and tech blogger who is currently living in Wellington, New Zealand. I write stuff that I find interesting on
This entry was posted in programming, Python, Ubuntu and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s