From d5dc15ddf0ff2a0e5a08887f740d6e009de1024a Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 3 Apr 2001 16:57:27 +0000 Subject: Pulled up fixes from evolution-0-10-branch. svn path=/trunk/; revision=9133 --- shell/ChangeLog | 21 +++++++++++++++++++++ shell/e-setup.c | 23 +++++++++++++++++++++++ shell/e-shell-view.c | 9 ++++++--- 3 files changed, 50 insertions(+), 3 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index a402bb638b..bce6012b7d 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,24 @@ +2001-04-03 Ettore Perazzoli + + * e-shell-view.c: Fix bug #1878 "folder sometimes fails to + display?". Thanks to Dan for finding out an explanation for the + problem. + (e_shell_view_display_uri): Don't set `priv->uri' here. + (show_existing_view): Set it here instead, and before showing the + control. + (create_new_view_for_uri): And here, likewise. + +2001-04-03 Christopher James Lahey + + * e-shell-folder-selection-dialog.c (dbl_click_cb): Made double + clicking not crash here. + +2001-04-02 Ettore Perazzoli + + * e-setup.c (e_setup): If we have a local folder named "Trash" of + type "mail", rename it to "Trash.old" so that the new + vfolder-based trash type gets installed. + 2001-04-03 Gediminas Paulauskas * importer/evolution-importer-client.c (evolution_importer_client_load_file): diff --git a/shell/e-setup.c b/shell/e-setup.c index 867aa73d2f..1d6e75b71e 100644 --- a/shell/e-setup.c +++ b/shell/e-setup.c @@ -40,6 +40,8 @@ #include #include +#include "e-local-folder.h" + #include "e-setup.h" @@ -278,12 +280,33 @@ e_setup (const char *evolution_directory) file = g_strdup_printf ("%s/config", evolution_directory); if (stat (file, &statinfo) == 0 && ! S_ISDIR (statinfo.st_mode)) { char *old = g_strdup_printf ("%s.old", file); + rename (file, old); mkdir (file, 0700); g_free (old); } g_free (file); + /* If the user has an old style trash folder, remove it so it gets + * replaced by the new vfolder-based trash folder. FIXME: This should + * go away at some point. */ + file = g_strdup_printf ("%s/local/Trash", evolution_directory); + if (stat (file, &statinfo) == 0 && S_ISDIR (statinfo.st_mode)) { + EFolder *local_folder; + + local_folder = e_local_folder_new_from_path (file); + if (local_folder != NULL + && strcmp (e_folder_get_type_string (local_folder), "mail") == 0) { + char *old = g_strdup_printf ("%s.old", file); + + rename (file, old); + g_free (old); + } + + gtk_object_unref (GTK_OBJECT (local_folder)); + } + g_free (file); + /* User has evolution directory... Check if it is up to date. */ return check_evolution_directory (evolution_directory); diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 12f87a217c..28fc43a761 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -1452,6 +1452,9 @@ show_existing_view (EShellView *shell_view, gtk_widget_show (control); } + g_free (priv->uri); + priv->uri = g_strdup (uri); + set_current_notebook_page (shell_view, notebook_page); return TRUE; @@ -1471,6 +1474,9 @@ create_new_view_for_uri (EShellView *shell_view, if (control == NULL) return FALSE; + g_free (priv->uri); + priv->uri = g_strdup (uri); + gtk_widget_show (control); gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), control, NULL); @@ -1532,9 +1538,6 @@ e_shell_view_display_uri (EShellView *shell_view, goto end; } - g_free (priv->uri); - priv->uri = g_strdup (uri); - retval = TRUE; end: -- cgit v1.2.3