diff options
author | Milan Crha <mcrha@redhat.com> | 2012-01-03 01:52:07 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-01-03 01:52:07 +0800 |
commit | e53a866afa08085048db5940a3b3175ed52c4f93 (patch) | |
tree | 5a0d1f54be220aae3df98a10da9a81845baa7345 | |
parent | 4dc5558f19f96858ec2a97d82b23b6401ed74a0b (diff) | |
download | gsoc2013-evolution-e53a866afa08085048db5940a3b3175ed52c4f93.tar gsoc2013-evolution-e53a866afa08085048db5940a3b3175ed52c4f93.tar.gz gsoc2013-evolution-e53a866afa08085048db5940a3b3175ed52c4f93.tar.bz2 gsoc2013-evolution-e53a866afa08085048db5940a3b3175ed52c4f93.tar.lz gsoc2013-evolution-e53a866afa08085048db5940a3b3175ed52c4f93.tar.xz gsoc2013-evolution-e53a866afa08085048db5940a3b3175ed52c4f93.tar.zst gsoc2013-evolution-e53a866afa08085048db5940a3b3175ed52c4f93.zip |
Bug #661885 - Disable horizontal scrolling in filter rule editor
-rw-r--r-- | filter/e-filter-rule.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c index f40f3b3d07..09172f89c7 100644 --- a/filter/e-filter-rule.c +++ b/filter/e-filter-rule.c @@ -644,6 +644,15 @@ filter_rule_copy (EFilterRule *dest, } } +static void +ensure_scrolled_width_cb (GtkAdjustment *adj, + GParamSpec *param_spec, + GtkScrolledWindow *scrolled_window) +{ + gtk_scrolled_window_set_min_content_width (scrolled_window, + gtk_adjustment_get_upper (adj)); +} + static GtkWidget * filter_rule_get_widget (EFilterRule *rule, ERuleContext *context) @@ -816,9 +825,11 @@ filter_rule_get_widget (EFilterRule *rule, vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0)); scrolledwindow = gtk_scrolled_window_new (hadj, vadj); + g_signal_connect (hadj, "notify::upper", G_CALLBACK (ensure_scrolled_width_cb), scrolledwindow); + gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW (scrolledwindow), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport ( GTK_SCROLLED_WINDOW (scrolledwindow), parts); |