diff options
| author | info-cppsp <[email protected]> | 2018-03-18 19:57:54 +0100 | 
|---|---|---|
| committer | raveit65 <[email protected]> | 2018-03-20 07:21:54 +0100 | 
| commit | dce0491a6622ed07a5aba037fe3326ffbdb9c51a (patch) | |
| tree | dc279672422e9b60c867a0038ad0544e14115a74 | |
| parent | 35205a5fb48b04833b854814ab15b6797ff7a42e (diff) | |
| download | mate-panel-dce0491a6622ed07a5aba037fe3326ffbdb9c51a.tar.bz2 mate-panel-dce0491a6622ed07a5aba037fe3326ffbdb9c51a.tar.xz | |
Fix run dialog show-program-list enabling fix
learning signal chaining...
| -rw-r--r-- | mate-panel/panel-run-dialog.c | 21 | 
1 files changed, 18 insertions, 3 deletions
| diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c index 06729466..adcb28a0 100644 --- a/mate-panel/panel-run-dialog.c +++ b/mate-panel/panel-run-dialog.c @@ -1118,6 +1118,7 @@ static void  panel_run_dialog_update_content (PanelRunDialog *dialog,  				 gboolean        show_list)  { +  	if (!panel_profile_get_enable_program_list ()) {  		GtkWidget *parent; @@ -1131,8 +1132,9 @@ panel_run_dialog_update_content (PanelRunDialog *dialog,  	} else { -        /* if the list is closed and the user wants to see it */ -        if (show_list && !gtk_expander_get_expanded (GTK_EXPANDER (dialog->list_expander))) { +        /* the following two conditions occur, when the user clicks the expander in the dialog +         * 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); @@ -1142,7 +1144,7 @@ panel_run_dialog_update_content (PanelRunDialog *dialog,              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))) { +        } 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); @@ -1150,6 +1152,19 @@ panel_run_dialog_update_content (PanelRunDialog *dialog,              gtk_window_set_resizable (GTK_WINDOW (dialog->run_dialog), FALSE);              gtk_widget_grab_focus (dialog->combobox);          } + +        /* the following two conditions occur, when the user changes the expander setting in GSettings */ +        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); + +        /* 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); +        }      }  } | 
