aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-26 23:06:42 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-26 23:06:42 +0800
commit2e4b61c8058d7405812277b2ac88f37ae642cbf8 (patch)
treeca52c37e20c2fa3cff0f28ffb7fa80029886f339
parentf4052ebd5b307db9adf77f8e61a6badf39c4a7af (diff)
downloadgsoc2013-epiphany-2e4b61c8058d7405812277b2ac88f37ae642cbf8.tar
gsoc2013-epiphany-2e4b61c8058d7405812277b2ac88f37ae642cbf8.tar.gz
gsoc2013-epiphany-2e4b61c8058d7405812277b2ac88f37ae642cbf8.tar.bz2
gsoc2013-epiphany-2e4b61c8058d7405812277b2ac88f37ae642cbf8.tar.lz
gsoc2013-epiphany-2e4b61c8058d7405812277b2ac88f37ae642cbf8.tar.xz
gsoc2013-epiphany-2e4b61c8058d7405812277b2ac88f37ae642cbf8.tar.zst
gsoc2013-epiphany-2e4b61c8058d7405812277b2ac88f37ae642cbf8.zip
Don't show the Leave Fullscreen button in lockdown fullscreen mode. Switch
2005-01-26 Christian Persch <chpe@cvs.gnome.org> * src/ephy-fullscreen-popup.c: (ephy_fullscreen_popup_update_visibility), (ephy_fullscreen_popup_set_show_leave), (ephy_fullscreen_popup_init): * src/ephy-fullscreen-popup.h: * src/ephy-toolbar.c: (ephy_toolbar_update_fixed_visibility), (ephy_toolbar_set_show_leave_fullscreen): * src/ephy-toolbar.h: * src/ephy-window.c: (ephy_window_fullscreen), (ephy_window_unfullscreen): Don't show the Leave Fullscreen button in lockdown fullscreen mode. Switch to fullscreen toolbar also in lockdown fullscreen mode. Fixes bug #165256.
-rw-r--r--ChangeLog17
-rw-r--r--src/ephy-fullscreen-popup.c28
-rw-r--r--src/ephy-fullscreen-popup.h15
-rwxr-xr-xsrc/ephy-toolbar.c16
-rw-r--r--src/ephy-toolbar.h4
-rw-r--r--src/ephy-window.c23
6 files changed, 69 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index 687e1657b..420bcd6ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2005-01-26 Christian Persch <chpe@cvs.gnome.org>
+
+ * src/ephy-fullscreen-popup.c:
+ (ephy_fullscreen_popup_update_visibility),
+ (ephy_fullscreen_popup_set_show_leave),
+ (ephy_fullscreen_popup_init):
+ * src/ephy-fullscreen-popup.h:
+ * src/ephy-toolbar.c: (ephy_toolbar_update_fixed_visibility),
+ (ephy_toolbar_set_show_leave_fullscreen):
+ * src/ephy-toolbar.h:
+ * src/ephy-window.c: (ephy_window_fullscreen),
+ (ephy_window_unfullscreen):
+
+ Don't show the Leave Fullscreen button in lockdown fullscreen mode.
+ Switch to fullscreen toolbar also in lockdown fullscreen mode.
+ Fixes bug #165256.
+
2005-01-26 Piers Cornwell <piers@gnome.org>
* help/C/epiphany.xml:
diff --git a/src/ephy-fullscreen-popup.c b/src/ephy-fullscreen-popup.c
index bf6795cc0..b10a0496d 100644
--- a/src/ephy-fullscreen-popup.c
+++ b/src/ephy-fullscreen-popup.c
@@ -52,8 +52,9 @@ struct _EphyFullscreenPopupPrivate
GtkWidget *lock;
GtkWidget *lock_ebox;
GtkWidget *button;
- gboolean spinning;
- gboolean show_lock;
+ guint show_button : 1;
+ guint spinning : 1;
+ guint show_lock : 1;
};
enum
@@ -99,11 +100,14 @@ static void
ephy_fullscreen_popup_update_visibility (EphyFullscreenPopup *popup)
{
EphyFullscreenPopupPrivate *priv = popup->priv;
- gboolean show_frame;
+ gboolean show_frame, show_sep;
show_frame = priv->spinning || priv->show_lock;
+ show_sep = show_frame && priv->show_button;
- g_object_set (priv->sep, "visible", show_frame, NULL);
+ g_object_set (priv->button, "visible", priv->show_button,
+ "sensitive", priv->show_button, NULL);
+ g_object_set (priv->sep, "visible", show_sep, NULL);
g_object_set (priv->frame, "visible", show_frame, NULL);
g_object_set (priv->spinner, "visible", priv->spinning, NULL);
g_object_set (priv->lock_ebox, "visible", priv->show_lock, NULL);
@@ -171,6 +175,16 @@ ephy_fullscreen_popup_set_window (EphyFullscreenPopup *popup,
/* public functions */
void
+ephy_fullscreen_popup_set_show_leave (EphyFullscreenPopup *popup,
+ gboolean show_button)
+{
+ EphyFullscreenPopupPrivate *priv = popup->priv;
+
+ priv->show_button = show_button;
+ ephy_fullscreen_popup_update_visibility (popup);
+}
+
+void
ephy_fullscreen_popup_set_spinning (EphyFullscreenPopup *popup,
gboolean spinning)
{
@@ -201,7 +215,11 @@ ephy_fullscreen_popup_set_security_state (EphyFullscreenPopup *popup,
static void
ephy_fullscreen_popup_init (EphyFullscreenPopup *popup)
{
- popup->priv = EPHY_FULLSCREEN_POPUP_GET_PRIVATE (popup);
+ EphyFullscreenPopupPrivate *priv;
+
+ priv = popup->priv = EPHY_FULLSCREEN_POPUP_GET_PRIVATE (popup);
+
+ priv->show_button = TRUE;
}
static GObject *
diff --git a/src/ephy-fullscreen-popup.h b/src/ephy-fullscreen-popup.h
index 393d31efb..b3ad634e0 100644
--- a/src/ephy-fullscreen-popup.h
+++ b/src/ephy-fullscreen-popup.h
@@ -27,12 +27,12 @@
G_BEGIN_DECLS
-#define EPHY_TYPE_FULLSCREEN_POPUP (ephy_fullscreen_popup_get_type ())
-#define EPHY_FULLSCREEN_POPUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_FULLSCREEN_POPUP, EphyFullscreenPopup))
-#define EPHY_FULLSCREEN_POPUP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_FULLSCREEN_POPUP, EphyFullscreenPopupClass))
-#define EPHY_IS_FULLSCREEN_POPUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_FULLSCREEN_POPUP))
-#define EPHY_IS_FULLSCREEN_POPUP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_FULLSCREEN_POPUP))
-#define EPHY_FULLSCREEN_POPUP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_FULLSCREEN_POPUP, EphyFullscreenPopupClass))
+#define EPHY_TYPE_FULLSCREEN_POPUP (ephy_fullscreen_popup_get_type ())
+#define EPHY_FULLSCREEN_POPUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_FULLSCREEN_POPUP, EphyFullscreenPopup))
+#define EPHY_FULLSCREEN_POPUP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_FULLSCREEN_POPUP, EphyFullscreenPopupClass))
+#define EPHY_IS_FULLSCREEN_POPUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_FULLSCREEN_POPUP))
+#define EPHY_IS_FULLSCREEN_POPUP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_FULLSCREEN_POPUP))
+#define EPHY_FULLSCREEN_POPUP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_FULLSCREEN_POPUP, EphyFullscreenPopupClass))
typedef struct _EphyFullscreenPopup EphyFullscreenPopup;
typedef struct _EphyFullscreenPopupPrivate EphyFullscreenPopupPrivate;
@@ -58,6 +58,9 @@ GType ephy_fullscreen_popup_get_type (void);
GtkWidget *ephy_fullscreen_popup_new (EphyWindow *window);
+void ephy_fullscreen_popup_set_show_leave (EphyFullscreenPopup *popup,
+ gboolean show_button);
+
void ephy_fullscreen_popup_set_spinning (EphyFullscreenPopup *popup,
gboolean spinning);
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index 8ece4642a..a92b22a68 100755
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -75,7 +75,7 @@ struct _EphyToolbarPrivate
gulong set_focus_handler;
gboolean show_lock;
gboolean lock_visible;
- gboolean fullscreen;
+ gboolean leave_fullscreen_visible;
gboolean spinning;
};
@@ -119,10 +119,12 @@ static void
ephy_toolbar_update_fixed_visibility (EphyToolbar *toolbar)
{
EphyToolbarPrivate *priv = toolbar->priv;
+ gboolean show;
- g_object_set (priv->sep_item, "visible", priv->fullscreen, NULL);
- g_object_set (priv->exit_button, "visible", priv->fullscreen,
- "sensitive", priv->fullscreen, NULL);
+ show = priv->leave_fullscreen_visible;
+ g_object_set (priv->sep_item, "visible", show, NULL);
+ g_object_set (priv->exit_button, "visible", show,
+ "sensitive", show, NULL);
}
static void
@@ -412,12 +414,12 @@ ephy_toolbar_set_favicon (EphyToolbar *toolbar,
}
void
-ephy_toolbar_set_fullscreen_mode (EphyToolbar *toolbar,
- gboolean fullscreen)
+ephy_toolbar_set_show_leave_fullscreen (EphyToolbar *toolbar,
+ gboolean show)
{
EphyToolbarPrivate *priv = toolbar->priv;
- priv->fullscreen = fullscreen;
+ priv->leave_fullscreen_visible = show;
ephy_toolbar_update_fixed_visibility (toolbar);
}
diff --git a/src/ephy-toolbar.h b/src/ephy-toolbar.h
index a1dbd205f..a7b90a81d 100644
--- a/src/ephy-toolbar.h
+++ b/src/ephy-toolbar.h
@@ -67,8 +67,8 @@ EphyToolbar *ephy_toolbar_new (EphyWindow *window);
void ephy_toolbar_set_favicon (EphyToolbar *toolbar,
const char *icon);
-void ephy_toolbar_set_fullscreen_mode (EphyToolbar *toolbar,
- gboolean fullscreen);
+void ephy_toolbar_set_show_leave_fullscreen (EphyToolbar *toolbar,
+ gboolean show);
void ephy_toolbar_activate_location (EphyToolbar *t);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index bd97d29e2..9b58668db 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -561,18 +561,15 @@ ephy_window_fullscreen (EphyWindow *window)
{
GtkWidget *popup;
EphyTab *tab;
+ gboolean lockdown_fs;
window->priv->fullscreen_mode = TRUE;
- sync_chromes_visibility (window);
-
- if (eel_gconf_get_boolean (CONF_LOCKDOWN_FULLSCREEN))
- {
- /* no need to show "exit fullscreen" button */
- return;
- }
+ lockdown_fs = eel_gconf_get_boolean (CONF_LOCKDOWN_FULLSCREEN);
popup = ephy_fullscreen_popup_new (window);
+ ephy_fullscreen_popup_set_show_leave
+ (EPHY_FULLSCREEN_POPUP (popup), !lockdown_fs);
window->priv->fullscreen_popup = popup;
g_signal_connect_swapped (popup, "exit-clicked",
G_CALLBACK (exit_fullscreen_clicked_cb), window);
@@ -582,17 +579,15 @@ ephy_window_fullscreen (EphyWindow *window)
sync_tab_load_status (tab, NULL, window);
sync_tab_security (tab, NULL, window);
- if (get_toolbar_visibility (window) == FALSE)
- {
- gtk_widget_show (popup);
- }
-
egg_editable_toolbar_set_model
(EGG_EDITABLE_TOOLBAR (window->priv->toolbar),
EGG_TOOLBARS_MODEL (
ephy_shell_get_toolbars_model (ephy_shell, TRUE)));
- ephy_toolbar_set_fullscreen_mode (window->priv->toolbar, TRUE);
+ ephy_toolbar_set_show_leave_fullscreen (window->priv->toolbar,
+ !lockdown_fs);
+
+ sync_chromes_visibility (window);
}
static void
@@ -602,7 +597,7 @@ ephy_window_unfullscreen (EphyWindow *window)
destroy_fullscreen_popup (window);
- ephy_toolbar_set_fullscreen_mode (window->priv->toolbar, FALSE);
+ ephy_toolbar_set_show_leave_fullscreen (window->priv->toolbar, FALSE);
egg_editable_toolbar_set_model
(EGG_EDITABLE_TOOLBAR (window->priv->toolbar),