2008-03-06
Posted in Fanfiction
at 3:01
The Last One by The Smiling Shadow
Length: 14 Chapters, Ongoing
Sources: Terminator
Rating: 5/5
I’ve always loved stories which explore alien mindsets (robots, aliens, and people like Rei Ayanami) and follow them as they learn about the aspects of the human mindset that were alien to them at the start of the story. (It’s excusable. I am human, after all.)
Permalink
2008-03-03
Posted in Geek Stuff
at 12:52
In case you were unaware, GTK+ doesn’t let you set_active(False) on every single button in a RadioToolButton group. One must be pressed at all times.
So, if you want to have a user interface where it’s possible to have none of them pressed (for example, using RadioToolButtons for “Zoom 100%” and “Zoom to Fit” and regular buttons for “Zoom In” and “Zoom Out”), you need to use a little trickery.
self.zoom_100 = self.wTree.get_widget("zoom_100")
self.zoom_fit = self.wTree.get_widget("zoom_fit")
self.zoom_manual = gtk.RadioToolButton(self.zoom_100)
zoom_100 and zoom_fit are the RadioToolButtons as defined in my Glade XML file. The trick is zoom_manual. It is now part of the button group, but I’m not adding it to the user interface.
This is a preview of
Quick Tip - GTK RadioToolButton With All Buttons Unset
.
Read the full post (173 words, estimated 42 secs reading time)
Permalink
Posted in Geek Stuff
at 5:37
PyGTK - EntryCompletion hacked up to give nicer tab-completion
While working on a batch organizing tool, I found out the hard way that GTK’s EntryCompletion is not meant for people who want speed. (It’s a memory aid, not a speed aid) I also couldn’t just switch to PyQt or wxPython because they all do basically the same thing.
As such, I hacked the GTK auto-complete up a bit so that it behaves more like shell auto-complete. (It doesn’t do anything until you hit Tab. When you do, if there’s one match, it’s completed. If there are multiple matches, it pops open the normal auto-complete list so you can pick one.
Permalink