From 7beb933c60288ce8e5756e591a089a82ab1c6b6c Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 11 Nov 2003 10:19:04 +0000 Subject: Build xul dialogs using GtkWindow+GtkMozEmbed. Make src code simpler and 2003-11-11 Marco Pesenti Gritti * embed/ephy-embed-single.c: (ephy_embed_single_class_init): * embed/ephy-embed-single.h: * embed/mozilla/mozilla-embed-persist.cpp: * embed/mozilla/mozilla-embed-single.cpp: * embed/mozilla/mozilla-embed.cpp: * embed/mozilla/mozilla-embed.h: * src/ephy-nautilus-view.c: (gnv_embed_new_window_cb): * src/ephy-session.c: (write_ephy_window): * src/ephy-shell.c: (ephy_shell_init): * src/ephy-tab.c: (ephy_tab_size_to_cb): * src/ephy-window.c: (translate_default_chrome): Build xul dialogs using GtkWindow+GtkMozEmbed. Make src code simpler and fix a pair of bugs. --- src/ephy-nautilus-view.c | 6 ------ src/ephy-session.c | 5 ----- src/ephy-shell.c | 24 ------------------------ src/ephy-tab.c | 7 +------ src/ephy-window.c | 1 - 5 files changed, 1 insertion(+), 42 deletions(-) (limited to 'src') diff --git a/src/ephy-nautilus-view.c b/src/ephy-nautilus-view.c index b79e0d7fc..e1c799dbd 100644 --- a/src/ephy-nautilus-view.c +++ b/src/ephy-nautilus-view.c @@ -409,12 +409,6 @@ gnv_embed_new_window_cb (EphyEmbed *embed, EphyEmbed **new_embed, EphyWindow *window; window = ephy_window_new (); - if (!(chromemask & EMBED_CHROME_OPENASCHROME)) - { - ephy_window_set_chrome (window, - chromemask | - EMBED_CHROME_OPENASPOPUP); - } new_tab = ephy_tab_new (); ephy_window_add_tab (window, new_tab, EPHY_NOTEBOOK_INSERT_LAST, FALSE); diff --git a/src/ephy-session.c b/src/ephy-session.c index 63a646724..2a78ccb83 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -541,7 +541,6 @@ static int write_ephy_window (xmlTextWriterPtr writer, EphyWindow *window) { - EmbedChromeMask chrome; GList *tabs, *l; int ret; @@ -552,10 +551,6 @@ write_ephy_window (xmlTextWriterPtr writer, */ if (tabs == NULL) return 0; - /* skip if it's a XUL dialog */ - chrome = ephy_window_get_chrome (window); - if (chrome & EMBED_CHROME_OPENASCHROME) return 0; - ret = xmlTextWriterStartElement (writer, "window"); if (ret < 0) return ret; diff --git a/src/ephy-shell.c b/src/ephy-shell.c index c476d3ac1..2a10315c6 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -144,25 +144,6 @@ ephy_shell_class_init (EphyShellClass *klass) g_type_class_add_private (object_class, sizeof(EphyShellPrivate)); } -static void -ephy_shell_new_window_cb (EphyEmbedShell *shell, - EphyEmbed **new_embed, - EmbedChromeMask chromemask, - gpointer data) -{ - EphyTab *new_tab; - EphyWindow *window; - - g_assert (new_embed != NULL); - - window = ephy_window_new (); - ephy_window_set_chrome (window, chromemask); - - new_tab = ephy_tab_new (); - ephy_window_add_tab (window, new_tab, EPHY_NOTEBOOK_INSERT_GROUPED, FALSE); - *new_embed = ephy_tab_get_embed (new_tab); -} - static void ephy_shell_init (EphyShell *gs) { @@ -197,11 +178,6 @@ ephy_shell_init (EphyShell *gs) single = ephy_embed_shell_get_embed_single (EPHY_EMBED_SHELL (gs)); if (single != NULL) { - g_signal_connect (G_OBJECT (single), - "new_window_orphan", - G_CALLBACK(ephy_shell_new_window_cb), - NULL); - ephy_init_services (gs); } else diff --git a/src/ephy-tab.c b/src/ephy-tab.c index 35a6a09cc..a2c4f1c65 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -952,13 +952,8 @@ ephy_tab_size_to_cb (EphyEmbed *embed, gint width, gint height, * has been resized. It appears to be the only way * to have the window sized according to embed * size correctly. - * We dont do it for XUL dialogs because in that case - * a "forced" requisition appear correct. */ - if (!(chromemask & EMBED_CHROME_OPENASCHROME)) - { - g_idle_add (let_me_resize_hack, embed); - } + g_idle_add (let_me_resize_hack, embed); } } diff --git a/src/ephy-window.c b/src/ephy-window.c index 3b81ede9e..c93689f54 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1573,7 +1573,6 @@ translate_default_chrome (EmbedChromeMask *chrome_mask) EMBED_CHROME_WINDOWLOWERED | EMBED_CHROME_CENTERSCREEN | EMBED_CHROME_OPENASDIALOG | - EMBED_CHROME_OPENASCHROME | EMBED_CHROME_OPENASPOPUP); /* Load defaults */ -- cgit v1.2.3