diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-10-07 02:35:33 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-10-07 02:35:33 +0800 |
commit | 53f4785830a46b1cf0584eb20d3cf3bdfc858aa8 (patch) | |
tree | 10a5aaaf90c0597a12002a2481e85e3f9fba1e3c | |
parent | c3422e72c44eb2999de994b8151ec2db2e591631 (diff) | |
download | gsoc2013-epiphany-53f4785830a46b1cf0584eb20d3cf3bdfc858aa8.tar.gz gsoc2013-epiphany-53f4785830a46b1cf0584eb20d3cf3bdfc858aa8.tar.zst gsoc2013-epiphany-53f4785830a46b1cf0584eb20d3cf3bdfc858aa8.zip |
Use flags to save memory for the priv struct.
2005-10-06 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-toolbar.c: (ephy_toolbar_update_spinner),
(ephy_toolbar_set_show_leave_fullscreen),
(ephy_toolbar_set_security_state),
(ephy_toolbar_set_lock_visibility), (ephy_toolbar_set_spinning):
Use flags to save memory for the priv struct.
-rw-r--r-- | ChangeLog | 9 | ||||
-rwxr-xr-x | src/ephy-toolbar.c | 25 |
2 files changed, 22 insertions, 12 deletions
@@ -1,5 +1,14 @@ 2005-10-06 Christian Persch <chpe@cvs.gnome.org> + * src/ephy-toolbar.c: (ephy_toolbar_update_spinner), + (ephy_toolbar_set_show_leave_fullscreen), + (ephy_toolbar_set_security_state), + (ephy_toolbar_set_lock_visibility), (ephy_toolbar_set_spinning): + + Use flags to save memory for the priv struct. + +2005-10-06 Christian Persch <chpe@cvs.gnome.org> + * lib/widgets/ephy-location-entry.c: (ephy_location_entry_style_set), (ephy_location_entry_class_init), (ephy_location_entry_set_favicon), diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c index 1e6e8a0e1..b128d5163 100755 --- a/src/ephy-toolbar.c +++ b/src/ephy-toolbar.c @@ -76,12 +76,13 @@ struct _EphyToolbarPrivate GtkToolItem *sep_item; GtkToolItem *exit_button; gulong set_focus_handler; - gboolean updating_address; - gboolean show_lock; - gboolean is_secure; - gboolean lock_visible; - gboolean leave_fullscreen_visible; - gboolean spinning; + + guint updating_address : 1; + guint show_lock : 1; + guint is_secure : 1; + guint lock_visible : 1; + guint leave_fullscreen_visible : 1; + guint spinning : 1; }; static const GtkTargetEntry drag_targets [] = @@ -136,7 +137,7 @@ ephy_toolbar_update_spinner (EphyToolbar *toolbar) GtkWidget *widget = GTK_WIDGET (toolbar); EphyToolbarPrivate *priv = toolbar->priv; - if (priv->spinning && GTK_WIDGET_VISIBLE (widget)) + if (priv->spinning) { ephy_spinner_start (EPHY_SPINNER (priv->spinner)); } @@ -392,7 +393,7 @@ ephy_toolbar_set_show_leave_fullscreen (EphyToolbar *toolbar, { EphyToolbarPrivate *priv = toolbar->priv; - priv->leave_fullscreen_visible = show; + priv->leave_fullscreen_visible = show != FALSE; ephy_toolbar_update_fixed_visibility (toolbar); } @@ -479,8 +480,8 @@ ephy_toolbar_set_security_state (EphyToolbar *toolbar, { EphyToolbarPrivate *priv = toolbar->priv; - priv->show_lock = show_lock; - priv->is_secure = is_secure; + priv->show_lock = show_lock != FALSE; + priv->is_secure = is_secure != FALSE; g_object_set (priv->actions[LOCATION_ACTION], "lock-stock-id", stock_id, @@ -496,7 +497,7 @@ ephy_toolbar_set_lock_visibility (EphyToolbar *toolbar, { EphyToolbarPrivate *priv = toolbar->priv; - priv->lock_visible = visible; + priv->lock_visible = visible != FALSE; g_object_set (priv->actions[LOCATION_ACTION], "show-lock", priv->lock_visible && priv->show_lock, @@ -509,7 +510,7 @@ ephy_toolbar_set_spinning (EphyToolbar *toolbar, { EphyToolbarPrivate *priv = toolbar->priv; - priv->spinning = spinning; + priv->spinning = spinning != FALSE; ephy_toolbar_update_spinner (toolbar); } |