aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-07-02 02:30:11 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-07-02 02:30:11 +0800
commitac60e853cbee9c568b3cc066cbdadfdd7e0152c8 (patch)
treead0daba3c32a00e33581296c8317cfa9a22b4061
parent2a9973b6fb45980836115bdbb0a05f0478d0a08e (diff)
downloadgsoc2013-evolution-ac60e853cbee9c568b3cc066cbdadfdd7e0152c8.tar.gz
gsoc2013-evolution-ac60e853cbee9c568b3cc066cbdadfdd7e0152c8.tar.zst
gsoc2013-evolution-ac60e853cbee9c568b3cc066cbdadfdd7e0152c8.zip
Get the "Open in a New Window" shortcut right-click menu to actually
work (I had removed a line by mistake), and fix a crash that would happen if user opened a new view, closed it and then created a new folder. svn path=/trunk/; revision=10657
-rw-r--r--shell/ChangeLog22
-rw-r--r--shell/e-shell-view.c37
-rw-r--r--shell/e-shortcuts-view.c2
3 files changed, 49 insertions, 12 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 396a50fa72..a7e079c1d0 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,27 @@
2001-07-01 Ettore Perazzoli <ettore@ximian.com>
+ * e-shell-view.c: Fixing a bug that could cause Evolution to crash
+ if a new ShellView was created and then destroyed, and then a new
+ folder would appear in the folder tree. Sigh, this code with the
+ delayed_selection is pretty messed up, but at least this will add
+ some consistency to it and make it safe.
+ (cleanup_delayed_selection): New function to disconnect the
+ "new_folder_cb" callback if the `delayed_selection' is not NULL,
+ and also free the `delayed_selection' itself.
+ (new_folder_cb): Use it.
+ (destroy): Call it here, otherwise we might [a] leak [b] cause a
+ crash as soon as a new folder appears in the folder tree, as
+ "new_folder" gets emitted and our connected signal handler has no
+ EShellView to handle the signal on.
+ (e_shell_view_display_uri): Call it here before re-setting the
+ `delayed_selection'.
+
+ * e-shortcuts-view.c (open_shortcut_in_new_window_cb): Add
+ invocation for `open_shortcut_helper()' back in [it was gone, for
+ unknown reasons].
+
+2001-07-01 Ettore Perazzoli <ettore@ximian.com>
+
* e-storage-set-view.c (tree_drag_begin): If the node doesn't have
a component, just don't start the whole CORBA drag thing instead
of crashing with an assertion.
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index f7d40e5330..ae72420da6 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -160,6 +160,10 @@ static void update_offline_toggle_status (EShellView *shell_view);
static const char *get_storage_set_path_from_uri (const char *uri);
+/* Boo. */
+static void new_folder_cb (EStorageSet *storage_set, const char *path, void *data);
+
+
/* Utility functions. */
static GtkWidget *
@@ -215,6 +219,22 @@ bonobo_widget_is_dead (BonoboWidget *bonobo_widget)
return is_dead;
}
+static void
+cleanup_delayed_selection (EShellView *shell_view)
+{
+ EShellViewPrivate *priv;
+
+ priv = shell_view->priv;
+
+ if (priv->delayed_selection != NULL) {
+ g_free (priv->delayed_selection);
+ priv->delayed_selection = NULL;
+ gtk_signal_disconnect_by_func (GTK_OBJECT (e_shell_get_storage_set (priv->shell)),
+ GTK_SIGNAL_FUNC (new_folder_cb),
+ shell_view);
+ }
+}
+
/* Folder bar pop-up handling. */
@@ -400,8 +420,6 @@ pop_up_folder_bar (EShellView *shell_view)
/* Switching views on a tree view click. */
-static void new_folder_cb (EStorageSet *storage_set, const char *path, void *data);
-
static int
set_folder_timeout (gpointer data)
{
@@ -437,13 +455,7 @@ switch_on_folder_tree_click (EShellView *shell_view,
gtk_timeout_remove (priv->set_folder_timeout);
g_free (priv->set_folder_uri);
- if (priv->delayed_selection) {
- g_free (priv->delayed_selection);
- priv->delayed_selection = NULL;
- gtk_signal_disconnect_by_func (GTK_OBJECT (e_shell_get_storage_set (priv->shell)),
- GTK_SIGNAL_FUNC (new_folder_cb),
- shell_view);
- }
+ cleanup_delayed_selection (shell_view);
if (priv->folder_bar_mode == E_SHELL_VIEW_SUBWINDOW_TRANSIENT) {
e_shell_view_display_uri (shell_view, uri);
@@ -482,8 +494,8 @@ new_folder_cb (EStorageSet *storage_set,
GTK_SIGNAL_FUNC (new_folder_cb),
shell_view);
g_free (priv->uri);
- priv->uri = priv->delayed_selection;
- priv->delayed_selection = NULL;
+ priv->uri = g_strdup (priv->delayed_selection);
+ cleanup_delayed_selection (shell_view);
e_shell_view_display_uri (shell_view, priv->uri);
}
}
@@ -915,6 +927,8 @@ destroy (GtkObject *object)
g_free (priv->uri);
+ cleanup_delayed_selection (shell_view);
+
if (priv->set_folder_timeout != 0)
gtk_timeout_remove (priv->set_folder_timeout);
@@ -1847,6 +1861,7 @@ e_shell_view_display_uri (EShellView *shell_view,
g_assert (GTK_IS_WIDGET (control));
show_existing_view (shell_view, uri, control);
} else if (create_new_view_for_uri (shell_view, uri)) {
+ cleanup_delayed_selection (shell_view);
priv->delayed_selection = g_strdup (uri);
gtk_signal_connect_after (GTK_OBJECT (e_shell_get_storage_set (priv->shell)), "new_folder",
GTK_SIGNAL_FUNC (new_folder_cb), shell_view);
diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c
index de30fdba1c..32aa46fa56 100644
--- a/shell/e-shortcuts-view.c
+++ b/shell/e-shortcuts-view.c
@@ -408,7 +408,7 @@ static void
open_shortcut_in_new_window_cb (GtkWidget *widget,
void *data)
{
-
+ open_shortcut_helper ((ShortcutRightClickMenuData *) data, TRUE);
}
170218sunpoet2017-02-242-4/+4 * Update to 20170214sunpoet2017-02-152-4/+4 * Update to 20170211sunpoet2017-02-142-4/+4 * Update to 5.2.5.jkim2017-02-012-10/+10 * Update to 5.2.4.jkim2017-01-022-10/+10 * - Update to 20161001sunpoet2016-11-212-4/+4 * devel/eric6: update to 6.1.11dbn2016-11-191-3/+3 * Update libreoffice to 5.2.3 and liborcus to 0.11.2bapt2016-11-122-8/+10 * devel/eric6: update to 6.1.10.dbn2016-10-101-3/+3 * devel/eric6: update to 6.1.9dbn2016-09-061-3/+3 * devel/eric6: update to 6.1.8.dbn2016-08-201-3/+3 * Update to 20160624bapt2016-07-072-3/+4 * eric6 ports: Update to version 6.1.7.bsam2016-07-051-3/+3 * eric6 ports: Update to version 6.1.6.bsam2016-06-061-2/+3 * Many KDE i10n ports: Patch updates CURDIRpi2016-05-262-2/+2 * editors/calligra-l10n: add plist-subpi2016-05-244-192/+192 * eric6 ports: Update to version 6.1.5.bsam2016-05-101-2/+2 * Update to 5.0.6.jkim2016-05-072-8/+8 * eric6 ports: update to version 6.1.4 (reaaly, previous updatebsam2016-04-221-2/+2 * eric6 ports: update to version 6.1.4.bsam2016-04-221-2/+2 * Fixup some whitespace at the beginning of lines problems.mat2016-04-011-1/+1 * Add missing items to the calligra-l10n ports plists.rakuco2016-03-294-0/+4 * - Update to 20160206sunpoet2016-03-062-3/+3 * - Makefile.local for slave ports is included by bsd.port.mk r397519dinoex2016-02-282-8/+0 * Update to 5.0.5.jkim2016-02-162-8/+8 * Update Calligra to 2.9.11.rakuco2016-02-094-6/+4 * eric6 ports: Update to version 6.1.2.bsam2016-02-081-2/+2 * - Add PORTSCOUTsunpoet2016-01-201-0/+4 * - Add PORTSCOUTsunpoet2016-01-201-0/+4 * - Update to 20160108sunpoet2016-01-202-3/+3 * eric6 ports: Update to version 6.1.1.bsam2016-01-051-2/+2 * Update Calligra to 2.9.10.rakuco2015-12-226-52/+76 * Update to 5.0.4.jkim2015-12-182-8/+8 * eric6 ports: Update to version 6.1.0.bsam2015-12-071-2/+2 * Update to 5.0.3.jkim2015-11-042-8/+8 * - Update to 20151003sunpoet2015-10-092-3/+3 * Update to 5.0.2.jkim2015-09-244-12/+12 * eric6 ports: Update to version 6.0.9.bsam2015-09-121-2/+2 * Update LibreOffice to 5.0.1.jkim2015-09-022-8/+8 * devel/eric6 and eric6 i18n files: update to version 6.0.8bsam2015-08-181-2/+2 * - Add NO_ARCHsunpoet2015-07-181-0/+1 * - Add NO_ARCHsunpoet2015-07-181-0/+1 * - Add NO_ARCHsunpoet2015-07-18