[Xfce4-commits] <midori:master> Always render icon only tabs at their natural size
Christian Dywan
noreply at xfce.org
Mon Apr 4 00:00:01 CEST 2011
Updating branch refs/heads/master
to 493936adcb014b28d598db00aea862b34aff2e42 (commit)
from 706fc6d063b2e988b0b8988efd49a39775013a95 (commit)
commit 493936adcb014b28d598db00aea862b34aff2e42
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Apr 3 23:59:29 2011 +0200
Always render icon only tabs at their natural size
midori/midori-browser.c | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index f812335..8fb85fb 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2007-2010 Christian Dywan <christian at twotoasts.de>
+ Copyright (C) 2007-2011 Christian Dywan <christian at twotoasts.de>
Copyright (C) 2008 Dale Whittaker <dayul at users.sf.net>
Copyright (C) 2009 Jérôme Geulfucci <jeromeg at xfce.org>
@@ -224,6 +224,9 @@ midori_browser_add_speed_dial (MidoriBrowser* browser);
gboolean
midori_transferbar_confirm_delete (MidoriTransferbar* transferbar);
+static void
+_midori_browser_update_notebook (MidoriBrowser* browser);
+
#if WEBKIT_CHECK_VERSION (1, 1, 3)
void
midori_transferbar_add_download_item (MidoriTransferbar* transferbar,
@@ -625,6 +628,21 @@ midori_view_notify_title_cb (GtkWidget* widget,
}
static void
+midori_view_notify_minimized_cb (GtkWidget* widget,
+ GParamSpec* pspec,
+ MidoriBrowser* browser)
+{
+ if (katze_object_get_boolean (widget, "minimized"))
+ {
+ GtkNotebook* notebook = GTK_NOTEBOOK (browser->notebook);
+ GtkWidget* label = gtk_notebook_get_tab_label (notebook, widget);
+ gtk_widget_set_size_request (label, -1, -1);
+ }
+ else
+ _midori_browser_update_notebook (browser);
+}
+
+static void
midori_view_notify_zoom_level_cb (GtkWidget* view,
GParamSpec* pspec,
MidoriBrowser* browser)
@@ -1484,7 +1502,8 @@ _midori_browser_update_notebook (MidoriBrowser* browser)
view = gtk_notebook_get_nth_page (GTK_NOTEBOOK(browser->notebook), i);
label = gtk_notebook_get_tab_label (GTK_NOTEBOOK(browser->notebook), view);
/* Don't resize empty bin, which is used for thumbnail tabs */
- if (GTK_IS_BIN (label) && gtk_bin_get_child (GTK_BIN (label)))
+ if (GTK_IS_BIN (label) && gtk_bin_get_child (GTK_BIN (label))
+ && !katze_object_get_boolean (view, "minimized"))
gtk_widget_set_size_request (label, new_size, -1);
}
}
@@ -1517,6 +1536,8 @@ _midori_browser_add_tab (MidoriBrowser* browser,
midori_view_notify_uri_cb, browser,
"signal::notify::title",
midori_view_notify_title_cb, browser,
+ "signal::notify::minimized",
+ midori_view_notify_minimized_cb, browser,
"signal::notify::zoom-level",
midori_view_notify_zoom_level_cb, browser,
"signal::notify::statusbar-text",
More information about the Xfce4-commits
mailing list