Esempio n. 1
0
 def add_dataset(self, action):
     n_pages = self.datasets_notebook.get_n_pages()
     suggested_name = u'Dataset %d' % (n_pages + 1)
     dialog = TextInputDialog(self.main_window, suggested_name)
     response = dialog.run()
     if response == gtk.RESPONSE_ACCEPT:
         name = dialog.get_name()
         self._create_dataset(name)
         self.datasets_notebook.set_current_page(n_pages)
     dialog.destroy()
Esempio n. 2
0
 def add_dataset(self, action):
     n_pages = self.datasets_notebook.get_n_pages()
     suggested_name = u'Dataset %d' % (n_pages + 1)
     dialog = TextInputDialog(self.main_window, suggested_name)
     response = dialog.run()
     if response == Gtk.ResponseType.ACCEPT:
         name = dialog.get_name()
         self._create_dataset(name)
         self.datasets_notebook.set_current_page(n_pages)
     dialog.destroy()
Esempio n. 3
0
    def edit_dataset(self, action):
        tab = self._get_current_dataset_tab()
        assert tab is not None

        label = self.datasets_notebook.get_tab_label(tab)
        name = label.get_label()
        dialog = TextInputDialog(self.main_window, name)
        response = dialog.run()
        if response == gtk.RESPONSE_ACCEPT:
            name = dialog.get_name()
            label.set_label(name)
        dialog.destroy()
Esempio n. 4
0
    def edit_dataset(self, action):
        tab = self._get_current_dataset_tab()
        assert tab is not None

        label = self.datasets_notebook.get_tab_label(tab)
        name = label.get_label()
        dialog = TextInputDialog(self.main_window, name)
        response = dialog.run()
        if response == Gtk.ResponseType.ACCEPT:
            name = dialog.get_name()
            label.set_label(name)
        dialog.destroy()