From 1c9e7ee09d40b8e06b80d0a09eca17d1b0fb8357 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Sat, 12 Mar 2016 18:50:04 -0500 Subject: Add a units box to line height and wire in the style units, plus some cleanup (bzr r14701) --- src/ui/widget/unit-tracker.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ui/widget/unit-tracker.cpp') diff --git a/src/ui/widget/unit-tracker.cpp b/src/ui/widget/unit-tracker.cpp index c6318db25..a1501c229 100644 --- a/src/ui/widget/unit-tracker.cpp +++ b/src/ui/widget/unit-tracker.cpp @@ -12,6 +12,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include "style-internal.h" #include "unit-tracker.h" #include "widgets/ege-select-one-action.h" @@ -121,6 +122,15 @@ void UnitTracker::addUnit(Inkscape::Util::Unit const *u) gtk_list_store_set(_store, &iter, COLUMN_STRING, u ? u->abbr.c_str() : "NULL", -1); } +void UnitTracker::prependUnit(Inkscape::Util::Unit const *u) +{ + GtkTreeIter iter; + gtk_list_store_prepend(_store, &iter); + gtk_list_store_set(_store, &iter, COLUMN_STRING, u ? u->abbr.c_str() : "NULL", -1); + /* Re-shuffle our default selection here (_active gets out of sync) */ + setActiveUnit(_activeUnit); +} + void UnitTracker::setFullVal(GtkAdjustment *adj, gdouble val) { _priorValues[adj] = val; -- cgit v1.2.3