gnome-scan r687 - in trunk: . lib
- From: bersace svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-scan r687 - in trunk: . lib
- Date: Sun, 14 Dec 2008 17:30:15 +0000 (UTC)
Author: bersace
Date: Sun Dec 14 17:30:14 2008
New Revision: 687
URL: http://svn.gnome.org/viewvc/gnome-scan?rev=687&view=rev
Log:
Show unit label after option widget.
Modified:
trunk/ChangeLog
trunk/lib/gnome-scan-common.vala
trunk/lib/gnome-scan-option-widget.vala
Modified: trunk/lib/gnome-scan-common.vala
==============================================================================
--- trunk/lib/gnome-scan-common.vala (original)
+++ trunk/lib/gnome-scan-common.vala Sun Dec 14 17:30:14 2008
@@ -34,6 +34,27 @@
PERCENT,
MICROSECOND
}
+ public string unit_to_string(Gnome.Scan.Unit unit)
+ {
+ switch(unit) {
+ case Unit.PIXEL:
+ return _("px");
+ case Unit.POINTS:
+ return _("pt");
+ case Unit.MM:
+ return _("mm");
+ case Unit.BIT:
+ return _("bit");
+ case Unit.DPI:
+ return _("dpi");
+ case Unit.PERCENT:
+ return "%";
+ case Unit.MICROSECOND:
+ return _("ms");
+ default:
+ return "";
+ }
+ }
// Status in reverse order of priority
public enum Status {
Modified: trunk/lib/gnome-scan-option-widget.vala
==============================================================================
--- trunk/lib/gnome-scan-option-widget.vala (original)
+++ trunk/lib/gnome-scan-option-widget.vala Sun Dec 14 17:30:14 2008
@@ -41,6 +41,11 @@
this.tooltip_text = option.desc;
this.option.notify["active"] += this.on_option_active_changed;
this.auto_hide(option);
+
+ if (option.unit != Gnome.Scan.Unit.NONE) {
+ var unit = new Label(unit_to_string(option.unit));
+ this.pack_end(unit, false, false, 0);
+ }
}
public OptionWidget(Option option)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]