diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2004-03-19 04:22:25 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2004-03-19 04:22:25 +0800 |
commit | 40f9870ee0b060e7fdbfff104343d4c2f0eb4ac2 (patch) | |
tree | 17b9b8fd132e01e1ff62590bdefa4d057ab92b69 /embed/mozilla/mozilla-embed.cpp | |
parent | fb9bc516d855e7422d6e6e3b5b93baf5238a0b38 (diff) | |
download | gsoc2013-epiphany-40f9870ee0b060e7fdbfff104343d4c2f0eb4ac2.tar gsoc2013-epiphany-40f9870ee0b060e7fdbfff104343d4c2f0eb4ac2.tar.gz gsoc2013-epiphany-40f9870ee0b060e7fdbfff104343d4c2f0eb4ac2.tar.bz2 gsoc2013-epiphany-40f9870ee0b060e7fdbfff104343d4c2f0eb4ac2.tar.lz gsoc2013-epiphany-40f9870ee0b060e7fdbfff104343d4c2f0eb4ac2.tar.xz gsoc2013-epiphany-40f9870ee0b060e7fdbfff104343d4c2f0eb4ac2.tar.zst gsoc2013-epiphany-40f9870ee0b060e7fdbfff104343d4c2f0eb4ac2.zip |
Cleanups chromes code and register a type for the enum.
2004-03-16 Marco Pesenti Gritti <marco@gnome.org>
* embed/ephy-embed.c: (ephy_embed_chrome_get_type):
* embed/ephy-embed.h:
* embed/mozilla/Makefile.am:
* embed/mozilla/mozilla-embed.cpp:
Cleanups chromes code and register a type for the enum.
* src/ephy-nautilus-view.c: (gnv_embed_new_window_cb):
Adapt to the api changes
* src/ephy-tab.c: (ephy_tab_new_window_cb):
Move js chrome lockdown pref check here.
* src/ephy-window.c: (get_chromes_visibility),
(sync_chromes_visibility), (ephy_window_fullscreen),
(ephy_window_unfullscreen), (update_chromes_actions),
(update_actions_sensitivity), (show_embed_popup),
(get_default_chrome), (ephy_window_set_property),
(ephy_window_class_init), (actions_notifier),
(navigation_notifier), (ephy_window_init), (ephy_window_finalize),
(ephy_window_new_with_chrome), (ephy_window_set_print_preview),
(ephy_window_show), (sync_prefs_with_chrome),
(sync_chrome_with_view_toggle), (ephy_window_view_statusbar_cb),
(ephy_window_view_toolbar_cb), (ephy_window_view_bookmarksbar_cb):
Rework chrome handling so that it's not applied to all windows.
Changes are now saved on the fly like for window size.
* src/ephy-window.h:
Use a construct property instead of a _set for chrome.
* src/window-commands.c:
* src/window-commands.h:
Move chromes actions to EphyWindow so we dont need to expose
chrome handling.
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r-- | embed/mozilla/mozilla-embed.cpp | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index b37e56cd2..70a17bbb6 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -983,45 +983,41 @@ mozilla_embed_dom_mouse_down_cb (GtkMozEmbed *embed, gpointer dom_event, static void mozilla_embed_new_window_cb (GtkMozEmbed *embed, GtkMozEmbed **newEmbed, - guint chromemask, + guint chrome_mask, MozillaEmbed *membed) { - int i; - EmbedChromeMask mask = EMBED_CHROME_OPENASPOPUP; + guint i; + guint mask = 0; EphyEmbed *new_embed = NULL; struct { - guint chromemask; - EmbedChromeMask embed_mask; + guint mozilla_mask; + guint embed_mask; } conversion_map [] = { - { GTK_MOZ_EMBED_FLAG_DEFAULTCHROME, EMBED_CHROME_DEFAULT }, - { GTK_MOZ_EMBED_FLAG_MENUBARON, EMBED_CHROME_MENUBARON }, - { GTK_MOZ_EMBED_FLAG_TOOLBARON, EMBED_CHROME_TOOLBARON }, - { GTK_MOZ_EMBED_FLAG_PERSONALTOOLBARON, EMBED_CHROME_BOOKMARKSBAR_DEFAULT }, - { GTK_MOZ_EMBED_FLAG_STATUSBARON, EMBED_CHROME_STATUSBARON }, - { GTK_MOZ_EMBED_FLAG_WINDOWRAISED, EMBED_CHROME_WINDOWRAISED }, - { GTK_MOZ_EMBED_FLAG_WINDOWLOWERED, EMBED_CHROME_WINDOWLOWERED }, - { GTK_MOZ_EMBED_FLAG_CENTERSCREEN, EMBED_CHROME_CENTERSCREEN }, - { 0, EMBED_CHROME_NONE } + { GTK_MOZ_EMBED_FLAG_DEFAULTCHROME, EPHY_EMBED_CHROME_DEFAULT }, + { GTK_MOZ_EMBED_FLAG_MENUBARON, EPHY_EMBED_CHROME_MENUBAR }, + { GTK_MOZ_EMBED_FLAG_TOOLBARON, EPHY_EMBED_CHROME_TOOLBAR }, + { GTK_MOZ_EMBED_FLAG_STATUSBARON, EPHY_EMBED_CHROME_STATUSBAR }, + { 0, 0 } }; - if (chromemask & GTK_MOZ_EMBED_FLAG_OPENASCHROME) + if (chrome_mask & GTK_MOZ_EMBED_FLAG_OPENASCHROME) { *newEmbed = _mozilla_embed_new_xul_dialog (); return; } - for (i = 0; conversion_map[i].chromemask != 0; i++) + for (i = 0; conversion_map[i].mozilla_mask != 0; i++) { - if (chromemask & conversion_map[i].chromemask) + if (chrome_mask & conversion_map[i].mozilla_mask) { - mask = (EmbedChromeMask) (mask | conversion_map[i].embed_mask); + mask |= conversion_map[i].embed_mask; } } - + g_signal_emit_by_name (membed, "ge_new_window", &new_embed, mask); g_assert (new_embed != NULL); |