forked from cromer/pamac-classic
do not allow access to preferences when a transaction is running
This commit is contained in:
parent
95b3e901fb
commit
369c7cc327
@ -985,6 +985,7 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="popover">popovermenu</property>
|
||||
<signal name="toggled" handler="on_menu_button_toggled" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkImage" id="menu_icon">
|
||||
<property name="visible">True</property>
|
||||
|
@ -430,6 +430,7 @@
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="popover">popovermenu</property>
|
||||
<signal name="toggled" handler="on_menu_button_toggled" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkImage" id="menu_icon">
|
||||
<property name="visible">True</property>
|
||||
|
@ -51,6 +51,8 @@ namespace Pamac {
|
||||
[GtkChild]
|
||||
Gtk.Button button_back;
|
||||
[GtkChild]
|
||||
Gtk.ModelButton preferences_button;
|
||||
[GtkChild]
|
||||
Gtk.TreeView packages_treeview;
|
||||
[GtkChild]
|
||||
Gtk.TreeViewColumn packages_state_column;
|
||||
@ -1428,6 +1430,11 @@ namespace Pamac {
|
||||
refresh_packages_list ();
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
void on_menu_button_toggled () {
|
||||
preferences_button.visible = !transaction_running;
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
void on_history_button_clicked () {
|
||||
transaction.run_history_dialog ();
|
||||
|
@ -25,6 +25,8 @@ namespace Pamac {
|
||||
[GtkChild]
|
||||
Gtk.HeaderBar headerbar;
|
||||
[GtkChild]
|
||||
Gtk.ModelButton preferences_button;
|
||||
[GtkChild]
|
||||
Gtk.StackSwitcher stackswitcher;
|
||||
[GtkChild]
|
||||
Gtk.ScrolledWindow repos_scrolledwindow;
|
||||
@ -148,6 +150,11 @@ namespace Pamac {
|
||||
}
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
void on_menu_button_toggled () {
|
||||
preferences_button.visible = !transaction_running;
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
void on_preferences_button_clicked () {
|
||||
transaction.run_preferences_dialog.begin (() => {
|
||||
|
Loading…
Reference in New Issue
Block a user