[gedit] Proxy the GtkScrollablePolicy to the main widget.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Proxy the GtkScrollablePolicy to the main widget.
- Date: Wed, 27 Oct 2010 08:59:14 +0000 (UTC)
commit 52e06007a7342b365307b0e721d04e48609b4eb3
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Oct 27 10:57:29 2010 +0200
Proxy the GtkScrollablePolicy to the main widget.
gedit/gedit-overlay.c | 44 ++++++++++++++++++++++++++++++++++++++------
1 files changed, 38 insertions(+), 6 deletions(-)
---
diff --git a/gedit/gedit-overlay.c b/gedit/gedit-overlay.c
index 238ee09..09e1cae 100644
--- a/gedit/gedit-overlay.c
+++ b/gedit/gedit-overlay.c
@@ -166,11 +166,27 @@ gedit_overlay_get_property (GObject *object,
break;
case PROP_HSCROLL_POLICY:
- g_value_set_enum (value, priv->hscroll_policy);
+ if (GTK_IS_SCROLLABLE (priv->main_widget))
+ {
+ g_value_set_enum (value,
+ gtk_scrollable_get_hscroll_policy (GTK_SCROLLABLE (priv->main_widget)));
+ }
+ else
+ {
+ g_value_set_enum (value, priv->hscroll_policy);
+ }
break;
case PROP_VSCROLL_POLICY:
- g_value_set_enum (value, priv->vscroll_policy);
+ if (GTK_IS_SCROLLABLE (priv->main_widget))
+ {
+ g_value_set_enum (value,
+ gtk_scrollable_get_vscroll_policy (GTK_SCROLLABLE (priv->main_widget)));
+ }
+ else
+ {
+ g_value_set_enum (value, priv->vscroll_policy);
+ }
break;
default:
@@ -209,13 +225,29 @@ gedit_overlay_set_property (GObject *object,
break;
case PROP_HSCROLL_POLICY:
- priv->hscroll_policy = g_value_get_enum (value);
- gtk_widget_queue_resize (GTK_WIDGET (overlay));
+ if (GTK_IS_SCROLLABLE (priv->main_widget))
+ {
+ gtk_scrollable_set_hscroll_policy (GTK_SCROLLABLE (priv->main_widget),
+ g_value_get_enum (value));
+ }
+ else
+ {
+ priv->hscroll_policy = g_value_get_enum (value);
+ gtk_widget_queue_resize (GTK_WIDGET (overlay));
+ }
break;
case PROP_VSCROLL_POLICY:
- priv->vscroll_policy = g_value_get_enum (value);
- gtk_widget_queue_resize (GTK_WIDGET (overlay));
+ if (GTK_IS_SCROLLABLE (priv->main_widget))
+ {
+ gtk_scrollable_set_vscroll_policy (GTK_SCROLLABLE (priv->main_widget),
+ g_value_get_enum (value));
+ }
+ else
+ {
+ priv->vscroll_policy = g_value_get_enum (value);
+ gtk_widget_queue_resize (GTK_WIDGET (overlay));
+ }
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]