[gnome-panel/wip/muktupavels/window-list: 2/2] wncklet: do not use size hints
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip/muktupavels/window-list: 2/2] wncklet: do not use size hints
- Date: Mon, 10 May 2021 18:30:10 +0000 (UTC)
commit 4c80887aa129005157128d4a3f883abe260ce8b8
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Fri May 7 01:04:29 2021 +0300
wncklet: do not use size hints
WnckTasklist now properly uses minimum and natural size meaning
that we don't need size hints.
configure.ac | 2 +-
modules/wncklet/window-list.c | 40 ----------------------------------------
2 files changed, 1 insertion(+), 41 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 04d5e1ad9..a3085a4c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,7 +126,7 @@ GDK_PIXBUF_REQUIRED=2.26.0
PANGO_REQUIRED=1.15.4
GLIB_REQUIRED=2.67.1
GTK_REQUIRED=3.22.0
-LIBWNCK_REQUIRED=3.4.6
+LIBWNCK_REQUIRED=40.0
LIBGNOME_MENU_REQUIRED=3.7.90
LIBECAL_REQUIRED=3.33.2
LIBEDATASERVER_REQUIRED=3.5.3
diff --git a/modules/wncklet/window-list.c b/modules/wncklet/window-list.c
index 593749b9d..107130128 100644
--- a/modules/wncklet/window-list.c
+++ b/modules/wncklet/window-list.c
@@ -41,7 +41,6 @@ struct _WindowListApplet
gboolean move_unminimized_windows;
GtkOrientation orientation;
- int size;
GtkIconTheme *icon_theme;
@@ -64,14 +63,6 @@ G_DEFINE_TYPE (WindowListApplet, window_list_applet, GP_TYPE_APPLET)
static void
tasklist_update (WindowListApplet *tasklist)
{
- if (tasklist->orientation == GTK_ORIENTATION_HORIZONTAL) {
- gtk_widget_set_size_request (GTK_WIDGET (tasklist->tasklist),
- -1, tasklist->size);
- } else {
- gtk_widget_set_size_request (GTK_WIDGET (tasklist->tasklist),
- tasklist->size, -1);
- }
-
wnck_tasklist_set_grouping (WNCK_TASKLIST (tasklist->tasklist),
tasklist->grouping);
wnck_tasklist_set_include_all_workspaces (WNCK_TASKLIST (tasklist->tasklist),
@@ -225,34 +216,6 @@ setup_gsettings (WindowListApplet *tasklist)
G_CALLBACK (move_unminimized_windows_changed), tasklist);
}
-static void
-applet_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation,
- WindowListApplet *tasklist)
-{
- gint len, size;
- const int *size_hints;
- GtkOrientation orient = gp_applet_get_orientation (GP_APPLET (tasklist));
-
- size_hints = wnck_tasklist_get_size_hint_list (WNCK_TASKLIST (tasklist->tasklist), &len);
- g_assert (len % 2 == 0);
-
- gp_applet_set_size_hints (GP_APPLET (tasklist), size_hints, len, 0);
-
- if (orient == GTK_ORIENTATION_HORIZONTAL) {
- size = allocation->height;
- } else {
- size = allocation->width;
- }
-
- if (tasklist->size == size)
- return;
-
- tasklist->size = size;
-
- tasklist_update (tasklist);
-}
-
static GdkPixbuf*
icon_loader_func (const char *icon,
int size,
@@ -495,9 +458,6 @@ window_list_applet_fill (GpApplet *applet)
g_signal_connect (G_OBJECT (tasklist->tasklist), "destroy",
G_CALLBACK (destroy_tasklist),
tasklist);
- g_signal_connect (G_OBJECT (tasklist), "size-allocate",
- G_CALLBACK (applet_size_allocate),
- tasklist);
tasklist_update (tasklist);
gtk_widget_show (tasklist->tasklist);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]