diff --git a/GTG/plugins/export/export.py b/GTG/plugins/export/export.py index 40a8d4cb29..b028c5de80 100644 --- a/GTG/plugins/export/export.py +++ b/GTG/plugins/export/export.py @@ -88,7 +88,6 @@ class ExportPlugin(): DEFAULT_PREFERENCES = { "menu_entry": True, - "toolbar_entry": True, "last_template": None, } @@ -180,16 +179,11 @@ def get_selected_tasks(self): def _init_gtk(self): """ Initialize all the GTK widgets """ self.menu_entry = False - self.toolbar_entry = False self.menu_item = Gtk.MenuItem(_("Export the tasks currently listed")) self.menu_item.connect('activate', self.show_dialog) self.menu_item.show() - self.tb_button = Gtk.ToolButton(Gtk.STOCK_PRINT) - self.tb_button.connect('clicked', self.show_dialog) - self.tb_button.show() - builder = Gtk.Builder() cur_dir = os.path.dirname(os.path.abspath(__file__)) builder_file = os.path.join(cur_dir, "export.ui") @@ -208,7 +202,6 @@ def _init_gtk(self): self.export_image = builder.get_object("export_image") self.preferences_dialog = builder.get_object("preferences_dialog") self.pref_menu = builder.get_object("pref_chbox_menu") - self.pref_toolbar = builder.get_object("pref_chbox_toolbar") self.description_label = builder.get_object("label_description") self.save_button = builder.get_object("export_btn_save") self.open_button = builder.get_object("export_btn_open") @@ -239,15 +232,11 @@ def _init_gtk(self): }) def _gtk_deactivate(self): - """ Remove Toolbar Button and Menu item for this plugin """ + """ Remove Menu item for this plugin """ if self.menu_entry: self.plugin_api.remove_menu_item(self.menu_item) self.menu_entry = False - if self.toolbar_entry: - self.plugin_api.remove_toolbar_item(self.tb_button) - self.toolbar_entry = False - def show_dialog(self, widget): """ Show dialog with options for export """ parent_window = self.plugin_api.get_ui().get_window() @@ -349,7 +338,6 @@ def configure_dialog(self, manager_dialog): self._preferences_load() self.preferences_dialog.set_transient_for(manager_dialog) self.pref_menu.set_active(self.preferences["menu_entry"]) - self.pref_toolbar.set_active(self.preferences["toolbar_entry"]) self.preferences_dialog.show_all() def on_preferences_cancel(self, widget, data=None): @@ -361,7 +349,6 @@ def on_preferences_cancel(self, widget, data=None): def on_preferences_ok(self, widget): """ Apply and store new preferences """ self.preferences["menu_entry"] = self.pref_menu.get_active() - self.preferences["toolbar_entry"] = self.pref_toolbar.get_active() self.preferences_dialog.hide() self._preferences_apply() @@ -379,17 +366,11 @@ def _preferences_store(self): self.PLUGIN_NAME, "preferences", self.preferences) def _preferences_apply(self): - """ Add/remove menu entry/toolbar entry """ + """ Add/remove menu entry """ if self.preferences["menu_entry"] and not self.menu_entry: self.plugin_api.add_menu_item(self.menu_item) self.menu_entry = True + elif not self.preferences["menu_entry"] and self.menu_entry: self.plugin_api.remove_menu_item(self.menu_item) self.menu_entry = False - - if self.preferences["toolbar_entry"] and not self.toolbar_entry: - self.plugin_api.add_toolbar_item(self.tb_button) - self.toolbar_entry = True - elif not self.preferences["toolbar_entry"] and self.toolbar_entry: - self.plugin_api.remove_toolbar_item(self.tb_button) - self.toolbar_entry = False diff --git a/GTG/plugins/export/export.ui b/GTG/plugins/export/export.ui index 67cd758cf5..62ca06cc4c 100644 --- a/GTG/plugins/export/export.ui +++ b/GTG/plugins/export/export.ui @@ -1,43 +1,56 @@ - + + - + + False Export tasks mouse True - + + + + True + False vertical True + False 15 15 True + False vertical True + False vertical True - GTK_ALIGN_START + False + start <b>Which tasks do you want to export?</b> True + False + True 0 True + False vertical @@ -51,6 +64,7 @@ False + True 0 @@ -65,6 +79,7 @@ False + True 1 @@ -79,45 +94,54 @@ False + True 2 + False + True 1 - 0 False + True + 0 True + False + 20 vertical - 20 True - GTK_ALIGN_START - GTK_ALIGN_START + False + start + start <b>Select a format for your tasks</b> True False + True 0 True - + False + False + True 10 1 @@ -125,9 +149,9 @@ True - GTK_ALIGN_START - GTK_ALIGN_START - 10 + False + start + start True fill True @@ -135,16 +159,22 @@ 30 + False + True 2 + False + True 1 + False + True 0 @@ -153,13 +183,18 @@ 300 350 True + False + False + True 1 + False + True 0 @@ -167,6 +202,7 @@ 50 True + False 12 23 @@ -175,9 +211,11 @@ True True True - + + False + True 0 @@ -187,14 +225,18 @@ True True True - + + False + True 1 + False + True 1 @@ -202,28 +244,37 @@ + False 10 center-on-parent dialog - + + + + True + False vertical True - 7 - 7 + False + 7 + 7 How do you want to access the export plugin? + False + True 0 True + False vertical @@ -235,23 +286,15 @@ True + False + True 0 - - - Put an icon in the Toolbar - True - True - False - True - - - 1 - - + False + True 1 @@ -259,6 +302,7 @@ 30 True + False 50 @@ -266,9 +310,11 @@ True True True - + + False + True 0 @@ -278,14 +324,18 @@ True True True - + + False + True 1 + False + True 2