sharing: Don't add the folder if the dialog isn't explicity accepted
E.g. selecting a folder and then dismissing the dialog via the cancel button or by pressing escape would still add the folder to the shared folders list.
This commit is contained in:
parent
1537fec704
commit
38180662cd
1 changed files with 3 additions and 2 deletions
|
@ -478,7 +478,7 @@ cc_sharing_panel_add_folder (GtkListBox *box,
|
|||
{
|
||||
CcSharingPanelPrivate *priv = self->priv;
|
||||
GtkWidget *dialog;
|
||||
gchar *folder;
|
||||
gchar *folder = NULL;
|
||||
gboolean matching = FALSE;
|
||||
GList *rows, *l;
|
||||
|
||||
|
@ -492,7 +492,8 @@ cc_sharing_panel_add_folder (GtkListBox *box,
|
|||
_("_Open"), GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), FALSE);
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_ACCEPT)
|
||||
goto bail;
|
||||
|
||||
gtk_widget_hide (dialog);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue