From: Jim Evins Date: Sat, 13 Oct 2007 03:46:14 +0000 (+0000) Subject: 2007-10-12 Jim Evins X-Git-Tag: glabels-2_3_0~319 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1ec161acb06ebf7440a74f4cf46d927a379980c3;p=glabels 2007-10-12 Jim Evins * docs/libglabels/libglabels-decl-list.txt: * docs/libglabels/libglabels-sections.txt: * docs/libglabels/libglabels-undocumented.txt: * docs/libglabels/tmpl/category.sgml: * docs/libglabels/tmpl/enums.sgml: * docs/libglabels/tmpl/libglabels-unused.sgml: * docs/libglabels/tmpl/paper.sgml: * docs/libglabels/tmpl/template-struct.sgml: * libglabels/init.c: * libglabels/template.c: * libglabels/template.h: Another pass at fleshing out the libglabels documentation. * src/cairo-label-path.c: * src/cairo-markup-path.c: * src/label.c: * src/mini-preview-pixbuf.c: * src/print-op.c: * src/print.c: * src/view.c: * src/wdgt-media-select.c: * src/wdgt-mini-preview.c: * src/wdgt-print-copies.c: * src/wdgt-print-merge.c: * src/wdgt-rotate-label.c: Removed lgl_template_get_first_frame() from libglabels API and all references. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@679 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index 48512bb6..536b7ab6 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,31 @@ +2007-10-12 Jim Evins + + * docs/libglabels/libglabels-decl-list.txt: + * docs/libglabels/libglabels-sections.txt: + * docs/libglabels/libglabels-undocumented.txt: + * docs/libglabels/tmpl/category.sgml: + * docs/libglabels/tmpl/enums.sgml: + * docs/libglabels/tmpl/libglabels-unused.sgml: + * docs/libglabels/tmpl/paper.sgml: + * docs/libglabels/tmpl/template-struct.sgml: + * libglabels/init.c: + * libglabels/template.c: + * libglabels/template.h: + Another pass at fleshing out the libglabels documentation. + * src/cairo-label-path.c: + * src/cairo-markup-path.c: + * src/label.c: + * src/mini-preview-pixbuf.c: + * src/print-op.c: + * src/print.c: + * src/view.c: + * src/wdgt-media-select.c: + * src/wdgt-mini-preview.c: + * src/wdgt-print-copies.c: + * src/wdgt-print-merge.c: + * src/wdgt-rotate-label.c: + Removed lgl_template_get_first_frame() from libglabels API and all references. + 2007-10-11 Jim Evins * configure.in: Extended checks for deprecated symbols. diff --git a/glabels2/docs/libglabels/libglabels-decl-list.txt b/glabels2/docs/libglabels/libglabels-decl-list.txt index 29a29582..fbd07003 100644 --- a/glabels2/docs/libglabels/libglabels-decl-list.txt +++ b/glabels2/docs/libglabels/libglabels-decl-list.txt @@ -60,7 +60,6 @@ lgl_template_get_name_list_unique lgl_template_get_name_list_all lgl_template_free_name_list lgl_template_from_name -lgl_template_get_first_frame lgl_template_does_page_size_match lgl_template_does_category_match lgl_template_frame_get_size diff --git a/glabels2/docs/libglabels/libglabels-sections.txt b/glabels2/docs/libglabels/libglabels-sections.txt index c012a17f..f3c04c4d 100644 --- a/glabels2/docs/libglabels/libglabels-sections.txt +++ b/glabels2/docs/libglabels/libglabels-sections.txt @@ -17,16 +17,20 @@ lglPaper lgl_paper_new lgl_paper_dup lgl_paper_free +lgl_paper_from_id +lgl_paper_from_name + lgl_paper_get_id_list lgl_paper_free_id_list lgl_paper_get_name_list lgl_paper_free_name_list + lgl_paper_is_id_known lgl_paper_is_id_other -lgl_paper_from_id -lgl_paper_from_name + lgl_paper_lookup_id_from_name lgl_paper_lookup_name_from_id + lgl_paper_print_known_papers @@ -37,10 +41,12 @@ lglCategory lgl_category_new lgl_category_dup lgl_category_free -lgl_category_get_name_list -lgl_category_free_name_list lgl_category_from_name lgl_category_from_id + +lgl_category_get_name_list +lgl_category_free_name_list + lgl_category_lookup_id_from_name lgl_category_lookup_name_from_id @@ -49,23 +55,28 @@ lgl_category_lookup_name_from_id template-struct libglabels/template.h lglTemplate + lglTemplateFrameShape lglTemplateFrame lglTemplateFrameAll lglTemplateFrameRect lglTemplateFrameRound lglTemplateFrameCD + lglTemplateLayout + lglTemplateMarkupType lglTemplateMarkup lglTemplateMarkupMargin lglTemplateMarkupLine lglTemplateMarkupCircle lglTemplateMarkupRect + lglTemplateOrigin -lgl_template_get_first_frame + lgl_template_does_page_size_match lgl_template_does_category_match + lgl_template_frame_get_size lgl_template_frame_get_n_labels lgl_template_frame_get_origins @@ -77,7 +88,9 @@ lgl_template_frame_get_origins lgl_template_get_name_list_unique lgl_template_get_name_list_all lgl_template_free_name_list + lgl_template_from_name + lgl_template_register @@ -90,6 +103,7 @@ lgl_template_free lgl_template_add_category lgl_template_add_frame lgl_template_add_alias + lgl_template_frame_rect_new lgl_template_frame_round_new lgl_template_frame_cd_new @@ -97,9 +111,11 @@ lgl_template_frame_dup lgl_template_frame_free lgl_template_frame_add_layout lgl_template_frame_add_markup + lgl_template_layout_new lgl_template_layout_dup lgl_template_layout_free + lgl_template_markup_margin_new lgl_template_markup_line_new lgl_template_markup_circle_new @@ -147,6 +163,7 @@ lgl_xml_template_create_template_node xml libglabels/xml.h LGL_XML_NAME_SPACE + lgl_xml_get_prop_string lgl_xml_get_prop_i18n_string lgl_xml_get_prop_double @@ -154,14 +171,17 @@ lgl_xml_get_prop_boolean lgl_xml_get_prop_int lgl_xml_get_prop_uint lgl_xml_get_prop_length + lgl_xml_set_prop_string lgl_xml_set_prop_double lgl_xml_set_prop_boolean lgl_xml_set_prop_int lgl_xml_set_prop_uint_hex lgl_xml_set_prop_length + lgl_xml_is_node lgl_xml_get_node_content + lgl_xml_set_default_units diff --git a/glabels2/docs/libglabels/libglabels-undocumented.txt b/glabels2/docs/libglabels/libglabels-undocumented.txt index 7bde80b2..2e20b3a5 100644 --- a/glabels2/docs/libglabels/libglabels-undocumented.txt +++ b/glabels2/docs/libglabels/libglabels-undocumented.txt @@ -1,27 +1,9 @@ -85% symbol docs coverage. -111 symbols documented. +99% symbol docs coverage. +128 symbols documented. 0 symbols incomplete. -19 not documented. +1 not documented. LGL_XML_NAME_SPACE -lglCategory -lglPaper -lglTemplate -lglTemplateFrame -lglTemplateFrameAll -lglTemplateFrameCD -lglTemplateFrameRect -lglTemplateFrameRound -lglTemplateFrameShape -lglTemplateLayout -lglTemplateMarkup -lglTemplateMarkupCircle -lglTemplateMarkupLine -lglTemplateMarkupMargin -lglTemplateMarkupRect -lglTemplateMarkupType -lglTemplateOrigin -lglUnitsType diff --git a/glabels2/docs/libglabels/tmpl/category.sgml b/glabels2/docs/libglabels/tmpl/category.sgml index 2e880b2e..0797f854 100644 --- a/glabels2/docs/libglabels/tmpl/category.sgml +++ b/glabels2/docs/libglabels/tmpl/category.sgml @@ -20,11 +20,11 @@ functions. - +This structure defines a category. -@id: -@name: +@id: Category ID. +@name: Localized category name. @@ -53,38 +53,38 @@ functions. @category: - + +@name: @Returns: - + -@names: +@id: +@Returns: - + -@name: @Returns: - + -@id: -@Returns: +@names: diff --git a/glabels2/docs/libglabels/tmpl/enums.sgml b/glabels2/docs/libglabels/tmpl/enums.sgml index 963555e8..b74f00d1 100644 --- a/glabels2/docs/libglabels/tmpl/enums.sgml +++ b/glabels2/docs/libglabels/tmpl/enums.sgml @@ -19,14 +19,15 @@ This section defines enumerations used to interact with libglabels. - +This enumeration defines a set of units of distance supported by the libglabels XML distance +attributes. -@LGL_UNITS_POINT: -@LGL_UNITS_INCH: -@LGL_UNITS_MM: -@LGL_UNITS_CM: -@LGL_UNITS_PICA: -@LGL_UNITS_FIRST: -@LGL_UNITS_LAST: +@LGL_UNITS_POINT: Points. Encoded as "pt" in XML distance attributes. +@LGL_UNITS_INCH: Inches. Encoded as "in" in XML distance attributes. +@LGL_UNITS_MM: Millmeters. Encoded as "mm" in XML distance attributes. +@LGL_UNITS_CM: Centimeters. Encoded as "cm" in XML distance attributes. +@LGL_UNITS_PICA: Picas. Encoded as "pc" in XML distance attributes. +@LGL_UNITS_FIRST: First enumeration. Used for generic iteration through supported units.. +@LGL_UNITS_LAST: Last enumeration. Used for generic iteration through supported units. diff --git a/glabels2/docs/libglabels/tmpl/libglabels-unused.sgml b/glabels2/docs/libglabels/tmpl/libglabels-unused.sgml index 6c3f01a2..946b837f 100644 --- a/glabels2/docs/libglabels/tmpl/libglabels-unused.sgml +++ b/glabels2/docs/libglabels/tmpl/libglabels-unused.sgml @@ -1204,6 +1204,14 @@ the CSS2 Specification (Section 4.3.2). @frame: @markup: + + + + + +@template: +@Returns: + diff --git a/glabels2/docs/libglabels/tmpl/paper.sgml b/glabels2/docs/libglabels/tmpl/paper.sgml index 40850c0f..17ec6ac8 100644 --- a/glabels2/docs/libglabels/tmpl/paper.sgml +++ b/glabels2/docs/libglabels/tmpl/paper.sgml @@ -20,13 +20,13 @@ and related functions. - +This structure defines a paper (page) size. -@id: -@name: -@width: -@height: +@id: Paper size ID. +@name: Localized paper size name. +@width: Width of paper in points. +@height: Height of paper in points. @@ -57,23 +57,25 @@ and related functions. @paper: - + +@id: @Returns: - + -@ids: +@name: +@Returns: - + @@ -81,33 +83,31 @@ and related functions. @Returns: - + -@names: +@ids: - + -@id: @Returns: - + -@id: -@Returns: +@names: - + @@ -116,12 +116,12 @@ and related functions. @Returns: - + -@name: +@id: @Returns: diff --git a/glabels2/docs/libglabels/tmpl/template-struct.sgml b/glabels2/docs/libglabels/tmpl/template-struct.sgml index aad3e0c6..7aa46193 100644 --- a/glabels2/docs/libglabels/tmpl/template-struct.sgml +++ b/glabels2/docs/libglabels/tmpl/template-struct.sgml @@ -7,7 +7,7 @@ How templates are represented in memory This section describes a set of structures that represent a template in memory. It also -describes functions for querying such structures. +describes functions to help interpret these structures. @@ -20,170 +20,176 @@ describes functions for querying such structures. - +This is the main structure of a libglabels template. A template represents a single sheet +of peel-off labels or cards. -@name: -@description: -@page_size: -@page_width: -@page_height: -@categories: -@frames: -@aliases: +@name: The primary name of the template. Usually a manufacturer followed by a part number. +@description: A description of the template. E.g. "Mailing labels." +@page_size: A page size ID. E.g. "US-Letter" or "A4." +@page_width: Page width in points. Used only if page_size is "Other." +@page_height: Page height in points. Used only if page_size is "Other." +@categories: A list of category IDs associated with this template. +@frames: A list of (#lglTemplateFrame *) structures. GLabels currently only supports one frame +per template -- future versions may support multiple frames per template. +@aliases: A list of alternate names for this template. Often a single template can be used for +multiple products. - +This enumeration defines frame types that are supported by libglabels -@LGL_TEMPLATE_FRAME_SHAPE_RECT: -@LGL_TEMPLATE_FRAME_SHAPE_ROUND: -@LGL_TEMPLATE_FRAME_SHAPE_CD: +@LGL_TEMPLATE_FRAME_SHAPE_RECT: A rectangular frame. (May have rounded corners.) +@LGL_TEMPLATE_FRAME_SHAPE_ROUND: A round frame. +@LGL_TEMPLATE_FRAME_SHAPE_CD: A CD or DVD frame. (Includes credit-card style CDs.) - +A union of all possible frame structures. The type of structure is indicated by the shape +member, which overlays the first field of all other member structures. - +This structure is composed of a set of fields common to all frame structures. All frame types +can be cast to this structure. -@shape: -@id: -@layouts: -@markups: +@shape: The shape of the frame. +@id: Reserved for future use. Should always be zero. +@layouts: A list of (#lglTemplateLayout *) structures. Typically a frame will have a single +layout, representing a simple grid of labels or cards. If the layout of labels or cards is +more complex, multiple (#lglTemplateLayout *) structures may be needed. +@markups: A list of (#lglTemplateMarkup *) structures, which represent non-printing markup lines. - +This structure defines the frame for a rectangular label or card. -@shape: -@id: -@layouts: -@markups: -@w: -@h: -@r: -@x_waste: -@y_waste: +@shape: Common field. Always #LGL_TEMPLATE_FRAME_SHAPE_RECT for #lglTemplateFrameRect. +@id: Common field. See #lglTemplateFrameAll. +@layouts: Common field. See #lglTemplateFrameAll. +@markups: Common field. See #lglTemplateFrameAll. +@w: Width of label or card in points. +@h: Height of label or card in points. +@r: Radius of corners in points. +@x_waste: Amount of horizontal over-print to allow in points. +@y_waste: Amount of vertical over-print to allow in points. - +This structure defines the frame for a round label or card. -@shape: -@id: -@layouts: -@markups: -@r: -@waste: +@shape: Common field. Always #LGL_TEMPLATE_FRAME_SHAPE_ROUND for #lglTemplateFrameRound. +@id: Common field. See #lglTemplateFrameAll. +@layouts: Common field. See #lglTemplateFrameAll. +@markups: Common field. See #lglTemplateFrameAll. +@r: Radius of label or card in points. +@waste: Amount of over-print to allow in points. - +This structure defines the frame for a CD or DVD label. This structure also supports +credit-card CD labels. -@shape: -@id: -@layouts: -@markups: -@r1: -@r2: -@w: -@h: -@waste: +@shape: Common field. Always #LGL_TEMPLATE_FRAME_SHAPE_CD for #lglTemplateFrameCD. +@id: Common field. See #lglTemplateFrameAll. +@layouts: Common field. See #lglTemplateFrameAll. +@markups: Common field. See #lglTemplateFrameAll. +@r1: Outer radius of label in points. +@r2: Radius of center hole in points. +@w: Clip width in points. Used for credit-card CD labels. This field is ignored if zero. +@h: Clip height in points. Used for credit-card CD labels. This field is ignored if zero. +@waste: Amount of over-print to allow in points. - +This structure defines a simple grid layout of labels or cards. -@nx: -@ny: -@x0: -@y0: -@dx: -@dy: +@nx: Number of labels or cards across in the grid (horizontal). +@ny: Number of labels or cards down in the grid (vertical). +@x0: Distance (in points) from the left edge of page to the left edge of the left column of +cards or labels in the layout. +@y0: Distance (in points) from the top edge of page to the top edge of the top row of +cards or labels in the layout. +@dx: Horizontal pitch of grid in points. This is the distance from left edge to left edge +(not the gap between labels or cards). +@dy: Vertical pitch of grid in points. This is the distance from top edge to top edge +(not the gap between labels or cards). - +This enumeration defines markup types that are supported by libglabels -@LGL_TEMPLATE_MARKUP_MARGIN: -@LGL_TEMPLATE_MARKUP_LINE: -@LGL_TEMPLATE_MARKUP_CIRCLE: -@LGL_TEMPLATE_MARKUP_RECT: +@LGL_TEMPLATE_MARKUP_MARGIN: A margin line around perimeter of label or card. +@LGL_TEMPLATE_MARKUP_LINE: A simple line segment. +@LGL_TEMPLATE_MARKUP_CIRCLE: A circle. +@LGL_TEMPLATE_MARKUP_RECT: A rectangle. Possibly with rounded corners. - +A union of all possible markup structures. The type of structure is indicated by the type +member, which overlays the first field of all other member structures. - +This structure defines a simple margin markup around the perimeter of a label or card. -@type: -@size: +@type: Common field. Always #LGL_TEMPLATE_MARKUP_MARGIN for #lglTemplateMarkupMargin. +@size: Distance of margin from edge of label or card. - +This structure defines a simple line segment markup. -@type: -@x1: -@y1: -@x2: -@y2: +@type: Common field. Always #LGL_TEMPLATE_MARKUP_LINE for #lglTemplateMarkupLine. +@x1: Distance (in points) of first endpoint from left edge of label or card. +@y1: Distance (in points) of first endpoint from top edge of label or card. +@x2: Distance (in points) of second endpoint from left edge of label or card. +@y2: Distance (in points) of second endpoint from top edge of label or card. - +This structure defines a simple circle markup. -@type: -@x0: -@y0: -@r: +@type: Common field. Always #LGL_TEMPLATE_MARKUP_CIRCLE for #lglTemplateMarkupCircle. +@x0: Distance (in points) of vertex from left edge of label or card. +@y0: Distance (in points) of vertex from top edge of label or card. +@r: Radius of circle in points. - +This structure defines a simple rectangle markup. The rectangle can have rounded corners. -@type: -@x1: -@y1: -@w: -@h: -@r: +@type: Common field. Always #LGL_TEMPLATE_MARKUP_RECT for #lglTemplateMarkupRect. +@x1: Distance (in points) of left edge of markup from left edge of label or card. +@y1: Distance (in points) of top edge of markup from top edge of label or card. +@w: Width of rectangle in points. +@h: Height of rectangle in points. +@r: Radius of corners in points. Should be zero for sharp corners. - +This structure represents the cartesian coordinates of the origin of a label or card on the page. +The orign is the upper left corner of the extent of the label or card. These coordinates are +relative to the upper left corner of the page. -@x: -@y: - - - - - - -@template: -@Returns: - +@x: Distance in points from top edge of page. +@y: Distance in points from left edge of page. diff --git a/glabels2/libglabels/init.c b/glabels2/libglabels/init.c index 609c323c..270d3160 100644 --- a/glabels2/libglabels/init.c +++ b/glabels2/libglabels/init.c @@ -47,12 +47,14 @@ /** * lgl_init: * - * Initialize all libglabels subsystems. An application should call lgl_init() once - * before calling any other libglabels functions. + * Initialize all libglabels subsystems. It is not necessary for an application to call + * lgl_init(), because libglabels will initialize on demand. An application programmer may + * choose to call lgl_init() at startup to minimize the impact of the first libglabels call + * on GUI response time. * - * This function reads in all files containing paper definitions, category definitions, - * and templates to build its template data base. This function will search both system - * and user template directories for these files. + * This function initializes its paper definitions, category definitions, and its template + * database.. It will search both system and user template directories to locate + * this data. */ void lgl_init (void) diff --git a/glabels2/libglabels/template.c b/glabels2/libglabels/template.c index dac143ca..784fae9d 100644 --- a/glabels2/libglabels/template.c +++ b/glabels2/libglabels/template.c @@ -200,7 +200,7 @@ lgl_template_get_name_list_unique (const gchar *page_size, * @page_size: If non NULL, limit results to given page size. * @category: If non NULL, limit results to given template category. * - * Get a list of valid names and aliases of unique templates in the template database. + * Get a list of all valid names and aliases of templates in the template database. * Results can be filtered by page size and/or template category. A list of valid page * sizes can be obtained using lgl_paper_get_id_list(). A list of valid template * categories can be obtained using lgl_category_get_id_list(). @@ -303,27 +303,6 @@ lgl_template_from_name (const gchar *name) return lgl_template_dup ((lglTemplate *) templates->data); } -/** - * lgl_template_get_first_frame: - * @template: #lglTemplate structure to query - * - * Lookup first #lglTemplateFrame in the given #lglTemplate. The returned - * value is simply a pointer to the given frame within the template and should - * not be freed. - * - * Note: glabels currently only supports a single frame per template. - * - * Returns: pointer to #lglTemplateFrame structure. - * - */ -const lglTemplateFrame * -lgl_template_get_first_frame (const lglTemplate *template) -{ - g_return_val_if_fail (template, NULL); - - return (lglTemplateFrame *)template->frames->data; -} - /** * lgl_template_frame_get_size: * @frame: #lglTemplateFrame structure to query @@ -401,6 +380,7 @@ lgl_template_frame_get_n_labels (const lglTemplateFrame *frame) * * Get an array of label origins for the given frame. These origins represent the * upper left hand corner of each label on a page corresponding to the given frame. + * The origins will be ordered geometrically left to right and then top to bottom. * The array should be freed using g_free(). * * Returns: A newly allocated array of #lglTemplateOrigin structures. diff --git a/glabels2/libglabels/template.h b/glabels2/libglabels/template.h index 83d04d3d..72767002 100644 --- a/glabels2/libglabels/template.h +++ b/glabels2/libglabels/template.h @@ -267,8 +267,6 @@ lglTemplate *lgl_template_from_name (const gchar *nam /* * Template query functions */ -const lglTemplateFrame *lgl_template_get_first_frame (const lglTemplate *template); - gboolean lgl_template_does_page_size_match (const lglTemplate *template, const gchar *page_size); diff --git a/glabels2/src/cairo-label-path.c b/glabels2/src/cairo-label-path.c index d9861f6e..1bc194ac 100644 --- a/glabels2/src/cairo-label-path.c +++ b/glabels2/src/cairo-label-path.c @@ -70,7 +70,7 @@ gl_cairo_label_path (cairo_t *cr, gl_debug (DEBUG_PATH, "START"); - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; switch (frame->shape) { @@ -109,7 +109,7 @@ gl_cairo_rect_label_path (cairo_t *cr, gl_debug (DEBUG_PATH, "START"); - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; r = frame->rect.r; x_waste = 0.0; @@ -167,7 +167,7 @@ gl_cairo_round_label_path (cairo_t *cr, gl_debug (DEBUG_PATH, "START"); - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; if (rotate_flag) { @@ -211,7 +211,7 @@ gl_cairo_cd_label_path (cairo_t *cr, gl_debug (DEBUG_PATH, "START"); - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; if (rotate_flag) { diff --git a/glabels2/src/cairo-markup-path.c b/glabels2/src/cairo-markup-path.c index 191782e6..cb7ead7c 100644 --- a/glabels2/src/cairo-markup-path.c +++ b/glabels2/src/cairo-markup-path.c @@ -112,7 +112,7 @@ gl_cairo_markup_margin_path (cairo_t *cr, gl_debug (DEBUG_PATH, "START"); - frame = lgl_template_get_first_frame (label->template); + frame = (lglTemplateFrame *)label->template->frames->data; switch (frame->shape) { @@ -149,7 +149,7 @@ gl_cairo_markup_margin_rect_path (cairo_t *cr, gl_debug (DEBUG_PATH, "START"); - frame = lgl_template_get_first_frame (label->template); + frame = (lglTemplateFrame *)label->template->frames->data; m = markup->margin.size; @@ -188,7 +188,7 @@ gl_cairo_markup_margin_round_path (cairo_t *cr, gl_debug (DEBUG_PATH, "START"); - frame = lgl_template_get_first_frame (label->template); + frame = (lglTemplateFrame *)label->template->frames->data; r = frame->round.r; m = markup->margin.size; @@ -215,7 +215,7 @@ gl_cairo_markup_margin_cd_path (cairo_t *cr, gl_debug (DEBUG_PATH, "START"); - frame = lgl_template_get_first_frame (label->template); + frame = (lglTemplateFrame *)label->template->frames->data; gl_label_get_size (label, &w, &h); xc = w/2.0; diff --git a/glabels2/src/label.c b/glabels2/src/label.c index a72975d4..555268e0 100644 --- a/glabels2/src/label.c +++ b/glabels2/src/label.c @@ -445,7 +445,7 @@ gl_label_get_size (glLabel *label, *w = *h = 0; return; } - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; if (!label->rotate_flag) { lgl_template_frame_get_size (frame, w, h); diff --git a/glabels2/src/mini-preview-pixbuf.c b/glabels2/src/mini-preview-pixbuf.c index 91b269a3..a4642525 100644 --- a/glabels2/src/mini-preview-pixbuf.c +++ b/glabels2/src/mini-preview-pixbuf.c @@ -176,7 +176,7 @@ draw_label_outlines (cairo_t *cr, cairo_set_line_width (cr, LABEL_OUTLINE_WIDTH_PIXELS/scale); - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; n_labels = lgl_template_frame_get_n_labels (frame); origins = lgl_template_frame_get_origins (frame); diff --git a/glabels2/src/print-op.c b/glabels2/src/print-op.c index ef21aa0c..cdcf11fc 100644 --- a/glabels2/src/print-op.c +++ b/glabels2/src/print-op.c @@ -220,7 +220,7 @@ gl_print_op_construct (glPrintOp *op, op->priv->label = label; op->priv->force_outline_flag = FALSE; - frame = lgl_template_get_first_frame (label->template); + frame = (lglTemplateFrame *)label->template->frames->data; op->priv->n_sheets = 1; op->priv->first = 1; @@ -378,7 +378,7 @@ gl_print_op_construct_batch (glPrintOp *op, merge = gl_label_get_merge (label); - frame = lgl_template_get_first_frame (label->template); + frame = (lglTemplateFrame *)label->template->frames->data; if (merge == NULL) { op->priv->merge_flag = FALSE; diff --git a/glabels2/src/print.c b/glabels2/src/print.c index 84b70129..ec0420e4 100644 --- a/glabels2/src/print.c +++ b/glabels2/src/print.c @@ -115,7 +115,7 @@ gl_print_simple_sheet (glLabel *label, pi = print_info_new (cr, label); - frame = lgl_template_get_first_frame (pi->template); + frame = (lglTemplateFrame *)pi->template->frames->data; origins = lgl_template_frame_get_origins (frame); if (crop_marks_flag) { @@ -166,7 +166,7 @@ gl_print_collated_merge_sheet (glLabel *label, record_list = gl_merge_get_record_list (merge); pi = print_info_new (cr, label); - frame = lgl_template_get_first_frame (pi->template); + frame = (lglTemplateFrame *)pi->template->frames->data; n_labels_per_page = lgl_template_frame_get_n_labels (frame); origins = lgl_template_frame_get_origins (frame); @@ -257,7 +257,7 @@ gl_print_uncollated_merge_sheet (glLabel *label, record_list = gl_merge_get_record_list (merge); pi = print_info_new (cr, label); - frame = lgl_template_get_first_frame (pi->template); + frame = (lglTemplateFrame *)pi->template->frames->data; n_labels_per_page = lgl_template_frame_get_n_labels (frame); origins = lgl_template_frame_get_origins (frame); @@ -386,7 +386,7 @@ print_crop_marks (PrintInfo *pi) gl_debug (DEBUG_PRINT, "START"); - frame = lgl_template_get_first_frame (pi->template); + frame = (lglTemplateFrame *)pi->template->frames->data; lgl_template_frame_get_size (frame, &w, &h); @@ -495,7 +495,7 @@ print_label (PrintInfo *pi, gl_debug (DEBUG_PRINT, "START"); - frame = lgl_template_get_first_frame (pi->template); + frame = (lglTemplateFrame *)pi->template->frames->data; gl_label_get_size (label, &width, &height); diff --git a/glabels2/src/view.c b/glabels2/src/view.c index 2636eb9d..c35db8d3 100644 --- a/glabels2/src/view.c +++ b/glabels2/src/view.c @@ -853,7 +853,7 @@ draw_grid_layer (glView *view, if (view->grid_visible) { - frame = lgl_template_get_first_frame (view->label->template); + frame = (lglTemplateFrame *)view->label->template->frames->data; gl_label_get_size (view->label, &w, &h); @@ -913,7 +913,7 @@ draw_markup_layer (glView *view, { label = view->label; - frame = lgl_template_get_first_frame (label->template); + frame = (lglTemplateFrame *)view->label->template->frames->data; cairo_save (cr); diff --git a/glabels2/src/wdgt-media-select.c b/glabels2/src/wdgt-media-select.c index 31311f27..dd5c47b9 100644 --- a/glabels2/src/wdgt-media-select.c +++ b/glabels2/src/wdgt-media-select.c @@ -492,7 +492,7 @@ get_layout_desc (const lglTemplate *template) gint n_labels; gchar *string; - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; n_labels = lgl_template_frame_get_n_labels (frame); @@ -517,7 +517,7 @@ get_label_size_desc (const lglTemplate *template) units_string = gl_prefs_get_units_string (); units_per_point = gl_prefs_get_units_per_point (); - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; switch (frame->shape) { case LGL_TEMPLATE_FRAME_SHAPE_RECT: diff --git a/glabels2/src/wdgt-mini-preview.c b/glabels2/src/wdgt-mini-preview.c index a11b5087..55f519a4 100644 --- a/glabels2/src/wdgt-mini-preview.c +++ b/glabels2/src/wdgt-mini-preview.c @@ -281,7 +281,7 @@ void gl_wdgt_mini_preview_set_template (glWdgtMiniPreview *preview, gl_debug (DEBUG_MINI_PREVIEW, "START"); - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; /* * Set template @@ -681,7 +681,7 @@ draw_labels (glWdgtMiniPreview *preview, gl_debug (DEBUG_MINI_PREVIEW, "START"); - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; n_labels = lgl_template_frame_get_n_labels (frame); origins = lgl_template_frame_get_origins (frame); diff --git a/glabels2/src/wdgt-print-copies.c b/glabels2/src/wdgt-print-copies.c index a63db098..f09522a0 100644 --- a/glabels2/src/wdgt-print-copies.c +++ b/glabels2/src/wdgt-print-copies.c @@ -132,7 +132,7 @@ gl_wdgt_print_copies_construct (glWdgtPrintCopies *copies, whbox = GTK_WIDGET (copies); - frame = lgl_template_get_first_frame (label->template); + frame = (lglTemplateFrame *)label->template->frames->data; copies->labels_per_sheet = lgl_template_frame_get_n_labels (frame); diff --git a/glabels2/src/wdgt-print-merge.c b/glabels2/src/wdgt-print-merge.c index 7dfef3a5..bc1fe6fd 100644 --- a/glabels2/src/wdgt-print-merge.c +++ b/glabels2/src/wdgt-print-merge.c @@ -131,7 +131,7 @@ gl_wdgt_print_merge_construct (glWdgtPrintMerge * merge, whbox = GTK_WIDGET (merge); - frame = lgl_template_get_first_frame (label->template); + frame = (lglTemplateFrame *)label->template->frames->data; merge->labels_per_sheet = lgl_template_frame_get_n_labels (frame); diff --git a/glabels2/src/wdgt-rotate-label.c b/glabels2/src/wdgt-rotate-label.c index 3dab6b3b..95c0b804 100644 --- a/glabels2/src/wdgt-rotate-label.c +++ b/glabels2/src/wdgt-rotate-label.c @@ -250,7 +250,7 @@ drawingarea_update (GtkDrawingArea *drawing_area, return; } - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; if (rotate_flag) { @@ -377,7 +377,7 @@ gl_wdgt_rotate_label_set_template_name (glWdgtRotateLabel *rotate_label, else { template = lgl_template_from_name (name); - frame = lgl_template_get_first_frame (template); + frame = (lglTemplateFrame *)template->frames->data; rotate_label->priv->template = template; lgl_template_frame_get_size (frame, &raw_w, &raw_h);