aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-commands.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-01-22 04:27:35 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-01-22 04:27:35 +0800
commite2eae63203dae33b0b72ed369d879be2c9179a26 (patch)
tree2320f4cc06be6e9644a55b03c6fc5191cf727314 /src/window-commands.c
parente9f5eff3e812dab2c9f8aaddf13c7540f309a5ee (diff)
downloadgsoc2013-epiphany-e2eae63203dae33b0b72ed369d879be2c9179a26.tar
gsoc2013-epiphany-e2eae63203dae33b0b72ed369d879be2c9179a26.tar.gz
gsoc2013-epiphany-e2eae63203dae33b0b72ed369d879be2c9179a26.tar.bz2
gsoc2013-epiphany-e2eae63203dae33b0b72ed369d879be2c9179a26.tar.lz
gsoc2013-epiphany-e2eae63203dae33b0b72ed369d879be2c9179a26.tar.xz
gsoc2013-epiphany-e2eae63203dae33b0b72ed369d879be2c9179a26.tar.zst
gsoc2013-epiphany-e2eae63203dae33b0b72ed369d879be2c9179a26.zip
Fix chromes
2003-01-21 Marco Pesenti Gritti <marco@it.gnome.org> * data/ui/epiphany-ui.xml.in: * lib/egg/egg-menu-merge.c: (do_updates): * src/ephy-spinner-action.c: (create_tool_item): * src/ephy-window.c: (add_widget), (ephy_window_init), (ephy_window_finalize), (update_layout_toggles), (ephy_window_set_chrome): * src/toolbar.c: (toolbar_set_window), (toolbar_new): * src/toolbar.h: * src/window-commands.c: (window_cmd_view_toolbar), (window_cmd_view_statusbar), (window_cmd_view_fullscreen): * src/window-commands.h: Fix chromes
Diffstat (limited to 'src/window-commands.c')
-rw-r--r--src/window-commands.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/window-commands.c b/src/window-commands.c
index ece083b35..a8957a0ed 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -28,6 +28,7 @@
#include "pdm-dialog.h"
#include "ephy-bookmarks-editor.h"
#include "ephy-new-bookmark.h"
+#include "egg-toggle-action.h"
#include <string.h>
#include <libgnomevfs/gnome-vfs-uri.h>
@@ -494,15 +495,61 @@ window_cmd_edit_find_prev (EggAction *action,
}
void
+window_cmd_view_toolbar (EggAction *action,
+ EphyWindow *window)
+{
+ EmbedChromeMask mask;
+ gboolean active;
+ gboolean current_state;
+
+ mask = ephy_window_get_chrome (window);
+ active = EGG_TOGGLE_ACTION (action)->active;
+ current_state = (mask & EMBED_CHROME_TOOLBARON) > 0;
+
+ if (active != current_state)
+ {
+ mask ^= EMBED_CHROME_TOOLBARON;
+ ephy_window_set_chrome (window, mask);
+ }
+}
+
+void
window_cmd_view_statusbar (EggAction *action,
EphyWindow *window)
{
+ EmbedChromeMask mask;
+ gboolean active;
+ gboolean current_state;
+
+ mask = ephy_window_get_chrome (window);
+ active = EGG_TOGGLE_ACTION (action)->active;
+ current_state = (mask & EMBED_CHROME_STATUSBARON) > 0;
+
+ if (active != current_state)
+ {
+ mask ^= EMBED_CHROME_STATUSBARON;
+ ephy_window_set_chrome (window, mask);
+ }
}
void
window_cmd_view_fullscreen (EggAction *action,
EphyWindow *window)
{
+ EmbedChromeMask mask;
+ gboolean active;
+ gboolean current_state;
+
+ mask = ephy_window_get_chrome (window);
+ active = EGG_TOGGLE_ACTION (action)->active;
+ current_state = (mask & EMBED_CHROME_OPENASFULLSCREEN) > 0;
+
+ if (active != current_state)
+ {
+ mask ^= EMBED_CHROME_OPENASFULLSCREEN;
+ mask |= EMBED_CHROME_DEFAULT;
+ ephy_window_set_chrome (window, mask);
+ }
}
void