aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c12
-rw-r--r--addressbook/gui/widgets/eab-gui-util.h3
2 files changed, 5 insertions, 10 deletions
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index 24fce0a99a..cfdf5876fc 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -281,14 +281,12 @@ eab_select_source (const gchar *title, const gchar *message, const gchar *select
return source;
}
-void
-eab_suggest_filename (GtkFileChooser *file_chooser,
- GList *contact_list)
+gchar *
+eab_suggest_filename (GList *contact_list)
{
gchar *current_name = NULL;
- g_return_if_fail (GTK_IS_FILE_CHOOSER (file_chooser));
- g_return_if_fail (contact_list != NULL);
+ g_return_val_if_fail (contact_list != NULL, NULL);
if (g_list_length (contact_list) == 1) {
EContact *contact = E_CONTACT (contact_list->data);
@@ -305,9 +303,7 @@ eab_suggest_filename (GtkFileChooser *file_chooser,
if (current_name == NULL)
current_name = make_safe_filename (_("list"));
- gtk_file_chooser_set_current_name (file_chooser, current_name);
-
- g_free (current_name);
+ return current_name;
}
typedef struct ContactCopyProcess_ ContactCopyProcess;
diff --git a/addressbook/gui/widgets/eab-gui-util.h b/addressbook/gui/widgets/eab-gui-util.h
index 838343a357..7a3da96105 100644
--- a/addressbook/gui/widgets/eab-gui-util.h
+++ b/addressbook/gui/widgets/eab-gui-util.h
@@ -43,8 +43,7 @@ void eab_transfer_contacts (EBook *source,
gboolean delete_from_source,
GtkWindow *parent_window);
-void eab_suggest_filename (GtkFileChooser *file_chooser,
- GList *contact_list);
+gchar * eab_suggest_filename (GList *contact_list);
GtkWidget *eab_create_image_chooser_widget (gchar *name, gchar *string1, gchar *string2, gint int1, gint int2);