[gnome-control-center/wip/iainl/language-chooser-always-scroll: 10/10] Show scrollbar on first Language window if needed
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/iainl/language-chooser-always-scroll: 10/10] Show scrollbar on first Language window if needed
- Date: Mon, 19 Mar 2018 12:58:28 +0000 (UTC)
commit 5b3e1bd7df0bf008e0ae2194517f9abd9732e070
Author: Gunnar Hjalmarsson <gunnarhj ubuntu com>
Date: Mon Feb 26 21:20:30 2018 +0100
Show scrollbar on first Language window if needed
If we are initially showing more languages than can be fit, we should
scroll then too.
https://bugzilla.gnome.org/show_bug.cgi?id=793861
panels/common/cc-language-chooser.c | 8 --------
panels/common/language-chooser.ui | 3 ++-
2 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/panels/common/cc-language-chooser.c b/panels/common/cc-language-chooser.c
index 961df5a0a..678c557bb 100644
--- a/panels/common/cc-language-chooser.c
+++ b/panels/common/cc-language-chooser.c
@@ -42,7 +42,6 @@ typedef struct {
GtkListBoxRow *more_item;
GtkWidget *filter_entry;
GtkWidget *language_list;
- GtkWidget *scrolledwindow;
gboolean showing_extra;
gchar *language;
gchar **filter_words;
@@ -288,18 +287,12 @@ static void
show_more (GtkDialog *chooser, gboolean visible)
{
CcLanguageChooserPrivate *priv = GET_PRIVATE (chooser);
- GtkWidget *widget;
gint width, height;
gtk_window_get_size (GTK_WINDOW (chooser), &width, &height);
gtk_widget_set_size_request (GTK_WIDGET (chooser), width, height);
gtk_window_set_resizable (GTK_WINDOW (chooser), TRUE);
- widget = priv->scrolledwindow;
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (widget),
- GTK_POLICY_NEVER,
- visible ? GTK_POLICY_AUTOMATIC : GTK_POLICY_NEVER);
-
gtk_widget_set_visible (priv->filter_entry, visible);
gtk_widget_grab_focus (visible ? priv->filter_entry : priv->language_list);
@@ -427,7 +420,6 @@ cc_language_chooser_new (GtkWidget *parent)
priv->done_button = WID ("ok-button");
priv->filter_entry = WID ("language-filter-entry");
priv->language_list = WID ("language-list");
- priv->scrolledwindow = WID ("language-scrolledwindow");
priv->more_item = more_widget_new ();
/* We ref-sink here so we can reuse this widget multiple times */
priv->no_results = g_object_ref_sink (no_results_widget_new ());
diff --git a/panels/common/language-chooser.ui b/panels/common/language-chooser.ui
index c8228bbd9..8077e1487 100644
--- a/panels/common/language-chooser.ui
+++ b/panels/common/language-chooser.ui
@@ -36,7 +36,8 @@
<object class="GtkScrolledWindow" id="language-scrolledwindow">
<property name="visible">True</property>
<property name="hscrollbar-policy">never</property>
- <property name="vscrollbar-policy">never</property>
+ <property name="vscrollbar-policy">automatic</property>
+ <property name="propagate-natural-height">True</property>
<property name="shadow-type">in</property>
<property name="margin-start">6</property>
<property name="margin-end">6</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]