summaryrefslogtreecommitdiff
path: root/sysutils/xfce4-fsguard-plugin/files/patch-panel-plugin_fsguard.c
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2019-09-19 23:46:33 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2019-09-19 23:46:33 +0000
commite69e6941cc0f1dab5aefa920fb26c0f26941f258 (patch)
treee3316902afbb4318b0439dc574f0496749ecfdc3 /sysutils/xfce4-fsguard-plugin/files/patch-panel-plugin_fsguard.c
parentUpgrade editors/openoffice-devel to upstream git hash d871312c80. (diff)
Welcome XFCE 4.14 to the FreeBSD ports tree
- This XFCE release uses almost exclusively gtk3, so the USES=xfce now defaults to gtk3 - Make x11-themes/gtk-xfce-engine an optional dependency(disabled by default), it only supports gtk2, so would leave miost of this XFCE version unthemed. - Add Greybird as an optional and enabled dependency as a modern theme supporting both GTK versions and all other XFCE parts - The xfce4-vala port is deprecated and removed. The VALA bindings are available in the library ports using the GIR and VAPI options (on by default) - Fixed various missing library and portlint warnings (portmgr fixit blanket) - Default Display Manager changed to lightdm (Thanks to woodsb02 for help) - Add x11/xfce4-screensaver as an optional dependency to the xfce4-goodies (enabled by default) - Remove dependency on x11-fm/thunar-vfs and deprecate the port. It is EOL upstream and the functionality is included in thunar itself Update: - Added back sysutils/xfce4-places-plugin, updated to 1.8.1 - archivers/thunar-archive-plugin to 0.4.0 - audio/thunar-media-tags-plugin to 0.3.0 - audio/xfce4-mpc-plugin to 0.5.2 - audio/xfce4-pulseaudio-plugin to 0.4.2 - deskutils/xfce4-tumbler to 0.2.7 - devel/thunar-vcs-plugin to 0.2.0 [1] - devel/xfce4-dev-tools to 4.14.0 - misc/xfce4-appfinder to 4.14.0 - misc/xfce4-weather-plugin to 0.10.0 - multimedia/xfce4-parole to 1.0.4 - sysutils/gigolo to 0.5.0 - sysutils/xfce4-battery-plugin to 1.1.3 - sysutils/xfce4-fsguard-plugin to 1.1.1 - sysutils/xfce4-netload-plugin to 1.3.2 - sysutils/xfce4-power-manage to 1.6.5 - sysutils/xfce4-settings 4.14.1 - sysutils/xfce4-systemload-plugin to 1.2.3 - sysutils/xfce4-wavelan-plugin to 0.6.1 - www/xfce4-smartbookmark-plugin to 0.5.1 - x11-clocks/xfce4-datetime-plugin to 0.8.0 - Added new xfce4-stopwatch-plugin, version 0.3.1 - x11-clocks/xfce4-timer-out-plugin to 1.0.3 - x11-fm/thunar to 1.8.9 - x11-wm/xfce4-desktop to 4.14.1 - x11-wm/xfce4-panel to 4.14.0 - x11-wm/xfce4-session to 4.14.0 - x11-wm/xfce4-wm to 4.14.0 - x11/libexo to 0.12.8 - x11/libxfce4menu to 4.14.1 - x11/libxfce4util to 4.14.0 - x11/xfce4-conf to 4.14.1 - x11/xfce4-dashboard to 0.7.5 - x11/xfce4-screensaver to 0.1.8 - x11/xfce4-screenshooter-plugin to 1.9.6 - x11/xfce4-verve-plugin to 2.0.0 Thanks to: Olivier Duchateau <duchateau.olivier@gmail.com> PR: 240236 Exp-run by: antoine Tested by: sbruno Approved by: sergey.dyatko@gmail.com (maintainer timeout via email), portmgr (fixit blanket, port breaks with new Thunar if not updated) [1] Differential Revision: https://reviews.freebsd.org/D21278
Notes
Notes: svn path=/head/; revision=512378
Diffstat (limited to 'sysutils/xfce4-fsguard-plugin/files/patch-panel-plugin_fsguard.c')
-rw-r--r--sysutils/xfce4-fsguard-plugin/files/patch-panel-plugin_fsguard.c148
1 files changed, 0 insertions, 148 deletions
diff --git a/sysutils/xfce4-fsguard-plugin/files/patch-panel-plugin_fsguard.c b/sysutils/xfce4-fsguard-plugin/files/patch-panel-plugin_fsguard.c
deleted file mode 100644
index 77586f71c9b3..000000000000
--- a/sysutils/xfce4-fsguard-plugin/files/patch-panel-plugin_fsguard.c
+++ /dev/null
@@ -1,148 +0,0 @@
---- 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);