From 30457fd1bc79dfc4e2fc36a165de0abf1b1d5b77 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 30 May 2005 22:39:33 +0000 Subject: Work around mozilla bug 2005-05-31 Christian Persch * src/ephy-notebook.c: (ephy_notebook_move_tab), (move_tab_to_another_notebook), (button_release_cb): * src/ephy-window.c: (update_tabs_menu_sensitivity): Work around mozilla bug https://bugzilla.mozilla.org/show_bug.cgi?id=296002 by disallowing tabs moves to a different window. Bug #303922. --- src/ephy-notebook.c | 9 +++++++++ src/ephy-window.c | 6 ++++++ 2 files changed, 15 insertions(+) (limited to 'src') diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index 182849ce6..bd953fca7 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -59,6 +59,9 @@ #define INSANE_NUMBER_OF_URLS 20 +/* Until https://bugzilla.mozilla.org/show_bug.cgi?id=296002 is fixed */ +#define KEEP_TAB_IN_SAME_TOPLEVEL + #define EPHY_NOTEBOOK_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_NOTEBOOK, EphyNotebookPrivate)) struct _EphyNotebookPrivate @@ -421,6 +424,7 @@ ephy_notebook_move_tab (EphyNotebook *src, g_signal_emit (G_OBJECT (src), signals[TABS_REORDERED], 0); } } +#ifndef KEEP_TAB_IN_SAME_TOPLEVEL else { /* make sure the tab isn't destroyed while we move it */ @@ -429,6 +433,7 @@ ephy_notebook_move_tab (EphyNotebook *src, ephy_notebook_add_tab (dest, tab, dest_position, TRUE); g_object_unref (tab); } +#endif } static void @@ -543,6 +548,7 @@ move_tab_to_another_notebook (EphyNotebook *src, GdkEventMotion *event, int dest_position) { +#ifndef KEEP_TAB_IN_SAME_TOPLEVEL EphyTab *tab; int cur_page; @@ -580,6 +586,7 @@ move_tab_to_another_notebook (EphyNotebook *src, NULL); drag_start (dest, event->time); +#endif /* KEEP_TAB_IN_SAME_TOPLEVEL */ } static gboolean @@ -597,6 +604,7 @@ button_release_cb (EphyNotebook *notebook, cur_page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), cur_page_num); +#ifndef KEEP_TAB_IN_SAME_TOPLEVEL if (!is_in_notebook_window (notebook, event->x_root, event->y_root) && gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)) > 1) { @@ -604,6 +612,7 @@ button_release_cb (EphyNotebook *notebook, g_signal_emit (G_OBJECT (notebook), signals[TAB_DETACHED], 0, cur_page); } +#endif /* ungrab the pointer if it's grabbed */ if (gdk_pointer_is_grabbed ()) diff --git a/src/ephy-window.c b/src/ephy-window.c index 6b11fd299..8d85d0db1 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -390,6 +390,9 @@ static const struct #define BOOKMARKS_MENU_PATH "/menubar/BookmarksMenu" +/* Until https://bugzilla.mozilla.org/show_bug.cgi?id=296002 is fixed */ +#define KEEP_TAB_IN_SAME_TOPLEVEL + #define EPHY_WINDOW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_WINDOW, EphyWindowPrivate)) struct _EphyWindowPrivate @@ -2010,6 +2013,9 @@ update_tabs_menu_sensitivity (EphyWindow *window) gtk_action_set_sensitive (action, move_right); action = gtk_action_group_get_action (action_group, "TabsDetach"); ephy_action_change_sensitivity_flags (action, SENS_FLAG_CHROME, !detach); +#ifdef KEEP_TAB_IN_SAME_TOPLEVEL + gtk_action_set_visible (action, FALSE); +#endif } static gboolean -- cgit v1.2.3