diff options
author | Daniel Gryniewicz <dang@gentoo.org> | 2006-09-15 19:07:44 +0000 |
---|---|---|
committer | Daniel Gryniewicz <dang@gentoo.org> | 2006-09-15 19:07:44 +0000 |
commit | 1115e50e4d3c7b7547f6d2dc32dbc08f8dbc6b46 (patch) | |
tree | ff0a4a2fefe76571c041a7b5f7bc94fa8740e7b4 /mail-client | |
parent | Make repoman happy; remove hppa and ia64 until libnotify can be keyworded (diff) | |
download | gentoo-2-1115e50e4d3c7b7547f6d2dc32dbc08f8dbc6b46.tar.gz gentoo-2-1115e50e4d3c7b7547f6d2dc32dbc08f8dbc6b46.tar.bz2 gentoo-2-1115e50e4d3c7b7547f6d2dc32dbc08f8dbc6b46.zip |
Make repoman happy; remove hppa and ia64 until libnotify can be keyworded
(Portage version: 2.1.1)
(Signed Manifest commit)
Diffstat (limited to 'mail-client')
-rw-r--r-- | mail-client/evolution/Manifest | 34 | ||||
-rw-r--r-- | mail-client/evolution/files/evolution-2.8.0-uri.patch | 746 |
2 files changed, 22 insertions, 758 deletions
diff --git a/mail-client/evolution/Manifest b/mail-client/evolution/Manifest index 2ab6a9d41328..a5b5f4ded749 100644 --- a/mail-client/evolution/Manifest +++ b/mail-client/evolution/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX evolution-2.0.3-gentoo_etc_services.patch 1662 RMD160 9ac648a5f055cb5e3e98b5e41547fed0c4a7ad3d SHA1 628bf559a4915bd794893f54c552025fb015e4ce SHA256 e881f56b96b7f5b692f63f7d96705bb70626ff1957d6fabd47090ff76f46acb3 MD5 7b8c1cc2fd2428815184d471af4bb3bf files/evolution-2.0.3-gentoo_etc_services.patch 1662 RMD160 9ac648a5f055cb5e3e98b5e41547fed0c4a7ad3d files/evolution-2.0.3-gentoo_etc_services.patch 1662 @@ -42,10 +45,10 @@ AUX evolution-2.8.0-includes.patch 670 RMD160 876a94d3a07af418bcd31051705c649262 MD5 49191e4a9a06eb90a9f756599eb455e7 files/evolution-2.8.0-includes.patch 670 RMD160 876a94d3a07af418bcd31051705c649262ecee3c files/evolution-2.8.0-includes.patch 670 SHA256 f3fcd6ed94e571ea0580b955f3b309802e91157811f00e98540276d3f854048a files/evolution-2.8.0-includes.patch 670 -AUX evolution-2.8.0-uri.patch 23552 RMD160 02a12b1cd9b510b152463b4024e48675cded9c4d SHA1 1d784b51829085863feaa6eded68a22ab0fe48f6 SHA256 9c366a00c37dd9fb11dd95111815b4f4c0c2bdc37dda43459e9d6e93ca8700c0 -MD5 8588a0f1fdf2f803301287c6fbc048b6 files/evolution-2.8.0-uri.patch 23552 -RMD160 02a12b1cd9b510b152463b4024e48675cded9c4d files/evolution-2.8.0-uri.patch 23552 -SHA256 9c366a00c37dd9fb11dd95111815b4f4c0c2bdc37dda43459e9d6e93ca8700c0 files/evolution-2.8.0-uri.patch 23552 +AUX evolution-2.8.0-uri.patch.gz 5564 RMD160 9e92e018adfec82ffdf572cc02ef638b4a62053d SHA1 6a52be2358153d0b18a1478b58f473654491839a SHA256 04401695c07ae85490151f65432becdcc23370a55e3c3add40c2618bd398a268 +MD5 a6083b552bc93e9224baecb1a4583941 files/evolution-2.8.0-uri.patch.gz 5564 +RMD160 9e92e018adfec82ffdf572cc02ef638b4a62053d files/evolution-2.8.0-uri.patch.gz 5564 +SHA256 04401695c07ae85490151f65432becdcc23370a55e3c3add40c2618bd398a268 files/evolution-2.8.0-uri.patch.gz 5564 DIST evolution-2.4.2.1.tar.bz2 11503590 RMD160 cb72e939fbd651a43ae09e0341f47e6ebf490c56 SHA1 b3e61e8f013ea35aa137928d1d25a91b3043357d SHA256 eae8fed13de8eee9f60606ec0e645876e4b9a1e9bb30d21dace54e3995ca5f40 DIST evolution-2.5.5.1-bf-junk.tar.bz2 10771 RMD160 7ae764761607d50024fbec32680bc57e04ac7879 SHA1 465205cf50770b72641995ec59617010dadaf204 SHA256 b8988b28836a201606d8fa651f48722ebac8c984dcc171f7f7a3b860d0f7a045 DIST evolution-2.6.2.tar.bz2 12394719 RMD160 72133312fb9cceae74d9f0e570dd898d5119a10b SHA1 08a6a9bf3754fff71cbdf82857337b1edc13ef46 SHA256 a69c45e9deae3a2eea06af08eacb9266e6cdcd452dd600ad96c2de23effa56f5 @@ -58,14 +61,14 @@ EBUILD evolution-2.6.2-r1.ebuild 6015 RMD160 830290676de44e0ca32b1c98f5a15e17692 MD5 7842041bd3a0e50d7b5a426f5298676d evolution-2.6.2-r1.ebuild 6015 RMD160 830290676de44e0ca32b1c98f5a15e1769265eeb evolution-2.6.2-r1.ebuild 6015 SHA256 73ba732a0fd84761e13c9234481f45734af85d7cc2009000f9cdb3f0abcfc1c7 evolution-2.6.2-r1.ebuild 6015 -EBUILD evolution-2.8.0.ebuild 6235 RMD160 c47c4c0818cbb12d68fd507de1a7e8223cde07dd SHA1 b0c00ca355f99af379cff26699ebe93bae963080 SHA256 0dd591e8f0ba3385f5dc233b43fb3181fdd2ffc13c1b06d46f1f05dab9c6c3fb -MD5 d63a2096683b36e218ae9f16142af74a evolution-2.8.0.ebuild 6235 -RMD160 c47c4c0818cbb12d68fd507de1a7e8223cde07dd evolution-2.8.0.ebuild 6235 -SHA256 0dd591e8f0ba3385f5dc233b43fb3181fdd2ffc13c1b06d46f1f05dab9c6c3fb evolution-2.8.0.ebuild 6235 -MISC ChangeLog 36700 RMD160 4ca3de3513191659cb8f55ed35803a98888d2bd9 SHA1 e1e7084168d2ae973c2a78c735408dd91bd4e3c1 SHA256 96af884d864b40bf45e3070dccf6f055690a9f2568f161b536258b63fb1bde6d -MD5 160ecfde992059a6deb65ef0ae4b5d63 ChangeLog 36700 -RMD160 4ca3de3513191659cb8f55ed35803a98888d2bd9 ChangeLog 36700 -SHA256 96af884d864b40bf45e3070dccf6f055690a9f2568f161b536258b63fb1bde6d ChangeLog 36700 +EBUILD evolution-2.8.0.ebuild 6225 RMD160 628ca487dcec964cbb9ed34aa51bf9a6b5f38f64 SHA1 9aacbac2ba9a73957a134dda6269b7ba6603e62b SHA256 76406c9c43e4db39dce71121442b76030126df15d5d9cccda10a04e499a487e7 +MD5 64d3a9f2b8255a916277315549d25314 evolution-2.8.0.ebuild 6225 +RMD160 628ca487dcec964cbb9ed34aa51bf9a6b5f38f64 evolution-2.8.0.ebuild 6225 +SHA256 76406c9c43e4db39dce71121442b76030126df15d5d9cccda10a04e499a487e7 evolution-2.8.0.ebuild 6225 +MISC ChangeLog 36923 RMD160 50de6c19599bd09bcdf3e47316440fd58139d041 SHA1 d295401b0b282423442b1a976283d59cbba30395 SHA256 0ec6ebd157eb48bb632b71abe4087ec15889e7c6ba8eb5429b188ed4d507498e +MD5 c0b729c2abf6de046cab60c8b6db4954 ChangeLog 36923 +RMD160 50de6c19599bd09bcdf3e47316440fd58139d041 ChangeLog 36923 +SHA256 0ec6ebd157eb48bb632b71abe4087ec15889e7c6ba8eb5429b188ed4d507498e ChangeLog 36923 MISC metadata.xml 285 RMD160 0c12c7c2e6dd66ea44e83541384d6b634c642bc0 SHA1 bbd215b7c718049707751c25e6bfc2318fa0f292 SHA256 0c662917bda7d3035eab7db55ade83dadca650d2ceddc44b7765ba5f898bd816 MD5 f0750af493d9560f5faf50f39fd644c5 metadata.xml 285 RMD160 0c12c7c2e6dd66ea44e83541384d6b634c642bc0 metadata.xml 285 @@ -79,3 +82,10 @@ SHA256 730a2ffe0655db234cb17adecb91357a37e42064f41dc64cccfb7ab2fda0614d files/di MD5 26fe6f66858beb4a799a0d4a2ef4ed19 files/digest-evolution-2.8.0 533 RMD160 51f8fb00430feb4a94d4851754fc5fe6cc5c77d5 files/digest-evolution-2.8.0 533 SHA256 ad352c750121d30170619502ba3a3dcf059d205cb1832e31b2f20687e188dbc9 files/digest-evolution-2.8.0 533 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.5-ecc0.1.6 (GNU/Linux) + +iD8DBQFFCvn8omPajV0RnrERAnIwAJ0ZcrbhH3U2v0kZcbie6wXLj7Q8rACggVRX +lvxijj8VlhX3iaLdR+zO4CI= +=TJ6k +-----END PGP SIGNATURE----- diff --git a/mail-client/evolution/files/evolution-2.8.0-uri.patch b/mail-client/evolution/files/evolution-2.8.0-uri.patch deleted file mode 100644 index 118e8ee07aba..000000000000 --- a/mail-client/evolution/files/evolution-2.8.0-uri.patch +++ /dev/null @@ -1,746 +0,0 @@ -diff --exclude-from=/home/dang/.diffrc -u -ruN evolution-2.7.91.orig/calendar/gui/apps_evolution_calendar.schemas.in.in evolution-2.7.91.uri/calendar/gui/apps_evolution_calendar.schemas.in.in ---- evolution-2.7.91.orig/calendar/gui/apps_evolution_calendar.schemas.in.in 2006-08-07 00:47:42.000000000 -0400 -+++ evolution-2.7.91.uri/calendar/gui/apps_evolution_calendar.schemas.in.in 2006-08-24 13:06:28.000000000 -0400 -@@ -577,5 +577,19 @@ - <long>The URL template to use as a free/busy data fallback, %u is replaced by the user part of the mail address and %d is replaced by the domain.</long> - </locale> - </schema> -+ -+ <schema> -+ <key>/schemas/apps/evolution/calendar/audio_dir</key> -+ <applyto>/apps/evolution/calendar/audio_dir</applyto> -+ <owner>evolution-calendar</owner> -+ <type>string</type> -+ <locale name="C"> -+ <short>Save directory for alarm audio</short> -+ <long> -+ Directory for saving alarm audio files -+ </long> -+ </locale> -+ </schema> -+ - </schemalist> - </gconfschemafile> -diff --exclude-from=/home/dang/.diffrc -u -ruN evolution-2.7.91.orig/calendar/gui/calendar-config-keys.h evolution-2.7.91.uri/calendar/gui/calendar-config-keys.h ---- evolution-2.7.91.orig/calendar/gui/calendar-config-keys.h 2006-07-22 07:14:50.000000000 -0400 -+++ evolution-2.7.91.uri/calendar/gui/calendar-config-keys.h 2006-08-24 12:05:43.000000000 -0400 -@@ -91,7 +91,7 @@ - /* Free/Busy settings */ - #define CALENDAR_CONFIG_TEMPLATE CALENDAR_CONFIG_PREFIX"/publish/template" - --#define CALENDAR_CONFIG_SAVE_DIR "/apps/evolution/mail/save_dir" -+#define CALENDAR_CONFIG_SAVE_DIR CALENDAR_CONFIG_PREFIX"/audio_dir" - G_END_DECLS - - #endif -diff --exclude-from=/home/dang/.diffrc -u -ruN evolution-2.7.91.orig/calendar/gui/dialogs/alarm-dialog.c evolution-2.7.91.uri/calendar/gui/dialogs/alarm-dialog.c ---- evolution-2.7.91.orig/calendar/gui/dialogs/alarm-dialog.c 2006-07-09 23:54:00.000000000 -0400 -+++ evolution-2.7.91.uri/calendar/gui/dialogs/alarm-dialog.c 2006-08-24 11:47:41.000000000 -0400 -@@ -1080,6 +1080,7 @@ - dir = calendar_config_get_dir_path (); - if ( dir && *dir ) - gnome_file_entry_set_default_path (GNOME_FILE_ENTRY (dialog->aalarm_file_entry), dir); -+ g_free(dir); - check_custom_sound (dialog); - break; - -diff --exclude-from=/home/dang/.diffrc -u -ruN evolution-2.7.91.orig/e-util/e-dialog-utils.c evolution-2.7.91.uri/e-util/e-dialog-utils.c ---- evolution-2.7.91.orig/e-util/e-dialog-utils.c 2006-05-31 23:29:48.000000000 -0400 -+++ evolution-2.7.91.uri/e-util/e-dialog-utils.c 2006-08-24 11:45:27.000000000 -0400 -@@ -28,6 +28,10 @@ - - #include "e-dialog-utils.h" - -+#include <unistd.h> -+#include <glib.h> -+#include <glib/gstdio.h> -+ - #include <gdkconfig.h> - #ifdef GDK_WINDOWING_X11 - #include <gdk/gdkx.h> -@@ -37,18 +41,19 @@ - #include <gtk/gtkplug.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 <gconf/gconf-client.h> - #include <libgnome/gnome-i18n.h> - #include <libgnome/gnome-util.h> - -+#include <libgnomevfs/gnome-vfs-utils.h> -+ -+#include "e-util/e-util.h" -+#include "e-util/e-error.h" -+ - - /** - * e_notice: -@@ -261,104 +266,42 @@ - GtkWidget *fs; - char **filename = data; - char *uri; -- const char *path; -- int btn = GTK_RESPONSE_YES; -- GConfClient *gconf = gconf_client_get_default(); -- char *dir; - - fs = gtk_widget_get_toplevel (widget); --#ifdef USE_GTKFILECHOOSER -- path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (fs)); - uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fs)); --#else -- path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); --#endif -- -- if (g_file_test (path, G_FILE_TEST_IS_REGULAR)) { -- GtkWidget *dlg; -- -- dlg = gtk_message_dialog_new (GTK_WINDOW (fs), 0, -- GTK_MESSAGE_QUESTION, -- GTK_BUTTONS_YES_NO, -- _("A file by that name already exists.\n" -- "Overwrite it?")); -- gtk_window_set_title (GTK_WINDOW (dlg), _("Overwrite file?")); -- gtk_dialog_set_has_separator (GTK_DIALOG (dlg), FALSE); - -- btn = gtk_dialog_run (GTK_DIALOG (dlg)); -- gtk_widget_destroy (dlg); -- } -- -- if (btn == GTK_RESPONSE_YES) { -- dir = g_path_get_dirname (path); -- gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", dir, NULL); -- g_free (dir); -+ if (e_file_can_save((GtkWindow *)widget, uri)) { -+ e_file_update_save_path(gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER(fs)), TRUE); - *filename = uri; - } -- g_object_unref(gconf); - - gtk_main_quit (); - } - --#ifdef USE_GTKFILECHOOSER - static void - filechooser_response (GtkWidget *fc, gint response_id, gpointer data) - { -- if (response_id == GTK_RESPONSE_ACCEPT) -+ if (response_id == GTK_RESPONSE_OK) - save_ok (fc, data); - else - gtk_widget_destroy (fc); - } --#endif - - char * - e_file_dialog_save (const char *title, const char *fname) - { - GtkWidget *selection; - char *filename = NULL; -- char *dir, *gdir = NULL; -- GConfClient *gconf; -- -- gconf = gconf_client_get_default(); -- dir = gdir = gconf_client_get_string(gconf, "/apps/evolution/mail/save_dir", NULL); -- g_object_unref(gconf); -- -- if (dir == NULL) -- dir = (char *)g_get_home_dir(); -- --#ifdef USE_GTKFILECHOOSER -- selection = gtk_file_chooser_dialog_new (title, -- NULL, -- GTK_FILE_CHOOSER_ACTION_SAVE, -- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, -- GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, -- NULL); -- gtk_dialog_set_default_response (GTK_DIALOG (selection), GTK_RESPONSE_ACCEPT); -- gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (selection), dir); -- gtk_file_chooser_set_local_only (selection, FALSE); -- -- if (fname) -- gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER (selection), fname); -- -- g_signal_connect (G_OBJECT (selection), "response", G_CALLBACK (filechooser_response), &filename); --#else -- char *path; - -- selection = gtk_file_selection_new (title); -- path = g_strdup_printf ("%s/", dir); -- gtk_file_selection_set_filename (GTK_FILE_SELECTION (selection), path); -- g_free (path); -+ selection = e_file_get_save_filesel(NULL, title, fname, GTK_FILE_CHOOSER_ACTION_SAVE); - -- g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (selection)->ok_button), "clicked", G_CALLBACK (save_ok), &filename); -- g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (selection)->cancel_button), "clicked", G_CALLBACK (gtk_main_quit), NULL); --#endif -+ g_signal_connect (G_OBJECT (selection), "response", G_CALLBACK (filechooser_response), &filename); - - gtk_widget_show (GTK_WIDGET (selection)); - gtk_grab_add (GTK_WIDGET (selection)); - gtk_main (); - - gtk_widget_destroy (GTK_WIDGET (selection)); -- g_free (gdir); - - return filename; - } -@@ -369,83 +312,147 @@ - GtkWidget *fs; - char **filename = data; - char *uri; -- const char *path; -- GConfClient *gconf = gconf_client_get_default(); - - fs = gtk_widget_get_toplevel (widget); --#ifdef USE_GTKFILECHOOSER -- path = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (fs)); - uri = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (fs)); --#else -- path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); --#endif - -- gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", path, NULL); -- g_object_unref(gconf); -+ e_file_update_save_path(uri, FALSE); - *filename = uri; - - gtk_main_quit (); - } - --#ifdef USE_GTKFILECHOOSER - static void - folderchooser_response (GtkWidget *fc, gint response_id, gpointer data) - { -- if (response_id == GTK_RESPONSE_ACCEPT) -+ if (response_id == GTK_RESPONSE_OK) - save_folder_ok (fc, data); - else - gtk_widget_destroy (fc); - } --#endif - - char * - e_file_dialog_save_folder (const char *title) - { - GtkWidget *selection; --#ifndef USE_GTKFILECHOOSER -- char *path; --#endif - char *filename = NULL; -- char *dir, *gdir = NULL; -- GConfClient *gconf; -- -- gconf = gconf_client_get_default(); -- dir = gdir = gconf_client_get_string(gconf, "/apps/evolution/mail/save_dir", NULL); -- g_object_unref(gconf); -- -- if (dir == NULL) -- dir = (char *)g_get_home_dir(); -- --#ifdef USE_GTKFILECHOOSER -- selection = gtk_file_chooser_dialog_new (title, -- NULL, -- GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, -- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, -- GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, -- NULL); -- gtk_dialog_set_default_response (GTK_DIALOG (selection), GTK_RESPONSE_ACCEPT); -- gtk_file_chooser_set_local_only (selection, FALSE); -- gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (selection), dir); - -+ selection = e_file_get_save_filesel(NULL, title, NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); - g_signal_connect (G_OBJECT (selection), "response", G_CALLBACK (folderchooser_response), &filename); --#else -- selection = gtk_file_selection_new (title); -- path = g_strdup_printf ("%s/", dir); -- gtk_file_selection_set_filename (GTK_FILE_SELECTION (selection), path); -- g_free (path); -- -- g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (selection)->ok_button), "clicked", G_CALLBACK (save_folder_ok), &filename); -- g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (selection)->cancel_button), "clicked", G_CALLBACK (gtk_main_quit), NULL); --#endif - - gtk_widget_show (GTK_WIDGET (selection)); - gtk_grab_add (GTK_WIDGET (selection)); - gtk_main (); - - gtk_widget_destroy (GTK_WIDGET (selection)); -- g_free (gdir); - - return filename; - } - -+/** -+ * e_file_get_save_filesel: -+ * @parent: parent window -+ * @title: dialog title -+ * @name: filename -+ * @action: action for dialog -+ * -+ * Creates a save dialog, using the saved directory from gconf. The dialog has -+ * no signals connected and is not shown. -+ **/ -+GtkWidget * -+e_file_get_save_filesel (GtkWidget *parent, const char *title, const char *name, GtkFileChooserAction action) -+{ -+ GtkWidget *filesel; -+ char *realname, *uri; -+ -+ filesel = gtk_file_chooser_dialog_new (title, -+ NULL, -+ action, -+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, -+ GTK_STOCK_SAVE, GTK_RESPONSE_OK, -+ NULL); -+ gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_OK); -+ gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (filesel), FALSE); -+ -+ if (parent) -+ e_dialog_set_transient_for((GtkWindow *)filesel, parent); -+ -+ uri = e_file_get_save_path(); -+ -+ if (name && name[0]) { -+ realname = gnome_vfs_escape_string (name); -+ } else { -+ realname = NULL; -+ } -+ -+ gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (filesel), uri); -+ -+ if (realname) -+ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filesel), realname); -+ -+ g_free (realname); -+ g_free (uri); -+ -+ return filesel; -+} -+ -+/** -+ * e_file_can_save: -+ * -+ * Return TRUE if the URI can be saved to, FALSE otherwise. It checks local -+ * files to see if they're regular and can be accessed. If the file exists and -+ * is writable, it pops up a dialog asking the user if they want to overwrite -+ * it. Returns the users choice. -+ **/ -+gboolean -+e_file_can_save(GtkWindow *parent, const char *uri) -+{ -+ struct stat st; -+ char *path; -+ gboolean res; -+ -+ if (!uri || uri[0] == 0) -+ return FALSE; - -+ /* Assume remote files are writable; too costly to check */ -+ if (!e_file_check_local(uri)) -+ return TRUE; -+ -+ path = gnome_vfs_get_local_path_from_uri(uri); -+ if (!path) -+ return FALSE; -+ -+ /* make sure we can actually save to it... */ -+ if (g_stat (path, &st) != -1 && !S_ISREG (st.st_mode)) { -+ g_free(path); -+ return FALSE; -+ } -+ -+ res = TRUE; -+ if (g_access (path, F_OK) == 0) { -+ if (g_access (path, W_OK) != 0) { e_error_run(parent, "mail:no-save-path", path, g_strerror(errno), NULL); -+ g_free(path); -+ return FALSE; -+ } -+ -+ res = e_error_run(parent, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, path, NULL) == GTK_RESPONSE_OK; -+ -+ } -+ -+ g_free(path); -+ return res; -+} -+ -+gboolean -+e_file_check_local (const char *name) -+{ -+ char *uri; -+ -+ uri = gnome_vfs_get_local_path_from_uri(name); -+ if (uri) { -+ g_free(uri); -+ return TRUE; -+ } -+ -+ return FALSE; -+} -diff --exclude-from=/home/dang/.diffrc -u -ruN evolution-2.7.91.orig/e-util/e-dialog-utils.h evolution-2.7.91.uri/e-util/e-dialog-utils.h ---- evolution-2.7.91.orig/e-util/e-dialog-utils.h 2005-10-18 05:57:20.000000000 -0400 -+++ evolution-2.7.91.uri/e-util/e-dialog-utils.h 2006-08-24 11:44:48.000000000 -0400 -@@ -24,6 +24,7 @@ - #define E_DIALOG_UTILS_H - - #include <gtk/gtkmessagedialog.h> -+#include <gtk/gtkfilechooser.h> - - void e_notice (gpointer parent, - GtkMessageType type, -@@ -43,5 +44,10 @@ - - char *e_file_dialog_save_folder (const char *title); - -+GtkWidget * e_file_get_save_filesel (GtkWidget *parent, const char *title, const char *name, GtkFileChooserAction action); -+ -+gboolean e_file_can_save(GtkWindow *parent, const char *uri); -+gboolean e_file_check_local(const char *name); -+ - - #endif -diff --exclude-from=/home/dang/.diffrc -u -ruN evolution-2.7.91.orig/e-util/e-util.c evolution-2.7.91.uri/e-util/e-util.c ---- evolution-2.7.91.orig/e-util/e-util.c 2006-07-24 04:21:14.000000000 -0400 -+++ evolution-2.7.91.uri/e-util/e-util.c 2006-08-24 11:45:06.000000000 -0400 -@@ -1187,4 +1187,45 @@ - return font_options; - } - -+/** -+ * e_file_update_save_path: -+ * @uri: URI to store -+ * @free: If TRUE, free uri -+ * -+ * Save the save_dir path for evolution. If free is TRUE, uri gets freed when -+ * done. Genearally, this should be called with the output of -+ * gtk_file_chooser_get_current_folder_uri() The URI must be a path URI, not a -+ * file URI. -+ **/ -+void -+e_file_update_save_path(char *uri, gboolean free) -+{ -+ GConfClient *gconf = gconf_client_get_default(); -+ -+ gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", uri, NULL); -+ g_object_unref(gconf); -+ if (free) -+ g_free(uri); -+} -+ -+/** -+ * e_file_get_save_path: -+ * -+ * Return the save_dir path for evolution. If there isn't a save_dir, returns -+ * the users home directory. Returns an allocated URI that should be freed by -+ * the caller. -+ **/ -+char * -+e_file_get_save_path(void) -+{ -+ GConfClient *gconf = gconf_client_get_default(); -+ char *uri; -+ -+ uri = gconf_client_get_string(gconf, "/apps/evolution/mail/save_dir", NULL); -+ g_object_unref(gconf); -+ -+ if (uri == NULL) -+ uri = gnome_vfs_get_uri_from_local_path(g_get_home_dir()); -+ return (uri); -+} - -diff --exclude-from=/home/dang/.diffrc -u -ruN evolution-2.7.91.orig/e-util/e-util.h evolution-2.7.91.uri/e-util/e-util.h ---- evolution-2.7.91.orig/e-util/e-util.h 2006-07-22 07:14:52.000000000 -0400 -+++ evolution-2.7.91.uri/e-util/e-util.h 2006-08-24 11:44:45.000000000 -0400 -@@ -215,6 +215,8 @@ - Less than 0 for the int means copy the whole string. */ - gchar *e_strdup_append_strings (gchar *first_string, - ...); -+void e_file_update_save_path(char *uri, gboolean free); -+char *e_file_get_save_path(void); - cairo_font_options_t * get_font_options (); - - #ifdef __cplusplus -diff --exclude-from=/home/dang/.diffrc -u -ruN evolution-2.7.91.orig/mail/em-utils.c evolution-2.7.91.uri/mail/em-utils.c ---- evolution-2.7.91.orig/mail/em-utils.c 2006-05-31 23:29:48.000000000 -0400 -+++ evolution-2.7.91.uri/mail/em-utils.c 2006-08-23 23:50:18.000000000 -0400 -@@ -90,23 +90,6 @@ - - #define d(x) - --static gboolean --emu_file_check_local (const char *name) --{ -- CamelURL *url; -- gboolean local = FALSE; -- -- url = camel_url_new (name, NULL); -- if (url == NULL) -- return TRUE; -- -- if (!g_ascii_strcasecmp (url->protocol, "file")) -- local = TRUE; -- -- camel_url_free (url); -- -- return local; --} - /** - * em_utils_prompt_user: - * @parent: parent window -@@ -375,119 +358,24 @@ - - /* Saving messages... */ - --static GtkWidget * --emu_get_save_filesel (GtkWidget *parent, const char *title, const char *name, GtkFileChooserAction action) --{ -- GtkWidget *filesel; -- const char *dir; -- char *realname, *gdir; -- GConfClient *gconf; -- --#ifdef USE_GTKFILECHOOSER -- filesel = gtk_file_chooser_dialog_new (title, -- NULL, -- action, -- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, -- GTK_STOCK_SAVE, GTK_RESPONSE_OK, -- NULL); -- gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_OK); -- gtk_file_chooser_set_local_only (filesel, FALSE); --#else -- char *filename; -- -- filesel = gtk_file_selection_new (title); --#endif -- -- if (parent) -- e_dialog_set_transient_for((GtkWindow *)filesel, parent); -- -- gconf = gconf_client_get_default(); -- dir = gdir = gconf_client_get_string(gconf, "/apps/evolution/mail/save_dir", NULL); -- g_object_unref(gconf); -- -- if (dir == NULL) -- dir = g_get_home_dir(); -- -- if (name && name[0]) { -- realname = g_strdup (name); -- em_filename_make_safe (realname); -- } else { -- realname = NULL; -- } -- --#ifdef USE_GTKFILECHOOSER -- gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filesel), dir); -- -- if (realname) -- gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filesel), realname); --#else -- filename = g_build_filename (dir, G_DIR_SEPARATOR_S, realname, NULL); -- gtk_file_selection_set_filename (GTK_FILE_SELECTION (filesel), filename); -- g_free (filename); --#endif -- -- g_free (realname); -- g_free (gdir); -- -- return filesel; --} -- --static void --emu_update_save_path(const char *filename, gboolean path) --{ -- char *dir = path ? (char *)filename : g_path_get_dirname(filename); -- GConfClient *gconf = gconf_client_get_default(); -- -- gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", dir, NULL); -- g_object_unref(gconf); -- if (!path) -- g_free(dir); --} -- --static gboolean --emu_can_save(GtkWindow *parent, const char *path) --{ -- struct stat st; -- -- if (!path || path[0] == 0) -- return FALSE; -- -- /* make sure we can actually save to it... */ -- if (g_stat (path, &st) != -1 && !S_ISREG (st.st_mode)) -- return FALSE; -- -- if (g_access (path, F_OK) == 0) { -- if (g_access (path, W_OK) != 0) { -- e_error_run(parent, "mail:no-save-path", path, g_strerror(errno), NULL); -- return FALSE; -- } -- -- return e_error_run(parent, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, path, NULL) == GTK_RESPONSE_OK; -- } -- -- return TRUE; --} -- - static void - emu_save_part_response(GtkWidget *filesel, int response, CamelMimePart *part) - { -- const char *path; -- const char *uri; -+ char *uri; - - if (response == GTK_RESPONSE_OK) { --#ifdef USE_GTKFILECHOOSER - uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (filesel)); -- path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel)); --#else -- path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); --#endif - -- if (emu_file_check_local(uri) && !emu_can_save((GtkWindow *)filesel, path)) -+ if (!e_file_can_save((GtkWindow *)filesel, uri)) { -+ g_free(uri); - return; -+ } - -- emu_update_save_path(path, FALSE); -+ e_file_update_save_path(gtk_file_chooser_get_current_folder_uri( -+ GTK_FILE_CHOOSER(filesel)), TRUE); - /* FIXME: popup error if it fails? */ - mail_save_part(part, uri, NULL, NULL, FALSE); -+ g_free(uri); - } - - gtk_widget_destroy((GtkWidget *)filesel); -@@ -519,7 +407,7 @@ - } - } - -- filesel = emu_get_save_filesel(parent, prompt, name, GTK_FILE_CHOOSER_ACTION_SAVE); -+ filesel = e_file_get_save_filesel(parent, prompt, name, GTK_FILE_CHOOSER_ACTION_SAVE); - camel_object_ref(part); - g_signal_connect (filesel, "response", G_CALLBACK (emu_save_part_response), part); - gtk_widget_show (filesel); -@@ -528,16 +416,11 @@ - static void - emu_save_parts_response (GtkWidget *filesel, int response, GSList *parts) - { -- char *path = NULL; - GSList *selected; -+ char *uri = NULL; - if (response == GTK_RESPONSE_OK) { --#ifdef USE_GTKFILECHOOSER -- path = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (filesel)); --#else -- path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); --#endif -- -- emu_update_save_path(path, TRUE); -+ uri = gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER (filesel)); -+ e_file_update_save_path(uri, FALSE); - - for ( selected = parts; selected != NULL; selected = selected->next) { - const char *file_name; -@@ -560,8 +443,8 @@ - file_name = safe_name; - } - -- file_path = g_build_filename (path, file_name, NULL); -- if (!g_file_test(file_path, (G_FILE_TEST_EXISTS)) || e_error_run(NULL, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, file_name, NULL) == GTK_RESPONSE_OK) -+ file_path = g_build_filename (uri, file_name, NULL); -+ if (!e_file_check_local(file_path) || !g_file_test(file_path, (G_FILE_TEST_EXISTS)) || e_error_run(NULL, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, file_name, NULL) == GTK_RESPONSE_OK) - mail_save_part(part, file_path, NULL, NULL, FALSE); - else - g_warning ("Could not save %s. File already exists", file_path); -@@ -570,7 +453,7 @@ - g_free (safe_name); - } - -- g_free (path); -+ g_free (uri); - } - - g_slist_free (parts); -@@ -582,7 +465,7 @@ - { - GtkWidget *filesel; - -- filesel = emu_get_save_filesel (parent, prompt, NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); -+ filesel = e_file_get_save_filesel (parent, prompt, NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); - g_signal_connect (filesel, "response", G_CALLBACK (emu_save_parts_response), parts); - gtk_widget_show (filesel); - } -@@ -643,21 +526,21 @@ - static void - emu_save_messages_response(GtkWidget *filesel, int response, struct _save_messages_data *data) - { -- const char *path; -+ char *uri; - - if (response == GTK_RESPONSE_OK) { --#ifdef USE_GTKFILECHOOSER -- path = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (filesel)); --#else -- path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (filesel)); --#endif -+ uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (filesel)); - -- if (!emu_can_save((GtkWindow *)filesel, path)) -+ if (!e_file_can_save((GtkWindow *)filesel, uri)) { -+ g_free(uri); - return; -+ } - -- emu_update_save_path(path, FALSE); -- mail_save_messages(data->folder, data->uids, path, NULL, NULL); -+ e_file_update_save_path(gtk_file_chooser_get_current_folder_uri( -+ GTK_FILE_CHOOSER (filesel)), TRUE); -+ mail_save_messages(data->folder, data->uids, uri, NULL, NULL); - data->uids = NULL; -+ g_free(uri); - } - - camel_object_unref(data->folder); -@@ -685,7 +568,7 @@ - g_return_if_fail (CAMEL_IS_FOLDER (folder)); - g_return_if_fail (uids != NULL); - -- filesel = emu_get_save_filesel(parent, _("Save Message..."), NULL, GTK_FILE_CHOOSER_ACTION_SAVE); -+ filesel = e_file_get_save_filesel(parent, _("Save Message..."), NULL, GTK_FILE_CHOOSER_ACTION_SAVE); - camel_object_ref(folder); - - data = g_malloc(sizeof(struct _save_messages_data)); -diff --exclude-from=/home/dang/.diffrc -u -ruN evolution-2.7.91.orig/mail/evolution-mail.schemas.in.in evolution-2.7.91.uri/mail/evolution-mail.schemas.in.in ---- evolution-2.7.91.orig/mail/evolution-mail.schemas.in.in 2006-07-22 07:14:53.000000000 -0400 -+++ evolution-2.7.91.uri/mail/evolution-mail.schemas.in.in 2006-08-24 13:04:58.000000000 -0400 -@@ -913,5 +913,20 @@ - </locale> - </schema> - -+ <!-- save directory settings --> -+ -+ <schema> -+ <key>/schemas/apps/evolution/mail/save_dir</key> -+ <applyto>/apps/evolution/mail/save_dir</applyto> -+ <owner>evolution-mail</owner> -+ <type>string</type> -+ <locale name="C"> -+ <short>Save directory</short> -+ <long> -+ Directory for saving mail component files -+ </long> -+ </locale> -+ </schema> -+ - </schemalist> - </gconfschemafile> |