diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-16 21:12:28 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-16 21:12:28 +0800 |
commit | 92be64204fc424a3b2756be253b985112dcedcf2 (patch) | |
tree | c55d8a1fe3be0dbda642966f623357dc09f13023 | |
parent | d041967019edda596ad98bd6d27e928dc2b7fd53 (diff) | |
parent | 8fd21279bc061f25da3cf74690d7cdb74844f6e3 (diff) | |
download | gsoc2013-empathy-92be64204fc424a3b2756be253b985112dcedcf2.tar gsoc2013-empathy-92be64204fc424a3b2756be253b985112dcedcf2.tar.gz gsoc2013-empathy-92be64204fc424a3b2756be253b985112dcedcf2.tar.bz2 gsoc2013-empathy-92be64204fc424a3b2756be253b985112dcedcf2.tar.lz gsoc2013-empathy-92be64204fc424a3b2756be253b985112dcedcf2.tar.xz gsoc2013-empathy-92be64204fc424a3b2756be253b985112dcedcf2.tar.zst gsoc2013-empathy-92be64204fc424a3b2756be253b985112dcedcf2.zip |
Merge remote branch 'vminko/fix-634688-v3'
-rw-r--r-- | libempathy-gtk/empathy-search-bar.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-search-bar.c b/libempathy-gtk/empathy-search-bar.c index 9a27795a2..51a79096a 100644 --- a/libempathy-gtk/empathy-search-bar.c +++ b/libempathy-gtk/empathy-search-bar.c @@ -58,6 +58,21 @@ empathy_search_bar_new (EmpathyChatView *view) } static void +empathy_search_bar_get_preferred_height (GtkWidget *widget, + gint *minimun_height, + gint *natural_height) +{ + GtkBin *bin; + GtkWidget *child; + + bin = GTK_BIN (widget); + child = gtk_bin_get_child (bin); + + if (child && gtk_widget_get_visible (child)) + gtk_widget_get_preferred_height (child, minimun_height, natural_height); +} + +static void empathy_search_bar_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { @@ -290,6 +305,7 @@ empathy_search_bar_class_init (EmpathySearchBarClass *class) g_type_class_add_private (gobject_class, sizeof (EmpathySearchBarPriv)); /* Neither GtkBin nor GtkContainer seems to do this for us :( */ + widget_class->get_preferred_height = empathy_search_bar_get_preferred_height; widget_class->size_allocate = empathy_search_bar_size_allocate; } |