Jim Evins [Sat, 10 Jul 2010 05:38:48 +0000 (01:38 -0400)]
Improved centering of barcode text.
Don't try to calculate x offset using hardcoded fixed character width, which
does not work properly for proportional fonts. Use the origin provided by
zint (wich is at the horizontal center) and use pango to calculate the offset
at render time.
Jim Evins [Sat, 10 Jul 2010 03:20:11 +0000 (23:20 -0400)]
Added new barcode drawing primitives.
Added a "Box" and a "String" barcode drawing primitives. The box primitive
should be more natural for drawing actual boxes instead of lines. The string
primitive allows an entire string to be rendered with a single interaction with
pango and cairo, rather than an interaction for each character. There is no
need to try to implement kerning since pango will take care of the string as
a single layout.
Jim Evins [Sat, 10 Jul 2010 03:15:30 +0000 (23:15 -0400)]
Fixed width behavior of object editor.
I had neglected to add the barcode page to the appropriate size group. Longer
names in the zint backend caused the style combobox to be the long pole in
the tent, causing the width of the object editor to fluctuate when selecting
and un-selecting barcode objects.
Jim Evins [Sun, 13 Jun 2010 00:40:24 +0000 (20:40 -0400)]
Add shadow property to image objects.
Added shadow support to image objects. Shadow is created from the image's
alpha channel, so the shadow will work properly for images with transparent
backgrounds. More work needs to be done to better optimize the performance.
Jim Evins [Sat, 12 Jun 2010 16:20:29 +0000 (12:20 -0400)]
Cleanup of shadows for boxes and ellipses.
Do a more intelligent job of drawing shadows for boxes and ellipses. Instead
of just blindly drawing a fill shadow and an outline shadow, choose to draw
one or the other and adjust size of shadow appropriately.
Jim Evins [Sat, 12 Jun 2010 01:53:49 +0000 (21:53 -0400)]
Do not explicitly set sidebar size.
Use 2 sizegroups to automatically fix sidebar size based on the size
of the widgets it contains -- even hidden ones. The width was previously
set explicitly to prevent the sidebar from changing size whenever objects
are selected and unselected. This has been problematic for compatability
with different themes, fonts, and translations.
Jim Evins [Mon, 31 May 2010 02:58:33 +0000 (22:58 -0400)]
Fix selection problem.
Clear existing paths before creating new test paths. This would occasionally
cause the wrong object to be selected because the in_fill or in_stroke
tests would be satisfied using left-over paths from previous tests.
Jim Evins [Thu, 27 May 2010 00:02:17 +0000 (20:02 -0400)]
Some minor barcode cleanup
- Added DEBUG_BARCODE so that verbosity on stdout of new libzint backend
can be controlled.
- Removed artifact comments and some minor formatting changes in libzint
backend.
- In object editor, make preview format track the number of digits in the
digits spinbox in real-time.
Jim Evins [Mon, 24 May 2010 23:45:03 +0000 (19:45 -0400)]
Additional translator hints.
- Fixed a couple of strings that should not have been marked translatable.
- Added comments for "Fixed", "Other", "None", and "No match."
- Attempted to disambiguate 3 different occurances of "Any"
Jim Evins [Mon, 24 May 2010 19:51:18 +0000 (15:51 -0400)]
Removed "translatable" attribute from unused builder strings
Removed "translatable" attribute from unused builder strings. These strings
are an artifact of how I organized the individual pages for GtkAssistants
in GtkNotebooks in glade.
Jim Evins [Mon, 24 May 2010 14:58:49 +0000 (10:58 -0400)]
Properly mark strings as no-c-format
Properly mark non-c-format strings containing '%' as no-c-format.
- Added "xgettext: no-c-format" comments as suggested by Claude Paroz.
- Removed backslashes ('\') from my ignorant attempt to address this.
Jim Evins [Sun, 16 May 2010 15:56:03 +0000 (11:56 -0400)]
Allow for small error in comparison of dimensions.
In lgl_template_are_templates_identical(), allow for a small error when
comparing dimensions. Set EPSILON to 0.5pt, which is aproximately
0.007in or 0.2mm.
Jim Evins [Sun, 16 May 2010 03:42:38 +0000 (23:42 -0400)]
Use g_get_user_config_dir() to locate custom templates.
Use g_get_user_config_dir() to locate custom template. By default this
means that custom templates will be stored at ~/.config/libglabels/templates
instead of ~/.glabels.
Also automatically migrate user custom templates to the new location when
run for the first time.
Jim Evins [Tue, 11 May 2010 02:54:47 +0000 (22:54 -0400)]
Refinements to text objects
- Draw outline around text objects.
- Use a more sophisticated test for determining if cursor is on a text
object: test against glyphs instead of simple bounds test. The test will
also indicate that cursor is on the object if it is on the selection outline.
- Do word wrap instead of character wrap.
Jim Evins [Thu, 6 May 2010 00:16:26 +0000 (20:16 -0400)]
Added sanity tests to template parser
When parsing a template node, if there is no recognized frame node (e.g.
Label-rectangle), a default full-page frame with a 1x1 layout is created.
Likewise, if a frame has no layout, a default 1x1 layout is created.
This prevents potential crashes due to typos in the case of typos in
hand generated templates.
Jim Evins [Mon, 26 Apr 2010 01:18:47 +0000 (21:18 -0400)]
Added "Up" label to orientation arrow.
Added an "Up" label to the orientation arrow in the 1st label in the
mini preview. Use theme base color for arrow and label. Don't draw
arrow if w == h.
Jim Evins [Thu, 22 Apr 2010 02:37:57 +0000 (22:37 -0400)]
Added test for duplicate templates
Added test for duplicate pre-defined templates. Removed duplicate
template in pearl-iso-templates.xml. Also added lgl_template_print() for
debugging purposes.
Jim Evins [Mon, 29 Mar 2010 03:03:39 +0000 (23:03 -0400)]
Added "custom" tab to media select widget
Added "custom" tab to media select widget. In this tab, the user can
launch the template designer or delete an existing user-defined template.
Added notification callbacks to libglabels db subsystem so that the
media select widget will automatically update when user-defined templates
are added or deleted. The "edit" button does not do anything yet.
Also did some visual cleanup to the new label dialog.
Also include ../libglabels in SUBDIRS in src/ so that libglabels can
be rebuilt from src/ directory.
Jim Evins [Sun, 21 Mar 2010 05:14:35 +0000 (01:14 -0400)]
Yet another new "New Label Dialog"
Re-designed the "New label dialog" again. This time as a "wizard" or
GtkAssistant. This is an attempt to keep the easy navigation of the
2.2.x dialog, to keep the added meta data and preview of the latest
incarnation, and to maintain a compact dialog that should work on fairly
small displays such on netbooks (probably not hand-helds still).
Jim Evins [Thu, 18 Mar 2010 14:40:53 +0000 (10:40 -0400)]
Escape URLs in markup.
Escape URLs in vendor and product markup. Also rearranged the layout of the
new "new label" dialog -- I am still not happy with navigating the templates
with this new dialog. I will probably try for a hybrid between this and
the 2.2.x dialog.
Jim Evins [Sat, 13 Mar 2010 15:49:52 +0000 (10:49 -0500)]
Some new label dialog cleanup
Draw arrow in mini preview relative to first label, not the entire sheet.
This should be more obvious what the arrow is indicating, before it could
have been interpreted as the feed direction.
Don't put an empty line at the end of the list of similar templates.