diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2008-11-22 00:19:30 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:19:30 +0800 |
commit | 151ee0170eaa756327b16c4231c5cb093015ed8b (patch) | |
tree | bb0d54e332f6ee1a32aa1c5a90c9aaaa0290f3e4 /libempathy-gtk/empathy-ui-utils.c | |
parent | ae9d6557dd41a9aff0f4ca6090dca403641e6165 (diff) | |
download | gsoc2013-empathy-151ee0170eaa756327b16c4231c5cb093015ed8b.tar gsoc2013-empathy-151ee0170eaa756327b16c4231c5cb093015ed8b.tar.gz gsoc2013-empathy-151ee0170eaa756327b16c4231c5cb093015ed8b.tar.bz2 gsoc2013-empathy-151ee0170eaa756327b16c4231c5cb093015ed8b.tar.lz gsoc2013-empathy-151ee0170eaa756327b16c4231c5cb093015ed8b.tar.xz gsoc2013-empathy-151ee0170eaa756327b16c4231c5cb093015ed8b.tar.zst gsoc2013-empathy-151ee0170eaa756327b16c4231c5cb093015ed8b.zip |
Use gtk_file_chooser_dialog_new and the document-send icon. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
svn path=/trunk/; revision=1827
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r-- | libempathy-gtk/empathy-ui-utils.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c index abd8702c0..7fae4acf8 100644 --- a/libempathy-gtk/empathy-ui-utils.c +++ b/libempathy-gtk/empathy-ui-utils.c @@ -1520,7 +1520,6 @@ empathy_send_file_with_file_chooser (EmpathyContact *contact, { GtkWidget *widget; GtkWidget *button; - GtkFileFilter *filter; FileChooserResponseData *response_data; /* FIXME we cannot return the ft as the response is async, maybe we @@ -1530,23 +1529,18 @@ empathy_send_file_with_file_chooser (EmpathyContact *contact, DEBUG ("Creating selection file chooser"); - widget = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG, - "action", GTK_FILE_CHOOSER_ACTION_OPEN, - "select-multiple", FALSE, - NULL); - - gtk_window_set_title (GTK_WINDOW (widget), _("Select a file")); - - /* cancel button */ - gtk_dialog_add_button (GTK_DIALOG (widget), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + widget = gtk_file_chooser_dialog_new (_("Select a file"), + NULL, + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + NULL); /* send button */ button = gtk_button_new_with_mnemonic (_("_Send")); - /* FIXME maybe we should use another icon */ gtk_button_set_image (GTK_BUTTON (button), - gtk_image_new_from_stock (GTK_STOCK_OPEN, - GTK_ICON_SIZE_BUTTON)); + gtk_image_new_from_icon_name (EMPATHY_IMAGE_DOCUMENT_SEND, + GTK_ICON_SIZE_BUTTON)); gtk_widget_show (button); gtk_dialog_add_action_widget (GTK_DIALOG (widget), button, GTK_RESPONSE_OK); @@ -1562,12 +1556,6 @@ empathy_send_file_with_file_chooser (EmpathyContact *contact, G_CALLBACK (file_manager_send_file_response_cb), response_data); - /* filters */ - filter = gtk_file_filter_new (); - gtk_file_filter_set_name (filter, "All Files"); - gtk_file_filter_add_pattern (filter, "*"); - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (widget), filter); - gtk_widget_show (widget); } |