def __init__(self, tw, path, columns=None): AnimBase.__init__(self, 1.0) self.tw = tw self.frozen = False self.sig = tw.connect_after("draw", self.on_expose) self.row = Gtk.TreeRowReference.new(tw.props.model, path) self.selection = tw.get_selection() self.style = Gtk.rc_get_style(tw) self.stylecontext = tw.get_style_context() self.columns = [] for i in columns: self.columns.append(self.tw.get_column(i))
def __init__(self): ''' Initialize the message object. ''' gtk.Frame.__init__(self) self.vbox = gtk.VBox() self.vbox.set_spacing(3) self.action_area = gtk.VBox() self.action_area.set_homogeneous(True) # Get the tooltip style, for use with the message background color. w = gtk.Window() w.set_name('gtk-tooltip') w.ensure_style() #self.message_style = w.rc_get_style() self.message_style = gtk.rc_get_style(w) event_box = gtk.EventBox() event_box.set_style(self.message_style) self.add(event_box) hbox = gtk.HBox() event_box.add(hbox) hbox.pack_start(self.vbox, True, True, 3) hbox.pack_start(self.action_area, False, False, 3)
def getDefaultStyle( self ): widget = Gtk.EventBox() widget.show() return Gtk.rc_get_style(widget)