diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-10-05 22:57:08 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-10-05 22:57:08 +0800 |
commit | 99b962d53d73d599f27730078bb58e96db26e68e (patch) | |
tree | a95c7707fdf9134efba2c9ce684f029bf4e86e95 | |
parent | 9ed9f586af97b79d53c216989d0c28e59a3d5a69 (diff) | |
download | gsoc2013-epiphany-99b962d53d73d599f27730078bb58e96db26e68e.tar gsoc2013-epiphany-99b962d53d73d599f27730078bb58e96db26e68e.tar.gz gsoc2013-epiphany-99b962d53d73d599f27730078bb58e96db26e68e.tar.bz2 gsoc2013-epiphany-99b962d53d73d599f27730078bb58e96db26e68e.tar.lz gsoc2013-epiphany-99b962d53d73d599f27730078bb58e96db26e68e.tar.xz gsoc2013-epiphany-99b962d53d73d599f27730078bb58e96db26e68e.tar.zst gsoc2013-epiphany-99b962d53d73d599f27730078bb58e96db26e68e.zip |
Don't size-allocate unmapped tabs, fixing slow resizes. Fixes bug #128191.
2004-10-05 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-tab.c: (ephy_tab_size_allocate), (ephy_tab_map),
(ephy_tab_class_init):
Don't size-allocate unmapped tabs, fixing slow resizes.
Fixes bug #128191.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/ephy-tab.c | 25 |
2 files changed, 31 insertions, 2 deletions
@@ -1,5 +1,13 @@ 2004-10-05 Christian Persch <chpe@cvs.gnome.org> + * src/ephy-tab.c: (ephy_tab_size_allocate), (ephy_tab_map), + (ephy_tab_class_init): + + Don't size-allocate unmapped tabs, fixing slow resizes. + Fixes bug #128191. + +2004-10-05 Christian Persch <chpe@cvs.gnome.org> + * lib/ephy-file-chooser.c: (ephy_file_chooser_constructor): * lib/ephy-gui.c: (ephy_gui_confirm_overwrite_file), (ephy_gui_is_middle_click), (ephy_gui_set_default_window_icon): diff --git a/src/ephy-tab.c b/src/ephy-tab.c index ac498ed7f..ad2bbd9ef 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -266,13 +266,33 @@ ephy_tab_size_allocate (GtkWidget *widget, widget->allocation = *allocation; child = GTK_BIN (widget)->child; + g_return_if_fail (child != NULL); - if (child && GTK_WIDGET_VISIBLE (child)) + /* only resize if we're mapped (which means we're drawable) */ + if (GTK_WIDGET_MAPPED (child)) { gtk_widget_size_allocate (child, allocation); } } +static void +ephy_tab_map (GtkWidget *widget) +{ + GtkWidget *child; + + g_return_if_fail (GTK_WIDGET_REALIZED (widget)); + + child = GTK_BIN (widget)->child; + g_return_if_fail (child != NULL); + + /* we do this since the window might have been resized while this + * tab wasn't mapped (i.e. was a non-active tab during the resize). + */ + gtk_widget_size_allocate (child, &widget->allocation); + + GTK_WIDGET_CLASS (parent_class)->map (widget); +} + static EphyWindow * ephy_tab_get_window (EphyTab *tab) { @@ -314,7 +334,8 @@ ephy_tab_class_init (EphyTabClass *class) object_class->set_property = ephy_tab_set_property; widget_class->size_allocate = ephy_tab_size_allocate; - + widget_class->map = ephy_tab_map; + g_object_class_install_property (object_class, PROP_ADDRESS, g_param_spec_string ("address", |