r24740 - in /desktop/unstable/libwnck/debian: changelog libwnck22.shlibs patches/01_tasklist_orientation.patch patches/01_vertical_panel.patch patches/series

joss at users.alioth.debian.org joss at users.alioth.debian.org
Tue Jul 13 17:46:04 UTC 2010


Author: joss
Date: Tue Jul 13 17:46:03 2010
New Revision: 24740

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=24740
Log:
* Disable 01_vertical_panel.patch. Closes: #588721.
* 01_tasklist_orientation.patch: patch from Jean-Luc Porquet to fix 
  #524117 in a more elegant way by extending the API.
* Bump shlibs accordingly.

Added:
    desktop/unstable/libwnck/debian/patches/01_tasklist_orientation.patch
Removed:
    desktop/unstable/libwnck/debian/patches/01_vertical_panel.patch
Modified:
    desktop/unstable/libwnck/debian/changelog
    desktop/unstable/libwnck/debian/libwnck22.shlibs
    desktop/unstable/libwnck/debian/patches/series

Modified: desktop/unstable/libwnck/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/libwnck/debian/changelog?rev=24740&op=diff
==============================================================================
--- desktop/unstable/libwnck/debian/changelog [utf-8] (original)
+++ desktop/unstable/libwnck/debian/changelog [utf-8] Tue Jul 13 17:46:03 2010
@@ -1,4 +1,4 @@
-libwnck (2.30.0-3) UNRELEASED; urgency=low
+libwnck (2.30.0-3) unstable; urgency=low
 
   [ Sebastien Bacher ]
   * debian/control.in:
@@ -12,9 +12,12 @@
 
   [ Josselin Mouette ]
   * Fix GIR package description.
-  * Disable 01_vertical_panel.patch. Closes: #588721, reopens: #524117.
-
- -- Sebastien Bacher <seb128 at ubuntu.com>  Thu, 01 Jul 2010 22:52:43 +0200
+  * Disable 01_vertical_panel.patch. Closes: #588721.
+  * 01_tasklist_orientation.patch: patch from Jean-Luc Porquet to fix 
+    #524117 in a more elegant way by extending the API.
+  * Bump shlibs accordingly.
+
+ -- Josselin Mouette <joss at debian.org>  Tue, 13 Jul 2010 19:30:02 +0200
 
 libwnck (2.30.0-2) unstable; urgency=low
 

Modified: desktop/unstable/libwnck/debian/libwnck22.shlibs
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/libwnck/debian/libwnck22.shlibs?rev=24740&op=diff
==============================================================================
--- desktop/unstable/libwnck/debian/libwnck22.shlibs [utf-8] (original)
+++ desktop/unstable/libwnck/debian/libwnck22.shlibs [utf-8] Tue Jul 13 17:46:03 2010
@@ -1,1 +1,1 @@
-libwnck-1 22 libwnck22 (>= 2.22.0)
+libwnck-1 22 libwnck22 (>= 2.30.0-3)

Added: desktop/unstable/libwnck/debian/patches/01_tasklist_orientation.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/libwnck/debian/patches/01_tasklist_orientation.patch?rev=24740&op=file
==============================================================================
--- desktop/unstable/libwnck/debian/patches/01_tasklist_orientation.patch (added)
+++ desktop/unstable/libwnck/debian/patches/01_tasklist_orientation.patch [utf-8] Tue Jul 13 17:46:03 2010
@@ -1,0 +1,278 @@
+Debian #524117
+GNOME #513347 and #86382
+
+Index: libwnck-2.30.0/libwnck/tasklist.c
+===================================================================
+--- libwnck-2.30.0.orig/libwnck/tasklist.c	2010-03-30 01:55:24.000000000 +0200
++++ libwnck-2.30.0/libwnck/tasklist.c	2010-07-13 19:29:18.489245060 +0200
+@@ -234,6 +234,8 @@ struct _WnckTasklistPrivate
+   GdkPixmap *background;
+ 
+   guint drag_start_time;
++
++  GtkOrientation orientation;  
+ };
+ 
+ static GType wnck_task_get_type (void);
+@@ -316,6 +318,7 @@ static int      wnck_tasklist_layout
+ 					     int             max_width,
+ 					     int             max_height,
+ 					     int             n_buttons,
++                                             GtkOrientation  orientation,
+ 					     int            *n_cols_out,
+ 					     int            *n_rows_out);
+ 
+@@ -976,6 +979,20 @@ wnck_tasklist_set_button_relief (WnckTas
+ }
+ 
+ /**
++ * wnck_tasklist_set_orientation:
++ * @tasklist: a #WnckTasklist.
++ * @orient: a GtkOrientation.
++ *
++ * Set the orientation of the @taskluist.  The main use of this function is
++ * proper integration of #WnckTasklist in vertical panels.
++ */
++ 
++void wnck_tasklist_set_orientation(WnckTasklist *tasklist, GtkOrientation orient)
++{
++    tasklist->priv->orientation = orient;
++}
++
++/**
+  * wnck_tasklist_set_switch_workspace_on_unminimize:
+  * @tasklist: a #WnckTasklist.
+  * @switch_workspace_on_unminimize: whether to activate the #WnckWorkspace a
+@@ -1147,29 +1164,38 @@ wnck_tasklist_layout (GtkAllocation *all
+ 		      int            max_width,
+ 		      int            max_height,
+ 		      int            n_buttons,
++                      GtkOrientation orientation,
+ 		      int           *n_cols_out,
+ 		      int           *n_rows_out)
+ {
+   int n_cols, n_rows;
+ 
+-  /* How many rows fit in the allocation */
+-  n_rows = allocation->height / max_height;
+-
+-  /* Don't have more rows than buttons */
+-  n_rows = MIN (n_rows, n_buttons);
+-
+-  /* At least one row */
+-  n_rows = MAX (n_rows, 1);
+-  
+-  /* We want to use as many rows as possible to limit the width */
+-  n_cols = (n_buttons + n_rows - 1) / n_rows;
+-
+-  /* At least one column */
+-  n_cols = MAX (n_cols, 1);
++  if (orientation == GTK_ORIENTATION_HORIZONTAL) {
++      /* How many rows fit in the allocation */
++      n_rows = allocation->height / max_height;
++      
++      /* Don't have more rows than buttons */
++      n_rows = MIN (n_rows, n_buttons);
++      
++      /* At least one row */
++      n_rows = MAX (n_rows, 1);
++      
++      /* We want to use as many rows as possible to limit the width */
++      n_cols = (n_buttons + n_rows - 1) / n_rows;
++      
++      /* At least one column */
++      n_cols = MAX (n_cols, 1);
++      
++  } else {
++      n_cols = allocation->width / max_width;
++      n_cols = MIN(n_cols, n_buttons);
++      n_cols = MAX(n_cols, 1);
+ 
++      n_rows = (n_buttons + n_cols - 1) / n_cols;
++      n_rows = MAX(n_rows, 1);
++  }
+   *n_cols_out = n_cols;
+   *n_rows_out = n_rows;
+-  
+   return allocation->width / n_cols;
+ }
+ 
+@@ -1367,19 +1393,31 @@ wnck_tasklist_size_request  (GtkWidget
+ 			tasklist->priv->max_button_width,
+ 			tasklist->priv->max_button_height,
+ 			n_windows + n_startup_sequences,
++                        tasklist->priv->orientation,
+ 			&n_cols, &n_rows);
+ 
+   last_n_cols = G_MAXINT;
+   lowest_range = G_MAXINT;
+   if (tasklist->priv->grouping != WNCK_TASKLIST_ALWAYS_GROUP)
+     {
+-      val = n_cols * tasklist->priv->max_button_width;
+-      g_array_insert_val (array, array->len, val);
+-      val = n_cols * grouping_limit;
+-      g_array_insert_val (array, array->len, val);
+-
+-      last_n_cols = n_cols;
+-      lowest_range = val;
++        if (tasklist->priv->orientation == GTK_ORIENTATION_HORIZONTAL) {
++            val = n_cols * tasklist->priv->max_button_width;
++            g_array_insert_val (array, array->len, val);
++            val = n_cols * grouping_limit;
++            g_array_insert_val (array, array->len, val);
++            
++            last_n_cols = n_cols;
++            lowest_range = val;
++        } else {
++            val = n_rows * tasklist->priv->max_button_height;
++            g_array_insert_val (array, array->len, val);
++            val = n_rows * grouping_limit;
++            g_array_insert_val (array, array->len, val);
++            
++            last_n_cols = n_rows;
++            lowest_range = val;
++            
++        }
+     }
+ 
+   while (ungrouped_class_groups != NULL &&
+@@ -1399,29 +1437,56 @@ wnck_tasklist_size_request  (GtkWidget
+ 			    tasklist->priv->max_button_width,
+ 			    tasklist->priv->max_button_height,
+ 			    n_startup_sequences + n_windows - n_grouped_buttons,
++                            tasklist->priv->orientation,
+ 			    &n_cols, &n_rows);
+-      if (n_cols != last_n_cols &&
+-	  (tasklist->priv->grouping == WNCK_TASKLIST_AUTO_GROUP ||
+-	   ungrouped_class_groups == NULL))
+-	{
+-	  val = n_cols * tasklist->priv->max_button_width;
+-	  if (val >= lowest_range)
+-	    { /* Overlaps old range */
+-              g_assert (array->len > 0);
+-	      lowest_range = n_cols * grouping_limit;
+-              g_array_index(array, int, array->len-1) = lowest_range;
+-	    }
+-	  else
+-	    {
+-	      /* Full new range */
+-	      g_array_insert_val (array, array->len, val);
+-	      val = n_cols * grouping_limit;
+-	      g_array_insert_val (array, array->len, val);
+-	      lowest_range = val;
+-	    }
+-
+-	  last_n_cols = n_cols;
+-	}
++      if (tasklist->priv->orientation == GTK_ORIENTATION_HORIZONTAL) {
++          if (n_cols != last_n_cols &&
++              (tasklist->priv->grouping == WNCK_TASKLIST_AUTO_GROUP ||
++               ungrouped_class_groups == NULL))
++          {
++              val = n_cols * tasklist->priv->max_button_width;
++              if (val >= lowest_range)
++              { /* Overlaps old range */
++                  g_assert (array->len > 0);
++                  lowest_range = n_cols * grouping_limit;
++                  g_array_index(array, int, array->len-1) = lowest_range;
++              }
++              else
++              {
++                  /* Full new range */
++                  g_array_insert_val (array, array->len, val);
++                  val = n_cols * grouping_limit;
++                  g_array_insert_val (array, array->len, val);
++                  lowest_range = val;
++              }
++              
++              last_n_cols = n_cols;
++          }
++      } else {
++          if (n_rows != last_n_cols &&
++              (tasklist->priv->grouping == WNCK_TASKLIST_AUTO_GROUP ||
++               ungrouped_class_groups == NULL))
++          {
++              val = n_rows * tasklist->priv->max_button_height;;
++              if (val >= lowest_range)
++              { /* Overlaps old range */
++                  g_assert (array->len > 0);
++                  lowest_range = n_rows * grouping_limit;
++                  g_array_index(array, int, array->len-1) = lowest_range;
++              }
++              else
++              {
++                  /* Full new range */
++                  g_array_insert_val (array, array->len, val);
++                  val = n_rows * grouping_limit;
++                  g_array_insert_val (array, array->len, val);
++                  lowest_range = val;
++              }
++              
++              last_n_cols = n_rows;
++          }
++      }
++      
+     }
+ 
+   g_list_free (ungrouped_class_groups);
+@@ -1443,8 +1508,13 @@ wnck_tasklist_size_request  (GtkWidget
+     
+   tasklist->priv->size_hints = (int *)g_array_free (array, FALSE);
+ 
+-  requisition->width = tasklist->priv->size_hints[0];
+-  requisition->height = fake_allocation.height;
++  if (tasklist->priv->orientation == GTK_ORIENTATION_VERTICAL) {
++      requisition->width  = n_cols * tasklist->priv->max_button_width;
++      requisition->height = n_rows * tasklist->priv->max_button_height;
++  } else {
++      requisition->width = tasklist->priv->size_hints[0];
++      requisition->height = fake_allocation.height;
++  }
+ }
+ 
+ /**
+@@ -1540,6 +1610,7 @@ wnck_tasklist_size_allocate (GtkWidget
+ 				       tasklist->priv->max_button_width,
+ 				       tasklist->priv->max_button_height,
+ 				       n_startup_sequences + n_windows,
++                                       tasklist->priv->orientation,
+ 				       &n_cols, &n_rows);
+   while (ungrouped_class_groups != NULL &&
+ 	 ((tasklist->priv->grouping == WNCK_TASKLIST_ALWAYS_GROUP) ||
+@@ -1589,6 +1660,7 @@ wnck_tasklist_size_allocate (GtkWidget
+ 					   tasklist->priv->max_button_width,
+ 					   tasklist->priv->max_button_height,
+ 					   n_startup_sequences + n_windows - n_grouped_buttons,
++                                           tasklist->priv->orientation,
+ 					   &n_cols, &n_rows);
+     }
+ 
+@@ -2143,6 +2215,7 @@ wnck_tasklist_new (WnckScreen *screen)
+   WnckTasklist *tasklist;
+ 
+   tasklist = g_object_new (WNCK_TYPE_TASKLIST, NULL);
++  tasklist->priv->orientation = GTK_ORIENTATION_HORIZONTAL;
+ 
+   return GTK_WIDGET (tasklist);
+ }
+@@ -4270,7 +4343,6 @@ wnck_task_new_from_window (WnckTasklist
+   WnckTask *task;
+ 
+   task = g_object_new (WNCK_TYPE_TASK, NULL);
+-
+   task->type = WNCK_TASK_WINDOW;
+   task->window = g_object_ref (window);
+   task->class_group = g_object_ref (wnck_window_get_class_group (window));
+Index: libwnck-2.30.0/libwnck/tasklist.h
+===================================================================
+--- libwnck-2.30.0.orig/libwnck/tasklist.h	2009-04-19 19:40:32.000000000 +0200
++++ libwnck-2.30.0/libwnck/tasklist.h	2010-07-13 19:29:18.489245060 +0200
+@@ -99,6 +99,8 @@ void wnck_tasklist_set_include_all_works
+ 					       gboolean      include_all_workspaces);
+ void wnck_tasklist_set_button_relief (WnckTasklist *tasklist,
+                                       GtkReliefStyle relief);
++void wnck_tasklist_set_orientation(WnckTasklist *tasklist, GtkOrientation orient);
++
+ #ifndef WNCK_DISABLE_DEPRECATED
+ void wnck_tasklist_set_minimum_width (WnckTasklist *tasklist, gint size);
+ gint wnck_tasklist_get_minimum_width (WnckTasklist *tasklist);

Modified: desktop/unstable/libwnck/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/libwnck/debian/patches/series?rev=24740&op=diff
==============================================================================
--- desktop/unstable/libwnck/debian/patches/series [utf-8] (original)
+++ desktop/unstable/libwnck/debian/patches/series [utf-8] Tue Jul 13 17:46:03 2010
@@ -1,2 +1,2 @@
-#01_vertical_panel.patch
+01_tasklist_orientation.patch
 99_ltmain_as-needed.patch




More information about the pkg-gnome-commits mailing list