diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-11-11 01:14:07 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-11-11 07:18:11 +0800 |
commit | 3dfdf087fc7657905fc7804b59414ecd3d74028e (patch) | |
tree | 45a5bb547ca73ebaea9c3276860f93df6d417006 /addressbook/gui | |
parent | f70ecb0406903e0fdc09bbf1c9a3367c7ba55ec2 (diff) | |
download | gsoc2013-evolution-3dfdf087fc7657905fc7804b59414ecd3d74028e.tar.gz gsoc2013-evolution-3dfdf087fc7657905fc7804b59414ecd3d74028e.tar.zst gsoc2013-evolution-3dfdf087fc7657905fc7804b59414ecd3d74028e.zip |
Kill more redundant save dialogs and related utilities.
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 12 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.h | 3 |
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); |