From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <40003223.4070404@mail.ru> Date: Sat, 10 Jan 2004 20:10:59 +0300 From: Artem Vakhitov User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: community@altlinux.ru Content-Type: multipart/mixed; boundary="------------080102000503070807080106" X-Spam: Probable Spam Subject: [Comm] XFCE4 conventional taskbar look patch X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.3 Precedence: list Reply-To: community@altlinux.ru List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2004 17:08:44 -0000 Archived-At: List-Archive: List-Post: This is a multi-part message in MIME format. --------------080102000503070807080106 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit Привет коммьюнити, если кому вдруг нужен патч для XFCE4, возвращающий панели задач привычный вид (т. е. одна-единственная задача не растягивается на всю панель) -- держите :) Патчил libxfcegui4-4.0.1 из Сизифа. Артем Вахитов --------------080102000503070807080106 Content-Type: text/plain; name="libxfcegui4-4.0.1-conv_look.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libxfcegui4-4.0.1-conv_look.patch" --- 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); --------------080102000503070807080106--