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="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
<property name="popover">popovermenu</property>
|
<property name="popover">popovermenu</property>
|
||||||
|
<signal name="toggled" handler="on_menu_button_toggled" swapped="no"/>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage" id="menu_icon">
|
<object class="GtkImage" id="menu_icon">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -430,6 +430,7 @@
|
|||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
<property name="popover">popovermenu</property>
|
<property name="popover">popovermenu</property>
|
||||||
|
<signal name="toggled" handler="on_menu_button_toggled" swapped="no"/>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage" id="menu_icon">
|
<object class="GtkImage" id="menu_icon">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -51,6 +51,8 @@ namespace Pamac {
|
|||||||
[GtkChild]
|
[GtkChild]
|
||||||
Gtk.Button button_back;
|
Gtk.Button button_back;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
|
Gtk.ModelButton preferences_button;
|
||||||
|
[GtkChild]
|
||||||
Gtk.TreeView packages_treeview;
|
Gtk.TreeView packages_treeview;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
Gtk.TreeViewColumn packages_state_column;
|
Gtk.TreeViewColumn packages_state_column;
|
||||||
@ -1428,6 +1430,11 @@ namespace Pamac {
|
|||||||
refresh_packages_list ();
|
refresh_packages_list ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[GtkCallback]
|
||||||
|
void on_menu_button_toggled () {
|
||||||
|
preferences_button.visible = !transaction_running;
|
||||||
|
}
|
||||||
|
|
||||||
[GtkCallback]
|
[GtkCallback]
|
||||||
void on_history_button_clicked () {
|
void on_history_button_clicked () {
|
||||||
transaction.run_history_dialog ();
|
transaction.run_history_dialog ();
|
||||||
|
@ -25,6 +25,8 @@ namespace Pamac {
|
|||||||
[GtkChild]
|
[GtkChild]
|
||||||
Gtk.HeaderBar headerbar;
|
Gtk.HeaderBar headerbar;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
|
Gtk.ModelButton preferences_button;
|
||||||
|
[GtkChild]
|
||||||
Gtk.StackSwitcher stackswitcher;
|
Gtk.StackSwitcher stackswitcher;
|
||||||
[GtkChild]
|
[GtkChild]
|
||||||
Gtk.ScrolledWindow repos_scrolledwindow;
|
Gtk.ScrolledWindow repos_scrolledwindow;
|
||||||
@ -148,6 +150,11 @@ namespace Pamac {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[GtkCallback]
|
||||||
|
void on_menu_button_toggled () {
|
||||||
|
preferences_button.visible = !transaction_running;
|
||||||
|
}
|
||||||
|
|
||||||
[GtkCallback]
|
[GtkCallback]
|
||||||
void on_preferences_button_clicked () {
|
void on_preferences_button_clicked () {
|
||||||
transaction.run_preferences_dialog.begin (() => {
|
transaction.run_preferences_dialog.begin (() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user