[evolution] Avoid vertical scrolling in the filtering rules editor dialog
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Avoid vertical scrolling in the filtering rules editor dialog
- Date: Tue, 23 Aug 2016 16:34:31 +0000 (UTC)
commit 46ca17e385d7edd1df1642b70b224e99c692736f
Author: Milan Crha <mcrha redhat com>
Date: Tue Aug 23 18:32:33 2016 +0200
Avoid vertical scrolling in the filtering rules editor dialog
It failed to work under GNOME Shell. This change makes it work again.
e-util/e-filter-rule.c | 4 ++++
mail/em-filter-rule.c | 18 +++++++++++++++---
2 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/e-util/e-filter-rule.c b/e-util/e-filter-rule.c
index af8b291..ef3e688 100644
--- a/e-util/e-filter-rule.c
+++ b/e-util/e-filter-rule.c
@@ -251,6 +251,9 @@ do_grab_focus_cb (GtkWidget *widget,
}
}
+static void parts_mapped_cb (GtkWidget *widget,
+ GtkScrolledWindow *scrolled_window);
+
static void
more_parts (GtkWidget *button,
FilterRuleData *data)
@@ -308,6 +311,7 @@ more_parts (GtkWidget *button,
gtk_adjustment_set_value (adjustment, upper);
}
+ parts_mapped_cb (NULL, GTK_SCROLLED_WINDOW (w));
}
}
}
diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c
index e13e1f9..cb80e1f 100644
--- a/mail/em-filter-rule.c
+++ b/mail/em-filter-rule.c
@@ -466,6 +466,8 @@ do_grab_focus_cb (GtkWidget *widget,
}
}
+static void ensure_scrolled_height (GtkScrolledWindow *scrolled_window);
+
static void
more_parts (GtkWidget *button,
struct _rule_data *data)
@@ -507,14 +509,14 @@ more_parts (GtkWidget *button,
upper = gtk_adjustment_get_upper (adjustment);
gtk_adjustment_set_value (adjustment, upper);
}
+
+ ensure_scrolled_height (GTK_SCROLLED_WINDOW (w));
}
}
}
static void
-ensure_scrolled_height_cb (GtkAdjustment *adj,
- GParamSpec *param_spec,
- GtkScrolledWindow *scrolled_window)
+ensure_scrolled_height (GtkScrolledWindow *scrolled_window)
{
GtkWidget *toplevel;
GdkScreen *screen;
@@ -564,6 +566,14 @@ ensure_scrolled_height_cb (GtkAdjustment *adj,
gtk_scrolled_window_set_min_content_height (scrolled_window, require_scw_height);
}
+static void
+ensure_scrolled_height_cb (GtkAdjustment *adj,
+ GParamSpec *param_spec,
+ GtkScrolledWindow *scrolled_window)
+{
+ ensure_scrolled_height (scrolled_window);
+}
+
static GtkWidget *
get_widget (EFilterRule *fr,
ERuleContext *rc)
@@ -663,6 +673,8 @@ get_widget (EFilterRule *fr,
vadj, "notify::upper",
G_CALLBACK (ensure_scrolled_height_cb), scrolledwindow);
+ g_signal_connect (scrolledwindow, "map", G_CALLBACK (ensure_scrolled_height), NULL);
+
gtk_widget_show_all (widget);
return widget;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]