Fix emission of file-set signal

svn path=/trunk/; revision=22307
This commit is contained in:
Matthias Clasen 2009-02-11 06:52:43 +00:00
parent 89c1bb49bd
commit 6bd8756269
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2009-02-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c: Don't emit the file-set signal
if the file chooser dialog is canceled. But emit it if a file
is received via DND.
2009-02-11 Matthias Clasen <mclasen@redhat.com>
Bug 353196 Add a file-set signal to GtkFileChooserButton

View File

@ -1011,6 +1011,8 @@ dnd_select_folder_get_info_cb (GCancellable *cancellable,
if (data->selected || data->uris[++data->i] == NULL)
{
g_signal_emit (data->button, file_chooser_button_signals[FILE_SET], 0);
g_object_unref (data->button);
g_object_unref (data->file);
g_strfreev (data->uris);
@ -1096,6 +1098,7 @@ gtk_file_chooser_button_drag_data_received (GtkWidget *widget,
NULL);
g_object_unref (file);
g_free (text);
g_signal_emit (button, file_chooser_button_signals[FILE_SET], 0);
break;
default:
@ -2694,7 +2697,9 @@ dialog_response_cb (GtkDialog *dialog,
gtk_widget_set_sensitive (priv->combo_box, TRUE);
gtk_widget_hide (priv->dialog);
g_signal_emit_by_name (user_data, "file-set");
if (response == GTK_RESPONSE_ACCEPT ||
response == GTK_RESPONSE_OK)
g_signal_emit (user_data, file_chooser_button_signals[FILE_SET], 0);
}