From d64bd058272ae98ad15f2995edddeb8570d2b64d Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Fri, 2 Jul 2004 18:48:42 +0000 Subject: [PATCH] 2004-07-02 Jim Evins * src/glabels.c: (main), (save_session_cb): - Now include libbonoboui.h, recent.h, and file.h to provide missing prototypes. - save_session_cb() now returns gboolean. - Minor formatting changes. * src/window.h: * src/window.c: - Now include file.h to provide missing prototype. - gl_window_get_type() now returns GType, not guint. I believe this may ultimately be cause of the segfault reported in Bug #982287, since GType is actually a gulong, which may not be compatible on other architectures (64bit) -- I cannot personally test this at this time. I was sloppy in several other xxx_get_type() functions which also returned guint -- see next group of files: * src/window.c: (gl_window_get_type): * src/canvas-hacktext.c: (gl_canvas_hacktext_get_type): * src/canvas-hacktext.h: * src/hig.c: (gl_hig_alert_get_type), (gl_hig_dialog_get_type), (gl_hig_category_get_type), (gl_hig_vbox_get_type), (gl_hig_hbox_get_type): * src/hig.h: * src/label-barcode.c: (gl_label_barcode_get_type): * src/label-barcode.h: * src/label-box.c: (gl_label_box_get_type): * src/label-box.h: * src/label-ellipse.c: (gl_label_ellipse_get_type): * src/label-ellipse.h: * src/label-image.c: (gl_label_image_get_type): * src/label-image.h: * src/label-line.c: (gl_label_line_get_type): * src/label-line.h: * src/label-object.c: (gl_label_object_get_type): * src/label-object.h: * src/label-text.c: (gl_label_text_get_type): * src/label-text.h: * src/label.c: (gl_label_get_type): * src/label.h: * src/merge-properties-dialog.c: (gl_merge_properties_dialog_get_type): * src/merge-properties-dialog.h: * src/merge-text.c: (gl_merge_text_get_type): * src/merge-text.h: * src/merge.c: (gl_merge_get_type): * src/merge.h: * src/object-editor.c: (gl_object_editor_get_type): * src/prefs-dialog.c: (gl_prefs_dialog_get_type): * src/prefs-dialog.h: * src/prefs-model.c: (gl_prefs_model_get_type): * src/prefs-model.h: * src/print-dialog.c: (gl_print_dialog_get_type): * src/print-dialog.h: * src/template-designer.c: (gl_template_designer_get_type): * src/template-designer.h: * src/ui-property-bar.c: (gl_ui_property_bar_get_type): * src/ui-property-bar.h: * src/ui-sidebar.c: (gl_ui_sidebar_get_type): * src/ui-sidebar.h: * src/view-barcode.c: (gl_view_barcode_get_type): * src/view-barcode.h: * src/view-box.c: (gl_view_box_get_type): * src/view-box.h: * src/view-ellipse.c: (gl_view_ellipse_get_type): * src/view-ellipse.h: * src/view-highlight.c: (gl_view_highlight_get_type): * src/view-highlight.h: * src/view-image.c: (gl_view_image_get_type): * src/view-image.h: * src/view-line.c: (gl_view_line_get_type): * src/view-line.h: * src/view-object.c: (gl_view_object_get_type): * src/view-object.h: * src/view-text.c: (gl_view_text_get_type): * src/view-text.h: * src/view.c: (gl_view_get_type): * src/view.h: * src/wdgt-chain-button.c: (gl_wdgt_chain_button_get_type): * src/wdgt-image-select.c: (gl_wdgt_image_select_get_type): * src/wdgt-image-select.h: * src/wdgt-media-select.c: (gl_wdgt_media_select_get_type): * src/wdgt-media-select.h: * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_get_type): * src/wdgt-mini-preview.h: * src/wdgt-print-copies.c: (gl_wdgt_print_copies_get_type): * src/wdgt-print-copies.h: * src/wdgt-print-merge.c: (gl_wdgt_print_merge_get_type): * src/wdgt-print-merge.h: * src/wdgt-rotate-label.c: (gl_wdgt_rotate_label_get_type): * src/wdgt-rotate-label.h: - Made sure all xxx_get_type functions returned GType, not guint. This was the case in hig.[ch], window.[ch], ui-property-bar.[ch], ui-sidebar.[ch], view.[ch], wdgt-image-select.[ch], wdgt-media-select.[ch], wdgt-mini-preview.[ch], wdgt-print-copies.[ch], wdt-print-merge.[ch], and wdgt-rotate-label.[ch]. See separate window.[ch] details above for more info. - Reconciled various coding style differences in all xxx_get_type() functions: * All prototypes include G_GNUC_CONST. * All prototypes specify the return value as GType, not GtkType or guint. * Info structures are all declared as "static const." * Generalized the names of type and info variables. * Miscelaneous formatting. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@427 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/ChangeLog | 107 +++++++++++++++++++++++++ glabels2/src/canvas-hacktext.c | 14 ++-- glabels2/src/canvas-hacktext.h | 2 +- glabels2/src/glabels.c | 45 ++++++----- glabels2/src/hig.c | 85 +++++++++----------- glabels2/src/hig.h | 10 +-- glabels2/src/label-barcode.c | 3 +- glabels2/src/label-barcode.h | 2 +- glabels2/src/label-box.c | 3 +- glabels2/src/label-box.h | 2 +- glabels2/src/label-ellipse.c | 3 +- glabels2/src/label-ellipse.h | 2 +- glabels2/src/label-image.c | 3 +- glabels2/src/label-image.h | 2 +- glabels2/src/label-line.c | 3 +- glabels2/src/label-line.h | 2 +- glabels2/src/label-object.c | 3 +- glabels2/src/label-object.h | 2 +- glabels2/src/label-text.c | 3 +- glabels2/src/label-text.h | 2 +- glabels2/src/label.c | 3 +- glabels2/src/label.h | 2 +- glabels2/src/merge-properties-dialog.c | 17 ++-- glabels2/src/merge-properties-dialog.h | 2 +- glabels2/src/merge-text.c | 3 +- glabels2/src/merge-text.h | 2 +- glabels2/src/merge.c | 3 +- glabels2/src/merge.h | 2 +- glabels2/src/object-editor.c | 17 ++-- glabels2/src/prefs-dialog.c | 17 ++-- glabels2/src/prefs-dialog.h | 2 +- glabels2/src/prefs-model.c | 3 +- glabels2/src/prefs-model.h | 2 +- glabels2/src/print-dialog.c | 17 ++-- glabels2/src/print-dialog.h | 2 +- glabels2/src/template-designer.c | 17 ++-- glabels2/src/template-designer.h | 2 +- glabels2/src/ui-property-bar.c | 17 ++-- glabels2/src/ui-property-bar.h | 2 +- glabels2/src/ui-sidebar.c | 17 ++-- glabels2/src/ui-sidebar.h | 2 +- glabels2/src/view-barcode.c | 3 +- glabels2/src/view-barcode.h | 14 ++-- glabels2/src/view-box.c | 3 +- glabels2/src/view-box.h | 14 ++-- glabels2/src/view-ellipse.c | 3 +- glabels2/src/view-ellipse.h | 14 ++-- glabels2/src/view-highlight.c | 3 +- glabels2/src/view-highlight.h | 2 +- glabels2/src/view-image.c | 3 +- glabels2/src/view-image.h | 14 ++-- glabels2/src/view-line.c | 3 +- glabels2/src/view-line.h | 14 ++-- glabels2/src/view-object.c | 3 +- glabels2/src/view-object.h | 2 +- glabels2/src/view-text.c | 3 +- glabels2/src/view-text.h | 14 ++-- glabels2/src/view.c | 16 ++-- glabels2/src/view.h | 2 +- glabels2/src/wdgt-chain-button.c | 13 +-- glabels2/src/wdgt-image-select.c | 17 ++-- glabels2/src/wdgt-image-select.h | 2 +- glabels2/src/wdgt-media-select.c | 17 ++-- glabels2/src/wdgt-media-select.h | 2 +- glabels2/src/wdgt-mini-preview.c | 17 ++-- glabels2/src/wdgt-mini-preview.h | 2 +- glabels2/src/wdgt-print-copies.c | 17 ++-- glabels2/src/wdgt-print-copies.h | 24 +++--- glabels2/src/wdgt-print-merge.c | 17 ++-- glabels2/src/wdgt-print-merge.h | 26 +++--- glabels2/src/wdgt-rotate-label.c | 18 ++--- glabels2/src/wdgt-rotate-label.h | 18 +++-- glabels2/src/window.c | 18 ++--- glabels2/src/window.h | 2 +- 74 files changed, 456 insertions(+), 333 deletions(-) diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index b4d94ac2..96b7d392 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,110 @@ +2004-07-02 Jim Evins + + * src/glabels.c: (main), (save_session_cb): + - Now include libbonoboui.h, recent.h, and file.h to provide missing + prototypes. + - save_session_cb() now returns gboolean. + - Minor formatting changes. + + * src/window.h: + * src/window.c: + - Now include file.h to provide missing prototype. + - gl_window_get_type() now returns GType, not guint. I believe this may + ultimately be cause of the segfault reported in Bug #982287, since + GType is actually a gulong, which may not be compatible on other + architectures (64bit) -- I cannot personally test this at this time. + I was sloppy in several other xxx_get_type() functions which also + returned guint -- see next group of files: + + * src/window.c: (gl_window_get_type): + * src/canvas-hacktext.c: (gl_canvas_hacktext_get_type): + * src/canvas-hacktext.h: + * src/hig.c: (gl_hig_alert_get_type), (gl_hig_dialog_get_type), + (gl_hig_category_get_type), (gl_hig_vbox_get_type), + (gl_hig_hbox_get_type): + * src/hig.h: + * src/label-barcode.c: (gl_label_barcode_get_type): + * src/label-barcode.h: + * src/label-box.c: (gl_label_box_get_type): + * src/label-box.h: + * src/label-ellipse.c: (gl_label_ellipse_get_type): + * src/label-ellipse.h: + * src/label-image.c: (gl_label_image_get_type): + * src/label-image.h: + * src/label-line.c: (gl_label_line_get_type): + * src/label-line.h: + * src/label-object.c: (gl_label_object_get_type): + * src/label-object.h: + * src/label-text.c: (gl_label_text_get_type): + * src/label-text.h: + * src/label.c: (gl_label_get_type): + * src/label.h: + * src/merge-properties-dialog.c: + (gl_merge_properties_dialog_get_type): + * src/merge-properties-dialog.h: + * src/merge-text.c: (gl_merge_text_get_type): + * src/merge-text.h: + * src/merge.c: (gl_merge_get_type): + * src/merge.h: + * src/object-editor.c: (gl_object_editor_get_type): + * src/prefs-dialog.c: (gl_prefs_dialog_get_type): + * src/prefs-dialog.h: + * src/prefs-model.c: (gl_prefs_model_get_type): + * src/prefs-model.h: + * src/print-dialog.c: (gl_print_dialog_get_type): + * src/print-dialog.h: + * src/template-designer.c: (gl_template_designer_get_type): + * src/template-designer.h: + * src/ui-property-bar.c: (gl_ui_property_bar_get_type): + * src/ui-property-bar.h: + * src/ui-sidebar.c: (gl_ui_sidebar_get_type): + * src/ui-sidebar.h: + * src/view-barcode.c: (gl_view_barcode_get_type): + * src/view-barcode.h: + * src/view-box.c: (gl_view_box_get_type): + * src/view-box.h: + * src/view-ellipse.c: (gl_view_ellipse_get_type): + * src/view-ellipse.h: + * src/view-highlight.c: (gl_view_highlight_get_type): + * src/view-highlight.h: + * src/view-image.c: (gl_view_image_get_type): + * src/view-image.h: + * src/view-line.c: (gl_view_line_get_type): + * src/view-line.h: + * src/view-object.c: (gl_view_object_get_type): + * src/view-object.h: + * src/view-text.c: (gl_view_text_get_type): + * src/view-text.h: + * src/view.c: (gl_view_get_type): + * src/view.h: + * src/wdgt-chain-button.c: (gl_wdgt_chain_button_get_type): + * src/wdgt-image-select.c: (gl_wdgt_image_select_get_type): + * src/wdgt-image-select.h: + * src/wdgt-media-select.c: (gl_wdgt_media_select_get_type): + * src/wdgt-media-select.h: + * src/wdgt-mini-preview.c: (gl_wdgt_mini_preview_get_type): + * src/wdgt-mini-preview.h: + * src/wdgt-print-copies.c: (gl_wdgt_print_copies_get_type): + * src/wdgt-print-copies.h: + * src/wdgt-print-merge.c: (gl_wdgt_print_merge_get_type): + * src/wdgt-print-merge.h: + * src/wdgt-rotate-label.c: (gl_wdgt_rotate_label_get_type): + * src/wdgt-rotate-label.h: + - Made sure all xxx_get_type functions returned GType, not guint. This + was the case in hig.[ch], window.[ch], ui-property-bar.[ch], + ui-sidebar.[ch], view.[ch], wdgt-image-select.[ch], + wdgt-media-select.[ch], wdgt-mini-preview.[ch], wdgt-print-copies.[ch], + wdt-print-merge.[ch], and wdgt-rotate-label.[ch]. See separate + window.[ch] details above for more info. + - Reconciled various coding style differences in all xxx_get_type() + functions: + * All prototypes include G_GNUC_CONST. + * All prototypes specify the return value as GType, not GtkType + or guint. + * Info structures are all declared as "static const." + * Generalized the names of type and info variables. + * Miscelaneous formatting. + 2004-06-08 Jim Evins * src/label.c: diff --git a/glabels2/src/canvas-hacktext.c b/glabels2/src/canvas-hacktext.c index 0c3ba8d8..bf45da08 100644 --- a/glabels2/src/canvas-hacktext.c +++ b/glabels2/src/canvas-hacktext.c @@ -85,10 +85,10 @@ struct _glCanvasHacktextPriv { GType gl_canvas_hacktext_get_type (void) { - static GType hacktext_type = 0; + static GType type = 0; - if (!hacktext_type) { - static const GTypeInfo hacktext_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glCanvasHacktextClass), NULL, NULL, @@ -101,12 +101,12 @@ gl_canvas_hacktext_get_type (void) NULL }; - hacktext_type = g_type_register_static (GNOME_TYPE_CANVAS_ITEM, - "glCanvasHacktext", - &hacktext_info, 0); + type = g_type_register_static (GNOME_TYPE_CANVAS_ITEM, + "glCanvasHacktext", + &info, 0); } - return hacktext_type; + return type; } static void diff --git a/glabels2/src/canvas-hacktext.h b/glabels2/src/canvas-hacktext.h index 09f1c698..7fe30134 100644 --- a/glabels2/src/canvas-hacktext.h +++ b/glabels2/src/canvas-hacktext.h @@ -65,7 +65,7 @@ struct _glCanvasHacktextClass { }; -GType gl_canvas_hacktext_get_type (void); +GType gl_canvas_hacktext_get_type (void) G_GNUC_CONST; G_END_DECLS diff --git a/glabels2/src/glabels.c b/glabels2/src/glabels.c index d3603e1c..d2f6f23e 100644 --- a/glabels2/src/glabels.c +++ b/glabels2/src/glabels.c @@ -25,15 +25,18 @@ #include #include #include +#include #include "splash.h" #include "stock.h" #include "merge-init.h" +#include "recent.h" #include #include #include "prefs.h" #include "debug.h" #include "window.h" +#include "file.h" /*========================================================*/ /* Private macros and constants. */ @@ -120,16 +123,16 @@ static const struct poptOption options [] = /*========================================================*/ /* Local function prototypes */ /*========================================================*/ -gint save_session_cb (GnomeClient *client, - gint phase, - GnomeRestartStyle save_style, - gint shutdown, - GnomeInteractStyle interact_style, - gint fast, - gpointer client_data); +gboolean save_session_cb (GnomeClient *client, + gint phase, + GnomeRestartStyle save_style, + gint shutdown, + GnomeInteractStyle interact_style, + gint fast, + gpointer client_data); -void client_die_cb (GnomeClient *client, - gpointer client_data); +void client_die_cb (GnomeClient *client, + gpointer client_data); /****************************************************************************/ /* main program */ @@ -174,13 +177,13 @@ main (int argc, char **argv) } /* Initialize subsystems */ - gl_paper_init(); + gl_paper_init (); gl_prefs_init (); - gl_template_init(); - gl_merge_init(); - gl_recent_init(); + gl_template_init (); + gl_merge_init (); + gl_recent_init (); - if (bonobo_ui_init ("glabels", VERSION, &argc, argv) == FALSE) { + if (!bonobo_ui_init ("glabels", VERSION, &argc, argv)) { g_error (_("Could not initialize Bonobo!\n")); } @@ -229,13 +232,13 @@ main (int argc, char **argv) /*---------------------------------------------------------------------------*/ /* PRIVATE. "Save session" callback. */ /*---------------------------------------------------------------------------*/ -gint save_session_cb (GnomeClient *client, - gint phase, - GnomeRestartStyle save_style, - gint shutdown, - GnomeInteractStyle interact_style, - gint fast, - gpointer client_data) +gboolean save_session_cb (GnomeClient *client, + gint phase, + GnomeRestartStyle save_style, + gint shutdown, + GnomeInteractStyle interact_style, + gint fast, + gpointer client_data) { gchar *argv[128]; gint argc; diff --git a/glabels2/src/hig.c b/glabels2/src/hig.c index bd2d2077..f5f026e2 100644 --- a/glabels2/src/hig.c +++ b/glabels2/src/hig.c @@ -87,13 +87,13 @@ static void gl_hig_hbox_finalize (GObject *object); /* Boilerplate Alert Object stuff. */ /****************************************************************************/ /****************************************************************************/ -guint +GType gl_hig_alert_get_type (void) { - static guint hig_alert_type = 0; + static GType type = 0; - if (!hig_alert_type) { - GTypeInfo hig_alert_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glHigAlertClass), NULL, NULL, @@ -103,15 +103,14 @@ gl_hig_alert_get_type (void) sizeof (glHigAlert), 0, (GInstanceInitFunc) gl_hig_alert_init, + NULL }; - hig_alert_type = - g_type_register_static (gtk_dialog_get_type (), - "glHigAlert", - &hig_alert_info, 0); + type = g_type_register_static (GTK_TYPE_DIALOG, + "glHigAlert", &info, 0); } - return hig_alert_type; + return type; } static void @@ -281,13 +280,13 @@ GtkWidget* gl_hig_alert_new (GtkWindow *parent, /* Boilerplate Dialog Object stuff. */ /****************************************************************************/ /****************************************************************************/ -guint +GType gl_hig_dialog_get_type (void) { - static guint hig_dialog_type = 0; + static GType type = 0; - if (!hig_dialog_type) { - GTypeInfo hig_dialog_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glHigDialogClass), NULL, NULL, @@ -297,15 +296,14 @@ gl_hig_dialog_get_type (void) sizeof (glHigDialog), 0, (GInstanceInitFunc) gl_hig_dialog_init, + NULL }; - hig_dialog_type = - g_type_register_static (gtk_dialog_get_type (), - "glHigDialog", - &hig_dialog_info, 0); + type = g_type_register_static (GTK_TYPE_DIALOG, + "glHigDialog", &info, 0); } - return hig_dialog_type; + return type; } static void @@ -444,13 +442,13 @@ gl_hig_dialog_add_widget (glHigDialog *dialog, /* Boilerplate Category Object stuff. */ /****************************************************************************/ /****************************************************************************/ -guint +GType gl_hig_category_get_type (void) { - static guint hig_category_type = 0; + static GType type = 0; - if (!hig_category_type) { - GTypeInfo hig_category_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glHigCategoryClass), NULL, NULL, @@ -460,15 +458,14 @@ gl_hig_category_get_type (void) sizeof (glHigCategory), 0, (GInstanceInitFunc) gl_hig_category_init, + NULL }; - hig_category_type = - g_type_register_static (gtk_vbox_get_type (), - "glHigCategory", - &hig_category_info, 0); + type = g_type_register_static (GTK_TYPE_VBOX, + "glHigCategory", &info, 0); } - return hig_category_type; + return type; } static void @@ -561,13 +558,13 @@ gl_hig_category_add_widget (glHigCategory *cat, /* Boilerplate VBox Object stuff. */ /****************************************************************************/ /****************************************************************************/ -guint +GType gl_hig_vbox_get_type (void) { - static guint hig_vbox_type = 0; + static GType type = 0; - if (!hig_vbox_type) { - GTypeInfo hig_vbox_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glHigVBoxClass), NULL, NULL, @@ -577,15 +574,14 @@ gl_hig_vbox_get_type (void) sizeof (glHigVBox), 0, (GInstanceInitFunc) gl_hig_vbox_init, + NULL }; - hig_vbox_type = - g_type_register_static (gtk_vbox_get_type (), - "glHigVBox", - &hig_vbox_info, 0); + type = g_type_register_static (GTK_TYPE_VBOX, + "glHigVBox", &info, 0); } - return hig_vbox_type; + return type; } static void @@ -667,13 +663,13 @@ gl_hig_vbox_add_widget (glHigVBox *hig_vbox, /* Boilerplate HBox Object stuff. */ /****************************************************************************/ /****************************************************************************/ -guint +GType gl_hig_hbox_get_type (void) { - static guint hig_hbox_type = 0; + static GType type = 0; - if (!hig_hbox_type) { - GTypeInfo hig_hbox_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glHigHBoxClass), NULL, NULL, @@ -683,15 +679,14 @@ gl_hig_hbox_get_type (void) sizeof (glHigHBox), 0, (GInstanceInitFunc) gl_hig_hbox_init, + NULL }; - hig_hbox_type = - g_type_register_static (gtk_hbox_get_type (), - "glHigHBox", - &hig_hbox_info, 0); + type = g_type_register_static (GTK_TYPE_HBOX, + "glHigHBox", &info, 0); } - return hig_hbox_type; + return type; } static void diff --git a/glabels2/src/hig.h b/glabels2/src/hig.h index c74df276..35c5b9e7 100644 --- a/glabels2/src/hig.h +++ b/glabels2/src/hig.h @@ -56,7 +56,7 @@ struct _glHigAlertClass { GtkDialogClass parent_class; }; -guint gl_hig_alert_get_type (void); +GType gl_hig_alert_get_type (void) G_GNUC_CONST; GtkWidget *gl_hig_alert_new (GtkWindow *parent, GtkDialogFlags flags, @@ -93,7 +93,7 @@ struct _glHigDialogClass { GtkDialogClass parent_class; }; -guint gl_hig_dialog_get_type (void); +GType gl_hig_dialog_get_type (void) G_GNUC_CONST; GtkWidget *gl_hig_dialog_new (void); @@ -135,7 +135,7 @@ struct _glHigCategoryClass { GtkVBoxClass parent_class; }; -guint gl_hig_category_get_type (void); +GType gl_hig_category_get_type (void) G_GNUC_CONST; GtkWidget *gl_hig_category_new (const gchar *header); @@ -173,7 +173,7 @@ struct _glHigVBoxClass { GtkVBoxClass parent_class; }; -guint gl_hig_vbox_get_type (void); +GType gl_hig_vbox_get_type (void) G_GNUC_CONST; GtkWidget *gl_hig_vbox_new (glHigVBoxType type); @@ -206,7 +206,7 @@ struct _glHigHBoxClass { GtkHBoxClass parent_class; }; -guint gl_hig_hbox_get_type (void); +GType gl_hig_hbox_get_type (void) G_GNUC_CONST; GtkWidget *gl_hig_hbox_new (void); diff --git a/glabels2/src/label-barcode.c b/glabels2/src/label-barcode.c index b49d4d34..1222ede2 100644 --- a/glabels2/src/label-barcode.c +++ b/glabels2/src/label-barcode.c @@ -84,7 +84,7 @@ gl_label_barcode_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glLabelBarcodeClass), NULL, NULL, @@ -94,6 +94,7 @@ gl_label_barcode_get_type (void) sizeof (glLabelBarcode), 0, (GInstanceInitFunc) gl_label_barcode_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_LABEL_OBJECT, diff --git a/glabels2/src/label-barcode.h b/glabels2/src/label-barcode.h index d2fda717..7fa79742 100644 --- a/glabels2/src/label-barcode.h +++ b/glabels2/src/label-barcode.h @@ -54,7 +54,7 @@ struct _glLabelBarcodeClass { }; -GType gl_label_barcode_get_type (void); +GType gl_label_barcode_get_type (void) G_GNUC_CONST; GObject *gl_label_barcode_new (glLabel *label); diff --git a/glabels2/src/label-box.c b/glabels2/src/label-box.c index d0548826..cd948553 100644 --- a/glabels2/src/label-box.c +++ b/glabels2/src/label-box.c @@ -81,7 +81,7 @@ gl_label_box_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glLabelBoxClass), NULL, NULL, @@ -91,6 +91,7 @@ gl_label_box_get_type (void) sizeof (glLabelBox), 0, (GInstanceInitFunc) gl_label_box_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_LABEL_OBJECT, diff --git a/glabels2/src/label-box.h b/glabels2/src/label-box.h index 16b67419..479e2b64 100644 --- a/glabels2/src/label-box.h +++ b/glabels2/src/label-box.h @@ -50,7 +50,7 @@ struct _glLabelBoxClass { glLabelObjectClass parent_class; }; -GType gl_label_box_get_type (void); +GType gl_label_box_get_type (void) G_GNUC_CONST; GObject *gl_label_box_new (glLabel *label); diff --git a/glabels2/src/label-ellipse.c b/glabels2/src/label-ellipse.c index c034e730..01dc6f46 100644 --- a/glabels2/src/label-ellipse.c +++ b/glabels2/src/label-ellipse.c @@ -81,7 +81,7 @@ gl_label_ellipse_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glLabelEllipseClass), NULL, NULL, @@ -91,6 +91,7 @@ gl_label_ellipse_get_type (void) sizeof (glLabelEllipse), 0, (GInstanceInitFunc) gl_label_ellipse_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_LABEL_OBJECT, diff --git a/glabels2/src/label-ellipse.h b/glabels2/src/label-ellipse.h index bc950d9c..57527dea 100644 --- a/glabels2/src/label-ellipse.h +++ b/glabels2/src/label-ellipse.h @@ -50,7 +50,7 @@ struct _glLabelEllipseClass { glLabelObjectClass parent_class; }; -GType gl_label_ellipse_get_type (void); +GType gl_label_ellipse_get_type (void) G_GNUC_CONST; GObject *gl_label_ellipse_new (glLabel *label); diff --git a/glabels2/src/label-image.c b/glabels2/src/label-image.c index 4572b3d7..c785ad03 100644 --- a/glabels2/src/label-image.c +++ b/glabels2/src/label-image.c @@ -68,7 +68,7 @@ gl_label_image_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glLabelImageClass), NULL, NULL, @@ -78,6 +78,7 @@ gl_label_image_get_type (void) sizeof (glLabelImage), 0, (GInstanceInitFunc) gl_label_image_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_LABEL_OBJECT, diff --git a/glabels2/src/label-image.h b/glabels2/src/label-image.h index 0b6b98ba..31a480a6 100644 --- a/glabels2/src/label-image.h +++ b/glabels2/src/label-image.h @@ -52,7 +52,7 @@ struct _glLabelImageClass { glLabelObjectClass parent_class; }; -GType gl_label_image_get_type (void); +GType gl_label_image_get_type (void) G_GNUC_CONST; GObject *gl_label_image_new (glLabel *label); diff --git a/glabels2/src/label-line.c b/glabels2/src/label-line.c index 48784232..23fd5d87 100644 --- a/glabels2/src/label-line.c +++ b/glabels2/src/label-line.c @@ -75,7 +75,7 @@ gl_label_line_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glLabelLineClass), NULL, NULL, @@ -85,6 +85,7 @@ gl_label_line_get_type (void) sizeof (glLabelLine), 0, (GInstanceInitFunc) gl_label_line_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_LABEL_OBJECT, diff --git a/glabels2/src/label-line.h b/glabels2/src/label-line.h index 6caeb685..4c2c2d15 100644 --- a/glabels2/src/label-line.h +++ b/glabels2/src/label-line.h @@ -50,7 +50,7 @@ struct _glLabelLineClass { glLabelObjectClass parent_class; }; -GType gl_label_line_get_type (void); +GType gl_label_line_get_type (void) G_GNUC_CONST; GObject *gl_label_line_new (glLabel *label); diff --git a/glabels2/src/label-object.c b/glabels2/src/label-object.c index 1df223e0..70780ce0 100644 --- a/glabels2/src/label-object.c +++ b/glabels2/src/label-object.c @@ -90,7 +90,7 @@ gl_label_object_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glLabelObjectClass), NULL, NULL, @@ -100,6 +100,7 @@ gl_label_object_get_type (void) sizeof (glLabelObject), 0, (GInstanceInitFunc) gl_label_object_instance_init, + NULL }; type = g_type_register_static (G_TYPE_OBJECT, diff --git a/glabels2/src/label-object.h b/glabels2/src/label-object.h index 222f71d1..08e594db 100644 --- a/glabels2/src/label-object.h +++ b/glabels2/src/label-object.h @@ -152,7 +152,7 @@ struct _glLabelObjectClass { gpointer user_data); }; -GType gl_label_object_get_type (void); +GType gl_label_object_get_type (void) G_GNUC_CONST; GObject *gl_label_object_new (glLabel *label); diff --git a/glabels2/src/label-text.c b/glabels2/src/label-text.c index b85c860d..70ae32a7 100644 --- a/glabels2/src/label-text.c +++ b/glabels2/src/label-text.c @@ -129,7 +129,7 @@ gl_label_text_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glLabelTextClass), NULL, NULL, @@ -139,6 +139,7 @@ gl_label_text_get_type (void) sizeof (glLabelText), 0, (GInstanceInitFunc) gl_label_text_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_LABEL_OBJECT, diff --git a/glabels2/src/label-text.h b/glabels2/src/label-text.h index 40bdb3aa..99c60728 100644 --- a/glabels2/src/label-text.h +++ b/glabels2/src/label-text.h @@ -54,7 +54,7 @@ struct _glLabelTextClass { glLabelObjectClass parent_class; }; -GType gl_label_text_get_type (void); +GType gl_label_text_get_type (void) G_GNUC_CONST; GObject *gl_label_text_new (glLabel *label); diff --git a/glabels2/src/label.c b/glabels2/src/label.c index a5f6de22..e2e097bf 100644 --- a/glabels2/src/label.c +++ b/glabels2/src/label.c @@ -99,7 +99,7 @@ gl_label_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glLabelClass), NULL, NULL, @@ -109,6 +109,7 @@ gl_label_get_type (void) sizeof (glLabel), 0, (GInstanceInitFunc) gl_label_instance_init, + NULL }; type = g_type_register_static (G_TYPE_OBJECT, diff --git a/glabels2/src/label.h b/glabels2/src/label.h index 791dbd23..8d2873c9 100644 --- a/glabels2/src/label.h +++ b/glabels2/src/label.h @@ -66,7 +66,7 @@ struct _glLabelClass { }; -GType gl_label_get_type (void); +GType gl_label_get_type (void) G_GNUC_CONST; GObject *gl_label_new (void); diff --git a/glabels2/src/merge-properties-dialog.c b/glabels2/src/merge-properties-dialog.c index 98cb6280..c00b5536 100644 --- a/glabels2/src/merge-properties-dialog.c +++ b/glabels2/src/merge-properties-dialog.c @@ -103,11 +103,11 @@ static void record_select_toggled_cb (GtkCellRendererToggle GType gl_merge_properties_dialog_get_type (void) { - static GType dialog_type = 0; + static GType type = 0; - if (!dialog_type) + if (!type) { - static const GTypeInfo dialog_info = + static const GTypeInfo info = { sizeof (glMergePropertiesDialogClass), NULL, /* base_init */ @@ -117,16 +117,15 @@ gl_merge_properties_dialog_get_type (void) NULL, /* class_data */ sizeof (glMergePropertiesDialog), 0, /* n_preallocs */ - (GInstanceInitFunc) gl_merge_properties_dialog_init + (GInstanceInitFunc) gl_merge_properties_dialog_init, + NULL }; - dialog_type = g_type_register_static (GL_TYPE_HIG_DIALOG, - "glMergePropertiesDialog", - &dialog_info, - 0); + type = g_type_register_static (GL_TYPE_HIG_DIALOG, + "glMergePropertiesDialog", &info, 0); } - return dialog_type; + return type; } static void diff --git a/glabels2/src/merge-properties-dialog.h b/glabels2/src/merge-properties-dialog.h index 5d16a1a3..c7e71f71 100644 --- a/glabels2/src/merge-properties-dialog.h +++ b/glabels2/src/merge-properties-dialog.h @@ -54,7 +54,7 @@ struct _glMergePropertiesDialogClass glHigDialogClass parent_class; }; -GtkType gl_merge_properties_dialog_get_type (void) G_GNUC_CONST; +GType gl_merge_properties_dialog_get_type (void) G_GNUC_CONST; GtkWidget *gl_merge_properties_dialog_new (glView *view); diff --git a/glabels2/src/merge-text.c b/glabels2/src/merge-text.c index 5aceefe4..637badbe 100644 --- a/glabels2/src/merge-text.c +++ b/glabels2/src/merge-text.c @@ -95,7 +95,7 @@ gl_merge_text_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glMergeTextClass), NULL, NULL, @@ -105,6 +105,7 @@ gl_merge_text_get_type (void) sizeof (glMergeText), 0, (GInstanceInitFunc) gl_merge_text_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_MERGE, diff --git a/glabels2/src/merge-text.h b/glabels2/src/merge-text.h index f642600a..7bf03700 100644 --- a/glabels2/src/merge-text.h +++ b/glabels2/src/merge-text.h @@ -59,7 +59,7 @@ struct _glMergeTextClass { }; -GType gl_merge_text_get_type (void); +GType gl_merge_text_get_type (void) G_GNUC_CONST; G_END_DECLS diff --git a/glabels2/src/merge.c b/glabels2/src/merge.c index cc10779e..d5f2b87d 100644 --- a/glabels2/src/merge.c +++ b/glabels2/src/merge.c @@ -233,7 +233,7 @@ gl_merge_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glMergeClass), NULL, NULL, @@ -243,6 +243,7 @@ gl_merge_get_type (void) sizeof (glMerge), 0, (GInstanceInitFunc) gl_merge_instance_init, + NULL }; type = g_type_register_static (G_TYPE_OBJECT, diff --git a/glabels2/src/merge.h b/glabels2/src/merge.h index 687cd3e7..f69922dc 100644 --- a/glabels2/src/merge.h +++ b/glabels2/src/merge.h @@ -93,7 +93,7 @@ void gl_merge_free_descriptions (GList **descriptions); gchar *gl_merge_description_to_name (gchar *description); -GType gl_merge_get_type (void); +GType gl_merge_get_type (void) G_GNUC_CONST; glMerge *gl_merge_new (gchar *name); diff --git a/glabels2/src/object-editor.c b/glabels2/src/object-editor.c index 259108f7..27412729 100644 --- a/glabels2/src/object-editor.c +++ b/glabels2/src/object-editor.c @@ -75,11 +75,11 @@ static void prefs_changed_cb (glObjectEditor *editor); GType gl_object_editor_get_type (void) { - static GType editor_type = 0; + static GType type = 0; - if (!editor_type) + if (!type) { - static const GTypeInfo editor_info = + static const GTypeInfo info = { sizeof (glObjectEditorClass), NULL, /* base_init */ @@ -89,16 +89,15 @@ gl_object_editor_get_type (void) NULL, /* class_data */ sizeof (glObjectEditor), 0, /* n_preallocs */ - (GInstanceInitFunc) gl_object_editor_init + (GInstanceInitFunc) gl_object_editor_init, + NULL }; - editor_type = g_type_register_static (GTK_TYPE_VBOX, - "glObjectEditor", - &editor_info, - 0); + type = g_type_register_static (GTK_TYPE_VBOX, + "glObjectEditor", &info, 0); } - return editor_type; + return type; } static void diff --git a/glabels2/src/prefs-dialog.c b/glabels2/src/prefs-dialog.c index 80324634..36e9f4b4 100644 --- a/glabels2/src/prefs-dialog.c +++ b/glabels2/src/prefs-dialog.c @@ -113,11 +113,11 @@ static void update_prefs_from_object_page (glPrefsDialog *dlg); GType gl_prefs_dialog_get_type (void) { - static GType dialog_type = 0; + static GType type = 0; - if (!dialog_type) + if (!type) { - static const GTypeInfo dialog_info = + static const GTypeInfo info = { sizeof (glPrefsDialogClass), NULL, /* base_init */ @@ -127,16 +127,15 @@ gl_prefs_dialog_get_type (void) NULL, /* class_data */ sizeof (glPrefsDialog), 0, /* n_preallocs */ - (GInstanceInitFunc) gl_prefs_dialog_init + (GInstanceInitFunc) gl_prefs_dialog_init, + NULL }; - dialog_type = g_type_register_static (GL_TYPE_HIG_DIALOG, - "glPrefsDialog", - &dialog_info, - 0); + type = g_type_register_static (GL_TYPE_HIG_DIALOG, + "glPrefsDialog", &info, 0); } - return dialog_type; + return type; } static void diff --git a/glabels2/src/prefs-dialog.h b/glabels2/src/prefs-dialog.h index adc68b53..16be052a 100644 --- a/glabels2/src/prefs-dialog.h +++ b/glabels2/src/prefs-dialog.h @@ -54,7 +54,7 @@ struct _glPrefsDialogClass glHigDialogClass parent_class; }; -GtkType gl_prefs_dialog_get_type (void) G_GNUC_CONST; +GType gl_prefs_dialog_get_type (void) G_GNUC_CONST; GtkWidget *gl_prefs_dialog_new (GtkWindow *parent); diff --git a/glabels2/src/prefs-model.c b/glabels2/src/prefs-model.c index 5abf224d..bb141503 100644 --- a/glabels2/src/prefs-model.c +++ b/glabels2/src/prefs-model.c @@ -148,7 +148,7 @@ gl_prefs_model_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glPrefsModelClass), NULL, NULL, @@ -158,6 +158,7 @@ gl_prefs_model_get_type (void) sizeof (glPrefsModel), 0, (GInstanceInitFunc) gl_prefs_model_instance_init, + NULL }; type = g_type_register_static (G_TYPE_OBJECT, diff --git a/glabels2/src/prefs-model.h b/glabels2/src/prefs-model.h index f73ad7e4..fc2f93f6 100644 --- a/glabels2/src/prefs-model.h +++ b/glabels2/src/prefs-model.h @@ -111,7 +111,7 @@ struct _glPrefsModelClass { }; -GType gl_prefs_model_get_type (void); +GType gl_prefs_model_get_type (void) G_GNUC_CONST; glPrefsModel *gl_prefs_model_new (void); diff --git a/glabels2/src/print-dialog.c b/glabels2/src/print-dialog.c index b25fe51a..7fd5307f 100644 --- a/glabels2/src/print-dialog.c +++ b/glabels2/src/print-dialog.c @@ -135,11 +135,11 @@ static void print_sheets_merge (GnomePrintConfig *config, GType gl_print_dialog_get_type (void) { - static GType dialog_type = 0; + static GType type = 0; - if (!dialog_type) + if (!type) { - static const GTypeInfo dialog_info = + static const GTypeInfo info = { sizeof (glPrintDialogClass), NULL, /* base_init */ @@ -149,16 +149,15 @@ gl_print_dialog_get_type (void) NULL, /* class_data */ sizeof (glPrintDialog), 0, /* n_preallocs */ - (GInstanceInitFunc) gl_print_dialog_init + (GInstanceInitFunc) gl_print_dialog_init, + NULL }; - dialog_type = g_type_register_static (GL_TYPE_HIG_DIALOG, - "glPrintDialog", - &dialog_info, - 0); + type = g_type_register_static (GL_TYPE_HIG_DIALOG, + "glPrintDialog", &info, 0); } - return dialog_type; + return type; } static void diff --git a/glabels2/src/print-dialog.h b/glabels2/src/print-dialog.h index 20e17c1e..0ccfc71b 100644 --- a/glabels2/src/print-dialog.h +++ b/glabels2/src/print-dialog.h @@ -56,7 +56,7 @@ struct _glPrintDialogClass }; -GtkType gl_print_dialog_get_type (void) G_GNUC_CONST; +GType gl_print_dialog_get_type (void) G_GNUC_CONST; GtkWidget *gl_print_dialog_new (glLabel *label, BonoboWindow *win); diff --git a/glabels2/src/template-designer.c b/glabels2/src/template-designer.c index cfb7ad66..66c28f7e 100644 --- a/glabels2/src/template-designer.c +++ b/glabels2/src/template-designer.c @@ -287,11 +287,11 @@ static void finish_cb (glTemplateDesigner *dlg) GType gl_template_designer_get_type (void) { - static GType dialog_type = 0; + static GType type = 0; - if (!dialog_type) + if (!type) { - static const GTypeInfo dialog_info = + static const GTypeInfo info = { sizeof (glTemplateDesignerClass), NULL, /* base_init */ @@ -301,16 +301,15 @@ gl_template_designer_get_type (void) NULL, /* class_data */ sizeof (glTemplateDesigner), 0, /* n_preallocs */ - (GInstanceInitFunc) gl_template_designer_init + (GInstanceInitFunc) gl_template_designer_init, + NULL }; - dialog_type = g_type_register_static (GTK_TYPE_WINDOW, - "glTemplateDesigner", - &dialog_info, - 0); + type = g_type_register_static (GTK_TYPE_WINDOW, + "glTemplateDesigner", &info, 0); } - return dialog_type; + return type; } static void diff --git a/glabels2/src/template-designer.h b/glabels2/src/template-designer.h index 7e1bc3dc..5cea341c 100644 --- a/glabels2/src/template-designer.h +++ b/glabels2/src/template-designer.h @@ -53,7 +53,7 @@ struct _glTemplateDesignerClass GtkWindowClass parent_class; }; -GtkType gl_template_designer_get_type (void) G_GNUC_CONST; +GType gl_template_designer_get_type (void) G_GNUC_CONST; GtkWidget *gl_template_designer_new (GtkWindow *parent); diff --git a/glabels2/src/ui-property-bar.c b/glabels2/src/ui-property-bar.c index e61015ad..603c033f 100644 --- a/glabels2/src/ui-property-bar.c +++ b/glabels2/src/ui-property-bar.c @@ -150,13 +150,13 @@ static void null_cmd (BonoboUIComponent *ui_component, /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ -guint +GType gl_ui_property_bar_get_type (void) { - static guint property_bar_type = 0; + static GType type = 0; - if (!property_bar_type) { - GTypeInfo property_bar_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glUIPropertyBarClass), NULL, NULL, @@ -166,15 +166,14 @@ gl_ui_property_bar_get_type (void) sizeof (glUIPropertyBar), 0, (GInstanceInitFunc) gl_ui_property_bar_instance_init, + NULL }; - property_bar_type = - g_type_register_static (G_TYPE_OBJECT, - "glUIPropertyBar", - &property_bar_info, 0); + type = g_type_register_static (G_TYPE_OBJECT, + "glUIPropertyBar", &info, 0); } - return property_bar_type; + return type; } static void diff --git a/glabels2/src/ui-property-bar.h b/glabels2/src/ui-property-bar.h index bb3fead1..b1d3680c 100644 --- a/glabels2/src/ui-property-bar.h +++ b/glabels2/src/ui-property-bar.h @@ -67,7 +67,7 @@ struct _glUIPropertyBarClass { GObjectClass parent_class; }; -guint gl_ui_property_bar_get_type (void); +GType gl_ui_property_bar_get_type (void) G_GNUC_CONST; GObject *gl_ui_property_bar_new (BonoboUIComponent *ui_component); diff --git a/glabels2/src/ui-sidebar.c b/glabels2/src/ui-sidebar.c index 6f9ca793..4487f13b 100644 --- a/glabels2/src/ui-sidebar.c +++ b/glabels2/src/ui-sidebar.c @@ -68,13 +68,13 @@ static void selection_changed_cb (glView *view, /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ -guint +GType gl_ui_sidebar_get_type (void) { - static guint sidebar_type = 0; + static GType type = 0; - if (!sidebar_type) { - GTypeInfo sidebar_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glUISidebarClass), NULL, NULL, @@ -84,15 +84,14 @@ gl_ui_sidebar_get_type (void) sizeof (glUISidebar), 0, (GInstanceInitFunc) gl_ui_sidebar_instance_init, + NULL }; - sidebar_type = - g_type_register_static (GTK_TYPE_VBOX, - "glUISidebar", - &sidebar_info, 0); + type = g_type_register_static (GTK_TYPE_VBOX, + "glUISidebar", &info, 0); } - return sidebar_type; + return type; } static void diff --git a/glabels2/src/ui-sidebar.h b/glabels2/src/ui-sidebar.h index a7f62fab..37892e82 100644 --- a/glabels2/src/ui-sidebar.h +++ b/glabels2/src/ui-sidebar.h @@ -58,7 +58,7 @@ struct _glUISidebarClass { GtkVBoxClass parent_class; }; -guint gl_ui_sidebar_get_type (void); +GType gl_ui_sidebar_get_type (void) G_GNUC_CONST; GObject *gl_ui_sidebar_new (BonoboUIComponent *ui_component); diff --git a/glabels2/src/view-barcode.c b/glabels2/src/view-barcode.c index 22d40549..99d088f4 100644 --- a/glabels2/src/view-barcode.c +++ b/glabels2/src/view-barcode.c @@ -98,7 +98,7 @@ gl_view_barcode_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glViewBarcodeClass), NULL, NULL, @@ -108,6 +108,7 @@ gl_view_barcode_get_type (void) sizeof (glViewBarcode), 0, (GInstanceInitFunc) gl_view_barcode_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_VIEW_OBJECT, diff --git a/glabels2/src/view-barcode.h b/glabels2/src/view-barcode.h index 7bb9112d..7edbeff0 100644 --- a/glabels2/src/view-barcode.h +++ b/glabels2/src/view-barcode.h @@ -51,19 +51,19 @@ struct _glViewBarcodeClass { }; -extern GType gl_view_barcode_get_type (void); +GType gl_view_barcode_get_type (void) G_GNUC_CONST; -extern glViewObject *gl_view_barcode_new (glLabelBarcode *object, - glView *view); +glViewObject *gl_view_barcode_new (glLabelBarcode *object, + glView *view); /* cursor for creating barcode objects */ -extern GdkCursor *gl_view_barcode_get_create_cursor (void); +GdkCursor *gl_view_barcode_get_create_cursor (void); /* event handler for creating barcode objects */ -extern gint gl_view_barcode_create_event_handler (GnomeCanvas *canvas, - GdkEvent *event, - glView *view); +gint gl_view_barcode_create_event_handler (GnomeCanvas *canvas, + GdkEvent *event, + glView *view); G_END_DECLS diff --git a/glabels2/src/view-box.c b/glabels2/src/view-box.c index 92cac0b6..5095a357 100644 --- a/glabels2/src/view-box.c +++ b/glabels2/src/view-box.c @@ -94,7 +94,7 @@ gl_view_box_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glViewBoxClass), NULL, NULL, @@ -104,6 +104,7 @@ gl_view_box_get_type (void) sizeof (glViewBox), 0, (GInstanceInitFunc) gl_view_box_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_VIEW_OBJECT, diff --git a/glabels2/src/view-box.h b/glabels2/src/view-box.h index 12cb9047..af63d5e5 100644 --- a/glabels2/src/view-box.h +++ b/glabels2/src/view-box.h @@ -51,19 +51,19 @@ struct _glViewBoxClass { }; -extern GType gl_view_box_get_type (void); +GType gl_view_box_get_type (void) G_GNUC_CONST; -extern glViewObject *gl_view_box_new (glLabelBox *object, - glView *view); +glViewObject *gl_view_box_new (glLabelBox *object, + glView *view); /* cursor for creating box objects */ -extern GdkCursor *gl_view_box_get_create_cursor (void); +GdkCursor *gl_view_box_get_create_cursor (void); /* event handler for creating box objects */ -extern gint gl_view_box_create_event_handler (GnomeCanvas *canvas, - GdkEvent *event, - glView *view); +gint gl_view_box_create_event_handler (GnomeCanvas *canvas, + GdkEvent *event, + glView *view); G_END_DECLS diff --git a/glabels2/src/view-ellipse.c b/glabels2/src/view-ellipse.c index fd2689cc..98643618 100644 --- a/glabels2/src/view-ellipse.c +++ b/glabels2/src/view-ellipse.c @@ -94,7 +94,7 @@ gl_view_ellipse_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glViewEllipseClass), NULL, NULL, @@ -104,6 +104,7 @@ gl_view_ellipse_get_type (void) sizeof (glViewEllipse), 0, (GInstanceInitFunc) gl_view_ellipse_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_VIEW_OBJECT, diff --git a/glabels2/src/view-ellipse.h b/glabels2/src/view-ellipse.h index ad0ce23f..d7f13b6f 100644 --- a/glabels2/src/view-ellipse.h +++ b/glabels2/src/view-ellipse.h @@ -51,19 +51,19 @@ struct _glViewEllipseClass { }; -extern GType gl_view_ellipse_get_type (void); +GType gl_view_ellipse_get_type (void) G_GNUC_CONST; -extern glViewObject *gl_view_ellipse_new (glLabelEllipse *object, - glView *view); +glViewObject *gl_view_ellipse_new (glLabelEllipse *object, + glView *view); /* cursor for creating ellipse objects */ -extern GdkCursor *gl_view_ellipse_get_create_cursor (void); +GdkCursor *gl_view_ellipse_get_create_cursor (void); /* event handler for creating ellipse objects */ -extern gint gl_view_ellipse_create_event_handler (GnomeCanvas *canvas, - GdkEvent *event, - glView *view); +gint gl_view_ellipse_create_event_handler (GnomeCanvas *canvas, + GdkEvent *event, + glView *view); G_END_DECLS diff --git a/glabels2/src/view-highlight.c b/glabels2/src/view-highlight.c index 1cfdc95c..7bd596ca 100644 --- a/glabels2/src/view-highlight.c +++ b/glabels2/src/view-highlight.c @@ -156,7 +156,7 @@ gl_view_highlight_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glViewHighlightClass), NULL, NULL, @@ -166,6 +166,7 @@ gl_view_highlight_get_type (void) sizeof (glViewHighlight), 0, (GInstanceInitFunc) gl_view_highlight_instance_init, + NULL }; type = g_type_register_static (G_TYPE_OBJECT, diff --git a/glabels2/src/view-highlight.h b/glabels2/src/view-highlight.h index 8f6bfa52..fceb40e9 100644 --- a/glabels2/src/view-highlight.h +++ b/glabels2/src/view-highlight.h @@ -60,7 +60,7 @@ struct _glViewHighlightClass { -GType gl_view_highlight_get_type (void); +GType gl_view_highlight_get_type (void) G_GNUC_CONST; GObject *gl_view_highlight_new (glViewObject *view_object, glViewHighlightStyle style); diff --git a/glabels2/src/view-image.c b/glabels2/src/view-image.c index 1521b300..176b169c 100644 --- a/glabels2/src/view-image.c +++ b/glabels2/src/view-image.c @@ -96,7 +96,7 @@ gl_view_image_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glViewImageClass), NULL, NULL, @@ -106,6 +106,7 @@ gl_view_image_get_type (void) sizeof (glViewImage), 0, (GInstanceInitFunc) gl_view_image_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_VIEW_OBJECT, diff --git a/glabels2/src/view-image.h b/glabels2/src/view-image.h index e36154ad..d19c9810 100644 --- a/glabels2/src/view-image.h +++ b/glabels2/src/view-image.h @@ -51,19 +51,19 @@ struct _glViewImageClass { }; -extern GType gl_view_image_get_type (void); +GType gl_view_image_get_type (void) G_GNUC_CONST; -extern glViewObject *gl_view_image_new (glLabelImage *object, - glView *view); +glViewObject *gl_view_image_new (glLabelImage *object, + glView *view); /* cursor for creating image objects */ -extern GdkCursor *gl_view_image_get_create_cursor (void); +GdkCursor *gl_view_image_get_create_cursor (void); /* event handler for creating image objects */ -extern gint gl_view_image_create_event_handler (GnomeCanvas *canvas, - GdkEvent *event, - glView *view); +gint gl_view_image_create_event_handler (GnomeCanvas *canvas, + GdkEvent *event, + glView *view); G_END_DECLS diff --git a/glabels2/src/view-line.c b/glabels2/src/view-line.c index 5ab61db3..143ed481 100644 --- a/glabels2/src/view-line.c +++ b/glabels2/src/view-line.c @@ -92,7 +92,7 @@ gl_view_line_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glViewLineClass), NULL, NULL, @@ -102,6 +102,7 @@ gl_view_line_get_type (void) sizeof (glViewLine), 0, (GInstanceInitFunc) gl_view_line_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_VIEW_OBJECT, diff --git a/glabels2/src/view-line.h b/glabels2/src/view-line.h index 23618996..5d532d1a 100644 --- a/glabels2/src/view-line.h +++ b/glabels2/src/view-line.h @@ -51,19 +51,19 @@ struct _glViewLineClass { }; -extern GType gl_view_line_get_type (void); +GType gl_view_line_get_type (void) G_GNUC_CONST; -extern glViewObject *gl_view_line_new (glLabelLine *object, - glView *view); +glViewObject *gl_view_line_new (glLabelLine *object, + glView *view); /* cursor for creating line objects */ -extern GdkCursor *gl_view_line_get_create_cursor (void); +GdkCursor *gl_view_line_get_create_cursor (void); /* event handler for creating line objects */ -extern gint gl_view_line_create_event_handler (GnomeCanvas *canvas, - GdkEvent *event, - glView *view); +gint gl_view_line_create_event_handler (GnomeCanvas *canvas, + GdkEvent *event, + glView *view); G_END_DECLS diff --git a/glabels2/src/view-object.c b/glabels2/src/view-object.c index 7c19c989..7f218ad8 100644 --- a/glabels2/src/view-object.c +++ b/glabels2/src/view-object.c @@ -95,7 +95,7 @@ gl_view_object_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glViewObjectClass), NULL, NULL, @@ -105,6 +105,7 @@ gl_view_object_get_type (void) sizeof (glViewObject), 0, (GInstanceInitFunc) gl_view_object_instance_init, + NULL }; type = g_type_register_static (G_TYPE_OBJECT, diff --git a/glabels2/src/view-object.h b/glabels2/src/view-object.h index b1af97fb..0559a888 100644 --- a/glabels2/src/view-object.h +++ b/glabels2/src/view-object.h @@ -62,7 +62,7 @@ struct _glViewObjectClass { G_BEGIN_DECLS -GType gl_view_object_get_type (void); +GType gl_view_object_get_type (void) G_GNUC_CONST; GObject *gl_view_object_new (void); diff --git a/glabels2/src/view-text.c b/glabels2/src/view-text.c index 45c60bbd..a4e49257 100644 --- a/glabels2/src/view-text.c +++ b/glabels2/src/view-text.c @@ -126,7 +126,7 @@ gl_view_text_get_type (void) static GType type = 0; if (!type) { - GTypeInfo info = { + static const GTypeInfo info = { sizeof (glViewTextClass), NULL, NULL, @@ -136,6 +136,7 @@ gl_view_text_get_type (void) sizeof (glViewText), 0, (GInstanceInitFunc) gl_view_text_instance_init, + NULL }; type = g_type_register_static (GL_TYPE_VIEW_OBJECT, diff --git a/glabels2/src/view-text.h b/glabels2/src/view-text.h index 392f4674..679e69a8 100644 --- a/glabels2/src/view-text.h +++ b/glabels2/src/view-text.h @@ -51,19 +51,19 @@ struct _glViewTextClass { }; -extern GType gl_view_text_get_type (void); +GType gl_view_text_get_type (void) G_GNUC_CONST; -extern glViewObject *gl_view_text_new (glLabelText *object, - glView *view); +glViewObject *gl_view_text_new (glLabelText *object, + glView *view); /* cursor for creating text objects */ -extern GdkCursor *gl_view_text_get_create_cursor (void); +GdkCursor *gl_view_text_get_create_cursor (void); /* event handler for creating text objects */ -extern gint gl_view_text_create_event_handler (GnomeCanvas *canvas, - GdkEvent *event, - glView *view); +gint gl_view_text_create_event_handler (GnomeCanvas *canvas, + GdkEvent *event, + glView *view); G_END_DECLS diff --git a/glabels2/src/view.c b/glabels2/src/view.c index 5f605209..fd35d74a 100644 --- a/glabels2/src/view.c +++ b/glabels2/src/view.c @@ -215,13 +215,13 @@ static void selection_received_cb (GtkWidget *widget, /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ -guint +GType gl_view_get_type (void) { - static guint view_type = 0; + static GType type = 0; - if (!view_type) { - GTypeInfo view_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glViewClass), NULL, NULL, @@ -231,14 +231,14 @@ gl_view_get_type (void) sizeof (glView), 0, (GInstanceInitFunc) gl_view_init, + NULL }; - view_type = - g_type_register_static (gtk_vbox_get_type (), - "glView", &view_info, 0); + type = g_type_register_static (GTK_TYPE_VBOX, + "glView", &info, 0); } - return view_type; + return type; } static void diff --git a/glabels2/src/view.h b/glabels2/src/view.h index f086bc24..1eebe09c 100644 --- a/glabels2/src/view.h +++ b/glabels2/src/view.h @@ -127,7 +127,7 @@ struct _glViewClass { G_BEGIN_DECLS -guint gl_view_get_type (void); +GType gl_view_get_type (void) G_GNUC_CONST; GtkWidget *gl_view_new (glLabel *label); diff --git a/glabels2/src/wdgt-chain-button.c b/glabels2/src/wdgt-chain-button.c index 6eef0dcc..9407c6d7 100644 --- a/glabels2/src/wdgt-chain-button.c +++ b/glabels2/src/wdgt-chain-button.c @@ -65,11 +65,11 @@ static GtkTableClass *parent_class = NULL; GType gl_wdgt_chain_button_get_type (void) { - static GType button_type = 0; + static GType type = 0; - if (! button_type) + if (! type) { - static const GTypeInfo button_info = + static const GTypeInfo info = { sizeof (glWdgtChainButtonClass), NULL, /* base_init */ @@ -80,13 +80,14 @@ gl_wdgt_chain_button_get_type (void) sizeof (glWdgtChainButton), 0, /* n_preallocs */ (GInstanceInitFunc) gl_wdgt_chain_button_init, + NULL }; - button_type = g_type_register_static (GTK_TYPE_TABLE, "glWdgtChainButton", - &button_info, 0); + type = g_type_register_static (GTK_TYPE_TABLE, + "glWdgtChainButton", &info, 0); } - return button_type; + return type; } static void diff --git a/glabels2/src/wdgt-image-select.c b/glabels2/src/wdgt-image-select.c index 9f2bb6f7..3b8e044f 100644 --- a/glabels2/src/wdgt-image-select.c +++ b/glabels2/src/wdgt-image-select.c @@ -71,13 +71,13 @@ static void radio_toggled_cb (GtkToggleButton *togglebutton, /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ -guint +GType gl_wdgt_image_select_get_type (void) { - static guint wdgt_image_select_type = 0; + static GType type = 0; - if (!wdgt_image_select_type) { - GTypeInfo wdgt_image_select_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glWdgtImageSelectClass), NULL, NULL, @@ -87,15 +87,14 @@ gl_wdgt_image_select_get_type (void) sizeof (glWdgtImageSelect), 0, (GInstanceInitFunc) gl_wdgt_image_select_instance_init, + NULL }; - wdgt_image_select_type = - g_type_register_static (gl_hig_vbox_get_type (), - "glWdgtImageSelect", - &wdgt_image_select_info, 0); + type = g_type_register_static (GL_TYPE_HIG_VBOX, + "glWdgtImageSelect", &info, 0); } - return wdgt_image_select_type; + return type; } static void diff --git a/glabels2/src/wdgt-image-select.h b/glabels2/src/wdgt-image-select.h index 08e429dd..69e4eb40 100644 --- a/glabels2/src/wdgt-image-select.h +++ b/glabels2/src/wdgt-image-select.h @@ -60,7 +60,7 @@ struct _glWdgtImageSelectClass { gpointer user_data); }; -guint gl_wdgt_image_select_get_type (void); +GType gl_wdgt_image_select_get_type (void) G_GNUC_CONST; GtkWidget *gl_wdgt_image_select_new (glMerge *merge, glTextNode *text_node); diff --git a/glabels2/src/wdgt-media-select.c b/glabels2/src/wdgt-media-select.c index c0e15f0c..acc64024 100644 --- a/glabels2/src/wdgt-media-select.c +++ b/glabels2/src/wdgt-media-select.c @@ -81,13 +81,13 @@ static gchar *get_label_size_desc (const glTemplate *template /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ -guint +GType gl_wdgt_media_select_get_type (void) { - static guint wdgt_media_select_type = 0; + static GType type = 0; - if (!wdgt_media_select_type) { - GTypeInfo wdgt_media_select_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glWdgtMediaSelectClass), NULL, NULL, @@ -97,15 +97,14 @@ gl_wdgt_media_select_get_type (void) sizeof (glWdgtMediaSelect), 0, (GInstanceInitFunc) gl_wdgt_media_select_instance_init, + NULL }; - wdgt_media_select_type = - g_type_register_static (gl_hig_vbox_get_type (), - "glWdgtMediaSelect", - &wdgt_media_select_info, 0); + type = g_type_register_static (GL_TYPE_HIG_VBOX, + "glWdgtMediaSelect", &info, 0); } - return wdgt_media_select_type; + return type; } static void diff --git a/glabels2/src/wdgt-media-select.h b/glabels2/src/wdgt-media-select.h index 7505e4c8..3d9f0539 100644 --- a/glabels2/src/wdgt-media-select.h +++ b/glabels2/src/wdgt-media-select.h @@ -62,7 +62,7 @@ struct _glWdgtMediaSelectClass { void (*changed) (glWdgtMediaSelect * media_select, gpointer user_data); }; -guint gl_wdgt_media_select_get_type (void); +GType gl_wdgt_media_select_get_type (void) G_GNUC_CONST; GtkWidget *gl_wdgt_media_select_new (void); diff --git a/glabels2/src/wdgt-mini-preview.c b/glabels2/src/wdgt-mini-preview.c index ffc6b30e..c7475430 100644 --- a/glabels2/src/wdgt-mini-preview.c +++ b/glabels2/src/wdgt-mini-preview.c @@ -89,13 +89,13 @@ static void style_set_cb (GtkWidget *widget, /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ -guint +GType gl_wdgt_mini_preview_get_type (void) { - static guint wdgt_mini_preview_type = 0; + static GType type = 0; - if (!wdgt_mini_preview_type) { - GTypeInfo wdgt_mini_preview_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glWdgtMiniPreviewClass), NULL, NULL, @@ -105,15 +105,14 @@ gl_wdgt_mini_preview_get_type (void) sizeof (glWdgtMiniPreview), 0, (GInstanceInitFunc) gl_wdgt_mini_preview_instance_init, + NULL }; - wdgt_mini_preview_type = - g_type_register_static (gtk_hbox_get_type (), - "glWdgtMiniPreview", - &wdgt_mini_preview_info, 0); + type = g_type_register_static (GTK_TYPE_HBOX, + "glWdgtMiniPreview", &info, 0); } - return wdgt_mini_preview_type; + return type; } static void diff --git a/glabels2/src/wdgt-mini-preview.h b/glabels2/src/wdgt-mini-preview.h index d6049c0e..9c3a9e62 100644 --- a/glabels2/src/wdgt-mini-preview.h +++ b/glabels2/src/wdgt-mini-preview.h @@ -71,7 +71,7 @@ struct _glWdgtMiniPreviewClass { gpointer user_data); }; -guint gl_wdgt_mini_preview_get_type (void); +GType gl_wdgt_mini_preview_get_type (void) G_GNUC_CONST; GtkWidget *gl_wdgt_mini_preview_new (gint height, gint width); diff --git a/glabels2/src/wdgt-print-copies.c b/glabels2/src/wdgt-print-copies.c index 09899f80..ca202671 100644 --- a/glabels2/src/wdgt-print-copies.c +++ b/glabels2/src/wdgt-print-copies.c @@ -63,13 +63,13 @@ preview_pressed (glWdgtMiniPreview *mini_preview, /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ -guint +GType gl_wdgt_print_copies_get_type (void) { - static guint wdgt_print_copies_type = 0; + static GType type = 0; - if (!wdgt_print_copies_type) { - GTypeInfo wdgt_print_copies_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glWdgtPrintCopiesClass), NULL, NULL, @@ -79,15 +79,14 @@ gl_wdgt_print_copies_get_type (void) sizeof (glWdgtPrintCopies), 0, (GInstanceInitFunc) gl_wdgt_print_copies_instance_init, + NULL }; - wdgt_print_copies_type = - g_type_register_static (gl_hig_hbox_get_type (), - "glWdgtPrintCopies", - &wdgt_print_copies_info, 0); + type = g_type_register_static (GL_TYPE_HIG_HBOX, + "glWdgtPrintCopies", &info, 0); } - return wdgt_print_copies_type; + return type; } static void diff --git a/glabels2/src/wdgt-print-copies.h b/glabels2/src/wdgt-print-copies.h index c0a85daa..dd6dacc0 100644 --- a/glabels2/src/wdgt-print-copies.h +++ b/glabels2/src/wdgt-print-copies.h @@ -27,6 +27,8 @@ #include "label.h" #include "hig.h" +G_BEGIN_DECLS + #define GL_TYPE_WDGT_PRINT_COPIES (gl_wdgt_print_copies_get_type ()) #define GL_WDGT_PRINT_COPIES(obj) \ (GTK_CHECK_CAST((obj), GL_TYPE_WDGT_PRINT_COPIES, glWdgtPrintCopies )) @@ -59,18 +61,20 @@ struct _glWdgtPrintCopiesClass { glHigHBoxClass parent_class; }; -extern guint gl_wdgt_print_copies_get_type (void); +GType gl_wdgt_print_copies_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_wdgt_print_copies_new (glLabel *label); -extern GtkWidget *gl_wdgt_print_copies_new (glLabel * label); +void gl_wdgt_print_copies_get_range (glWdgtPrintCopies *copies, + gint *n_sheets, + gint *first_label, + gint *last_label); -extern void gl_wdgt_print_copies_get_range (glWdgtPrintCopies * copies, - gint * n_sheets, - gint * first_label, - gint * last_label); +void gl_wdgt_print_copies_set_range (glWdgtPrintCopies *copies, + gint n_sheets, + gint first_label, + gint last_label); -extern void gl_wdgt_print_copies_set_range (glWdgtPrintCopies * copies, - gint n_sheets, - gint first_label, - gint last_label); +G_END_DECLS #endif diff --git a/glabels2/src/wdgt-print-merge.c b/glabels2/src/wdgt-print-merge.c index 51a01432..290e6a28 100644 --- a/glabels2/src/wdgt-print-merge.c +++ b/glabels2/src/wdgt-print-merge.c @@ -64,13 +64,13 @@ static void spin_cb (GtkSpinButton * spinbutton, /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ -guint +GType gl_wdgt_print_merge_get_type (void) { - static guint wdgt_print_merge_type = 0; + static GType type = 0; - if (!wdgt_print_merge_type) { - GTypeInfo wdgt_print_merge_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glWdgtPrintMergeClass), NULL, NULL, @@ -80,15 +80,14 @@ gl_wdgt_print_merge_get_type (void) sizeof (glWdgtPrintMerge), 0, (GInstanceInitFunc) gl_wdgt_print_merge_instance_init, + NULL }; - wdgt_print_merge_type = - g_type_register_static (gl_hig_hbox_get_type (), - "glWdgtPrintMerge", - &wdgt_print_merge_info, 0); + type = g_type_register_static (GL_TYPE_HIG_HBOX, + "glWdgtPrintMerge", &info, 0); } - return wdgt_print_merge_type; + return type; } static void diff --git a/glabels2/src/wdgt-print-merge.h b/glabels2/src/wdgt-print-merge.h index dbe8cba9..2b6adf54 100644 --- a/glabels2/src/wdgt-print-merge.h +++ b/glabels2/src/wdgt-print-merge.h @@ -27,6 +27,8 @@ #include "label.h" #include "hig.h" +G_BEGIN_DECLS + #define GL_TYPE_WDGT_PRINT_MERGE (gl_wdgt_print_merge_get_type ()) #define GL_WDGT_PRINT_MERGE(obj) \ (GTK_CHECK_CAST((obj), GL_TYPE_WDGT_PRINT_MERGE, glWdgtPrintMerge )) @@ -58,19 +60,21 @@ struct _glWdgtPrintMergeClass { glHigHBoxClass parent_class; }; -extern guint gl_wdgt_print_merge_get_type (void); +GType gl_wdgt_print_merge_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_wdgt_print_merge_new (glLabel *label); -extern GtkWidget *gl_wdgt_print_merge_new (glLabel * label); +void gl_wdgt_print_merge_get_copies (glWdgtPrintMerge *merge, + gint *n_copies, + gint *first_label, + gboolean *collate_flag); -extern void gl_wdgt_print_merge_get_copies (glWdgtPrintMerge * merge, - gint * n_copies, - gint * first_label, - gboolean * collate_flag); +void gl_wdgt_print_merge_set_copies (glWdgtPrintMerge *merge, + gint n_copies, + gint first_label, + gint n_records, + gboolean collate_flag); -extern void gl_wdgt_print_merge_set_copies (glWdgtPrintMerge * merge, - gint n_copies, - gint first_label, - gint n_records, - gboolean collate_flag); +G_END_DECLS #endif diff --git a/glabels2/src/wdgt-rotate-label.c b/glabels2/src/wdgt-rotate-label.c index e5100c82..e8d21884 100644 --- a/glabels2/src/wdgt-rotate-label.c +++ b/glabels2/src/wdgt-rotate-label.c @@ -94,13 +94,13 @@ static GnomeCanvasItem *cdbc_item (GnomeCanvasGroup *group, /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ -guint +GType gl_wdgt_rotate_label_get_type (void) { - static guint wdgt_rotate_label_type = 0; + static GType type = 0; - if (!wdgt_rotate_label_type) { - GTypeInfo wdgt_rotate_label_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glWdgtRotateLabelClass), NULL, NULL, @@ -110,16 +110,14 @@ gl_wdgt_rotate_label_get_type (void) sizeof (glWdgtRotateLabel), 0, (GInstanceInitFunc) gl_wdgt_rotate_label_instance_init, - + NULL }; - wdgt_rotate_label_type = - g_type_register_static (gl_hig_hbox_get_type (), - "glWdgtRotateLabel", - &wdgt_rotate_label_info, 0); + type = g_type_register_static (GL_TYPE_HIG_HBOX, + "glWdgtRotateLabel", &info, 0); } - return wdgt_rotate_label_type; + return type; } static void diff --git a/glabels2/src/wdgt-rotate-label.h b/glabels2/src/wdgt-rotate-label.h index fc5661cd..bcb3fc73 100644 --- a/glabels2/src/wdgt-rotate-label.h +++ b/glabels2/src/wdgt-rotate-label.h @@ -27,6 +27,8 @@ #include "hig.h" #include +G_BEGIN_DECLS + #define GL_TYPE_WDGT_ROTATE_LABEL (gl_wdgt_rotate_label_get_type ()) #define GL_WDGT_ROTATE_LABEL(obj) \ (GTK_CHECK_CAST((obj), GL_TYPE_WDGT_ROTATE_LABEL, glWdgtRotateLabel )) @@ -57,16 +59,18 @@ struct _glWdgtRotateLabelClass { gpointer user_data); }; -extern guint gl_wdgt_rotate_label_get_type (void); +GType gl_wdgt_rotate_label_get_type (void) G_GNUC_CONST; + +GtkWidget *gl_wdgt_rotate_label_new (void); -extern GtkWidget *gl_wdgt_rotate_label_new (void); +gboolean gl_wdgt_rotate_label_get_state (glWdgtRotateLabel *wdgt_rotate_label); -extern gboolean gl_wdgt_rotate_label_get_state (glWdgtRotateLabel * wdgt_rotate_label); +void gl_wdgt_rotate_label_set_state (glWdgtRotateLabel *wdgt_rotate_label, + gboolean state); -extern void gl_wdgt_rotate_label_set_state (glWdgtRotateLabel * wdgt_rotate_label, - gboolean state); +void gl_wdgt_rotate_label_set_template_name (glWdgtRotateLabel *wdgt_rotate_label, + gchar *name); -extern void gl_wdgt_rotate_label_set_template_name (glWdgtRotateLabel * wdgt_rotate_label, - gchar * name); +G_END_DECLS #endif diff --git a/glabels2/src/window.c b/glabels2/src/window.c index 0c24f889..d3206658 100644 --- a/glabels2/src/window.c +++ b/glabels2/src/window.c @@ -27,6 +27,7 @@ #include "util.h" #include "xml-label.h" #include "prefs.h" +#include "file.h" #include "debug.h" @@ -89,13 +90,13 @@ static void modified_changed_cb (glLabel *label, /****************************************************************************/ /* Boilerplate Object stuff. */ /****************************************************************************/ -guint +GType gl_window_get_type (void) { - static guint window_type = 0; + static GType type = 0; - if (!window_type) { - GTypeInfo window_info = { + if (!type) { + static const GTypeInfo info = { sizeof (glWindowClass), NULL, NULL, @@ -105,15 +106,14 @@ gl_window_get_type (void) sizeof (glWindow), 0, (GInstanceInitFunc) gl_window_init, + NULL }; - window_type = - g_type_register_static (bonobo_window_get_type (), - "glWindow", - &window_info, 0); + type = g_type_register_static (BONOBO_TYPE_WINDOW, + "glWindow", &info, 0); } - return window_type; + return type; } static void diff --git a/glabels2/src/window.h b/glabels2/src/window.h index 402d131a..5a390684 100644 --- a/glabels2/src/window.h +++ b/glabels2/src/window.h @@ -68,7 +68,7 @@ struct _glWindowClass { BonoboWindowClass parent_class; }; -guint gl_window_get_type (void); +GType gl_window_get_type (void) G_GNUC_CONST; GtkWidget *gl_window_new (void); -- 2.39.5