diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-12-24 23:41:59 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@googlemail.com> | 2012-12-24 23:41:59 +0000 |
| commit | d91fb6088a6810b96746f4be00a47ac27b1a0b18 (patch) | |
| tree | df956813971afa88a6762786922b64d884befc56 /src | |
| parent | ruler: Merge sizing from GIMP. Don't use our UNUSED_PIXELS hack in Gtk+ 3 bu... (diff) | |
| download | inkscape-d91fb6088a6810b96746f4be00a47ac27b1a0b18.tar.gz inkscape-d91fb6088a6810b96746f4be00a47ac27b1a0b18.zip | |
ruler: Drop unused members of SPRulerMetric
(bzr r11982)
Diffstat (limited to 'src')
| -rw-r--r-- | src/widgets/ruler.cpp | 19 | ||||
| -rw-r--r-- | src/widgets/ruler.h | 2 |
2 files changed, 9 insertions, 12 deletions
diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp index ab0089d0a..60bbb4b14 100644 --- a/src/widgets/ruler.cpp +++ b/src/widgets/ruler.cpp @@ -105,19 +105,18 @@ static PangoLayout * sp_ruler_get_layout (GtkWidget *widget, #define SP_RULER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), SP_TYPE_RULER, SPRulerPrivate)) -// Note: const casts are due to SPRuler being const-broken and not scheduled for any more fixes. /// Ruler metrics. static SPRulerMetric const sp_ruler_metrics[] = { // NOTE: the order of records in this struct must correspond to the SPMetric enum. - {const_cast<gchar*>("NONE"), const_cast<gchar*>(""), 1, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, - {const_cast<gchar*>("millimeters"), const_cast<gchar*>("mm"), PX_PER_MM, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, - {const_cast<gchar*>("centimeters"), const_cast<gchar*>("cm"), PX_PER_CM, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, - {const_cast<gchar*>("inches"), const_cast<gchar*>("in"), PX_PER_IN, { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 }, { 1, 2, 4, 8, 16 }}, - {const_cast<gchar*>("feet"), const_cast<gchar*>("ft"), PX_PER_FT, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, - {const_cast<gchar*>("points"), const_cast<gchar*>("pt"), PX_PER_PT, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, - {const_cast<gchar*>("picas"), const_cast<gchar*>("pc"), PX_PER_PC, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, - {const_cast<gchar*>("pixels"), const_cast<gchar*>("px"), PX_PER_PX, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, - {const_cast<gchar*>("meters"), const_cast<gchar*>("m"), PX_PER_M, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, + {1, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, // SP_NONE + {PX_PER_MM, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, // SP_MM + {PX_PER_CM, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, // SP_CM + {PX_PER_IN, { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 }, { 1, 2, 4, 8, 16 }}, // SP_IN + {PX_PER_FT, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, // SP_FT + {PX_PER_PT, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, // SP_PT + {PX_PER_PC, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, // SP_PC + {PX_PER_PX, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, // SP_PX + {PX_PER_M, { 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000 }, { 1, 5, 10, 50, 100 }}, // SP_M }; G_DEFINE_TYPE_WITH_CODE (SPRuler, sp_ruler, GTK_TYPE_WIDGET, diff --git a/src/widgets/ruler.h b/src/widgets/ruler.h index 9c7971fb7..a15e9bd57 100644 --- a/src/widgets/ruler.h +++ b/src/widgets/ruler.h @@ -45,8 +45,6 @@ struct _SPRulerClass struct _SPRulerMetric { - gchar const *metric_name; - gchar const *abbrev; /* This should be points_per_unit. This is the size of the unit * in 1/72nd's of an inch and has nothing to do with screen pixels */ gdouble pixels_per_unit; |
