From d1d7e7b5252667b99f2ca8d2955386ee9c34d858 Mon Sep 17 00:00:00 2001 From: guinux Date: Mon, 22 Apr 2013 19:06:31 +0200 Subject: [PATCH] better reaction on tab switch --- gui/manager.glade | 1 + pamac-install.py | 12 ++++++------ pamac/main.py | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/gui/manager.glade b/gui/manager.glade index 1896621..14f7d69 100644 --- a/gui/manager.glade +++ b/gui/manager.glade @@ -420,6 +420,7 @@ True True + True diff --git a/pamac-install.py b/pamac-install.py index 55dcf13..e2f5b99 100755 --- a/pamac-install.py +++ b/pamac-install.py @@ -98,12 +98,12 @@ if common.pid_file_exists(): response = main.ErrorDialog.run() if response: main.ErrorDialog.hide() -#~ elif updates: - #~ main.ErrorDialog.format_secondary_text(_('Some updates are available.\nPlease update your system first')) - #~ response = main.ErrorDialog.run() - #~ if response: - #~ main.ErrorDialog.hide() - #~ transaction.StopDaemon() +elif updates: + main.ErrorDialog.format_secondary_text(_('Some updates are available.\nPlease update your system first')) + response = main.ErrorDialog.run() + if response: + main.ErrorDialog.hide() + transaction.StopDaemon() else: common.write_pid_file() pkgs_to_install = argv[1:] diff --git a/pamac/main.py b/pamac/main.py index 160a524..87267bc 100644 --- a/pamac/main.py +++ b/pamac/main.py @@ -1008,6 +1008,20 @@ class Handler: else: handle_reply('') + def on_notebook1_switch_page(self, notebook, page, page_num): + if page_num == 0: + liste, line = search_selection.get_selected() + if line: + self.on_search_treeview_selection_changed(self) + elif search_entry.get_text(): + self.on_search_entry_activate(self) + elif page_num == 1: + self.on_groups_treeview_selection_changed(self) + elif page_num == 2: + self.on_state_treeview_selection_changed(self) + elif page_num == 3: + self.on_repos_treeview_selection_changed(self) + #Updater Handlers def on_UpdaterWindow_delete_event(self, *arg): transaction.StopDaemon()