[Xfce4-commits] <ristretto:stephan/gtk3> Fix compile-errors

Stephan Arts noreply at xfce.org
Fri May 4 20:42:10 CEST 2012


Updating branch refs/heads/stephan/gtk3
         to 462b174969845e1940ce04c31d5ca01bb8b34cfe (commit)
       from 6f60607684500b87e9f62d638692d03f0a350def (commit)

commit 462b174969845e1940ce04c31d5ca01bb8b34cfe
Author: Stephan Arts <stephan at xfce.org>
Date:   Thu May 3 20:46:50 2012 +0200

    Fix compile-errors

 src/image_viewer.c    |   46 +++++++++++++++++++++++++++++++++++++++++++---
 src/main_window.c     |    8 ++++----
 src/monitor_chooser.c |    4 ++--
 3 files changed, 49 insertions(+), 9 deletions(-)

diff --git a/src/image_viewer.c b/src/image_viewer.c
index 1c87861..5d24328 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -56,7 +56,13 @@
 enum
 {
     PROP_0,
-    PROP_SHOW_CLOCK
+    PROP_SHOW_CLOCK,
+
+    /* For scrollable interface */
+    PROP_HADJUSTMENT,
+    PROP_VADJUSTMENT,
+    PROP_HSCROLL_POLICY,
+    PROP_VSCROLL_POLICY
 };
 
 typedef enum
@@ -444,6 +450,24 @@ rstto_image_viewer_class_init(RsttoImageViewerClass *viewer_class)
             G_OBJECT_CLASS(object_class),
             PROP_SHOW_CLOCK,
             pspec);
+
+    /* Scrollable interface properties */
+    g_object_class_override_property (
+            object_class,
+            PROP_HADJUSTMENT,
+            "hadjustment");
+    g_object_class_override_property (
+            object_class,
+            PROP_VADJUSTMENT,
+            "vadjustment");
+    g_object_class_override_property (
+            object_class,
+            PROP_HSCROLL_POLICY,
+            "hscroll-policy");
+    g_object_class_override_property (
+            object_class,
+            PROP_VSCROLL_POLICY,
+            "vscroll-policy");
 }
 
 /**
@@ -573,7 +597,7 @@ rstto_image_viewer_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
     gtk_widget_set_allocation (widget, allocation);
     GdkWindow *window = gtk_widget_get_window (widget);
 
-    if (GTK_WIDGET_REALIZED (widget))
+    if (gtk_widget_get_realized (widget))
     {
         gdk_window_move_resize (window,
             allocation->x + border_width,
@@ -1498,7 +1522,7 @@ rstto_image_viewer_paint (GtkWidget *widget, cairo_t *ctx)
     gdouble alloc_width = (gdouble)gtk_widget_get_allocated_width (widget);
     gdouble alloc_height = (gdouble)gtk_widget_get_allocated_height (widget);
     
-    if(GTK_WIDGET_REALIZED(widget))
+    if(gtk_widget_get_realized(widget))
     {
 
         correct_adjustments (viewer);
@@ -2953,6 +2977,14 @@ rstto_image_viewer_set_property (
         case PROP_SHOW_CLOCK:
             viewer->priv->props.show_clock = g_value_get_boolean (value);
             break;
+        case PROP_HADJUSTMENT:
+          break;
+        case PROP_VADJUSTMENT:
+          break;
+        case PROP_HSCROLL_POLICY:
+          break;
+        case PROP_VSCROLL_POLICY:
+          break;
     }
 }
 
@@ -2970,6 +3002,14 @@ rstto_image_viewer_get_property (
         case PROP_SHOW_CLOCK:
             g_value_set_boolean (value, viewer->priv->props.show_clock);
             break;
+        case PROP_HADJUSTMENT:
+          break;
+        case PROP_VADJUSTMENT:
+          break;
+        case PROP_HSCROLL_POLICY:
+          break;
+        case PROP_VSCROLL_POLICY:
+          break;
     }
 }
 
diff --git a/src/main_window.c b/src/main_window.c
index ac1955f..d95ec72 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -1498,7 +1498,7 @@ rstto_main_window_update_buttons (RsttoMainWindow *main_window)
     switch (rstto_image_list_get_n_images (main_window->priv->image_list))
     {
         case 0: 
-            if ( GTK_WIDGET_VISIBLE (main_window) )
+            if ( gtk_widget_get_visible (GTK_WIDGET (main_window)) )
             {
                 if ( 0 != (gdk_window_get_state (window) & GDK_WINDOW_STATE_FULLSCREEN ))
                 {
@@ -1809,7 +1809,7 @@ rstto_main_window_update_buttons (RsttoMainWindow *main_window)
                 FALSE);
     }
 
-    if ( GTK_WIDGET_VISIBLE (window) )
+    if ( gtk_widget_get_visible (GTK_WIDGET (main_window)) )
     {
         gtk_ui_manager_remove_ui (
             main_window->priv->ui_manager,
@@ -1853,7 +1853,7 @@ rstto_window_save_geometry_timer (gpointer user_data)
     gint width = 0;
     gint height = 0;
     /* check if the window is still visible */
-    if (GTK_WIDGET_VISIBLE (widget))
+    if ( gtk_widget_get_visible (widget))
     {
         /* determine the current state of the window */
         gint state = gdk_window_get_state (window);
@@ -2654,7 +2654,7 @@ cb_rstto_main_window_configure_event (
         window->priv->window_save_geometry_timer_id = 0;
 
         /* check if we should schedule another save timer */
-        if (GTK_WIDGET_VISIBLE (widget))
+        if ( gtk_widget_get_visible (widget))
         {
             /* save the geometry one second after the last configure event */
             window->priv->window_save_geometry_timer_id = g_timeout_add (
diff --git a/src/monitor_chooser.c b/src/monitor_chooser.c
index e7aaef7..cdc6f95 100644
--- a/src/monitor_chooser.c
+++ b/src/monitor_chooser.c
@@ -262,7 +262,7 @@ rstto_monitor_chooser_size_allocate(GtkWidget *widget, GtkAllocation *allocation
     GdkWindow *window = gtk_widget_get_window (widget);
     gtk_widget_set_allocation (widget, allocation);
 
-    if (GTK_WIDGET_REALIZED (widget))
+    if (gtk_widget_get_realized (widget))
     {
         gdk_window_move_resize (window,
             allocation->x,
@@ -762,7 +762,7 @@ rstto_monitor_chooser_set_image_surface (
 
         retval = monitor_id;
     }
-    if (GTK_WIDGET_REALIZED (GTK_WIDGET(chooser)))
+    if ( gtk_widget_get_realized (GTK_WIDGET(chooser)))
     {
         gdk_window_invalidate_rect (
                 window,


More information about the Xfce4-commits mailing list