Port to GTK+3



Trivial patch to port sysprof to GTK+3. This patch assumes that the
previous one to port to GtkBuilder has been applied

-- 
Javier Jardón Cabezas
From 5ff115b58b48038368bc5f19d140bc20a1f1207b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Javier=20Jard=C3=B3n?= <jjardon gnome org>
Date: Mon, 26 Dec 2011 14:55:51 +0100
Subject: [PATCH] Port to GTK+3

---
 configure.ac   |    2 +-
 footreestore.c |    2 +-
 sysprof.c      |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0ea9af2..e7448f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,7 @@ KMICRO=`uname -r | cut -d"." -f 3 | cut -d"-" -f 1`
 # Pkgconfig dependencies
 
 core_dep="glib-2.0 >= 2.6.0"
-gui_dep="gtk+-2.0 > 2.16.0 gdk-pixbuf-2.0 pangoft2"
+gui_dep="gtk+-3.0 > 3.0.0 gdk-pixbuf-2.0 pangoft2"
 
 PKG_CHECK_MODULES(CORE_DEP, $core_dep, [], AC_MSG_ERROR([sysprof dependencies not satisfied]))
 
diff --git a/footreestore.c b/footreestore.c
index 110f89c..784de47 100644
--- a/footreestore.c
+++ b/footreestore.c
@@ -147,7 +147,7 @@ static void     foo_tree_store_move                    (FooTreeStore           *
 static inline void
 validate_tree (FooTreeStore *tree_store)
 {
-  if (gtk_debug_flags & GTK_DEBUG_TREE)
+  if (gtk_get_debug_flags() & GTK_DEBUG_TREE)
     {
       g_assert (G_NODE (tree_store->root)->parent == NULL);
 
diff --git a/sysprof.c b/sysprof.c
index ac567c2..6537475 100644
--- a/sysprof.c
+++ b/sysprof.c
@@ -263,7 +263,7 @@ set_busy (GtkWidget *widget,
     if (GTK_IS_TEXT_VIEW (widget))
 	window = gtk_text_view_get_window (GTK_TEXT_VIEW (widget), GTK_TEXT_WINDOW_TEXT);
     else
-	window = widget->window;
+	window = gtk_widget_get_window (widget);
 
     gdk_window_set_cursor (window, cursor);
 
@@ -1316,7 +1316,7 @@ set_sizes (GtkWindow *window,
     GtkWidget *widget = GTK_WIDGET (window);
 
     screen = gtk_widget_get_screen (widget);
-    monitor_num = gdk_screen_get_monitor_at_window (screen, widget->window);
+    monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget));
 
     gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
 
-- 
1.7.5.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]