[mdz@ubuntu.com: Re: dapper-updates: gtk+2.0 notebook tabs fix]

Matt Zimmerman mdz at ubuntu.com
Tue Jun 27 19:39:27 BST 2006


----- Forwarded message from Matt Zimmerman <mdz at ubuntu.com> -----

Date: Fri, 23 Jun 2006 02:27:33 -0700
From: Matt Zimmerman <mdz at ubuntu.com>
To: Sebastian Dr?ge <slomo at circular-chaos.org>
Cc: Scott James Remnant <scott at canonical.com>
Subject: Re: dapper-updates: gtk+2.0 notebook tabs fix

On Fri, Jun 23, 2006 at 11:19:17AM +0200, Sebastian Dr?ge wrote:
> are you fine with the attached debdiff to be uploaded to dapper-updates?
> It fixes a problem that was introduced with 2.8.18-0ubuntu1 in
> dapper-updates (bug #50104) and the patch is taken from gnome cvs[0].

OK for dapper-updates, thanks.

> diff -u gtk+2.0-2.8.18/debian/changelog gtk+2.0-2.8.18/debian/changelog
> --- gtk+2.0-2.8.18/debian/changelog
> +++ gtk+2.0-2.8.18/debian/changelog
> @@ -1,3 +1,11 @@
> +gtk+2.0 (2.8.18-0ubuntu2) dapper-updates; urgency=low
> +
> +  * debian/patches/010_gtknotebook-out-of-window.patch:
> +    - Patch from upstream CVS to fix tabs of GtkNotebook to go out of window
> +      in various applications (Ubuntu: #50104)
> +
> + -- Sebastian Dr??ge <slomo at ubuntu.com>  Thu, 22 Jun 2006 19:23:41 +0200
> +
>  gtk+2.0 (2.8.18-0ubuntu1) dapper-updates; urgency=low
>  
>    * New upstream version:
> only in patch2:
> unchanged:
> --- gtk+2.0-2.8.18.orig/debian/patches/010_gtknotebook-out-of-window.patch
> +++ gtk+2.0-2.8.18/debian/patches/010_gtknotebook-out-of-window.patch
> @@ -0,0 +1,112 @@
> +diff -u -r1.186.2.5 -r1.186.2.6
> +--- gtk+-2.8.13/gtk/gtknotebook.c	2006/05/19 15:50:36	1.186.2.5
> ++++ gtk+-2.8.13/gtk/gtknotebook.c	2006/06/15 18:59:21	1.186.2.6
> +@@ -3342,9 +3342,7 @@
> + 					&(notebook->first_tab), &tab_space,
> + 					STEP_PREV);
> + 
> +-	      page = focus_tab->data;
> +-	      if (tab_space <= 0 &&
> +-		  !gtk_widget_get_child_visible (page->tab_label))
> ++	      if (tab_space < 0)
> + 		{
> + 		  notebook->first_tab =
> + 		    gtk_notebook_search_page (notebook, notebook->first_tab,
> +@@ -3382,10 +3380,14 @@
> + 						   STEP_PREV,
> + 						   TRUE),
> + 			 &children, &tab_space, STEP_PREV);
> +-		      notebook->first_tab = gtk_notebook_search_page(notebook,
> +-								     children,
> +-								     STEP_NEXT,
> +-								     TRUE);
> ++
> ++		      if (tab_space == 0)
> ++			notebook->first_tab = children;
> ++		      else
> ++			notebook->first_tab = gtk_notebook_search_page(notebook,
> ++								       children,
> ++								       STEP_NEXT,
> ++								       TRUE);
> + 		    }
> + 		}
> + 	    }
> +@@ -3742,8 +3744,10 @@
> +   GtkNotebookPage *page = NULL;
> +   GList *children;
> +   GList *last_list = NULL;
> ++  GList *last_calculated_child = NULL;
> +   gboolean pack;
> +   gint tab_pos = get_effective_tab_pos (notebook);
> ++  guint real_direction;
> + 
> +   if (!start)
> +     return;
> +@@ -3751,7 +3755,9 @@
> +   children = start;
> +   pack = GTK_NOTEBOOK_PAGE (start)->pack;
> +   if (pack == GTK_PACK_END)
> +-    direction = (direction == STEP_PREV) ? STEP_NEXT : STEP_PREV;
> ++    real_direction = (direction == STEP_PREV) ? STEP_NEXT : STEP_PREV;
> ++  else
> ++    real_direction = direction;
> + 
> +   while (1)
> +     {
> +@@ -3773,14 +3779,20 @@
> + 			    {
> + 			      *tab_space = - (*tab_space +
> + 					      page->requisition.width);
> ++
> ++			      if (*tab_space == 0 && direction == STEP_PREV)
> ++				children = last_calculated_child;
> ++
> + 			      *end = children;
> + 			    }
> + 			  return;
> + 			}
> ++
> ++		      last_calculated_child = children;
> + 		    }
> + 		  last_list = children;
> + 		}
> +-	      if (direction == STEP_NEXT)
> ++	      if (real_direction == STEP_NEXT)
> + 		children = children->next;
> + 	      else
> + 		children = children->prev;
> +@@ -3802,24 +3814,30 @@
> + 			    {
> + 			      *tab_space = - (*tab_space +
> + 					      page->requisition.height);
> ++
> ++			      if (*tab_space == 0 && direction == STEP_PREV)
> ++				children = last_calculated_child;
> ++
> + 			      *end = children;
> + 			    }
> + 			  return;
> + 			}
> ++
> ++		      last_calculated_child = children;
> + 		    }
> + 		  last_list = children;
> + 		}
> +-	      if (direction == STEP_NEXT)
> ++	      if (real_direction == STEP_NEXT)
> + 		children = children->next;
> + 	      else
> + 		children = children->prev;
> + 	    }
> + 	  break;
> + 	}
> +-      if (direction == STEP_PREV)
> ++      if (real_direction == STEP_PREV)
> + 	return;
> +       pack = (pack == GTK_PACK_END) ? GTK_PACK_START : GTK_PACK_END;
> +-      direction = STEP_PREV;
> ++      real_direction = STEP_PREV;
> +       children = last_list;
> +     }
> + }
> +




-- 
 - mdz

----- End forwarded message -----

-- 
 - mdz



More information about the ubuntu-archive mailing list