summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfo-cppsp <[email protected]>2018-01-31 15:07:20 +0100
committerlukefromdc <[email protected]>2018-01-31 14:43:15 -0500
commitf20f4b9e45c1ac33e651fdd77ccf8a530c894d73 (patch)
treeedbff61d2105cdcc4eccbd9a4b0dc282eca06c7e
parentab7987701bcea97e4326fecd161c3137080f6077 (diff)
downloadmate-panel-f20f4b9e45c1ac33e651fdd77ccf8a530c894d73.tar.bz2
mate-panel-f20f4b9e45c1ac33e651fdd77ccf8a530c894d73.tar.xz
Fix run dialog show-program-list enabling
fix #296
-rw-r--r--mate-panel/panel-run-dialog.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c
index b906e4f3..50098cb1 100644
--- a/mate-panel/panel-run-dialog.c
+++ b/mate-panel/panel-run-dialog.c
@@ -1129,15 +1129,28 @@ panel_run_dialog_update_content (PanelRunDialog *dialog,
gtk_window_set_resizable (GTK_WINDOW (dialog->run_dialog), FALSE);
gtk_widget_grab_focus (dialog->combobox);
- } else if (show_list) {
- gtk_window_resize (GTK_WINDOW (dialog->run_dialog), 100, 300);
- gtk_window_set_resizable (GTK_WINDOW (dialog->run_dialog), TRUE);
- gtk_widget_grab_focus (dialog->program_list);
+ } else {
- } else if (!show_list) {
- gtk_window_set_resizable (GTK_WINDOW (dialog->run_dialog), FALSE);
- gtk_widget_grab_focus (dialog->combobox);
+ /* if the list is closed and the user wants to see it */
+ if (show_list && !gtk_expander_get_expanded (GTK_EXPANDER (dialog->list_expander))) {
+
+ /* open the expander, this shows the list */
+ gtk_expander_set_expanded (GTK_EXPANDER (dialog->list_expander), TRUE);
+
+ gtk_window_resize (GTK_WINDOW (dialog->run_dialog), 100, 300);
+ gtk_window_set_resizable (GTK_WINDOW (dialog->run_dialog), TRUE);
+ gtk_widget_grab_focus (dialog->program_list);
+
+ /* if the list is open and the user wants to close it */
+ } else if (!show_list && gtk_expander_get_expanded (GTK_EXPANDER (dialog->list_expander))) {
+
+ /* close the expander, this hides the list */
+ gtk_expander_set_expanded (GTK_EXPANDER (dialog->list_expander), FALSE);
+
+ gtk_window_set_resizable (GTK_WINDOW (dialog->run_dialog), FALSE);
+ gtk_widget_grab_focus (dialog->combobox);
}
+ }
}
static void