View | Details | Raw Unified | Return to bug 234224
Collapse All | Expand All

(-)Makefile (-10 / +5 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	xfce4-taskmanager
4
PORTNAME=	xfce4-taskmanager
5
PORTVERSION=	1.2.1
5
PORTVERSION=	1.2.2
6
PORTREVISION=	1
7
CATEGORIES=	x11 xfce
6
CATEGORIES=	x11 xfce
8
MASTER_SITES=	XFCE/src/apps/${PORTNAME}/${PORTVERSION:R}
7
MASTER_SITES=	XFCE/src/apps/${PORTNAME}/${PORTVERSION:R}
9
DIST_SUBDIR=	xfce4
8
DIST_SUBDIR=	xfce4
Lines 18-38 Link Here
18
		libfreetype.so:print/freetype2
17
		libfreetype.so:print/freetype2
19
18
20
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
21
USES=		gettext-tools gmake localbase pkgconfig tar:bzip2
20
USES=		gettext-tools gmake gnome localbase pkgconfig tar:bzip2
22
USE_GNOME=	glib20 cairo gdkpixbuf2 intltool libwnck
21
USE_GNOME=	glib20 gtk30 cairo gdkpixbuf2 intltool libwnck3
23
USE_XORG=	ice sm x11 xmu xt
22
USE_XORG=	ice sm x11 xmu xt
24
INSTALLS_ICONS=	yes
23
INSTALLS_ICONS=	yes
25
24
26
CONFIGURE_ARGS+=	--disable-silent-rules --disable-gksu \
25
CONFIGURE_ARGS+=	--disable-silent-rules --disable-gksu \
27
			--disable-wnck3 --enable-wnck
26
			--enable-wnck3 --disable-wnck --disable-gtk2
28
27
29
OPTIONS_DEFINE=		GTK3 NLS
28
OPTIONS_DEFINE=		NLS
30
OPTIONS_SUB=		yes
29
OPTIONS_SUB=		yes
31
30
32
GTK3_CONFIGURE_ENABLE=	gtk3
33
GTK3_USE=		GNOME=gtk30
34
GTK3_USE_OFF=		GNOME=gtk20
35
36
NLS_CONFIGURE_ENABLE=	nls
31
NLS_CONFIGURE_ENABLE=	nls
37
NLS_USES=		gettext-runtime
32
NLS_USES=		gettext-runtime
38
33
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1528046210
1
TIMESTAMP = 1545243474
2
SHA256 (xfce4/xfce4-taskmanager-1.2.1.tar.bz2) = 22e523e2ee231713f40a48890d8cbae99320ac1173f7c68502f490318e1e0409
2
SHA256 (xfce4/xfce4-taskmanager-1.2.2.tar.bz2) = e49a61c819a4fd9286a65ae61605984f327c8b26cf939289f644e656bfa20e13
3
SIZE (xfce4/xfce4-taskmanager-1.2.1.tar.bz2) = 394704
3
SIZE (xfce4/xfce4-taskmanager-1.2.2.tar.bz2) = 395320
(-)files/patch-af078d4 (-74 lines)
Lines 1-74 Link Here
1
From af078d406a43243388e0a61d647c3a6b7ada60ed Mon Sep 17 00:00:00 2001
2
From: rim <rozhuk.im@gmail.com>
3
Date: Thu, 21 Jun 2018 12:10:15 +0300
4
Subject: Improve app search on close (bug 14466)
5
6
---
7
 src/app-manager.c | 25 ++++++++++++++++++++++++-
8
 1 file changed, 24 insertions(+), 1 deletion(-)
9
10
diff --git a/src/app-manager.c b/src/app-manager.c
11
index 5092e00..b2bdb0c 100644
12
--- src/app-manager.c
13
+++ src/app-manager.c
14
@@ -44,6 +44,7 @@ static gint	app_pid_compare_fn				(gconstpointer a, gconstpointer b);
15
 static void	apps_add_application				(GArray *apps, WnckApplication *application, GPid pid);
16
 static void	apps_remove_application				(GArray *apps, WnckApplication *application);
17
 static App *	apps_lookup_pid					(GArray *apps, GPid pid);
18
+static App *	apps_lookup_app					(GArray *apps, WnckApplication *application);
19
 static void	application_opened				(WnckScreen *screen, WnckApplication *application, XtmAppManager *manager);
20
 static void	application_closed				(WnckScreen *screen, WnckApplication *application, XtmAppManager *manager);
21
 
22
@@ -97,12 +98,17 @@ static GPid
23
 app_get_pid(WnckApplication *application)
24
 {
25
 	GPid pid;
26
+	GList *windows;
27
+
28
 	if (NULL == application)
29
 		return (0);
30
 	pid = wnck_application_get_pid (application);
31
 	if (pid != 0)
32
 		return (pid);
33
-	return (wnck_window_get_pid (WNCK_WINDOW (wnck_application_get_windows (application)->data)));
34
+	windows = wnck_application_get_windows (application);
35
+	if (NULL != windows && NULL != windows->data)
36
+		return (wnck_window_get_pid (WNCK_WINDOW (windows->data)));
37
+	return (0);
38
 }
39
 
40
 static gint
41
@@ -134,6 +140,8 @@ apps_remove_application (GArray *apps, WnckApplication *application)
42
 {
43
 	App *app = apps_lookup_pid(apps, app_get_pid (application));
44
 
45
+	if (app == NULL)
46
+		app = apps_lookup_app(apps, application);
47
 	if (app == NULL)
48
 		return;
49
 	g_object_unref (app->icon);
50
@@ -150,6 +158,21 @@ apps_lookup_pid (GArray *apps, GPid pid)
51
 	return (bsearch(&tapp, apps->data, apps->len, sizeof(App), app_pid_compare_fn));
52
 }
53
 
54
+static App *
55
+apps_lookup_app (GArray *apps, WnckApplication *application)
56
+{
57
+	App *tapp;
58
+	guint i;
59
+
60
+	for (i = 0; i < apps->len; i++) {
61
+		tapp = &g_array_index (apps, App, i);
62
+		if (tapp->application == application)
63
+			return (tapp);
64
+	}
65
+
66
+	return (NULL);
67
+}
68
+
69
 static void
70
 application_opened (WnckScreen *screen __unused, WnckApplication *application, XtmAppManager *manager)
71
 {
72
-- 
73
cgit v1.2.1
74
(-)files/patch-b896848 (-84 lines)
Lines 1-84 Link Here
1
From b89684865d88bbb8399f70387cae9e8ae17d64d9 Mon Sep 17 00:00:00 2001
2
From: rim <rozhuk.im@gmail.com>
3
Date: Sun, 29 Jul 2018 09:22:48 +0300
4
Subject: Better utf-8 normalization (bug 14172)
5
6
---
7
 src/task-manager.c | 47 ++++++++++++++++++++++++++++++++++++++++-------
8
 1 file changed, 40 insertions(+), 7 deletions(-)
9
10
diff --git a/src/task-manager.c b/src/task-manager.c
11
index 93f9122..8188de6 100644
12
--- src/task-manager.c
13
+++ src/task-manager.c
14
@@ -22,6 +22,7 @@
15
 #include <glib-object.h>
16
 #include <glib/gi18n.h>
17
 #include <gtk/gtk.h>
18
+#include <gmodule.h>
19
 
20
 #include "task-manager.h"
21
 #ifdef HAVE_WNCK
22
@@ -125,12 +126,44 @@ setting_changed (GObject *object, GParamSpec *pspec __unused, XtmTaskManager *ma
23
 static gchar *
24
 pretty_cmdline (gchar *cmdline, gchar *comm)
25
 {
26
-	/* Use the printable range of 0x20-0x7E */
27
-	const gchar *valid_chars = " !\"#$%&'()*+,-./0123456789:;<=>?@"
28
-				   "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`"
29
-				   "abcdefghijklmnopqrstuvwxyz{|}~";
30
-	gchar *text = g_strstrip (g_strcanon (g_strdup (cmdline), valid_chars, ' '));
31
-	gsize text_size = (gsize)strlen (text);
32
+	gunichar c;
33
+	gchar *ch, *text_max, *text = g_strstrip (g_strdup (cmdline));
34
+	gsize csize, text_size = (gsize)strlen (text);
35
+
36
+	/* UTF-8 normalize. */
37
+	do {
38
+		for (ch = text, text_max = (text + text_size);
39
+		     text_max > ch;
40
+		     text_max = (text + text_size), ch = g_utf8_next_char(ch)) {
41
+			c = g_utf8_get_char_validated(ch, -1); /* If use (text_max - ch) - result is worse. */
42
+			if ((gunichar)-2 == c) {
43
+				text_size = (gsize)(ch - text);
44
+				(*ch) = 0;
45
+				break;
46
+			}
47
+			if ((gunichar)-1 == c) {
48
+				(*ch) = ' ';
49
+				continue;
50
+			}
51
+			csize = (gsize)g_unichar_to_utf8(c, NULL);
52
+
53
+			if (!g_unichar_isdefined(c) ||
54
+			    !g_unichar_isprint(c) ||
55
+			    (g_unichar_isspace(c) && (1 != csize || (' ' != (*ch) && '	' != (*ch)))) ||
56
+			    g_unichar_ismark(c) ||
57
+			    g_unichar_istitle(c) ||
58
+			    g_unichar_iswide(c) ||
59
+			    g_unichar_iszerowidth(c) ||
60
+			    g_unichar_iscntrl(c)) {
61
+				if (text_max < (ch + csize))
62
+					break;
63
+				memmove(ch, (ch + csize), (gsize)(text_max - (ch + csize)));
64
+				text_size -= csize;
65
+			}
66
+		}
67
+		text[text_size] = 0;
68
+	} while (!g_utf8_validate(text, (gssize)text_size, NULL));
69
+
70
 	if (!full_cmdline && text_size > 3)
71
 	{
72
 		/* Shorten full path to commands and wine applications */
73
@@ -139,7 +172,7 @@ pretty_cmdline (gchar *cmdline, gchar *comm)
74
 			gchar *p = g_strstr_len (text, (gssize)text_size, comm);
75
 			if (p != NULL)
76
 			{
77
-				g_strlcpy (text, p, text_size);
78
+				memmove (text, p, text_size);
79
 			}
80
 		}
81
 	}
82
-- 
83
cgit v1.2.1
84
(-)files/patch-src__exec-tool-button.c (-37 lines)
Lines 1-37 Link Here
1
--- src/exec-tool-button.c.orig	2014-12-23 21:35:43 UTC
2
+++ src/exec-tool-button.c
3
@@ -51,7 +51,7 @@ xtm_exec_tool_button_init (XtmExecToolBu
4
 {
5
 	GtkWidget *menu;
6
 
7
-	gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (button), "gtk-execute");
8
+	gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (button), "system-run");
9
 	gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (button), TRUE);
10
 
11
 	menu = construct_menu ();
12
@@ -189,19 +189,19 @@ construct_menu (void)
13
 
14
 	/* Find a runner program */
15
 	if (program_exists ("xfrun4"))
16
-		menu_append_item (GTK_MENU (menu), _("Run Program..."), "xfrun4", "gtk-execute");
17
+		menu_append_item (GTK_MENU (menu), _("Run Program..."), "xfrun4", "system-run");
18
 	else if (program_exists ("gmrun"))
19
-		menu_append_item (GTK_MENU (menu), _("Run Program..."), "gmrun", "gtk-execute");
20
+		menu_append_item (GTK_MENU (menu), _("Run Program..."), "gmrun", "system-run");
21
 	else if (program_exists ("gexec"))
22
-		menu_append_item (GTK_MENU (menu), _("Run Program..."), "gexec", "gtk-execute");
23
+		menu_append_item (GTK_MENU (menu), _("Run Program..."), "gexec", "system-run");
24
 	/* Find an applications-listing program */
25
 	if (program_exists ("xfce4-appfinder"))
26
-		menu_append_item (GTK_MENU (menu), _("Application Finder"), "xfce4-appfinder", "xfce4-appfinder");
27
+		menu_append_item (GTK_MENU (menu), _("Application Finder"), "xfce4-appfinder", "utilities-system-monitor");
28
 	/* Find a terminal emulator */
29
 	if (program_exists ("exo-open"))
30
-		menu_append_item (GTK_MENU (menu), _("Terminal emulator"), "exo-open --launch TerminalEmulator", "terminal");
31
+		menu_append_item (GTK_MENU (menu), _("Terminal emulator"), "exo-open --launch TerminalEmulator", "utilities-terminal");
32
 	else if (program_exists ("xterm"))
33
-		menu_append_item (GTK_MENU (menu), _("XTerm"), "xterm -fg grey -bg black", "terminal");
34
+		menu_append_item (GTK_MENU (menu), _("XTerm"), "xterm -fg grey -bg black", "utilities-terminal");
35
 
36
 	gtk_widget_show_all (menu);
37
 
(-)files/patch-src_exec-tool-button.c (-2 / +2 lines)
Lines 1-6 Link Here
1
--- src/exec-tool-button.c.orig	2014-12-23 21:35:43 UTC
1
--- src/exec-tool-button.c.orig	2014-12-23 21:35:43 UTC
2
+++ src/exec-tool-button.c
2
+++ src/exec-tool-button.c
3
@@ -51,7 +51,7 @@ xtm_exec_tool_button_init (XtmExecToolBu
3
@@ -51,7 +51,7 @@ xtm_exec_tool_button_init (XtmExecToolButton *button)
4
 {
4
 {
5
 	GtkWidget *menu;
5
 	GtkWidget *menu;
6
 
6
 
Lines 24-30 Link Here
24
 	/* Find an applications-listing program */
24
 	/* Find an applications-listing program */
25
 	if (program_exists ("xfce4-appfinder"))
25
 	if (program_exists ("xfce4-appfinder"))
26
-		menu_append_item (GTK_MENU (menu), _("Application Finder"), "xfce4-appfinder", "xfce4-appfinder");
26
-		menu_append_item (GTK_MENU (menu), _("Application Finder"), "xfce4-appfinder", "xfce4-appfinder");
27
+		menu_append_item (GTK_MENU (menu), _("Application Finder"), "xfce4-appfinder", "utilities-system-monitor");
27
+		menu_append_item (GTK_MENU (menu), _("Application Finder"), "xfce4-appfinder", "system-search");
28
 	/* Find a terminal emulator */
28
 	/* Find a terminal emulator */
29
 	if (program_exists ("exo-open"))
29
 	if (program_exists ("exo-open"))
30
-		menu_append_item (GTK_MENU (menu), _("Terminal emulator"), "exo-open --launch TerminalEmulator", "terminal");
30
-		menu_append_item (GTK_MENU (menu), _("Terminal emulator"), "exo-open --launch TerminalEmulator", "terminal");
(-)pkg-plist (-1 / +1 lines)
Lines 28-35 Link Here
28
%%NLS%%share/locale/ja/LC_MESSAGES/xfce4-taskmanager.mo
28
%%NLS%%share/locale/ja/LC_MESSAGES/xfce4-taskmanager.mo
29
%%NLS%%share/locale/kk/LC_MESSAGES/xfce4-taskmanager.mo
29
%%NLS%%share/locale/kk/LC_MESSAGES/xfce4-taskmanager.mo
30
%%NLS%%share/locale/ko/LC_MESSAGES/xfce4-taskmanager.mo
30
%%NLS%%share/locale/ko/LC_MESSAGES/xfce4-taskmanager.mo
31
%%NLS%%share/locale/lt/LC_MESSAGES/xfce4-taskmanager.mo
31
%%NLS%%share/locale/lv/LC_MESSAGES/xfce4-taskmanager.mo
32
%%NLS%%share/locale/lv/LC_MESSAGES/xfce4-taskmanager.mo
32
%%NLS%%share/locale/lt/LC_MESSAGES/xfce4-taskmanager.mo
33
%%NLS%%share/locale/ms/LC_MESSAGES/xfce4-taskmanager.mo
33
%%NLS%%share/locale/ms/LC_MESSAGES/xfce4-taskmanager.mo
34
%%NLS%%share/locale/nb/LC_MESSAGES/xfce4-taskmanager.mo
34
%%NLS%%share/locale/nb/LC_MESSAGES/xfce4-taskmanager.mo
35
%%NLS%%share/locale/nl/LC_MESSAGES/xfce4-taskmanager.mo
35
%%NLS%%share/locale/nl/LC_MESSAGES/xfce4-taskmanager.mo

Return to bug 234224