[epiphany/mcatanzaro/cflags] notebook: don't return -1 in a guint



commit bbaab167d6e2c2501ba6cbc26fbe6bf3f5c92974
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sat May 4 11:05:40 2019 -0500

    notebook: don't return -1 in a guint

 src/ephy-notebook.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 15c80f3d1..185ef48d4 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -466,7 +466,7 @@ show_tabs_changed_cb (GSettings    *settings,
   update_tabs_visibility (nb, FALSE);
 }
 
-static guint
+static gint
 get_last_pinned_tab_pos (GtkNotebook *notebook)
 {
   gint pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook));
@@ -489,10 +489,10 @@ page_reordered_cb (GtkNotebook *notebook,
                    guint        page_num,
                    gpointer     user_data)
 {
-  guint last_pinned_tab_pos = get_last_pinned_tab_pos (notebook);
+  gint last_pinned_tab_pos = get_last_pinned_tab_pos (notebook);
 
   /* Ensure that pinned tabs will always stay at the beginning of tab bar */
-  if (last_pinned_tab_pos != -1 && page_num <= last_pinned_tab_pos)
+  if (last_pinned_tab_pos != -1 && page_num <= (guint)last_pinned_tab_pos)
     gtk_notebook_reorder_child (notebook, child, last_pinned_tab_pos);
 }
 


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