From 5c793737750a5d168a6be4180c50abac85eade9f Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Mon, 11 Jan 2010 14:24:03 +0100 Subject: [PATCH] [AdgTitleBlock] Reordered methods Switched to the conventional method order, that is setter before getter. --- adg/adg-title-block.c | 96 +++++++++++++++++++++++++-------------------------- adg/adg-title-block.h | 12 +++---- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/adg/adg-title-block.c b/adg/adg-title-block.c index 65e42ce5..e1629173 100644 --- a/adg/adg-title-block.c +++ b/adg/adg-title-block.c @@ -288,28 +288,6 @@ adg_title_block_new(void) } /** - * adg_title_block_get_title: - * @title_block: an #AdgTitleBlock entity - * - * Gets the descriptive title associated to this title block. - * The returned string is owned by @title_block and should not - * be modifed or freed. - * - * Returns: the title or %NULL on no title or errors - **/ -const gchar * -adg_title_block_get_title(AdgTitleBlock *title_block) -{ - AdgTitleBlockPrivate *data; - - g_return_val_if_fail(ADG_IS_TITLE_BLOCK(title_block), NULL); - - data = title_block->data; - - return data->title; -} - -/** * adg_title_block_set_title: * @title_block: an #AdgTitleBlock entity * @title: the new title @@ -326,17 +304,17 @@ adg_title_block_set_title(AdgTitleBlock *title_block, const gchar *title) } /** - * adg_title_block_get_drawing: + * adg_title_block_get_title: * @title_block: an #AdgTitleBlock entity * - * Gets the drawing name, commonly used to specify the file name. + * Gets the descriptive title associated to this title block. * The returned string is owned by @title_block and should not * be modifed or freed. * - * Returns: the drawing name or %NULL on no name or errors + * Returns: the title or %NULL on no title or errors **/ const gchar * -adg_title_block_get_drawing(AdgTitleBlock *title_block) +adg_title_block_get_title(AdgTitleBlock *title_block) { AdgTitleBlockPrivate *data; @@ -344,7 +322,7 @@ adg_title_block_get_drawing(AdgTitleBlock *title_block) data = title_block->data; - return data->drawing; + return data->title; } /** @@ -364,18 +342,17 @@ adg_title_block_set_drawing(AdgTitleBlock *title_block, const gchar *drawing) } /** - * adg_title_block_get_size: + * adg_title_block_get_drawing: * @title_block: an #AdgTitleBlock entity * - * Gets the media size (a descriptive name) where this drawing will - * be printed. Usually contains something like "A4" or "Letter". + * Gets the drawing name, commonly used to specify the file name. * The returned string is owned by @title_block and should not * be modifed or freed. * - * Returns: the size or %NULL on no size or errors + * Returns: the drawing name or %NULL on no name or errors **/ const gchar * -adg_title_block_get_size(AdgTitleBlock *title_block) +adg_title_block_get_drawing(AdgTitleBlock *title_block) { AdgTitleBlockPrivate *data; @@ -383,7 +360,7 @@ adg_title_block_get_size(AdgTitleBlock *title_block) data = title_block->data; - return data->size; + return data->drawing; } /** @@ -403,15 +380,18 @@ adg_title_block_set_size(AdgTitleBlock *title_block, const gchar *size) } /** - * adg_title_block_get_scale: + * adg_title_block_get_size: * @title_block: an #AdgTitleBlock entity * - * Gets the scale descriptive name of the drawing. + * Gets the media size (a descriptive name) where this drawing will + * be printed. Usually contains something like "A4" or "Letter". + * The returned string is owned by @title_block and should not + * be modifed or freed. * - * Returns: the scale text or %NULL on no scale or errors + * Returns: the size or %NULL on no size or errors **/ const gchar * -adg_title_block_get_scale(AdgTitleBlock *title_block) +adg_title_block_get_size(AdgTitleBlock *title_block) { AdgTitleBlockPrivate *data; @@ -419,7 +399,7 @@ adg_title_block_get_scale(AdgTitleBlock *title_block) data = title_block->data; - return data->scale; + return data->size; } /** @@ -439,15 +419,15 @@ adg_title_block_set_scale(AdgTitleBlock *title_block, const gchar *scale) } /** - * adg_title_block_get_author: + * adg_title_block_get_scale: * @title_block: an #AdgTitleBlock entity * - * Gets the author's name of the drawing. + * Gets the scale descriptive name of the drawing. * - * Returns: the author or %NULL on no author or errors + * Returns: the scale text or %NULL on no scale or errors **/ const gchar * -adg_title_block_get_author(AdgTitleBlock *title_block) +adg_title_block_get_scale(AdgTitleBlock *title_block) { AdgTitleBlockPrivate *data; @@ -455,7 +435,7 @@ adg_title_block_get_author(AdgTitleBlock *title_block) data = title_block->data; - return data->author; + return data->scale; } /** @@ -475,15 +455,15 @@ adg_title_block_set_author(AdgTitleBlock *title_block, const gchar *author) } /** - * adg_title_block_get_date: + * adg_title_block_get_author: * @title_block: an #AdgTitleBlock entity * - * Gets the date of the rendering set on @title_block. + * Gets the author's name of the drawing. * - * Returns: the date or %NULL on no date or errors + * Returns: the author or %NULL on no author or errors **/ const gchar * -adg_title_block_get_date(AdgTitleBlock *title_block) +adg_title_block_get_author(AdgTitleBlock *title_block) { AdgTitleBlockPrivate *data; @@ -491,7 +471,7 @@ adg_title_block_get_date(AdgTitleBlock *title_block) data = title_block->data; - return data->date; + return data->author; } /** @@ -519,6 +499,26 @@ adg_title_block_set_date(AdgTitleBlock *title_block, const gchar *date) } /** + * adg_title_block_get_date: + * @title_block: an #AdgTitleBlock entity + * + * Gets the date of the rendering set on @title_block. + * + * Returns: the date or %NULL on no date or errors + **/ +const gchar * +adg_title_block_get_date(AdgTitleBlock *title_block) +{ + AdgTitleBlockPrivate *data; + + g_return_val_if_fail(ADG_IS_TITLE_BLOCK(title_block), NULL); + + data = title_block->data; + + return data->date; +} + +/** * adg_title_block_set_logo: * @title_block: an #AdgTitleBlock entity * @logo: the new logo diff --git a/adg/adg-title-block.h b/adg/adg-title-block.h index 952b6531..f565bd32 100644 --- a/adg/adg-title-block.h +++ b/adg/adg-title-block.h @@ -54,24 +54,24 @@ AdgTitleBlock * adg_title_block_new (void); void adg_title_block_set_logo (AdgTitleBlock *title_block, AdgEntity *logo); AdgEntity * adg_title_block_logo (AdgTitleBlock *title_block); -const gchar * adg_title_block_get_title (AdgTitleBlock *title_block); void adg_title_block_set_title (AdgTitleBlock *title_block, const gchar *title); -const gchar * adg_title_block_get_drawing (AdgTitleBlock *title_block); +const gchar * adg_title_block_get_title (AdgTitleBlock *title_block); void adg_title_block_set_drawing (AdgTitleBlock *title_block, const gchar *drawing); -const gchar * adg_title_block_get_size (AdgTitleBlock *title_block); +const gchar * adg_title_block_get_drawing (AdgTitleBlock *title_block); void adg_title_block_set_size (AdgTitleBlock *title_block, const gchar *size); -const gchar * adg_title_block_get_scale (AdgTitleBlock *title_block); +const gchar * adg_title_block_get_size (AdgTitleBlock *title_block); void adg_title_block_set_scale (AdgTitleBlock *title_block, const gchar *scale); -const gchar * adg_title_block_get_author (AdgTitleBlock *title_block); +const gchar * adg_title_block_get_scale (AdgTitleBlock *title_block); void adg_title_block_set_author (AdgTitleBlock *title_block, const gchar *author); -const gchar * adg_title_block_get_date (AdgTitleBlock *title_block); +const gchar * adg_title_block_get_author (AdgTitleBlock *title_block); void adg_title_block_set_date (AdgTitleBlock *title_block, const gchar *date); +const gchar * adg_title_block_get_date (AdgTitleBlock *title_block); void adg_title_block_set_projection (AdgTitleBlock *title_block, AdgEntity *projection); AdgEntity * adg_title_block_projection (AdgTitleBlock *title_block); -- 2.11.4.GIT