[Goodies-commits] r3306 - in xfce4-fsguard-plugin/trunk: . panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Fri Oct 5 05:38:23 CEST 2007
Author: mmassonnet
Date: 2007-10-05 03:38:23 +0000 (Fri, 05 Oct 2007)
New Revision: 3306
Modified:
xfce4-fsguard-plugin/trunk/ChangeLog
xfce4-fsguard-plugin/trunk/NEWS
xfce4-fsguard-plugin/trunk/TODO
xfce4-fsguard-plugin/trunk/panel-plugin/fsguard.c
Log:
* panel-plugin/fsguard.c(fsguard_refresh_monitor): New function.
Set the color of the progress bar according the free disk
space limit.
Modified: xfce4-fsguard-plugin/trunk/ChangeLog
===================================================================
--- xfce4-fsguard-plugin/trunk/ChangeLog 2007-10-05 02:29:54 UTC (rev 3305)
+++ xfce4-fsguard-plugin/trunk/ChangeLog 2007-10-05 03:38:23 UTC (rev 3306)
@@ -1,3 +1,55 @@
+2007-10-05 Mike Massonnet <mmassonnet at xfce.org>
+
+ * panel-plugin/fsguard.c: Remove deprecated #define, add 4 new
+ #define for the icon style. Add icon_id and an icon widget in
+ the structure. Include xfce-panel-convenience.h for the
+ button panel.
+ * panel-plugin/fsguard.c(fsguard_set_icon): New function. Sets
+ the image inside the panel button.
+ * panel-plugin/fsguard.c(fsguard_refresh_icon): New function.
+ Refresh the current icon the panel button.
+ * panel-plugin/fsguard.c(fsguard_refresh_monitor): New function.
+ Set the color of the progress bar according the free disk space
+ limit.
+ * panel-plugin/fsguard.c(fsguard_check_fs): Replace code for the
+ new image inside the button panel.
+ * panel-plugin/fsguard.c(fsguard_read_config): Set default
+ values for the warning and urgent limit.
+ * panel-plugin/fsguard.c(fsguard_new): Replace
+ xfce_iconbutton_new with xfce_create_panel_button and put a
+ GtkImage in that one.
+ * panel-plugin/fsguard.c(fsguard_spin1_changed),
+ panel-plugin/fsguard.c(fsguard_spin2_changed),
+ panel-plugin/fsguard.c(fsguard_create_options): Fixed a mix
+ between limit_urgent and limit_warning.
+ * configure.in.in, icons/*/**,
+ panel-plugin/fsguard.desktop.in.in,
+ panel-plugin/Makefile.am: Removed old icons against 3 new
+ icons.
+
+2007-10-04 Mike Massonnet <mmassonnet at xfce.org>
+
+ * panel-plugin/fsguard.c: Add defined(__FreeBSD_kernel__) to
+ build the plugin on GNU/kFreeBSD. Fix bug #3033.
+ * fsguard.c: Code cleaning in general.
+ * fsguard.c(typedef struct FsGuard): Dropped size and
+ orientation, and renamed some properties. Added 3 new
+ widgets: a progress bar, a box for the progress bar, and a
+ label for the free space.
+ * fsguard.c(fsguard_check_fs): Add total size in the tooltip.
+ * fsguard.c(setup_fsguard): Renamed to fsguard_new. Read the
+ config there to create a new plugin with better default
+ values. Create the widget for the name and avoid to destroy
+ it in fsguard_recreate_gui.
+ * fsguard.c(fsguard_recreate_gui): Renamed to
+ fsguard_refresh_name.
+ * fsguard.c(setup_fsguard), fsguard.c(fsguard_set_orientation):
+ Replace orientation code with an XfceHVBox widget.
+ * fsguard.c(fsguard_create_options): String modifications. Two
+ new checkboxes to display the size and progress bar.
+ * po/: Run make update-po and update fuzzy strings.
+
+
2006-01-01 15:04 p0llux
* configure.ac, po/fr.po: add fr translations from Stephane Roy
Modified: xfce4-fsguard-plugin/trunk/NEWS
===================================================================
--- xfce4-fsguard-plugin/trunk/NEWS 2007-10-05 02:29:54 UTC (rev 3305)
+++ xfce4-fsguard-plugin/trunk/NEWS 2007-10-05 03:38:23 UTC (rev 3306)
@@ -1,31 +1,38 @@
+20071005 (0.3.99.1):
+--------------------
+ * New options to display the free space in a text label and in a
+ progress bar, and the possibility to hide the button in the panel
+ * Redefined the strings
+ * Bug fixes and code cleanup
+
20060206 (0.3.0):
-----------------
- * ported to xfce 4.4 by Jasper Huijsmans, thanks!
+ * Ported to xfce 4.4 by Jasper Huijsmans, thanks!
20051011 (0.2.1):
-----------------
- * the icon is now properly centered when no label is given
+ * The icon is now properly centered when no label is given
20040204:
---------
- * now it's possible to add mountpoints with max 32 chars
+ * Now it's possible to add mountpoints with max 32 chars
as requested by Stefan Misel
20040109:
---------
- * added Polish translation by Daniel Mroz
+ * Added Polish translation by Daniel Mroz
20031124:
---------
- * added Korean translation by David Choi
+ * Added Korean translation by David Choi
20031122:
---------
- * fixed memory leak
+ * Fixed memory leak
20031112:
---------
- * new option to choose the filemanager for button1 click
+ * New option to choose the filemanager for button1 click
20031111:
---------
Modified: xfce4-fsguard-plugin/trunk/TODO
===================================================================
--- xfce4-fsguard-plugin/trunk/TODO 2007-10-05 02:29:54 UTC (rev 3305)
+++ xfce4-fsguard-plugin/trunk/TODO 2007-10-05 03:38:23 UTC (rev 3306)
@@ -1 +0,0 @@
-- Color the progres bar depending on the limit state
Modified: xfce4-fsguard-plugin/trunk/panel-plugin/fsguard.c
===================================================================
--- xfce4-fsguard-plugin/trunk/panel-plugin/fsguard.c 2007-10-05 02:29:54 UTC (rev 3305)
+++ xfce4-fsguard-plugin/trunk/panel-plugin/fsguard.c 2007-10-05 03:38:23 UTC (rev 3306)
@@ -56,8 +56,12 @@
#define ICON_URGENT 2
#define ICON_INSENSITIVE 3
-#define BORDER 8
+#define BORDER 8
+#define COLOR_NORMAL "#00C000"
+#define COLOR_WARNING "#FFE500"
+#define COLOR_URGENT "#FF4F00"
+
// }}}
// struct {{{
@@ -157,6 +161,37 @@
}
static void
+fsguard_refresh_monitor (FsGuard *fsguard)
+{
+ GdkColor color;
+
+ switch (fsguard->icon_id) {
+ default:
+ case ICON_NORMAL:
+ gdk_color_parse (COLOR_NORMAL, &color);
+ break;
+
+ case ICON_WARNING:
+ gdk_color_parse (COLOR_WARNING, &color);
+ break;
+
+ case ICON_URGENT:
+ gdk_color_parse (COLOR_URGENT, &color);
+ break;
+ }
+
+ gtk_widget_modify_bg (GTK_WIDGET (fsguard->progress_bar),
+ GTK_STATE_PRELIGHT,
+ &color);
+ gtk_widget_modify_bg (GTK_WIDGET (fsguard->progress_bar),
+ GTK_STATE_SELECTED,
+ &color);
+ gtk_widget_modify_base (GTK_WIDGET (fsguard->progress_bar),
+ GTK_STATE_SELECTED,
+ &color);
+}
+
+static void
fsguard_open_mnt (GtkWidget *widget, FsGuard *fsguard)
{
GString *cmd;
@@ -236,6 +271,7 @@
gtk_tooltips_set_tip (tooltips, fsguard->ebox, msg, NULL);
fsguard_set_icon (fsguard, icon_id);
+ fsguard_refresh_monitor (fsguard);
return TRUE;
}
More information about the Goodies-commits
mailing list