def __init__(self, mainwin, label=''): gtk.VBox.__init__(self, False) self.mainwin = mainwin self.input_topics = gtk.Entry() self.clearbtn = gtk.Button() self.clearbtn.set_image(self.mainwin.load_image('clear.png')) self.clearbtn.set_tooltip_text(_('Clear results')) try: #self.input_topics.set_property("primary-icon-stock", # gtk.STOCK_FIND) self.input_topics.set_property("secondary-icon-stock", gtk.STOCK_FIND) self.input_topics.connect("icon-press", self.__on_icon_press) except: pass inputbox = gtk.HBox(False) inputbox.pack_start(self.input_topics, True, True) inputbox.pack_start(self.clearbtn, False, False) self.topics = TweetList(mainwin, label) self.caption = label self.pack_start(inputbox, False, False) self.pack_start(self.topics, True, True) self.show_all() self.clearbtn.connect('clicked', self.__clear) self.input_topics.connect('activate', self.__search_topic) self.input_topics.grab_focus()
def __init__(self, mainwin, mode='single'): Wrapper.__init__(self) if mainwin.extend: self.timeline = TweetListWebkit(mainwin, 'Timeline') self.replies = TweetListWebkit(mainwin, _('Mentions')) else: self.timeline = TweetList(mainwin, _('Timeline')) self.replies = TweetList(mainwin, _('Mentions')) self.direct = TweetList(mainwin, _('Directs'), 'direct') self._append_widget(self.timeline, WrapperAlign.left) self._append_widget(self.replies, WrapperAlign.middle) self._append_widget(self.direct, WrapperAlign.right) self.change_mode(mode)
def __init__(self, mainwin, mode='single'): Wrapper.__init__(self) self.favorites = TweetList(mainwin, _('Favorites')) self.user_form = UserForm(mainwin, _('Profile')) self.topics = SearchTweets(mainwin, _('Search')) self._append_widget(self.user_form, WrapperAlign.left) self._append_widget(self.favorites, WrapperAlign.middle) self._append_widget(self.topics, WrapperAlign.right) self.change_mode(mode)
def __init__(self, parent): gtk.Window.__init__(self) self.working = True self.mainwin = parent self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG) self.set_title(_('In reply to...')) self.set_resizable(False) self.set_size_request(400, 300) self.set_transient_for(parent) self.set_position(gtk.WIN_POS_CENTER_ON_PARENT) self.tweets = TweetList(parent, _('In reply to...')) top = gtk.VBox(False, 0) top.pack_start(self.tweets, True, True, 0) self.add(top) self.connect('delete-event', self.__unclose) self.connect('size-request', self.__size_request)