patch to tasklist and libwnck



Here are two patches that fix an issue I had with my sliding panel, namely 
the tasklist applet not showing up because the size request doesn't take 
into account that the panel can shrink to accomodate it.  These patches 
are against a pretty recent CVS.

I've sent it to Alex a few times for revision and this one should be 
pretty clean.  It implements a minimum_width (useful for sliding and 
corner panels, this is the size they'll take) and a maximum_width (useful 
for edge panels to limit the space they'll take).

It also adds these two prefs to the ui, and that's why I'm posting it 
here so this patch can make it in for the string and ui freeze.

Let me know if this is useful and ok to commit.  And don't spare me just 
because this is my first gnome patch ;)

Thomas

-- 

The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
<-*-                      -*->
Lover fair
We'll be looking sharp I swear
I want them all to stop and stare
When we take'em down
<-*- thomas apestaart org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libwnck/ChangeLog,v
retrieving revision 1.109
diff -u -p -r1.109 ChangeLog
--- ChangeLog	2 May 2002 22:49:27 -0000	1.109
+++ ChangeLog	11 May 2002 16:37:58 -0000
@@ -1,3 +1,10 @@
+2002-05-11  Thomas Vander Stichele <thomas apestaart org>
+ 
+        * libwnck/tasklist.c: implemented minimum_width 
+        which can be set from applets to force a minimum width of the
+        tasklist applet
+        (see gnome-panel/applets/gen_util/tasklist.c)
+ 
 2002-05-02  Havoc Pennington  <hp redhat com>
 
 	* libwnck/pager.c (wnck_pager_get_background): disable showing
Index: libwnck/tasklist.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/tasklist.c,v
retrieving revision 1.31
diff -u -p -r1.31 tasklist.c
--- libwnck/tasklist.c	18 Apr 2002 18:06:19 -0000	1.31
+++ libwnck/tasklist.c	11 May 2002 16:38:02 -0000
@@ -123,6 +123,8 @@ struct _WnckTasklistPrivate
 
   int *size_hints;
   int size_hints_len;
+
+  gint minimum_width;
 };
 
 
@@ -360,6 +362,8 @@ wnck_tasklist_init (WnckTasklist *taskli
   
   tasklist->priv->grouping = WNCK_TASKLIST_AUTO_GROUP;
   tasklist->priv->grouping_limit = DEFAULT_GROUPING_LIMIT;
+
+  tasklist->priv->minimum_width = DEFAULT_WIDTH;
 }
 
 static void
@@ -470,6 +474,28 @@ wnck_tasklist_set_grouping_limit (WnckTa
   gtk_widget_queue_resize (GTK_WIDGET (tasklist));
 }
 
+/* set the minimum width */
+void 
+wnck_tasklist_set_minimum_width (WnckTasklist *tasklist, gint size)
+{
+  g_return_if_fail (WNCK_IS_TASKLIST (tasklist));
+
+  if (tasklist->priv->minimum_width == size)
+    return;
+
+  tasklist->priv->minimum_width = size;
+  gtk_widget_queue_resize (GTK_WIDGET (tasklist));
+}
+ 
+/* get the minimum width */
+gint
+wnck_tasklist_get_minimum_width (WnckTasklist *tasklist)
+{
+  g_return_val_if_fail (WNCK_IS_TASKLIST (tasklist), 0);
+	
+  return tasklist->priv->minimum_width;
+}
+
 /* returns the maximal possible button width (i.e. if you
  * don't want to stretch the buttons to fill the alloctions
  * the width can be smaller) */
@@ -645,7 +671,7 @@ wnck_tasklist_size_request  (GtkWidget  
 
   gtk_widget_get_size_request (widget, &u_width, &u_height);
 
-  requisition->width = DEFAULT_WIDTH;
+  requisition->width = tasklist->priv->minimum_width;
   requisition->height = DEFAULT_HEIGHT;
   
   if (u_height != -1)
Index: libwnck/tasklist.h
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/tasklist.h,v
retrieving revision 1.7
diff -u -p -r1.7 tasklist.h
--- libwnck/tasklist.h	13 Apr 2002 20:47:10 -0000	1.7
+++ libwnck/tasklist.h	11 May 2002 16:38:02 -0000
@@ -71,6 +71,9 @@ void wnck_tasklist_set_grouping_limit (W
 				       gint          limit);
 void wnck_tasklist_set_include_all_workspaces (WnckTasklist *tasklist,
 					       gboolean      include_all_workspaces);
+void wnck_tasklist_set_minimum_width (WnckTasklist *tasklist, gint size);
+gint wnck_tasklist_get_minimum_width (WnckTasklist *tasklist);
+    
 G_END_DECLS
 
 #endif /* WNCK_TASKLIST_H */
Index: libwnck/test-tasklist.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/test-tasklist.c,v
retrieving revision 1.5
diff -u -p -r1.5 test-tasklist.c
--- libwnck/test-tasklist.c	13 Apr 2002 20:47:10 -0000	1.5
+++ libwnck/test-tasklist.c	11 May 2002 16:38:02 -0000
@@ -32,7 +32,7 @@ main (int argc, char **argv)
 
   tasklist = wnck_tasklist_new (screen);
 
-  wnck_tasklist_set_grouping (tasklist, WNCK_TASKLIST_AUTO_GROUP);
+  wnck_tasklist_set_grouping (WNCK_TASKLIST (tasklist), WNCK_TASKLIST_AUTO_GROUP);
   frame = gtk_frame_new (NULL);
   gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
   gtk_container_add (GTK_CONTAINER (win), frame);
Index: applets/ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/ChangeLog,v
retrieving revision 1.300
diff -u -p -r1.300 ChangeLog
--- applets/ChangeLog	10 Feb 2002 17:24:50 -0000	1.300
+++ applets/ChangeLog	11 May 2002 16:40:13 -0000
@@ -1,3 +1,12 @@
+2002-05-11  Thomas Vander Stichele <thomas apestaart org>
+
+        * applets/gen_util/tasklist.c: implemented minimum_width and 
+	  maximum_width preferences
+          using GConf keys and updates to libwnck
+        * applets/gen_util/tasklist.glade: added configuration spinbuttons
+          for min/max width
+        * applets/gen_util/tasklist.schema: added GConf keys
+
 2002-02-10  Gediminas Paulauskas <menesis delfi lt>
 
 	* desk-guide/Makefile.am, tasklist/Makefile.am: use intltool
Index: applets/gen_util/tasklist.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/gen_util/tasklist.c,v
retrieving revision 1.27
diff -u -p -r1.27 tasklist.c
--- applets/gen_util/tasklist.c	10 May 2002 14:46:03 -0000	1.27
+++ applets/gen_util/tasklist.c	11 May 2002 16:40:15 -0000
@@ -40,6 +40,7 @@ typedef struct {
   
 	GtkOrientation orientation;
 	int size;
+	gint maximum_width;
 
 	/* Properties: */
 	GtkWidget *properties_dialog;
@@ -51,8 +52,11 @@ typedef struct {
 	GtkWidget *move_minimized_radio;
 	GtkWidget *change_workspace_radio;
 
+	GtkWidget *minimum_width_spin;
+	GtkWidget *maximum_width_spin;
+
 	/* gconf listeners id */
-	guint listeners [3];
+	guint listeners [5];
 } TasklistData;
 
 static void display_properties_dialog (BonoboUIComponent *uic,
@@ -155,10 +159,14 @@ destroy_tasklist(GtkWidget * widget, Tas
 	gconf_client_notify_remove (client, tasklist->listeners[0]);
 	gconf_client_notify_remove (client, tasklist->listeners[1]);
 	gconf_client_notify_remove (client, tasklist->listeners[2]);
+	gconf_client_notify_remove (client, tasklist->listeners[3]);
+	gconf_client_notify_remove (client, tasklist->listeners[4]);
 	
 	tasklist->listeners[0] = 0;
 	tasklist->listeners[1] = 0;
 	tasklist->listeners[2] = 0;
+	tasklist->listeners[3] = 0;
+	tasklist->listeners[4] = 0;
 }
 
 static const BonoboUIVerb tasklist_menu_verbs [] = {
@@ -317,6 +325,45 @@ move_unminimized_windows_changed (GConfC
 	tasklist_update_unminimization_radio (tasklist);
 }
 
+/* GConf callback for changes in minimum_width */
+static void
+minimum_width_changed (GConfClient *client, guint cnxn_id,
+		       GConfEntry *entry, TasklistData *tasklist)
+{
+    	WnckTasklist *wncktl = WNCK_TASKLIST (tasklist->tasklist);
+	gint value;
+	GtkSpinButton *button = GTK_SPIN_BUTTON (tasklist->minimum_width_spin);
+
+	if (!entry->value || entry->value->type != GCONF_VALUE_INT)
+		return;
+	
+	value = gconf_value_get_int (entry->value);
+	
+	gtk_spin_button_set_value (button, value);
+	wnck_tasklist_set_minimum_width (wncktl, value);
+}
+
+/* GConf callback for changes in maximum_width
+ */
+static void
+maximum_width_changed (GConfClient  *client,
+				guint         cnxn_id,
+				GConfEntry   *entry,
+				TasklistData *tasklist)
+{
+	gint value;
+	GtkSpinButton *button = GTK_SPIN_BUTTON (tasklist->maximum_width_spin);
+
+	if (!entry->value || entry->value->type != GCONF_VALUE_INT)
+		return;
+	
+	value = gconf_value_get_int (entry->value);
+
+	gtk_spin_button_set_value (button, value);
+	tasklist->maximum_width = value;
+        gtk_widget_queue_resize (GTK_WIDGET (tasklist->applet));
+}
+    
 static void
 setup_gconf (TasklistData *tasklist)
 {
@@ -348,7 +395,21 @@ setup_gconf (TasklistData *tasklist)
 				tasklist,
 				NULL, NULL);
 	g_free (key);
-}
+	
+	key = panel_applet_gconf_get_full_key (PANEL_APPLET (tasklist->applet),
+					       "minimum_width");
+	tasklist->listeners[3] = gconf_client_notify_add(client, key,
+				(GConfClientNotifyFunc)minimum_width_changed,
+				tasklist,
+				NULL, NULL);
+	g_free (key);
+	key = panel_applet_gconf_get_full_key (PANEL_APPLET (tasklist->applet),
+					       "maximum_width");
+	tasklist->listeners[4] = gconf_client_notify_add(client, key,
+				(GConfClientNotifyFunc)maximum_width_changed,
+				tasklist,
+				NULL, NULL);
+	g_free (key);}
 
 static void
 applet_size_request (GtkWidget      *widget,
@@ -358,14 +419,42 @@ applet_size_request (GtkWidget      *wid
 	int len;
 	const int *size_hints;
 	GtkRequisition child_req;
+	int i;
+	int maximum_width;
+	int *new_size_hints;
+	int new_len = 0;
+	gint handle_size = 11;  /* FIXME: how to get the grip's size ? */
+    	WnckTasklist *wncktl = WNCK_TASKLIST (tasklist->tasklist);
+	gint minimum_width = wnck_tasklist_get_minimum_width (wncktl);
 	
 	gtk_widget_get_child_requisition (tasklist->applet,
 					  &child_req);
 	
-	size_hints = wnck_tasklist_get_size_hint_list (WNCK_TASKLIST (tasklist->tasklist),
-						       &len);
+	size_hints = wnck_tasklist_get_size_hint_list (wncktl, &len);
+	new_size_hints = calloc (len, sizeof (int));
 	
-	panel_applet_set_size_hints (PANEL_APPLET (tasklist->applet), size_hints, len, child_req.width - 1);
+	/* size_hints is an array of (max, min) int pairs
+	 * where min(i) > max (i+1)
+	 * convert it using a GArray to clipped values
+	 */
+	maximum_width = tasklist->maximum_width - minimum_width + handle_size;
+	g_assert (maximum_width >= 0);
+
+	for (i = 0; i < len; i += 2) {
+		if (size_hints[i + 1] <= maximum_width) {
+		        /* this one should be stored */
+			if (size_hints[i] > maximum_width)
+			    	new_size_hints[new_len] = maximum_width;
+			else
+				new_size_hints[new_len] = size_hints[i];
+			new_size_hints[new_len + 1] = size_hints[i + 1];
+			new_len += 2;
+		}
+	}
+        panel_applet_set_size_hints (PANEL_APPLET (tasklist->applet),
+		                     new_size_hints, 
+				     new_len, child_req.width - 1);
+	free (new_size_hints);
 }
 
 gboolean
@@ -375,6 +464,8 @@ fill_tasklist_applet(PanelApplet *applet
 	GError *error;
 	GConfValue *value;
 
+	gint sizepref;
+
 	panel_applet_add_preferences (applet, "/schemas/apps/tasklist_applet/prefs", NULL);
 	
 	tasklist = g_new0 (TasklistData, 1);
@@ -408,7 +499,7 @@ fill_tasklist_applet(PanelApplet *applet
 		g_error_free (error);
 		tasklist->move_unminimized_windows = TRUE; /* Default value */
 	}
-	
+
 	tasklist->size = panel_applet_get_size (applet);
 	switch (panel_applet_get_orient (applet)) {
 	case PANEL_APPLET_ORIENT_LEFT:
@@ -430,6 +521,24 @@ fill_tasklist_applet(PanelApplet *applet
 
 	tasklist->tasklist = wnck_tasklist_new (tasklist->screen);
 
+	/* get size preferences */
+	error = NULL;
+	sizepref = panel_applet_gconf_get_int (applet, "minimum_width", 
+	                                         &error);
+        if (error == NULL) 
+  		wnck_tasklist_set_minimum_width (WNCK_TASKLIST (tasklist->tasklist), 
+					         sizepref);	  
+	else
+	  g_error_free (error);
+
+	error = NULL;
+	sizepref = panel_applet_gconf_get_int (applet, "maximum_width", 
+	                                         &error);
+        if (error == NULL) 
+	        tasklist->maximum_width = sizepref;
+	else
+	  g_error_free (error);
+
 	g_signal_connect (G_OBJECT (tasklist->tasklist), "destroy",
 			  G_CALLBACK (destroy_tasklist),
 			  tasklist);
@@ -437,7 +546,6 @@ fill_tasklist_applet(PanelApplet *applet
 	g_signal_connect (G_OBJECT (tasklist->applet), "size_request",
 			  G_CALLBACK (applet_size_request),
 			  tasklist);
-
 	tasklist_update (tasklist);
 	gtk_widget_show (tasklist->tasklist);
 
@@ -571,6 +679,43 @@ display_all_workspaces_toggled (GtkToggl
 				     NULL);
 }
 
+/* called when minimum width spin button is changed
+ * check if it exceeds max width
+ * saves numeric GConf preference values
+ */
+static void
+spin_minimum_width_changed (GtkSpinButton *button, TasklistData *tasklist)
+{
+	GtkSpinButton *max_b = GTK_SPIN_BUTTON (tasklist->maximum_width_spin);
+	PanelApplet *applet = PANEL_APPLET (tasklist->applet);
+	gint prop_value = gtk_spin_button_get_value (button);
+	gint max_width = gtk_spin_button_get_value (max_b);
+	
+	/* check if we exceed max width */
+	if (prop_value > max_width)
+	        panel_applet_gconf_set_int (applet, "maximum_width", 
+			                    prop_value, NULL);
+	panel_applet_gconf_set_int (applet, "minimum_width", prop_value, NULL);
+}
+
+/* called when maximum width spin button is changed
+ * check if we drop below min width
+ * saves numeric GConf preference values
+ */
+static void
+spin_maximum_width_changed (GtkSpinButton *button, TasklistData *tasklist)
+{
+	GtkSpinButton *min_b = GTK_SPIN_BUTTON (tasklist->minimum_width_spin);
+	PanelApplet *applet = PANEL_APPLET (tasklist->applet);
+	gint prop_value = gtk_spin_button_get_value (button);
+	gint min_width = gtk_spin_button_get_value (min_b);
+
+	/* check if we drop below min width */
+	if (prop_value < min_width)
+		panel_applet_gconf_set_int (applet, "minimum_width", 
+					    prop_value, NULL);
+	panel_applet_gconf_set_int (applet, "maximum_width", prop_value, NULL);
+}
 
 #define WID(s) glade_xml_get_widget (xml, s)
 
@@ -580,6 +725,8 @@ setup_dialog (GladeXML     *xml,
 {
 	GConfClient *client;
 	GtkWidget *button;
+	gint sizepref;
+	GError *error;
 	
 	client = gconf_client_get_default ();
 
@@ -591,6 +738,9 @@ setup_dialog (GladeXML     *xml,
 	tasklist->move_minimized_radio = WID ("move_minimized_radio");
 	tasklist->change_workspace_radio = WID ("change_workspace_radio");
 
+	tasklist->minimum_width_spin = WID ("minimum_width");
+	tasklist->maximum_width_spin = WID ("maximum_width");
+
 	/* Window grouping: */
 	button = get_grouping_button (tasklist, tasklist->grouping);
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
@@ -600,6 +750,16 @@ setup_dialog (GladeXML     *xml,
 			   "group_value", "auto");
 	g_object_set_data (G_OBJECT (tasklist->always_group_radio),
 			   "group_value", "always");
+
+	error = NULL;
+	/* FIXME: what does one do in case of errors here ? */
+	sizepref = panel_applet_gconf_get_int (PANEL_APPLET (tasklist->applet), 
+	    				       "minimum_width", NULL);
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (tasklist->minimum_width_spin), sizepref);
+	sizepref = panel_applet_gconf_get_int (PANEL_APPLET (tasklist->applet), 
+	    				       "maximum_width", NULL);
+	gtk_spin_button_set_value (GTK_SPIN_BUTTON (tasklist->maximum_width_spin), sizepref);
+
 	g_signal_connect (G_OBJECT (tasklist->never_group_radio), "toggled",
 			  (GCallback) group_windows_toggled, tasklist);
 	g_signal_connect (G_OBJECT (tasklist->auto_group_radio), "toggled",
@@ -617,11 +777,22 @@ setup_dialog (GladeXML     *xml,
 	g_signal_connect (G_OBJECT (tasklist->show_all_radio), "toggled",
 			  (GCallback) display_all_workspaces_toggled, tasklist);
 
+	g_signal_connect (G_OBJECT (tasklist->minimum_width_spin), 
+		          "value_changed", 
+			  (GCallback) spin_minimum_width_changed,
+			  tasklist);
+	g_signal_connect (G_OBJECT (tasklist->maximum_width_spin), 
+		          "value_changed", 
+			  (GCallback) spin_maximum_width_changed,
+			  tasklist);
 	g_signal_connect_swapped (WID ("done_button"), "clicked",
-				  (GCallback) gtk_widget_hide, tasklist->properties_dialog);
+				  (GCallback) gtk_widget_hide, 
+				  tasklist->properties_dialog);
 
 }
 
+
+
 static void 
 display_properties_dialog (BonoboUIComponent *uic,
 			   TasklistData      *tasklist,
@@ -643,3 +814,5 @@ display_properties_dialog (BonoboUICompo
 
 	gtk_window_present (GTK_WINDOW (tasklist->properties_dialog));
 }
+
+
Index: applets/gen_util/tasklist.glade
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/gen_util/tasklist.glade,v
retrieving revision 1.7
diff -u -p -r1.7 tasklist.glade
--- applets/gen_util/tasklist.glade	29 Mar 2002 14:55:02 -0000	1.7
+++ applets/gen_util/tasklist.glade	11 May 2002 16:40:17 -0000
@@ -1,5 +1,5 @@
 <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
 
 <glade-interface>
 
@@ -129,6 +129,25 @@
 		      </child>
 		    </widget>
 		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Window List content</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
@@ -205,88 +224,221 @@
 	  </child>
 
 	  <child>
-	    <widget class="GtkFrame" id="frame3">
-              <property name="label" translatable="yes">Window grouping</property>
+	    <widget class="GtkVBox" id="vbox5">
 	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
 	      <child>
-		<widget class="GtkTable" id="table1">
-		  <property name="border_width">8</property>
+		<widget class="GtkFrame" id="frame3">
+                  <property name="label" translatable="yes">Window grouping</property>
 		  <property name="visible">True</property>
-		  <property name="n_rows">3</property>
-		  <property name="n_columns">1</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">8</property>
-		  <property name="column_spacing">8</property>
+		  <property name="label_xalign">0</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
 		  <child>
-		    <widget class="GtkRadioButton" id="never_group_radio">
+		    <widget class="GtkTable" id="table1">
+		      <property name="border_width">8</property>
 		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">_Never group windows</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
+		      <property name="n_rows">3</property>
+		      <property name="n_columns">1</property>
+		      <property name="homogeneous">False</property>
+		      <property name="row_spacing">8</property>
+		      <property name="column_spacing">8</property>
 
-		  <child>
-		    <widget class="GtkRadioButton" id="auto_group_radio">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Group windows when _space is limited</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">never_group_radio</property>
+		      <child>
+			<widget class="GtkRadioButton" id="never_group_radio">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">_Never group windows</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="auto_group_radio">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Group windows when _space is limited</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">never_group_radio</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="always_group_radio">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">_Always group windows</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">never_group_radio</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">2</property>
+			  <property name="bottom_attach">3</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
 		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
 		  </child>
 
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkFrame" id="frame5">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+                  <property name="label" translatable="yes">Tasklist size</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
 		  <child>
-		    <widget class="GtkRadioButton" id="always_group_radio">
+		    <widget class="GtkTable" id="table2">
 		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">_Always group windows</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">never_group_radio</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
+		      <property name="n_rows">2</property>
+		      <property name="n_columns">2</property>
+		      <property name="homogeneous">True</property>
+		      <property name="row_spacing">8</property>
+		      <property name="column_spacing">8</property>
+                      <property name="border_width">8</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label7">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">M_inimum size:</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">minimum_width</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label8">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Ma_ximum size:</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="mnemonic_widget">maximum_width</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="minimum_width">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">1</property>
+			  <property name="digits">0</property>
+			  <property name="numeric">True</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">128 0 4096 1 10 10</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="maximum_width">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">1</property>
+			  <property name="digits">0</property>
+			  <property name="numeric">False</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">256 0 4096 1 10 10</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+	            </widget>
 		  </child>
 
 		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
 	    </widget>
 	    <packing>
Index: applets/gen_util/tasklist.schemas
===================================================================
RCS file: /cvs/gnome/gnome-panel/applets/gen_util/tasklist.schemas,v
retrieving revision 1.4
diff -u -p -r1.4 tasklist.schemas
--- applets/gen_util/tasklist.schemas	22 Mar 2002 10:16:02 -0000	1.4
+++ applets/gen_util/tasklist.schemas	11 May 2002 16:40:17 -0000
@@ -40,6 +40,36 @@
         </locale>
       </schema>
                  
-  </schemalist>
+      <schema>
+        <key>/schemas/apps/tasklist_applet/prefs/minimum_width</key>
+        <owner>tasklist-applet</owner>
+        <type>int</type>
+        <default>50</default>
+        <locale name="C">
+          <short>Minimum width the tasklist applet will request</short>
+          <long>The tasklist applet needs a minimum width to be useful at all.
+		This value is the minimum width the applet will request.
+		This is useful for sliding and edge panels, which would 
+		otherwise ask for a very small default width.
+	  </long>
+        </locale>
+      </schema>
+
+      <schema>
+        <key>/schemas/apps/tasklist_applet/prefs/maximum_width</key>
+        <owner>tasklist-applet</owner>
+        <type>int</type>
+        <default>4096</default>
+        <locale name="C">
+          <short>Maximum width the tasklist applet will request</short>
+          <long>This value is the maximum width the applet will request.
+		This is useful to limit the size used in big panels where
+		this applet could otherwise fill the entire available space,
+		like in edge panels.
+	  </long>
+        </locale>
+      </schema>
+
+    </schemalist>
   
 </gconfschemafile>
Index: doc/reference/panel-applet/tmpl/panel-applet.sgml
===================================================================
RCS file: /cvs/gnome/gnome-panel/doc/reference/panel-applet/tmpl/panel-applet.sgml,v
retrieving revision 1.9
diff -u -p -r1.9 panel-applet.sgml
--- doc/reference/panel-applet/tmpl/panel-applet.sgml	11 Feb 2002 17:55:42 -0000	1.9
+++ doc/reference/panel-applet/tmpl/panel-applet.sgml	11 May 2002 16:40:19 -0000
@@ -216,3 +216,11 @@ depending on the size of the panel.
 <!-- # Unused Parameters # -->
 @size: The size, in pixels, of the panel.
 
+<!-- ##### SIGNAL PanelApplet::move-focus-out-of-applet ##### -->
+<para>
+
+</para>
+
+ panelapplet: the object which received the signal.
+ arg1: 
+


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