Beispiel #1
0
    def _create_additional_buttons(self):
        start_btn = util.new_small_button(
                'media-playback-start',
                self._on_start_timer,
                tooltip=_('Start a tomato timer and work on selected activity'))

        later_btn = util.new_small_button(
                'stock_down',
                self._on_later,
                tooltip=_('Move the selected activity to the plan list for later processing'))
        return ((start_btn, 0), (later_btn, 1))
Beispiel #2
0
    def _create_additional_buttons(self):
        start_btn = util.new_small_button(
            'media-playback-start',
            self._on_start_timer,
            tooltip=_('Start a tomato timer and work on selected activity'))

        later_btn = util.new_small_button(
            'stock_down',
            self._on_later,
            tooltip=
            _('Move the selected activity to the plan list for later processing'
              ))
        return ((start_btn, 0), (later_btn, 1))
Beispiel #3
0
    def __init__(self):
        super(MainWindow, self).__init__()
        self.notebook = self._create_notebook()
        self.menu_view = self._create_menuview()
        self.menu_view.set_size_request(120, -1)
        self.menu_model = self.menu_view.get_model()
        self._setup_pages()

        left_pane = gtk.Viewport()
        left_pane.add(self.menu_view)

        mainpane = gtk.HPaned()
        mainpane.pack1(left_pane, shrink=False)
        mainpane.pack2(self.notebook, shrink=False)

        quote, author = timequotes.random_quote()
        quotelabel = gtk.Label(shorten_quote(quote))
        spacing = ' ' * 50
        quotelabel.set_tooltip_markup('%s\n%s<i><s>    </s> %s</i>' % (quote, spacing, author))

        option_btn = util.new_small_button(
                'gtk-preferences',
                self._on_options,
                tooltip=_('Preferences'))

        about_btn = util.new_small_button(
                'dialog-info',
                self._on_about,
                tooltip=_('About Tomate'))

        bottombox = gtk.HBox(False, 0)
        bottombox.pack_start(quotelabel, False, False)
        bottombox.pack_end(about_btn, False, False)
        #bottombox.pack_end(option_btn, False, False)

        mainbox = gtk.VBox(False, 5)
        mainbox.pack_start(mainpane, True, True)
        mainbox.pack_end(bottombox, False, False)
        self.add(mainbox)

        self.set_title('Tomate')
        self.set_position(gtk.WIN_POS_CENTER)
        self.set_icon_name('tomate')
        self.set_border_width(5)
        self.set_geometry_hints(mainbox, min_width=750, min_height=515)

        self.connect('destroy', self._on_close)
Beispiel #4
0
    def __init__(self, parent_window, priority=model.TODO):
        super(BaseActivityView, self).__init__(False, 0)
        self.parent_window = parent_window
        self.priority = priority
        self.act_name = gtk.Entry()
        self.act_name.set_property('secondary-icon-stock', gtk.STOCK_ADD)
        self.act_name.set_property('secondary-icon-tooltip-text',
                                   'Add new activity')
        self.act_name.set_property('secondary-icon-activatable', True)
        self.act_name.connect('activate', self._on_add)
        self.act_name.connect('icon-press', self._on_add)
        self.act_name.connect('focus-in-event', self._on_focus)

        finish_btn = util.new_small_button(
            'dialog-ok',
            self._on_mark_finish,
            tooltip=_('Mark the selected activity as finished'))

        del_btn = util.new_small_button(
            'edit-delete',
            self._on_delete,
            tooltip=_('Remove the selected activity'))

        buttons = [finish_btn, del_btn]
        for btn, pos in self._create_additional_buttons():
            buttons.insert(pos, btn)
        toolbar_box = gtk.HBox(False, 0)
        for btn in buttons:
            toolbar_box.pack_start(btn, False, False)
        toolbar_box.pack_end(self.act_name, True, True)

        self.act_model = ActivityStore(priority=self.priority)
        self.act_view = self._create_list_view(self.act_model)
        self.connect('destroy', lambda arg: self.act_model.close())
        act_wnd = gtk.ScrolledWindow()
        act_wnd.add(self.act_view)
        act_wnd.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)

        topbox = gtk.HBox(False, 0)
        topbox.pack_start(toolbar_box, True, True, padding=5)
        self.pack_start(topbox, False, False, padding=5)
        self.pack_end(act_wnd, True, True)
Beispiel #5
0
    def __init__(self, parent_window, priority=model.TODO):
        super(BaseActivityView, self).__init__(False, 0)
        self.parent_window = parent_window
        self.priority = priority
        self.act_name = gtk.Entry()
        self.act_name.set_property('secondary-icon-stock', gtk.STOCK_ADD)
        self.act_name.set_property('secondary-icon-tooltip-text',
                'Add new activity')
        self.act_name.set_property('secondary-icon-activatable', True)
        self.act_name.connect('activate', self._on_add)
        self.act_name.connect('icon-press', self._on_add)
        self.act_name.connect('focus-in-event', self._on_focus)

        finish_btn = util.new_small_button(
                'dialog-ok',
                self._on_mark_finish,
                tooltip=_('Mark the selected activity as finished'))

        del_btn = util.new_small_button(
                'edit-delete',
                self._on_delete,
                tooltip=_('Remove the selected activity'))

        buttons = [finish_btn, del_btn]
        for btn, pos in self._create_additional_buttons():
            buttons.insert(pos, btn)
        toolbar_box = gtk.HBox(False, 0)
        for btn in buttons:
            toolbar_box.pack_start(btn, False, False)
        toolbar_box.pack_end(self.act_name, True, True)

        self.act_model = ActivityStore(priority=self.priority)
        self.act_view = self._create_list_view(self.act_model)
        self.connect('destroy', lambda arg : self.act_model.close())
        act_wnd = gtk.ScrolledWindow()
        act_wnd.add(self.act_view)
        act_wnd.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)

        topbox = gtk.HBox(False, 0)
        topbox.pack_start(toolbar_box, True, True, padding=5)
        self.pack_start(topbox, False, False, padding=5)
        self.pack_end(act_wnd, True, True)
Beispiel #6
0
 def _create_additional_buttons(self):
     move_btn = util.new_small_button(
         'stock_up',
         self._on_move,
         tooltip=_('Move the selected activity to current ToDo list'))
     return ((move_btn, 0), )
Beispiel #7
0
 def _create_additional_buttons(self):
     move_btn = util.new_small_button(
             'stock_up',
             self._on_move,
             tooltip=_('Move the selected activity to current ToDo list'))
     return ((move_btn, 0),)