From owner-svn-ports-head@freebsd.org Sun Feb 26 09:58:50 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BFB7CEC151; Sun, 26 Feb 2017 09:58:50 +0000 (UTC) (envelope-from olivierd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE4FFD90; Sun, 26 Feb 2017 09:58:49 +0000 (UTC) (envelope-from olivierd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1Q9wnhc037174; Sun, 26 Feb 2017 09:58:49 GMT (envelope-from olivierd@FreeBSD.org) Received: (from olivierd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1Q9wmui037170; Sun, 26 Feb 2017 09:58:48 GMT (envelope-from olivierd@FreeBSD.org) Message-Id: <201702260958.v1Q9wmui037170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: olivierd set sender to olivierd@FreeBSD.org using -f From: Olivier Duchateau Date: Sun, 26 Feb 2017 09:58:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r434852 - in head/sysutils/xfce4-fsguard-plugin: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2017 09:58:50 -0000 Author: olivierd Date: Sun Feb 26 09:58:48 2017 New Revision: 434852 URL: https://svnweb.freebsd.org/changeset/ports/434852 Log: - Update to 1.1.0 - Add LICENSE - Sort USES - Switch to optional extra build target - Backport support of Gtk3 < 3.20 Added: head/sysutils/xfce4-fsguard-plugin/files/ head/sysutils/xfce4-fsguard-plugin/files/patch-panel-plugin_fsguard.c (contents, props changed) Modified: head/sysutils/xfce4-fsguard-plugin/Makefile head/sysutils/xfce4-fsguard-plugin/distinfo head/sysutils/xfce4-fsguard-plugin/pkg-plist Modified: head/sysutils/xfce4-fsguard-plugin/Makefile ============================================================================== --- head/sysutils/xfce4-fsguard-plugin/Makefile Sun Feb 26 09:01:42 2017 (r434851) +++ head/sysutils/xfce4-fsguard-plugin/Makefile Sun Feb 26 09:58:48 2017 (r434852) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= xfce4-fsguard-plugin -PORTVERSION= 1.0.2 -PORTREVISION= 1 +PORTVERSION= 1.1.0 CATEGORIES= sysutils xfce MASTER_SITES= XFCE/src/panel-plugins/${PORTNAME}/${PORTVERSION:R} DIST_SUBDIR= xfce4 @@ -11,11 +10,14 @@ DIST_SUBDIR= xfce4 MAINTAINER= xfce@FreeBSD.org COMMENT= Panel plugin which displays free space of mountpoint +# COPYING file is wrong compared to license header +LICENSE= BSD2CLAUSE + GNU_CONFIGURE= yes INSTALLS_ICONS= yes INSTALL_TARGET= install-strip -USES= gmake libtool pkgconfig gettext-tools xfce tar:bzip2 -USE_GNOME= gtk20 intltool intlhack +USES= gettext-tools gmake libtool pkgconfig tar:bzip2 xfce:gtk3 +USE_GNOME= gtk30 intltool cairo USE_XFCE= panel USE_XORG= x11 @@ -24,11 +26,7 @@ NLS_USES= gettext-runtime NLS_CONFIGURE_ENABLE= nls OPTIONS_SUB= yes -.include - -post-patch: -.if empty(PORT_OPTIONS:MNLS) +post-patch-NLS-off: @${REINPLACE_CMD} -e 's| po||' ${WRKSRC}/Makefile.in -.endif .include Modified: head/sysutils/xfce4-fsguard-plugin/distinfo ============================================================================== --- head/sysutils/xfce4-fsguard-plugin/distinfo Sun Feb 26 09:01:42 2017 (r434851) +++ head/sysutils/xfce4-fsguard-plugin/distinfo Sun Feb 26 09:58:48 2017 (r434852) @@ -1,2 +1,3 @@ -SHA256 (xfce4/xfce4-fsguard-plugin-1.0.2.tar.bz2) = a2c8d59386ae3d23cf6bdd06a1cdd7a1b9473cf6f38ae106600b194c601040ae -SIZE (xfce4/xfce4-fsguard-plugin-1.0.2.tar.bz2) = 356715 +TIMESTAMP = 1488101299 +SHA256 (xfce4/xfce4-fsguard-plugin-1.1.0.tar.bz2) = 6b038322b49d29625219e6a54497085b8f834b9c1fd15282ce286a6529d7c445 +SIZE (xfce4/xfce4-fsguard-plugin-1.1.0.tar.bz2) = 360463 Added: head/sysutils/xfce4-fsguard-plugin/files/patch-panel-plugin_fsguard.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/xfce4-fsguard-plugin/files/patch-panel-plugin_fsguard.c Sun Feb 26 09:58:48 2017 (r434852) @@ -0,0 +1,148 @@ +--- panel-plugin/fsguard.c.orig 2016-10-29 06:43:10 UTC ++++ panel-plugin/fsguard.c +@@ -70,6 +70,7 @@ typedef struct + XfcePanelPlugin *plugin; + gboolean seen; + gint icon_id; ++ gchar *css_class; + gint timeout; + guint limit_warning; + guint limit_urgent; +@@ -135,6 +136,7 @@ fsguard_set_icon (FsGuard *fsguard, gint + if (id == fsguard->icon_id) + return; + ++ DBG ("icon id: new=%d, cur=%d", id, fsguard->icon_id); + fsguard->icon_id = id; + size = xfce_panel_plugin_get_size (fsguard->plugin); + size /= xfce_panel_plugin_get_nrows (fsguard->plugin); +@@ -177,7 +179,7 @@ fsguard_refresh_icon (FsGuard *fsguard) + } + + static void +-fsguard_refresh_monitor (FsGuard *fsguard) ++fsguard_refresh_monitor_color (FsGuard *fsguard, gchar *css_class) + { + GdkRGBA color; + +@@ -197,23 +199,15 @@ fsguard_refresh_monitor (FsGuard *fsguar + } + + #if GTK_CHECK_VERSION (3, 16, 0) +- GtkCssProvider *css_provider; +-#if GTK_CHECK_VERSION (3, 20, 0) +- gchar * css = g_strdup_printf("progressbar trough { min-width: 4px; min-height: 4px; } \ +- progressbar progress { min-width: 4px; min-height: 4px; \ +- background-color: %s; background-image: none; }", +-#else +- gchar * css = g_strdup_printf(".progressbar { background-color: %s; background-image: none; }", +-#endif +- gdk_rgba_to_string(&color)); +- /* Setup Gtk style */ +- css_provider = gtk_css_provider_new (); +- gtk_css_provider_load_from_data (css_provider, css, strlen(css), NULL); +- gtk_style_context_add_provider ( +- GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (fsguard->progress_bar))), +- GTK_STYLE_PROVIDER (css_provider), +- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); +- g_free(css); ++ DBG("removing class %s, adding %s", fsguard->css_class, css_class); ++ gtk_style_context_remove_class ( ++ GTK_STYLE_CONTEXT(gtk_widget_get_style_context (GTK_WIDGET (fsguard->progress_bar))), ++ fsguard->css_class); ++ gtk_style_context_add_class ( ++ GTK_STYLE_CONTEXT(gtk_widget_get_style_context (GTK_WIDGET (fsguard->progress_bar))), ++ css_class); ++ g_free(fsguard->css_class); ++ fsguard->css_class = g_strdup(css_class); + #else + gtk_widget_override_background_color (GTK_WIDGET (fsguard->progress_bar), + GTK_STATE_PRELIGHT, +@@ -270,6 +264,7 @@ fsguard_check_fs (FsGuard *fsguard) + float totalblocks = 0; + long blocksize = 0; + int err; ++ gchar *css_class = "normal"; + gchar msg_size[100], msg_total_size[100], msg[100]; + gint icon_id = ICON_INSENSITIVE; + static struct statfs fsd; +@@ -285,10 +280,13 @@ fsguard_check_fs (FsGuard *fsguard) + + if (freespace > (total * fsguard->limit_warning / 100)) { + icon_id = ICON_NORMAL; ++ css_class = "normal"; + } else if (freespace > (total * fsguard->limit_urgent / 100) && freespace <= (total * fsguard->limit_warning / 100)) { + icon_id = ICON_WARNING; ++ css_class = "warning"; + } else { + icon_id = ICON_URGENT; ++ css_class = "urgent"; + } + } + g_snprintf (msg, sizeof (msg), +@@ -316,7 +314,8 @@ fsguard_check_fs (FsGuard *fsguard) + if (fsguard->show_progress_bar) { + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(fsguard->progress_bar), + (total > 0 ) ? 1.0 - (freespace / total) : 0.0); +- fsguard_refresh_monitor (fsguard); ++ if (icon_id != fsguard->icon_id) ++ fsguard_refresh_monitor_color (fsguard, css_class); + } + + gtk_widget_set_tooltip_text(fsguard->ebox, msg); +@@ -347,6 +346,7 @@ fsguard_read_config (FsGuard *fsguard) + fsguard->name = g_strdup (""); + fsguard->show_name = FALSE; + fsguard->path = g_strdup ("/"); ++ fsguard->css_class = g_strdup ("normal"); + fsguard->show_size = TRUE; + fsguard->show_progress_bar = TRUE; + fsguard->hide_button = FALSE; +@@ -406,6 +406,9 @@ fsguard_write_config (XfcePanelPlugin *p + static FsGuard * + fsguard_new (XfcePanelPlugin *plugin) + { ++#if GTK_CHECK_VERSION (3, 16, 0) ++ GtkCssProvider *css_provider; ++#endif + FsGuard *fsguard = g_new0(FsGuard, 1); + + fsguard->plugin = plugin; +@@ -429,6 +432,37 @@ fsguard_new (XfcePanelPlugin *plugin) + fsguard->icon_panel = gtk_image_new (); + + fsguard->progress_bar = gtk_progress_bar_new (); ++#if GTK_CHECK_VERSION (3, 16, 0) ++ css_provider = gtk_css_provider_new (); ++#if GTK_CHECK_VERSION (3, 20, 0) ++ gtk_css_provider_load_from_data (css_provider, "\ ++ progressbar.horizontal trough { min-height: 4px; }\ ++ progressbar.horizontal progress { min-height: 4px; }\ ++ progressbar.vertical trough { min-width: 4px; }\ ++ progressbar.vertical progress { min-width: 4px; }\ ++ .normal progress { background-color: " COLOR_NORMAL " ; background-image: none; }\ ++ .warning progress { background-color: " COLOR_WARNING " ; background-image: none; }\ ++ .urgent progress { background-color: " COLOR_URGENT " ; background-image: none; }", ++ -1, NULL); ++#else ++ gtk_css_provider_load_from_data (css_provider, "\ ++ .progressbar.horizontal trough { min-height: 4px; }\ ++ .progressbar.horizontal progress { min-height: 4px; }\ ++ .progressbar.vertical trough { min-width: 4px; }\ ++ .progressbar.vertical progress { min-width: 4px; }\ ++ .normal progress { background-color: " COLOR_NORMAL " ; background-image: none; }\ ++ .warning progress { background-color: " COLOR_WARNING " ; background-image: none; }\ ++ .urgent progress { background-color: " COLOR_URGENT " ; background-image: none; }", ++ -1, NULL); ++#endif ++ gtk_style_context_add_provider ( ++ GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (fsguard->progress_bar))), ++ GTK_STYLE_PROVIDER (css_provider), ++ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); ++ gtk_style_context_add_class ( ++ GTK_STYLE_CONTEXT(gtk_widget_get_style_context (GTK_WIDGET (fsguard->progress_bar))), ++ fsguard->css_class); ++#endif + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(fsguard->progress_bar), 0.0); + gtk_progress_bar_set_inverted (GTK_PROGRESS_BAR(fsguard->progress_bar), (orientation == GTK_ORIENTATION_HORIZONTAL)); + gtk_orientable_set_orientation (GTK_ORIENTABLE(fsguard->progress_bar), !orientation); Modified: head/sysutils/xfce4-fsguard-plugin/pkg-plist ============================================================================== --- head/sysutils/xfce4-fsguard-plugin/pkg-plist Sun Feb 26 09:01:42 2017 (r434851) +++ head/sysutils/xfce4-fsguard-plugin/pkg-plist Sun Feb 26 09:58:48 2017 (r434852) @@ -35,6 +35,7 @@ share/icons/hicolor/scalable/apps/xfce4- %%NLS%%share/locale/fi/LC_MESSAGES/xfce4-fsguard-plugin.mo %%NLS%%share/locale/fr/LC_MESSAGES/xfce4-fsguard-plugin.mo %%NLS%%share/locale/gl/LC_MESSAGES/xfce4-fsguard-plugin.mo +%%NLS%%share/locale/he/LC_MESSAGES/xfce4-fsguard-plugin.mo %%NLS%%share/locale/hr/LC_MESSAGES/xfce4-fsguard-plugin.mo %%NLS%%share/locale/hu/LC_MESSAGES/xfce4-fsguard-plugin.mo %%NLS%%share/locale/id/LC_MESSAGES/xfce4-fsguard-plugin.mo @@ -48,6 +49,7 @@ share/icons/hicolor/scalable/apps/xfce4- %%NLS%%share/locale/ms/LC_MESSAGES/xfce4-fsguard-plugin.mo %%NLS%%share/locale/nb/LC_MESSAGES/xfce4-fsguard-plugin.mo %%NLS%%share/locale/nl/LC_MESSAGES/xfce4-fsguard-plugin.mo +%%NLS%%share/locale/nn/LC_MESSAGES/xfce4-fsguard-plugin.mo %%NLS%%share/locale/oc/LC_MESSAGES/xfce4-fsguard-plugin.mo %%NLS%%share/locale/pa/LC_MESSAGES/xfce4-fsguard-plugin.mo %%NLS%%share/locale/pl/LC_MESSAGES/xfce4-fsguard-plugin.mo