From 01df94ac039ce1d9a6c4da5dee5703afd0a712fb Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 21 Nov 2008 16:19:15 +0000 Subject: Made creating a save dialog a bit nicer by using proper GTK functions. (Jonny Lamb) Signed-off-by: Jonny Lamb svn path=/trunk/; revision=1823 --- libempathy-gtk/empathy-ft-manager.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-ft-manager.c b/libempathy-gtk/empathy-ft-manager.c index a882732ce..bbef49139 100644 --- a/libempathy-gtk/empathy-ft-manager.c +++ b/libempathy-gtk/empathy-ft-manager.c @@ -823,14 +823,12 @@ ft_manager_create_save_dialog (ReceiveResponseData *response_data) DEBUG ("Creating save file chooser"); - widget = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG, - "action", GTK_FILE_CHOOSER_ACTION_SAVE, - "select-multiple", FALSE, - "do-overwrite-confirmation", TRUE, + widget = gtk_file_chooser_dialog_new (_("Save file as..."), + NULL, GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_SAVE_AS, GTK_RESPONSE_OK, NULL); - gtk_window_set_title (GTK_WINDOW (widget), _("Save file")); - if (!empathy_conf_get_string (empathy_conf_get (), EMPATHY_PREFS_FILE_TRANSFER_DEFAULT_FOLDER, &folder) || !folder) @@ -842,11 +840,6 @@ ft_manager_create_save_dialog (ReceiveResponseData *response_data) gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (widget), empathy_tp_file_get_filename (response_data->tp_file)); - gtk_dialog_add_buttons (GTK_DIALOG (widget), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_SAVE, GTK_RESPONSE_OK, - NULL); - gtk_dialog_set_default_response (GTK_DIALOG (widget), GTK_RESPONSE_OK); -- cgit v1.2.3