aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2007-09-14 23:29:05 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-09-14 23:29:05 +0800
commit5ad1bf8506772c6e02da2e48391d0a9e03b80048 (patch)
treed1842e355beb2431b16c587a5add7434ef24179b /composer
parent3cf65fa9b41612c0a126503fae88b85a9f3d8ae0 (diff)
downloadgsoc2013-evolution-5ad1bf8506772c6e02da2e48391d0a9e03b80048.tar.gz
gsoc2013-evolution-5ad1bf8506772c6e02da2e48391d0a9e03b80048.tar.zst
gsoc2013-evolution-5ad1bf8506772c6e02da2e48391d0a9e03b80048.zip
Remove the --enable-file-chooser configure option.
GtkFileChooser has been around since 2004. svn path=/trunk/; revision=34257
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog8
-rw-r--r--composer/e-msg-composer-select-file.c47
2 files changed, 8 insertions, 47 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index bd4cad3a76..371fd1cd7f 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,11 @@
+2007-09-14 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #476231
+
+ * e-msg-composer-select-file.c:
+ Remove non-USE_GTKFILECHOOSER code.
+ GtkFileChooser has been around since 2004.
+
2007-09-12 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #476040
diff --git a/composer/e-msg-composer-select-file.c b/composer/e-msg-composer-select-file.c
index cf3be43b33..302897d517 100644
--- a/composer/e-msg-composer-select-file.c
+++ b/composer/e-msg-composer-select-file.c
@@ -32,13 +32,9 @@
#include <gtk/gtksignal.h>
#include <gtk/gtkversion.h>
-#ifdef USE_GTKFILECHOOSER
#include <gtk/gtkfilechooser.h>
#include <gtk/gtkfilechooserdialog.h>
#include <gtk/gtkstock.h>
-#else
-#include <gtk/gtkfilesel.h>
-#endif
#include <libgnomeui/gnome-uidefs.h>
#include <glib/gi18n.h>
@@ -66,7 +62,6 @@ get_selector(struct _EMsgComposer *composer, const char *title, guint32 flags)
path = g_object_get_data ((GObject *) composer, "attach_path");
-#ifdef USE_GTKFILECHOOSER
if (flags & SELECTOR_MODE_SAVE)
selection = gtk_file_chooser_dialog_new (title,
NULL,
@@ -100,27 +95,6 @@ get_selector(struct _EMsgComposer *composer, const char *title, guint32 flags)
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (selection), showinline);
g_object_set_data((GObject *)selection, "show-inline", showinline);
}
-#else
- selection = gtk_file_selection_new (title);
-
- gtk_file_selection_set_select_multiple ((GtkFileSelection *) selection, (flags & SELECTOR_MODE_MULTI));
-
- /* restore last path used */
- if (!path) {
- path = g_strdup_printf ("%s/", g_get_home_dir ());
- gtk_file_selection_set_filename (GTK_FILE_SELECTION (selection), path);
- g_free (path);
- } else {
- gtk_file_selection_set_filename (GTK_FILE_SELECTION (selection), path);
- }
-
- if (flags & SELECTOR_SHOW_INLINE) {
- showinline = gtk_check_button_new_with_mnemonic (_("_Suggest automatic display of attachment"));
- gtk_widget_show (showinline);
- gtk_box_pack_end (GTK_BOX (GTK_FILE_SELECTION (selection)->main_vbox), showinline, FALSE, FALSE, 4);
- g_object_set_data((GObject *)selection, "show-inline", showinline);
- }
-#endif
gtk_window_set_transient_for ((GtkWindow *) selection, (GtkWindow *) composer);
gtk_window_set_wmclass ((GtkWindow *) selection, "fileselection", "Evolution:composer");
@@ -144,13 +118,8 @@ select_file_response(GtkWidget *selector, guint response, struct _EMsgComposer *
char *path;
EMsgComposerSelectFileFunc func = g_object_get_data((GObject *)selector, "callback");
-#ifdef USE_GTKFILECHOOSER
name = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selector));
path = g_path_get_dirname (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selector)));
-#else
- name = gtk_file_selection_get_filename (GTK_FILE_SELECTION (selector));
- path = g_path_get_dirname (gtk_file_selection_get_filename (GTK_FILE_SELECTION (selector)));
-#endif
g_object_set_data_full ((GObject *) composer, "attach_path", path, g_free);
func(composer, name);
@@ -195,7 +164,6 @@ select_attach_response(GtkWidget *selector, guint response, struct _EMsgComposer
GtkToggleButton *showinline = g_object_get_data((GObject *)selector, "show-inline");
char *path = NULL;
-#ifdef USE_GTKFILECHOOSER
char *filename = NULL;
names = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (selector));
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selector));
@@ -203,21 +171,6 @@ select_attach_response(GtkWidget *selector, guint response, struct _EMsgComposer
path = g_path_get_dirname (filename);
g_free (filename);
}
-#else
- char **files;
- int i;
-
- names = NULL;
- if ((files = gtk_file_selection_get_selections (GTK_FILE_SELECTION (selector)))) {
- for (i = 0; files[i]; i++)
- names = g_slist_prepend(names, files[i]);
-
- g_free (files);
- names = g_slist_reverse(names);
- }
-
- path = g_path_get_dirname (gtk_file_selection_get_filename (GTK_FILE_SELECTION (selector)));
-#endif
if (path)
g_object_set_data_full ((GObject *) composer, "attach_path", path, g_free);