Exemple #1
0
    def __init__(self, journal, *args, **kwargs):
        AssistantPage.__init__(self, *args, **kwargs)

        self.journal = journal

        self.all_days_button = Gtk.RadioButton(label=_('Export all days'))
        self.selected_text_button = Gtk.RadioButton(
            group=self.all_days_button)
        self.one_day_button = Gtk.RadioButton(
            label=_('Export currently visible day'),
            group=self.all_days_button)
        self.sel_days_button = Gtk.RadioButton(
            label=_('Export days in the selected time range'),
            group=self.all_days_button)

        self.pack_start(self.all_days_button, False, False, 0)
        self.pack_start(self.one_day_button, False, False, 0)
        self.pack_start(self.selected_text_button, False, False, 0)
        self.pack_start(self.sel_days_button, False, False, 0)

        label1 = Gtk.Label()
        label1.set_markup('<b>' + _('From:') + '</b>')
        label2 = Gtk.Label()
        label2.set_markup('<b>' + _('To:') + '</b>')

        show_week_numbers = self.journal.config.read('weekNumbers')
        self.calendar1 = Calendar(week_numbers=show_week_numbers)
        self.calendar2 = Calendar(week_numbers=show_week_numbers)

        vbox1 = Gtk.VBox()
        vbox2 = Gtk.VBox()
        vbox1.pack_start(label1, False, False, 0)
        vbox1.pack_start(self.calendar1, True, True, 0)
        vbox2.pack_start(label2, False, False, 0)
        vbox2.pack_start(self.calendar2, True, True, 0)

        hbox = Gtk.HBox()
        hbox.pack_start(vbox1, True, True, 0)
        hbox.pack_start(vbox2, True, True, 0)
        self.pack_start(hbox, True, True, 0)

        self.sel_days_button.connect('toggled', self._on_select_days_toggled)

        self.all_days_button.set_active(True)
        self._set_select_days(False)
Exemple #2
0
    def __init__(self, journal, *args, **kwargs):
        AssistantPage.__init__(self, *args, **kwargs)

        self.journal = journal

        self.all_days_button = gtk.RadioButton(label=_('Export all days'))
        self.sel_days_button = gtk.RadioButton(label=_('Export only the days in the selected time range'),
                                            group=self.all_days_button)

        self.pack_start(self.all_days_button, False)
        self.pack_start(self.sel_days_button, False)

        label1 = gtk.Label()
        label1.set_markup('<b>' + _('From:') + '</b>')
        label2 = gtk.Label()
        label2.set_markup('<b>' + _('To:') + '</b>')

        self.calendar1 = Calendar()
        self.calendar2 = Calendar()

        vbox1 = gtk.VBox()
        vbox2 = gtk.VBox()
        vbox1.pack_start(label1, False)
        vbox1.pack_start(self.calendar1)
        vbox2.pack_start(label2, False)
        vbox2.pack_start(self.calendar2)

        hbox = gtk.HBox()
        hbox.pack_start(vbox1)
        hbox.pack_start(vbox2)
        self.pack_start(hbox)

        self.sel_days_button.connect('toggled', self._on_select_days_toggled)

        self.all_days_button.set_active(True)
        self._set_select_days(False)