[gnome-terminal] Use GtkScrollable on gtk3
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] Use GtkScrollable on gtk3
- Date: Thu, 28 Oct 2010 20:34:20 +0000 (UTC)
commit a90840b3cf92b4a44eac3c8bd2f5bc0ca4d2460e
Author: Christian Persch <chpe gnome org>
Date: Sun Oct 24 20:18:42 2010 +0200
Use GtkScrollable on gtk3
src/terminal-screen-container.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-screen-container.c b/src/terminal-screen-container.c
index b69f85a..2781b59 100644
--- a/src/terminal-screen-container.c
+++ b/src/terminal-screen-container.c
@@ -142,7 +142,12 @@ terminal_screen_container_constructor (GType type,
g_assert (priv->screen != NULL);
#ifdef USE_SCROLLED_WINDOW
+#if GTK_CHECK_VERSION (2, 91, 2)
+ priv->scrolled_window = gtk_scrolled_window_new (gtk_scrollable_get_hadjustment(GTK_SCROLLABLE(priv->screen)),
+ gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(priv->screen)));
+#else
priv->scrolled_window = gtk_scrolled_window_new (NULL, vte_terminal_get_adjustment (VTE_TERMINAL (priv->screen)));
+#endif
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scrolled_window),
priv->hscrollbar_policy,
@@ -162,7 +167,11 @@ terminal_screen_container_constructor (GType type,
priv->hbox = gtk_hbox_new (FALSE, 0);
+#if GTK_CHECK_VERSION (2, 91, 2)
+ priv->vscrollbar = gtk_vscrollbar_new (gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(priv->screen)));
+#else
priv->vscrollbar = gtk_vscrollbar_new (vte_terminal_get_adjustment (VTE_TERMINAL (priv->screen)));
+#endif
gtk_box_pack_start (GTK_BOX (priv->hbox), GTK_WIDGET (priv->screen), TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (priv->hbox), priv->vscrollbar, FALSE, FALSE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]