]> Pileus Git - ~andy/gtk/commitdiff
Drop pack consideration from gtk_notebook_search_page
authorMatthias Clasen <mclasen@redhat.com>
Tue, 4 Jan 2011 06:39:18 +0000 (01:39 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 4 Jan 2011 06:39:18 +0000 (01:39 -0500)
gtk/gtknotebook.c

index d96bad1194ab23813bb8a4232c64592e7e14d81e..680e46b167f7c6f57573397ddf2cf0542cc309c0 100644 (file)
@@ -4897,23 +4897,11 @@ gtk_notebook_search_page (GtkNotebook *notebook,
   GtkNotebookPrivate *priv = notebook->priv;
   GtkNotebookPage *page = NULL;
   GList *old_list = NULL;
-  gint flag = 0;
-
-  switch (direction)
-    {
-    case STEP_PREV:
-      flag = GTK_PACK_END;
-      break;
-
-    case STEP_NEXT:
-      flag = GTK_PACK_START;
-      break;
-    }
 
   if (list)
     page = list->data;
 
-  if (!page || page->pack == flag)
+  if (!page || direction == STEP_NEXT)
     {
       if (list)
        {
@@ -4926,7 +4914,7 @@ gtk_notebook_search_page (GtkNotebook *notebook,
       while (list)
        {
          page = list->data;
-         if (page->pack == flag &&
+         if (direction == STEP_NEXT &&
              (!find_visible ||
               (gtk_widget_get_visible (page->child) &&
                (!page->tab_label || NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page)))))
@@ -4944,7 +4932,7 @@ gtk_notebook_search_page (GtkNotebook *notebook,
   while (list)
     {
       page = list->data;
-      if (page->pack != flag &&
+      if (direction == STEP_PREV &&
          (!find_visible ||
           (gtk_widget_get_visible (page->child) &&
            (!page->tab_label || NOTEBOOK_IS_TAB_LABEL_PARENT (notebook, page)))))