Exemple #1
0
 def get(self):
     rslt = []
     model = self.widget.get_model()
     itr = model.get_iter_first()
     while itr:
         if not model.get_value(itr, 3):
             curr_tuple = list(model.get(itr, 0, 1, 2))
             curr_tuple[1] = util.unescape_markup(curr_tuple[1])
             curr_tuple[2] = curr_tuple[2]
             rslt.append(curr_tuple)
         itr = model.iter_next(itr)
     return rslt
Exemple #2
0
 def changed_cb(self, widget, *args):
     entry = self.child
     model = self.get_model()
     itr = self.get_active_iter()
     if itr:
         entry.set_icon_from_pixbuf(0, icons.Menu.get_status_pixbuf(model.get_value(itr, 0)))
         self.current_status = model.get_value(itr, 0)
     if itr and model.get_value(itr, 3):
         self.child.modify_text(gtk.STATE_NORMAL, gtk.gdk.color_parse('#CCCCCC'))
         self.child.set_sensitive(model.get_value(itr, 4))
     else:
         self.child.modify_text(gtk.STATE_NORMAL, gtk.gdk.color_parse('#000000'))
         self.child.set_sensitive(True)
     entry.set_text(util.unescape_markup(entry.get_text()))