ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] XFCE4 conventional taskbar look patch
@ 2004-01-10 17:10 Artem Vakhitov
  2004-01-10 18:40 ` Alexej Kryukov
  0 siblings, 1 reply; 2+ messages in thread
From: Artem Vakhitov @ 2004-01-10 17:10 UTC (permalink / raw)
  To: community

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

Привет коммьюнити,

если кому вдруг нужен патч для XFCE4, возвращающий панели задач 
привычный вид  (т. е. одна-единственная задача не растягивается 
на всю панель) -- держите :) Патчил libxfcegui4-4.0.1 из Сизифа.

Артем Вахитов

[-- Attachment #2: libxfcegui4-4.0.1-conv_look.patch --]
[-- Type: text/plain, Size: 2892 bytes --]

--- libxfcegui4-4.0.1/libxfcegui4/netk-tasklist.c.conv_look	2003-08-04 01:41:19 +0400
+++ libxfcegui4-4.0.1/libxfcegui4/netk-tasklist.c	2004-01-10 14:01:23 +0300
@@ -380,6 +380,8 @@
 
     tasklist->priv->minimum_width = DEFAULT_WIDTH;
     tasklist->priv->minimum_height = DEFAULT_HEIGHT;
+    
+    tasklist->priv->max_button_width = 1; /* max_button_width == 1 will tell us that we haven't had any size requests before -- A.V. */
 
     tasklist->priv->idle_callback_tag = 0;
 }
@@ -704,8 +706,9 @@
     GtkRequisition child_req;
     GtkAllocation fake_allocation;
     int max_height = 1;
-    int max_width = 1;
-    /* int u_width, u_height; */
+    int max_width = 220; /* This makes four task buttons on 1024x768 with the pager present and without tray icons.
+                            In truth, though, this doesn't matter anyway, because on (...)_size_allocate we'll know the actual 
+			    amount of space available and adjust max_button_width accordingly -- A.V. */
     GList *l;
     GArray *array;
     GList *ungrouped_apps;
@@ -730,7 +733,10 @@
         gtk_widget_size_request (task->button, &child_req);
 
         max_height = MAX (child_req.height, max_height);
-        max_width = MAX (child_req.width, max_width);
+	
+	/* We're going to set a fixed max_button_width, so I'm commenting out the next line -- A.V. */
+	
+        /* max_width = MAX (child_req.width, max_width); */
 
         l = l->next;
     }
@@ -743,12 +749,22 @@
         gtk_widget_size_request (task->button, &child_req);
 
         max_height = MAX (child_req.height, max_height);
-        max_width = MAX (child_req.width, max_width);
+        
+	/* See above -- A.V. */
+	
+	/* max_width = MAX (child_req.width, max_width); */
 
         l = l->next;
     }
+    
+    /* If this is our first ever size request, we assign max_button_width an initial value of max_width,
+       otherwise we leave it as it is -- A.V. */
 
-    tasklist->priv->max_button_width = max_width;
+    if (tasklist->priv->max_button_width <= 1) 
+    {
+    	tasklist->priv->max_button_width = max_width;
+    }
+    
     tasklist->priv->max_button_height = max_height;
 
 
@@ -900,6 +916,8 @@
 
     tasklist = NETK_TASKLIST (widget);
 
+    tasklist->priv->max_button_width = allocation->width / 4; /* We want minimum four buttons to completely fill the tasklist -- A.V. */
+
     n_windows = g_list_length (tasklist->priv->windows);
     n_grouped_buttons = 0;
     ungrouped_apps = g_list_copy (tasklist->priv->applications);
@@ -980,7 +998,7 @@
     i = 0;
     total_width = tasklist->priv->max_button_width * n_cols;
     total_width = MIN (total_width, allocation->width);
-    total_width = allocation->width;
+    /* total_width = allocation->width; */ /* Task buttons should not always grab all free taskbar space -- A.V. */
     while (l != NULL)
     {
         NetkTask *task = NETK_TASK (l->data);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-10 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-10 17:10 [Comm] XFCE4 conventional taskbar look patch Artem Vakhitov
2004-01-10 18:40 ` Alexej Kryukov

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git