From d183f722a7b4752bf860fd46a1deddeb509b968a Mon Sep 17 00:00:00 2001 From: Rafael Ortiz Date: Thu, 03 May 2012 20:18:50 +0000 Subject: style fixes --- diff --git a/CeibalNotifica.py b/CeibalNotifica.py index 5de438c..84ac98c 100644 --- a/CeibalNotifica.py +++ b/CeibalNotifica.py @@ -27,8 +27,9 @@ import gobject from ceibal.notifier.store import * BASE = os.path.dirname(__file__) -pixbuf1 = gtk.gdk.pixbuf_new_from_file_at_size(os.path.join(BASE, "Iconos", "ceibal-gris.png"), 32,32) -pixbuf2 = gtk.gdk.pixbuf_new_from_file_at_size(os.path.join(BASE, "Iconos", "ceibal.png"), 32,32) +pixbuf1 = gtk.gdk.pixbuf_new_from_file_at_size(os.path.join(BASE, "Iconos", "ceibal-gris.png"), 32, 32) +pixbuf2 = gtk.gdk.pixbuf_new_from_file_at_size(os.path.join(BASE, "Iconos", "ceibal.png"), 32, 32) + class CeibalNotifica(gtk.Window): def __init__(self): @@ -171,6 +172,7 @@ class CeibalNotifica(gtk.Window): def salir(self, widget=None): sys.exit(0) + class ListoreModel(gtk.ListStore): def __init__(self): gtk.ListStore.__init__(self, gtk.gdk.Pixbuf, @@ -179,6 +181,7 @@ class ListoreModel(gtk.ListStore): gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_BOOLEAN) + class Notify_Store(gtk.TreeView): __gsignals__ = {"show_notify": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_STRING, gobject.TYPE_STRING)), @@ -186,6 +189,7 @@ class Notify_Store(gtk.TreeView): gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT, )), "marcar_notify": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT, ))} + def __init__(self, model): gtk.TreeView.__init__(self, model) self.set_property("rules-hint", True) @@ -277,10 +281,13 @@ class Notify_Store(gtk.TreeView): def emit_delete_notify(self, path): self.emit("delete_notify", path) + def emit_marcar_notify(self, path): self.emit("marcar_notify", path) + class ToolbarInfo(gtk.Toolbar): + def __init__(self): gtk.Toolbar.__init__(self) self.modify_bg(gtk.STATE_NORMAL, @@ -302,9 +309,11 @@ class ToolbarInfo(gtk.Toolbar): separator.set_size_request(0, -1) separator.set_expand(True) self.insert(separator, -1) + def set_text(self, text=""): self.info_label.set_text(text) + class ToolbarControl(gtk.Toolbar): __gsignals__ = {"get_filter": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_STRING, )), @@ -312,6 +321,7 @@ class ToolbarControl(gtk.Toolbar): gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT, )), "show_filter": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, [])} + def __init__(self): gtk.Toolbar.__init__(self) self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(0, 0, 0, 1)) @@ -388,6 +398,7 @@ class ToolbarControl(gtk.Toolbar): def emit_get_filter(self, widget, value): self.emit("get_filter", value) + def emit_make_filter(self, widget, value): val1 = self.filter_combo1.get_value_select() self.emit("make_filter", [val1,value]) @@ -400,9 +411,11 @@ class ToolbarControl(gtk.Toolbar): self.filter_combo2.get_model().clear() self.emit('show_filter') + class Combo(gtk.ComboBox): __gsignals__ = {"change_selection": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_STRING, ))} + def __init__(self): gtk.ComboBox.__init__(self, gtk.ListStore(str)) cell = gtk.CellRendererText() @@ -432,6 +445,7 @@ class Combo(gtk.ComboBox): value = self.get_model().get_value(iter, 0) return value + if __name__ == "__main__": CeibalNotifica() gtk.main() -- cgit v0.9.1