[libgda] ui: Removing warnings



commit 66d0cf8f172fb7e259dd0abfad6c82be26d52393
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date:   Fri Feb 22 16:29:07 2019 -0600

    ui: Removing warnings

 libgda-ui/demos/main.c                     | 12 +++---------
 tools/browser/canvas/browser-canvas-text.c |  1 +
 tools/browser/canvas/browser-canvas.c      |  7 +++++--
 3 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/libgda-ui/demos/main.c b/libgda-ui/demos/main.c
index e5a7e6223..fc39a111a 100644
--- a/libgda-ui/demos/main.c
+++ b/libgda-ui/demos/main.c
@@ -509,16 +509,10 @@ load_file (const gchar *filename)
                                p++;
                        if (*p) {
                                p = buffer->str;
-                               state++;
-                               /* Fall through */
+                         /* Reading program body */
+                         gtk_text_buffer_insert (source_buffer, &start, p, -1);
+                         gtk_text_buffer_insert (source_buffer, &start, "\n", 1);
                        }
-                       else
-                               break;
-                       
-               case 3:
-                       /* Reading program body */
-                       gtk_text_buffer_insert (source_buffer, &start, p, -1);
-                       gtk_text_buffer_insert (source_buffer, &start, "\n", 1);
                        break;
                }
        }
diff --git a/tools/browser/canvas/browser-canvas-text.c b/tools/browser/canvas/browser-canvas-text.c
index e3724db16..58fc7cd1c 100644
--- a/tools/browser/canvas/browser-canvas-text.c
+++ b/tools/browser/canvas/browser-canvas-text.c
@@ -286,6 +286,7 @@ browser_canvas_text_set_property (GObject *object,
                                              "text", ct->priv->text,
                                              "use-markup", FALSE, NULL);
                }
+               break;
        case PROP_BOLD:
                bool = g_value_get_boolean (value);
                ct->priv->bold = bool;
diff --git a/tools/browser/canvas/browser-canvas.c b/tools/browser/canvas/browser-canvas.c
index a1e27e19c..a5119f7dc 100644
--- a/tools/browser/canvas/browser-canvas.c
+++ b/tools/browser/canvas/browser-canvas.c
@@ -276,8 +276,11 @@ motion_notify_event_cb (BrowserCanvas *canvas, GdkEvent *event, G_GNUC_UNUSED Go
                                canvas->xmouse = ((GdkEventMotion*) event)->x;
                                canvas->ymouse = ((GdkEventMotion*) event)->y;
                                canvas->priv->canvas_moving = TRUE;
-                               if (! hand_cursor)
-                                       hand_cursor = gdk_cursor_new (GDK_HAND2);
+                               if (! hand_cursor) {
+                                       hand_cursor = gdk_cursor_new_for_display (
+                        gtk_widget_get_display (GTK_WIDGET(canvas)),
+                        GDK_HAND2);
+                               }
                                gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (canvas)),
                                                       hand_cursor);
                        }


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