aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-12-14 20:25:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-12-15 21:16:36 +0800
commit5e2efa2cd4ac7891fdf316dafd9ab249086e842a (patch)
treefe4b9c1ef8d783281789c4a378253aa41af35db3 /e-util
parent63cff95414fc76e6d58a274ffebe019cd6feb0a5 (diff)
downloadgsoc2013-evolution-5e2efa2cd4ac7891fdf316dafd9ab249086e842a.tar
gsoc2013-evolution-5e2efa2cd4ac7891fdf316dafd9ab249086e842a.tar.gz
gsoc2013-evolution-5e2efa2cd4ac7891fdf316dafd9ab249086e842a.tar.bz2
gsoc2013-evolution-5e2efa2cd4ac7891fdf316dafd9ab249086e842a.tar.lz
gsoc2013-evolution-5e2efa2cd4ac7891fdf316dafd9ab249086e842a.tar.xz
gsoc2013-evolution-5e2efa2cd4ac7891fdf316dafd9ab249086e842a.tar.zst
gsoc2013-evolution-5e2efa2cd4ac7891fdf316dafd9ab249086e842a.zip
Finish adding symbols to libeutil API docs.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-action-combo-box.c12
-rw-r--r--e-util/e-action-combo-box.h6
-rw-r--r--e-util/e-activity-bar.h2
-rw-r--r--e-util/e-activity-proxy.h2
-rw-r--r--e-util/e-activity.h2
-rw-r--r--e-util/e-alert-bar.h2
-rw-r--r--e-util/e-alert-dialog.h2
-rw-r--r--e-util/e-alert-sink.h2
-rw-r--r--e-util/e-alert.h2
-rw-r--r--e-util/e-attachment-bar.h2
-rw-r--r--e-util/e-attachment-button.h2
-rw-r--r--e-util/e-attachment-dialog.h2
-rw-r--r--e-util/e-attachment-handler-image.h2
-rw-r--r--e-util/e-attachment-handler-sendto.h2
-rw-r--r--e-util/e-attachment-handler.h2
-rw-r--r--e-util/e-attachment-icon-view.h2
-rw-r--r--e-util/e-attachment-paned.h2
-rw-r--r--e-util/e-attachment-store.h2
-rw-r--r--e-util/e-attachment-tree-view.h2
-rw-r--r--e-util/e-attachment-view.h2
-rw-r--r--e-util/e-attachment.h2
-rw-r--r--e-util/e-bit-array.c2
-rw-r--r--e-util/e-bit-array.h120
-rw-r--r--e-util/e-calendar-item.h2
-rw-r--r--e-util/e-calendar.h2
-rw-r--r--e-util/e-canvas.h2
-rw-r--r--e-util/e-categories-dialog.h2
-rw-r--r--e-util/e-categories-editor.h2
-rw-r--r--e-util/e-categories-selector.h2
-rw-r--r--e-util/e-category-completion.h2
-rw-r--r--e-util/e-category-editor.h2
-rw-r--r--e-util/e-cell-renderer-color.h2
-rw-r--r--e-util/e-cell.h2
-rw-r--r--e-util/e-charset-combo-box.h2
-rw-r--r--e-util/e-config.h2
-rw-r--r--e-util/e-contact-store.h8
-rw-r--r--e-util/e-dateedit.h2
-rw-r--r--e-util/e-datetime-format.h32
-rw-r--r--e-util/e-destination-store.h2
-rw-r--r--e-util/e-event.h4
-rw-r--r--e-util/e-filter-code.h2
-rw-r--r--e-util/e-filter-color.h2
-rw-r--r--e-util/e-filter-datespec.h2
-rw-r--r--e-util/e-filter-element.c2
-rw-r--r--e-util/e-filter-element.h4
-rw-r--r--e-util/e-filter-file.h2
-rw-r--r--e-util/e-filter-input.h2
-rw-r--r--e-util/e-filter-int.h2
-rw-r--r--e-util/e-filter-option.h2
-rw-r--r--e-util/e-filter-part.h2
-rw-r--r--e-util/e-filter-rule.h2
-rw-r--r--e-util/e-focus-tracker.h2
-rw-r--r--e-util/e-image-chooser.h2
-rw-r--r--e-util/e-import-assistant.h2
-rw-r--r--e-util/e-import.h2
-rw-r--r--e-util/e-interval-chooser.c4
-rw-r--r--e-util/e-interval-chooser.h4
-rw-r--r--e-util/e-map.h2
-rw-r--r--e-util/e-menu-tool-action.h2
-rw-r--r--e-util/e-menu-tool-button.h2
-rw-r--r--e-util/e-misc-utils.h3
-rw-r--r--e-util/e-name-selector-dialog.h2
-rw-r--r--e-util/e-name-selector-entry.h2
-rw-r--r--e-util/e-name-selector-list.h2
-rw-r--r--e-util/e-name-selector-model.h2
-rw-r--r--e-util/e-name-selector.h2
-rw-r--r--e-util/e-online-button.h2
-rw-r--r--e-util/e-paned.h2
-rw-r--r--e-util/e-picture-gallery.h2
-rw-r--r--e-util/e-plugin-ui.h2
-rw-r--r--e-util/e-plugin.h20
-rw-r--r--e-util/e-popup-action.h2
-rw-r--r--e-util/e-preferences-window.h2
-rw-r--r--e-util/e-preview-pane.h2
-rw-r--r--e-util/e-printable.c7
-rw-r--r--e-util/e-printable.h114
-rw-r--r--e-util/e-reflow-model.h118
-rw-r--r--e-util/e-reflow.h2
-rw-r--r--e-util/e-rule-context.h2
-rw-r--r--e-util/e-rule-editor.h2
-rw-r--r--e-util/e-search-bar.h11
-rw-r--r--e-util/e-selectable.h2
-rw-r--r--e-util/e-selection-model-array.c8
-rw-r--r--e-util/e-selection-model-array.h87
-rw-r--r--e-util/e-selection-model-simple.c4
-rw-r--r--e-util/e-selection-model-simple.h75
-rw-r--r--e-util/e-selection-model.c2
-rw-r--r--e-util/e-selection-model.h15
-rw-r--r--e-util/e-send-options.h67
-rw-r--r--e-util/e-sorter-array.c4
-rw-r--r--e-util/e-sorter-array.h80
-rw-r--r--e-util/e-sorter.c2
-rw-r--r--e-util/e-sorter.h97
-rw-r--r--e-util/e-source-combo-box.h2
-rw-r--r--e-util/e-source-selector-dialog.h2
-rw-r--r--e-util/e-source-selector.h2
-rw-r--r--e-util/e-spell-entry.h55
-rw-r--r--e-util/e-stock-request.h2
-rw-r--r--e-util/e-table-config.h2
-rw-r--r--e-util/e-table-extras.h3
-rw-r--r--e-util/e-table-field-chooser-item.h28
-rw-r--r--e-util/e-table-group-container.h4
-rw-r--r--e-util/e-table-header-item.h2
-rw-r--r--e-util/e-table-item.h136
-rw-r--r--e-util/e-table-memory-callbacks.h18
-rw-r--r--e-util/e-table-memory-store.h12
-rw-r--r--e-util/e-table-selection-model.c5
-rw-r--r--e-util/e-table-sorter.c2
-rw-r--r--e-util/e-table.h2
-rw-r--r--e-util/e-text-event-processor-emacs-like.c4
-rw-r--r--e-util/e-text-event-processor-emacs-like.h50
-rw-r--r--e-util/e-text-event-processor-types.h6
-rw-r--r--e-util/e-text-event-processor.h58
-rw-r--r--e-util/e-text-model.h155
-rw-r--r--e-util/e-text.c2
-rw-r--r--e-util/e-text.h78
-rw-r--r--e-util/e-timezone-dialog.h2
-rw-r--r--e-util/e-tree-model-generator.h2
-rw-r--r--e-util/e-tree-model.h11
-rw-r--r--e-util/e-tree.c52
-rw-r--r--e-util/e-tree.h11
-rw-r--r--e-util/e-ui-manager.h2
-rw-r--r--e-util/e-unicode.h49
-rw-r--r--e-util/e-url-entry.h42
-rw-r--r--e-util/e-web-view-gtkhtml.h181
-rw-r--r--e-util/e-web-view-preview.c20
-rw-r--r--e-util/e-web-view-preview.h6
-rw-r--r--e-util/e-web-view.h28
-rw-r--r--e-util/gal-define-views-dialog.c2
-rw-r--r--e-util/gal-define-views-model.c13
-rw-r--r--e-util/gal-define-views-model.h63
-rw-r--r--e-util/gal-view-collection.c2
-rw-r--r--e-util/gal-view-collection.h162
-rw-r--r--e-util/gal-view-factory-etable.h2
-rw-r--r--e-util/gal-view-instance-save-as-dialog.c2
-rw-r--r--e-util/gal-view-instance.c2
-rw-r--r--e-util/gal-view-instance.h107
-rw-r--r--e-util/gal-view-new-dialog.c2
-rw-r--r--e-util/gal-view-new-dialog.h56
139 files changed, 1387 insertions, 1104 deletions
diff --git a/e-util/e-action-combo-box.c b/e-util/e-action-combo-box.c
index 0747a6ed27..cb15d276d8 100644
--- a/e-util/e-action-combo-box.c
+++ b/e-util/e-action-combo-box.c
@@ -458,7 +458,7 @@ e_action_combo_box_new_with_action (GtkRadioAction *action)
GtkRadioAction *
e_action_combo_box_get_action (EActionComboBox *combo_box)
{
- g_return_val_if_fail (E_ACTION_IS_COMBO_BOX (combo_box), NULL);
+ g_return_val_if_fail (E_IS_ACTION_COMBO_BOX (combo_box), NULL);
return combo_box->priv->action;
}
@@ -467,7 +467,7 @@ void
e_action_combo_box_set_action (EActionComboBox *combo_box,
GtkRadioAction *action)
{
- g_return_if_fail (E_ACTION_IS_COMBO_BOX (combo_box));
+ g_return_if_fail (E_IS_ACTION_COMBO_BOX (combo_box));
if (action != NULL)
g_return_if_fail (GTK_IS_RADIO_ACTION (action));
@@ -526,7 +526,7 @@ e_action_combo_box_set_action (EActionComboBox *combo_box,
gint
e_action_combo_box_get_current_value (EActionComboBox *combo_box)
{
- g_return_val_if_fail (E_ACTION_IS_COMBO_BOX (combo_box), 0);
+ g_return_val_if_fail (E_IS_ACTION_COMBO_BOX (combo_box), 0);
g_return_val_if_fail (combo_box->priv->action != NULL, 0);
return gtk_radio_action_get_current_value (combo_box->priv->action);
@@ -536,7 +536,7 @@ void
e_action_combo_box_set_current_value (EActionComboBox *combo_box,
gint current_value)
{
- g_return_if_fail (E_ACTION_IS_COMBO_BOX (combo_box));
+ g_return_if_fail (E_IS_ACTION_COMBO_BOX (combo_box));
g_return_if_fail (combo_box->priv->action != NULL);
gtk_radio_action_set_current_value (
@@ -550,7 +550,7 @@ e_action_combo_box_add_separator_before (EActionComboBox *combo_box,
GtkTreeModel *model;
GtkTreeIter iter;
- g_return_if_fail (E_ACTION_IS_COMBO_BOX (combo_box));
+ g_return_if_fail (E_IS_ACTION_COMBO_BOX (combo_box));
/* NULL actions are rendered as separators. */
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box));
@@ -567,7 +567,7 @@ e_action_combo_box_add_separator_after (EActionComboBox *combo_box,
GtkTreeModel *model;
GtkTreeIter iter;
- g_return_if_fail (E_ACTION_IS_COMBO_BOX (combo_box));
+ g_return_if_fail (E_IS_ACTION_COMBO_BOX (combo_box));
/* NULL actions are rendered as separators. */
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box));
diff --git a/e-util/e-action-combo-box.h b/e-util/e-action-combo-box.h
index 43adeaff7a..49245b938b 100644
--- a/e-util/e-action-combo-box.h
+++ b/e-util/e-action-combo-box.h
@@ -40,10 +40,10 @@
#define E_ACTION_COMBO_BOX_CLASS(cls) \
(G_TYPE_CHECK_CLASS_CAST \
((cls), E_TYPE_ACTION_COMBO_BOX, EActionComboBoxClass))
-#define E_ACTION_IS_COMBO_BOX(obj) \
+#define E_IS_ACTION_COMBO_BOX(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE \
((obj), E_TYPE_ACTION_COMBO_BOX))
-#define E_ACTION_IS_COMBO_BOX_CLASS(cls) \
+#define E_IS_ACTION_COMBO_BOX_CLASS(cls) \
(G_TYPE_CHECK_CLASS_TYPE \
((cls), E_TYPE_ACTION_COMBO_BOX))
#define E_ACTION_COMBO_BOX_GET_CLASS(obj) \
@@ -65,7 +65,7 @@ struct _EActionComboBoxClass {
GtkComboBoxClass parent_class;
};
-GType e_action_combo_box_get_type (void);
+GType e_action_combo_box_get_type (void) G_GNUC_CONST;
GtkWidget * e_action_combo_box_new (void);
GtkWidget * e_action_combo_box_new_with_action
(GtkRadioAction *action);
diff --git a/e-util/e-activity-bar.h b/e-util/e-activity-bar.h
index d56378e2c1..5588b5f851 100644
--- a/e-util/e-activity-bar.h
+++ b/e-util/e-activity-bar.h
@@ -60,7 +60,7 @@ struct _EActivityBarClass {
GtkInfoBarClass parent_class;
};
-GType e_activity_bar_get_type (void);
+GType e_activity_bar_get_type (void) G_GNUC_CONST;
GtkWidget * e_activity_bar_new (void);
EActivity * e_activity_bar_get_activity (EActivityBar *bar);
void e_activity_bar_set_activity (EActivityBar *bar,
diff --git a/e-util/e-activity-proxy.h b/e-util/e-activity-proxy.h
index 75125351f4..df1c26ce83 100644
--- a/e-util/e-activity-proxy.h
+++ b/e-util/e-activity-proxy.h
@@ -63,7 +63,7 @@ struct _EActivityProxyClass {
GtkFrameClass parent_class;
};
-GType e_activity_proxy_get_type (void);
+GType e_activity_proxy_get_type (void) G_GNUC_CONST;
GtkWidget * e_activity_proxy_new (EActivity *activity);
EActivity * e_activity_proxy_get_activity (EActivityProxy *proxy);
void e_activity_proxy_set_activity (EActivityProxy *proxy,
diff --git a/e-util/e-activity.h b/e-util/e-activity.h
index ac380a030c..0ba5753528 100644
--- a/e-util/e-activity.h
+++ b/e-util/e-activity.h
@@ -68,7 +68,7 @@ struct _EActivityClass {
gchar * (*describe) (EActivity *activity);
};
-GType e_activity_get_type (void);
+GType e_activity_get_type (void) G_GNUC_CONST;
EActivity * e_activity_new (void);
gchar * e_activity_describe (EActivity *activity);
EAlertSink * e_activity_get_alert_sink (EActivity *activity);
diff --git a/e-util/e-alert-bar.h b/e-util/e-alert-bar.h
index ae5b315b40..d565f1ba84 100644
--- a/e-util/e-alert-bar.h
+++ b/e-util/e-alert-bar.h
@@ -61,7 +61,7 @@ struct _EAlertBarClass {
GtkInfoBarClass parent_class;
};
-GType e_alert_bar_get_type (void);
+GType e_alert_bar_get_type (void) G_GNUC_CONST;
GtkWidget * e_alert_bar_new (void);
void e_alert_bar_clear (EAlertBar *alert_bar);
void e_alert_bar_add_alert (EAlertBar *alert_bar,
diff --git a/e-util/e-alert-dialog.h b/e-util/e-alert-dialog.h
index 3d2662a398..6240f681ad 100644
--- a/e-util/e-alert-dialog.h
+++ b/e-util/e-alert-dialog.h
@@ -62,7 +62,7 @@ struct _EAlertDialogClass {
GtkDialogClass parent_class;
};
-GType e_alert_dialog_get_type (void);
+GType e_alert_dialog_get_type (void) G_GNUC_CONST;
GtkWidget * e_alert_dialog_new (GtkWindow *parent,
EAlert *alert);
GtkWidget * e_alert_dialog_new_for_args (GtkWindow *parent,
diff --git a/e-util/e-alert-sink.h b/e-util/e-alert-sink.h
index c8fd5127e7..06a2e68483 100644
--- a/e-util/e-alert-sink.h
+++ b/e-util/e-alert-sink.h
@@ -54,7 +54,7 @@ struct _EAlertSinkInterface {
EAlert *alert);
};
-GType e_alert_sink_get_type (void);
+GType e_alert_sink_get_type (void) G_GNUC_CONST;
void e_alert_sink_submit_alert (EAlertSink *alert_sink,
EAlert *alert);
diff --git a/e-util/e-alert.h b/e-util/e-alert.h
index f62e612235..4cba32135d 100644
--- a/e-util/e-alert.h
+++ b/e-util/e-alert.h
@@ -76,7 +76,7 @@ struct _EAlertClass {
gint response_id);
};
-GType e_alert_get_type (void);
+GType e_alert_get_type (void) G_GNUC_CONST;
EAlert * e_alert_new (const gchar *tag,
...) G_GNUC_NULL_TERMINATED;
EAlert * e_alert_new_valist (const gchar *tag,
diff --git a/e-util/e-attachment-bar.h b/e-util/e-attachment-bar.h
index 9f35ae2aba..4442164240 100644
--- a/e-util/e-attachment-bar.h
+++ b/e-util/e-attachment-bar.h
@@ -63,7 +63,7 @@ struct _EAttachmentBarClass {
GtkBoxClass parent_class;
};
-GType e_attachment_bar_get_type (void);
+GType e_attachment_bar_get_type (void) G_GNUC_CONST;
GtkWidget * e_attachment_bar_new (EAttachmentStore *store);
gint e_attachment_bar_get_active_view
(EAttachmentBar *bar);
diff --git a/e-util/e-attachment-button.h b/e-util/e-attachment-button.h
index abe5fa4dc9..6873bc4c95 100644
--- a/e-util/e-attachment-button.h
+++ b/e-util/e-attachment-button.h
@@ -64,7 +64,7 @@ struct _EAttachmentButtonClass {
GtkBoxClass parent_class;
};
-GType e_attachment_button_get_type (void);
+GType e_attachment_button_get_type (void) G_GNUC_CONST;
GtkWidget * e_attachment_button_new (void);
EAttachmentView *
e_attachment_button_get_view (EAttachmentButton *button);
diff --git a/e-util/e-attachment-dialog.h b/e-util/e-attachment-dialog.h
index af7141190e..c77023d70d 100644
--- a/e-util/e-attachment-dialog.h
+++ b/e-util/e-attachment-dialog.h
@@ -63,7 +63,7 @@ struct _EAttachmentDialogClass {
GtkDialogClass parent_class;
};
-GType e_attachment_dialog_get_type (void);
+GType e_attachment_dialog_get_type (void) G_GNUC_CONST;
GtkWidget * e_attachment_dialog_new (GtkWindow *parent,
EAttachment *attachment);
EAttachment * e_attachment_dialog_get_attachment
diff --git a/e-util/e-attachment-handler-image.h b/e-util/e-attachment-handler-image.h
index e0e0cb3b23..8d21c8d2a4 100644
--- a/e-util/e-attachment-handler-image.h
+++ b/e-util/e-attachment-handler-image.h
@@ -62,7 +62,7 @@ struct _EAttachmentHandlerImageClass {
EAttachmentHandlerClass parent_class;
};
-GType e_attachment_handler_image_get_type (void);
+GType e_attachment_handler_image_get_type (void) G_GNUC_CONST;
G_END_DECLS
diff --git a/e-util/e-attachment-handler-sendto.h b/e-util/e-attachment-handler-sendto.h
index 17115c4104..ea0fc02827 100644
--- a/e-util/e-attachment-handler-sendto.h
+++ b/e-util/e-attachment-handler-sendto.h
@@ -59,7 +59,7 @@ struct _EAttachmentHandlerSendtoClass {
EAttachmentHandlerClass parent_class;
};
-GType e_attachment_handler_sendto_get_type (void);
+GType e_attachment_handler_sendto_get_type (void) G_GNUC_CONST;
G_END_DECLS
diff --git a/e-util/e-attachment-handler.h b/e-util/e-attachment-handler.h
index 086ba8ff6a..b947ad6e3e 100644
--- a/e-util/e-attachment-handler.h
+++ b/e-util/e-attachment-handler.h
@@ -69,7 +69,7 @@ struct _EAttachmentHandlerClass {
guint *n_targets);
};
-GType e_attachment_handler_get_type (void);
+GType e_attachment_handler_get_type (void) G_GNUC_CONST;
EAttachmentView *
e_attachment_handler_get_view (EAttachmentHandler *handler);
GdkDragAction e_attachment_handler_get_drag_actions
diff --git a/e-util/e-attachment-icon-view.h b/e-util/e-attachment-icon-view.h
index bd3d2109db..23b9dc0b64 100644
--- a/e-util/e-attachment-icon-view.h
+++ b/e-util/e-attachment-icon-view.h
@@ -62,7 +62,7 @@ struct _EAttachmentIconViewClass {
GtkIconViewClass parent_class;
};
-GType e_attachment_icon_view_get_type (void);
+GType e_attachment_icon_view_get_type (void) G_GNUC_CONST;
GtkWidget * e_attachment_icon_view_new (void);
void e_attachment_icon_view_set_default_icon_size
(gint size);
diff --git a/e-util/e-attachment-paned.h b/e-util/e-attachment-paned.h
index af44cd6d67..64a8696fde 100644
--- a/e-util/e-attachment-paned.h
+++ b/e-util/e-attachment-paned.h
@@ -62,7 +62,7 @@ struct _EAttachmentPanedClass {
GtkVPanedClass parent_class;
};
-GType e_attachment_paned_get_type (void);
+GType e_attachment_paned_get_type (void) G_GNUC_CONST;
GtkWidget * e_attachment_paned_new (void);
GtkWidget * e_attachment_paned_get_content_area
(EAttachmentPaned *paned);
diff --git a/e-util/e-attachment-store.h b/e-util/e-attachment-store.h
index a112b0e56c..fe0cb8f75d 100644
--- a/e-util/e-attachment-store.h
+++ b/e-util/e-attachment-store.h
@@ -76,7 +76,7 @@ enum {
E_ATTACHMENT_STORE_NUM_COLUMNS
};
-GType e_attachment_store_get_type (void);
+GType e_attachment_store_get_type (void) G_GNUC_CONST;
GtkTreeModel * e_attachment_store_new (void);
void e_attachment_store_add_attachment
(EAttachmentStore *store,
diff --git a/e-util/e-attachment-tree-view.h b/e-util/e-attachment-tree-view.h
index 416a09b7f6..41422c5899 100644
--- a/e-util/e-attachment-tree-view.h
+++ b/e-util/e-attachment-tree-view.h
@@ -62,7 +62,7 @@ struct _EAttachmentTreeViewClass {
GtkTreeViewClass parent_class;
};
-GType e_attachment_tree_view_get_type (void);
+GType e_attachment_tree_view_get_type (void) G_GNUC_CONST;
GtkWidget * e_attachment_tree_view_new (void);
G_END_DECLS
diff --git a/e-util/e-attachment-view.h b/e-util/e-attachment-view.h
index 174181541a..145b11513c 100644
--- a/e-util/e-attachment-view.h
+++ b/e-util/e-attachment-view.h
@@ -114,7 +114,7 @@ struct _EAttachmentViewPrivate {
guint editable : 1;
};
-GType e_attachment_view_get_type (void);
+GType e_attachment_view_get_type (void) G_GNUC_CONST;
void e_attachment_view_init (EAttachmentView *view);
void e_attachment_view_dispose (EAttachmentView *view);
diff --git a/e-util/e-attachment.h b/e-util/e-attachment.h
index 268bcf68b9..0da2c9d883 100644
--- a/e-util/e-attachment.h
+++ b/e-util/e-attachment.h
@@ -63,7 +63,7 @@ struct _EAttachmentClass {
GObjectClass parent_class;
};
-GType e_attachment_get_type (void);
+GType e_attachment_get_type (void) G_GNUC_CONST;
EAttachment * e_attachment_new (void);
EAttachment * e_attachment_new_for_path (const gchar *path);
EAttachment * e_attachment_new_for_uri (const gchar *uri);
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
index b17f8a089b..045f8e2439 100644
--- a/e-util/e-bit-array.c
+++ b/e-util/e-bit-array.c
@@ -412,7 +412,7 @@ e_bit_array_class_init (EBitArrayClass *class)
EBitArray *
e_bit_array_new (gint count)
{
- EBitArray *eba = g_object_new (E_BIT_ARRAY_TYPE, NULL);
+ EBitArray *eba = g_object_new (E_TYPE_BIT_ARRAY, NULL);
eba->bit_count = count;
eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
return eba;
diff --git a/e-util/e-bit-array.h b/e-util/e-bit-array.h
index 39b55d906c..93fb17ed85 100644
--- a/e-util/e-bit-array.h
+++ b/e-util/e-bit-array.h
@@ -25,73 +25,83 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _E_BIT_ARRAY_H_
-#define _E_BIT_ARRAY_H_
+#ifndef E_BIT_ARRAY_H
+#define E_BIT_ARRAY_H
-#include <glib-object.h>
+#include <e-util/e-misc-utils.h>
-G_BEGIN_DECLS
+/* Standard GObject macros */
+#define E_TYPE_BIT_ARRAY \
+ (e_bit_array_get_type ())
+#define E_BIT_ARRAY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_BIT_ARRAY, EBitArray))
+#define E_BIT_ARRAY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_BIT_ARRAY, EBitArrayClass))
+#define E_IS_BIT_ARRAY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_BIT_ARRAY))
+#define E_IS_BIT_ARRAY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_BIT_ARRAY))
+#define E_BIT_ARRAY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_BIT_ARRAY, EBitArrayClass))
-#define E_BIT_ARRAY_TYPE (e_bit_array_get_type ())
-#define E_BIT_ARRAY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_BIT_ARRAY_TYPE, EBitArray))
-#define E_BIT_ARRAY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_BIT_ARRAY_TYPE, EBitArrayClass))
-#define E_IS_BIT_ARRAY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_BIT_ARRAY_TYPE))
-#define E_IS_BIT_ARRAY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_BIT_ARRAY_TYPE))
+G_BEGIN_DECLS
-#ifndef _E_FOREACH_FUNC_H_
-#define _E_FOREACH_FUNC_H_
-typedef void (*EForeachFunc) (gint model_row,
- gpointer closure);
-#endif
+typedef struct _EBitArray EBitArray;
+typedef struct _EBitArrayClass EBitArrayClass;
-typedef struct {
- GObject base;
+struct _EBitArray {
+ GObject parent;
gint bit_count;
- guint32 *data;
-} EBitArray;
+ guint32 *data;
+};
-typedef struct {
+struct _EBitArrayClass {
GObjectClass parent_class;
-} EBitArrayClass;
+};
-GType e_bit_array_get_type (void);
-EBitArray *e_bit_array_new (gint count);
+GType e_bit_array_get_type (void) G_GNUC_CONST;
+EBitArray * e_bit_array_new (gint count);
-gboolean e_bit_array_value_at (EBitArray *selection,
- gint n);
-void e_bit_array_foreach (EBitArray *selection,
- EForeachFunc callback,
- gpointer closure);
-gint e_bit_array_selected_count (EBitArray *selection);
-void e_bit_array_select_all (EBitArray *selection);
-void e_bit_array_invert_selection (EBitArray *selection);
-gint e_bit_array_bit_count (EBitArray *selection);
-void e_bit_array_change_one_row (EBitArray *selection,
- gint row,
- gboolean grow);
-void e_bit_array_change_range (EBitArray *selection,
- gint start,
- gint end,
- gboolean grow);
-void e_bit_array_select_single_row (EBitArray *eba,
- gint row);
-void e_bit_array_toggle_single_row (EBitArray *eba,
- gint row);
+gboolean e_bit_array_value_at (EBitArray *selection,
+ gint n);
+void e_bit_array_foreach (EBitArray *selection,
+ EForeachFunc callback,
+ gpointer closure);
+gint e_bit_array_selected_count (EBitArray *selection);
+void e_bit_array_select_all (EBitArray *selection);
+void e_bit_array_invert_selection (EBitArray *selection);
+gint e_bit_array_bit_count (EBitArray *selection);
+void e_bit_array_change_one_row (EBitArray *selection,
+ gint row,
+ gboolean grow);
+void e_bit_array_change_range (EBitArray *selection,
+ gint start,
+ gint end,
+ gboolean grow);
+void e_bit_array_select_single_row (EBitArray *eba,
+ gint row);
+void e_bit_array_toggle_single_row (EBitArray *eba,
+ gint row);
-void e_bit_array_insert (EBitArray *esm,
- gint row,
- gint count);
-void e_bit_array_delete (EBitArray *esm,
- gint row,
- gint count);
-void e_bit_array_delete_single_mode (EBitArray *esm,
- gint row,
- gint count);
-void e_bit_array_move_row (EBitArray *esm,
- gint old_row,
- gint new_row);
+void e_bit_array_insert (EBitArray *esm,
+ gint row,
+ gint count);
+void e_bit_array_delete (EBitArray *esm,
+ gint row,
+ gint count);
+void e_bit_array_delete_single_mode (EBitArray *esm,
+ gint row,
+ gint count);
+void e_bit_array_move_row (EBitArray *esm,
+ gint old_row,
+ gint new_row);
G_END_DECLS
-#endif /* _E_BIT_ARRAY_H_ */
+#endif /* E_BIT_ARRAY_H */
diff --git a/e-util/e-calendar-item.h b/e-util/e-calendar-item.h
index a4c0867b66..9a3828f106 100644
--- a/e-util/e-calendar-item.h
+++ b/e-util/e-calendar-item.h
@@ -281,7 +281,7 @@ struct _ECalendarItemClass {
void (* selection_preview_changed) (ECalendarItem *calitem);
};
-GType e_calendar_item_get_type (void);
+GType e_calendar_item_get_type (void) G_GNUC_CONST;
/* FIXME: months are 0-11 throughout, but 1-12 may be better. */
diff --git a/e-util/e-calendar.h b/e-util/e-calendar.h
index 9a3651348c..0ffe909aa7 100644
--- a/e-util/e-calendar.h
+++ b/e-util/e-calendar.h
@@ -91,7 +91,7 @@ struct _ECalendarClass {
ECanvasClass parent_class;
};
-GType e_calendar_get_type (void);
+GType e_calendar_get_type (void) G_GNUC_CONST;
GtkWidget * e_calendar_new (void);
void e_calendar_set_minimum_size (ECalendar *cal,
gint rows,
diff --git a/e-util/e-canvas.h b/e-util/e-canvas.h
index 8d704b963c..00618b2875 100644
--- a/e-util/e-canvas.h
+++ b/e-util/e-canvas.h
@@ -111,7 +111,7 @@ struct _ECanvasClass {
void (*reflow) (ECanvas *canvas);
};
-GType e_canvas_get_type (void);
+GType e_canvas_get_type (void) G_GNUC_CONST;
GtkWidget * e_canvas_new (void);
/* Used to send all of the keystroke events to a specific item as well as
diff --git a/e-util/e-categories-dialog.h b/e-util/e-categories-dialog.h
index 5ad35e098c..0e5d109dbf 100644
--- a/e-util/e-categories-dialog.h
+++ b/e-util/e-categories-dialog.h
@@ -60,7 +60,7 @@ struct _ECategoriesDialogClass {
GtkDialogClass parent_class;
};
-GType e_categories_dialog_get_type (void);
+GType e_categories_dialog_get_type (void) G_GNUC_CONST;
GtkWidget * e_categories_dialog_new (const gchar *categories);
gchar * e_categories_dialog_get_categories
(ECategoriesDialog *dialog);
diff --git a/e-util/e-categories-editor.h b/e-util/e-categories-editor.h
index 07c9dc6987..fc193b1c41 100644
--- a/e-util/e-categories-editor.h
+++ b/e-util/e-categories-editor.h
@@ -70,7 +70,7 @@ struct _ECategoriesEditorClass {
void (*entry_changed) (GtkEntry *entry);
};
-GType e_categories_editor_get_type (void);
+GType e_categories_editor_get_type (void) G_GNUC_CONST;
GtkWidget * e_categories_editor_new (void);
gchar * e_categories_editor_get_categories
(ECategoriesEditor *editor);
diff --git a/e-util/e-categories-selector.h b/e-util/e-categories-selector.h
index 6ffc9f82ef..4eb334775c 100644
--- a/e-util/e-categories-selector.h
+++ b/e-util/e-categories-selector.h
@@ -75,7 +75,7 @@ struct _ECategoriesSelectorClass {
GtkTreeSelection *selection);
};
-GType e_categories_selector_get_type (void);
+GType e_categories_selector_get_type (void) G_GNUC_CONST;
GtkWidget * e_categories_selector_new (void);
gchar * e_categories_selector_get_checked
(ECategoriesSelector *selector);
diff --git a/e-util/e-category-completion.h b/e-util/e-category-completion.h
index 477a036cd3..cb3c049cbf 100644
--- a/e-util/e-category-completion.h
+++ b/e-util/e-category-completion.h
@@ -63,7 +63,7 @@ struct _ECategoryCompletionClass {
GtkEntryCompletionClass parent_class;
};
-GType e_category_completion_get_type (void);
+GType e_category_completion_get_type (void) G_GNUC_CONST;
GtkEntryCompletion *
e_category_completion_new (void);
diff --git a/e-util/e-category-editor.h b/e-util/e-category-editor.h
index bf5ebbe1a8..e50cf69779 100644
--- a/e-util/e-category-editor.h
+++ b/e-util/e-category-editor.h
@@ -68,7 +68,7 @@ struct _ECategoryEditorClass {
GtkDialogClass parent_class;
};
-GType e_category_editor_get_type (void);
+GType e_category_editor_get_type (void) G_GNUC_CONST;
ECategoryEditor *
e_category_editor_new (void);
const gchar * e_category_editor_create_category
diff --git a/e-util/e-cell-renderer-color.h b/e-util/e-cell-renderer-color.h
index 00dd615607..679c456e19 100644
--- a/e-util/e-cell-renderer-color.h
+++ b/e-util/e-cell-renderer-color.h
@@ -71,7 +71,7 @@ struct _ECellRendererColorClass {
void (*_gtk_reserved4) (void);
};
-GType e_cell_renderer_color_get_type (void);
+GType e_cell_renderer_color_get_type (void) G_GNUC_CONST;
GtkCellRenderer *e_cell_renderer_color_new (void);
G_END_DECLS
diff --git a/e-util/e-cell.h b/e-util/e-cell.h
index 4c1354259c..390d4b07ac 100644
--- a/e-util/e-cell.h
+++ b/e-util/e-cell.h
@@ -101,8 +101,6 @@ struct _ECellView {
GList *kill_view_cb_data;
};
-#define E_CELL_IS_FOCUSED(ecell_view) (ecell_view->focus_x1 != -1)
-
struct _ECell {
GObject parent;
};
diff --git a/e-util/e-charset-combo-box.h b/e-util/e-charset-combo-box.h
index 54c5527875..a1e8cec5bb 100644
--- a/e-util/e-charset-combo-box.h
+++ b/e-util/e-charset-combo-box.h
@@ -62,7 +62,7 @@ struct _ECharsetComboBoxClass {
EActionComboBoxClass parent_class;
};
-GType e_charset_combo_box_get_type (void);
+GType e_charset_combo_box_get_type (void) G_GNUC_CONST;
GtkWidget * e_charset_combo_box_new (void);
const gchar * e_charset_combo_box_get_charset (ECharsetComboBox *combo_box);
void e_charset_combo_box_set_charset (ECharsetComboBox *combo_box,
diff --git a/e-util/e-config.h b/e-util/e-config.h
index a372601cb2..a6c52bddd6 100644
--- a/e-util/e-config.h
+++ b/e-util/e-config.h
@@ -262,7 +262,7 @@ struct _EConfigClass {
void (*commit) (EConfig *config);
};
-GType e_config_get_type (void);
+GType e_config_get_type (void) G_GNUC_CONST;
/* Static class methods */
EConfigFactory *e_config_class_add_factory (EConfigClass *klass,
diff --git a/e-util/e-contact-store.h b/e-util/e-contact-store.h
index c0754afab0..de86c5f325 100644
--- a/e-util/e-contact-store.h
+++ b/e-util/e-contact-store.h
@@ -64,11 +64,13 @@ struct _EContactStoreClass {
GObjectClass parent_class;
/* signals */
- void (*start_client_view) (EContactStore *contact_store, EBookClientView *client_view);
- void (*stop_client_view) (EContactStore *contact_store, EBookClientView *client_view);
+ void (*start_client_view) (EContactStore *contact_store,
+ EBookClientView *client_view);
+ void (*stop_client_view) (EContactStore *contact_store,
+ EBookClientView *client_view);
};
-GType e_contact_store_get_type (void);
+GType e_contact_store_get_type (void) G_GNUC_CONST;
EContactStore * e_contact_store_new (void);
EBookClient * e_contact_store_get_client (EContactStore *contact_store,
diff --git a/e-util/e-dateedit.h b/e-util/e-dateedit.h
index b415847b23..5557bb12e0 100644
--- a/e-util/e-dateedit.h
+++ b/e-util/e-dateedit.h
@@ -91,7 +91,7 @@ struct _EDateEditClass {
void (*changed) (EDateEdit *dedit);
};
-GType e_date_edit_get_type (void);
+GType e_date_edit_get_type (void) G_GNUC_CONST;
GtkWidget * e_date_edit_new (void);
/* Analogous to gtk_editable_set_editable. disable editing, while still
diff --git a/e-util/e-datetime-format.h b/e-util/e-datetime-format.h
index 5974349e06..90e3aaac6c 100644
--- a/e-util/e-datetime-format.h
+++ b/e-util/e-datetime-format.h
@@ -24,27 +24,41 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef __E_DATETIME_FORMAT__
-#define __E_DATETIME_FORMAT__
+#ifndef E_DATETIME_FORMAT_H
+#define E_DATETIME_FORMAT_H
#include <time.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
-typedef enum _DTFormatKind {
+typedef enum {
DTFormatKindDate,
DTFormatKindTime,
DTFormatKindDateTime,
DTFormatKindShortDate
} DTFormatKind;
-void e_datetime_format_add_setup_widget (GtkWidget *table, gint row, const gchar *component, const gchar *part, DTFormatKind kind, const gchar *caption);
-
-gchar *e_datetime_format_format (const gchar *component, const gchar *part, DTFormatKind kind, time_t value);
-gchar *e_datetime_format_format_tm (const gchar *component, const gchar *part, DTFormatKind kind, struct tm *tm_time);
-gboolean e_datetime_format_includes_day_name (const gchar *component, const gchar *part, DTFormatKind kind);
+void e_datetime_format_add_setup_widget
+ (GtkWidget *table,
+ gint row,
+ const gchar *component,
+ const gchar *part,
+ DTFormatKind kind,
+ const gchar *caption);
+gchar * e_datetime_format_format (const gchar *component,
+ const gchar *part,
+ DTFormatKind kind,
+ time_t value);
+gchar * e_datetime_format_format_tm (const gchar *component,
+ const gchar *part,
+ DTFormatKind kind,
+ struct tm *tm_time);
+gboolean e_datetime_format_includes_day_name
+ (const gchar *component,
+ const gchar *part,
+ DTFormatKind kind);
G_END_DECLS
-#endif
+#endif /* E_DATETIME_FORMAT_H */
diff --git a/e-util/e-destination-store.h b/e-util/e-destination-store.h
index 630db11f58..1039728b40 100644
--- a/e-util/e-destination-store.h
+++ b/e-util/e-destination-store.h
@@ -71,7 +71,7 @@ typedef enum {
E_DESTINATION_STORE_NUM_COLUMNS
} EDestinationStoreColumnType;
-GType e_destination_store_get_type (void);
+GType e_destination_store_get_type (void) G_GNUC_CONST;
EDestinationStore *
e_destination_store_new (void);
EDestination * e_destination_store_get_destination
diff --git a/e-util/e-event.h b/e-util/e-event.h
index 28caded6fe..65f3b9b5f0 100644
--- a/e-util/e-event.h
+++ b/e-util/e-event.h
@@ -173,7 +173,7 @@ struct _EEventClass {
EEventTarget *target);
};
-GType e_event_get_type (void);
+GType e_event_get_type (void) G_GNUC_CONST;
EEvent * e_event_construct (EEvent *event,
const gchar *id);
gpointer e_event_add_items (EEvent *event,
@@ -270,7 +270,7 @@ struct _EEventHookClass {
EEvent *event;
};
-GType e_event_hook_get_type (void);
+GType e_event_hook_get_type (void) G_GNUC_CONST;
void e_event_hook_class_add_target_map
(EEventHookClass *klass,
const EEventHookTargetMap *map);
diff --git a/e-util/e-filter-code.h b/e-util/e-filter-code.h
index 45e1922ba4..ff5be2af8c 100644
--- a/e-util/e-filter-code.h
+++ b/e-util/e-filter-code.h
@@ -64,7 +64,7 @@ struct _EFilterCodeClass {
EFilterInputClass parent_class;
};
-GType e_filter_code_get_type (void);
+GType e_filter_code_get_type (void) G_GNUC_CONST;
EFilterCode * e_filter_code_new (gboolean raw_code);
G_END_DECLS
diff --git a/e-util/e-filter-color.h b/e-util/e-filter-color.h
index acecf7d08c..7d3b583869 100644
--- a/e-util/e-filter-color.h
+++ b/e-util/e-filter-color.h
@@ -66,7 +66,7 @@ struct _EFilterColorClass {
EFilterElementClass parent_class;
};
-GType e_filter_color_get_type (void);
+GType e_filter_color_get_type (void) G_GNUC_CONST;
EFilterColor * e_filter_color_new (void);
G_END_DECLS
diff --git a/e-util/e-filter-datespec.h b/e-util/e-filter-datespec.h
index ecc15bfdc9..be21e82b07 100644
--- a/e-util/e-filter-datespec.h
+++ b/e-util/e-filter-datespec.h
@@ -82,7 +82,7 @@ struct _EFilterDatespecClass {
EFilterElementClass parent_class;
};
-GType e_filter_datespec_get_type (void);
+GType e_filter_datespec_get_type (void) G_GNUC_CONST;
EFilterDatespec *
e_filter_datespec_new (void);
diff --git a/e-util/e-filter-element.c b/e-util/e-filter-element.c
index e00651ec03..50948c8ffe 100644
--- a/e-util/e-filter-element.c
+++ b/e-util/e-filter-element.c
@@ -31,6 +31,8 @@
#include "e-filter-element.h"
#include "e-filter-part.h"
+typedef EFilterElement * (*EFilterElementFunc) (gpointer data);
+
struct _element_type {
gchar *name;
diff --git a/e-util/e-filter-element.h b/e-util/e-filter-element.h
index ecec9db7b9..15049c4bcd 100644
--- a/e-util/e-filter-element.h
+++ b/e-util/e-filter-element.h
@@ -61,8 +61,6 @@ typedef struct _EFilterElement EFilterElement;
typedef struct _EFilterElementClass EFilterElementClass;
typedef struct _EFilterElementPrivate EFilterElementPrivate;
-typedef EFilterElement * (*EFilterElementFunc) (gpointer data);
-
struct _EFilterElement {
GObject parent;
EFilterElementPrivate *priv;
@@ -97,7 +95,7 @@ struct _EFilterElementClass {
GString *out);
};
-GType e_filter_element_get_type (void);
+GType e_filter_element_get_type (void) G_GNUC_CONST;
EFilterElement *e_filter_element_new (void);
void e_filter_element_set_data (EFilterElement *element,
gpointer data);
diff --git a/e-util/e-filter-file.h b/e-util/e-filter-file.h
index c78062b4e0..c0d42fbb89 100644
--- a/e-util/e-filter-file.h
+++ b/e-util/e-filter-file.h
@@ -67,7 +67,7 @@ struct _EFilterFileClass {
EFilterElementClass parent_class;
};
-GType e_filter_file_get_type (void);
+GType e_filter_file_get_type (void) G_GNUC_CONST;
EFilterFile * e_filter_file_new (void);
EFilterFile * e_filter_file_new_type_name (const gchar *type);
void e_filter_file_set_path (EFilterFile *file,
diff --git a/e-util/e-filter-input.h b/e-util/e-filter-input.h
index 782be404e9..04c3749ce6 100644
--- a/e-util/e-filter-input.h
+++ b/e-util/e-filter-input.h
@@ -67,7 +67,7 @@ struct _EFilterInputClass {
EFilterElementClass parent_class;
};
-GType e_filter_input_get_type (void);
+GType e_filter_input_get_type (void) G_GNUC_CONST;
EFilterInput * e_filter_input_new (void);
EFilterInput * e_filter_input_new_type_name (const gchar *type);
void e_filter_input_set_value (EFilterInput *input,
diff --git a/e-util/e-filter-int.h b/e-util/e-filter-int.h
index 40b0c9e7a4..42d5eb6cfc 100644
--- a/e-util/e-filter-int.h
+++ b/e-util/e-filter-int.h
@@ -68,7 +68,7 @@ struct _EFilterIntClass {
EFilterElementClass parent_class;
};
-GType e_filter_int_get_type (void);
+GType e_filter_int_get_type (void) G_GNUC_CONST;
EFilterElement *e_filter_int_new (void);
EFilterElement *e_filter_int_new_type (const gchar *type,
gint min,
diff --git a/e-util/e-filter-option.h b/e-util/e-filter-option.h
index 9bd7543ba6..c5db025926 100644
--- a/e-util/e-filter-option.h
+++ b/e-util/e-filter-option.h
@@ -82,7 +82,7 @@ struct _EFilterOptionClass {
EFilterElementClass parent_class;
};
-GType e_filter_option_get_type (void);
+GType e_filter_option_get_type (void) G_GNUC_CONST;
EFilterElement *e_filter_option_new (void);
void e_filter_option_set_current (EFilterOption *option,
const gchar *name);
diff --git a/e-util/e-filter-part.h b/e-util/e-filter-part.h
index b5ee2c46f2..3ff9fdd454 100644
--- a/e-util/e-filter-part.h
+++ b/e-util/e-filter-part.h
@@ -76,7 +76,7 @@ struct _EFilterPartClass {
GObjectClass parent_class;
};
-GType e_filter_part_get_type (void);
+GType e_filter_part_get_type (void) G_GNUC_CONST;
EFilterPart * e_filter_part_new (void);
gboolean e_filter_part_validate (EFilterPart *part,
EAlert **alert);
diff --git a/e-util/e-filter-rule.h b/e-util/e-filter-rule.h
index 8670265d88..c1bd8ee84f 100644
--- a/e-util/e-filter-rule.h
+++ b/e-util/e-filter-rule.h
@@ -120,7 +120,7 @@ struct _EFilterRuleClass {
void (*changed) (EFilterRule *rule);
};
-GType e_filter_rule_get_type (void);
+GType e_filter_rule_get_type (void) G_GNUC_CONST;
EFilterRule * e_filter_rule_new (void);
EFilterRule * e_filter_rule_clone (EFilterRule *rule);
void e_filter_rule_set_name (EFilterRule *rule,
diff --git a/e-util/e-focus-tracker.h b/e-util/e-focus-tracker.h
index e633d0f57c..fdd531c689 100644
--- a/e-util/e-focus-tracker.h
+++ b/e-util/e-focus-tracker.h
@@ -62,7 +62,7 @@ struct _EFocusTrackerClass {
GObjectClass parent_class;
};
-GType e_focus_tracker_get_type (void);
+GType e_focus_tracker_get_type (void) G_GNUC_CONST;
EFocusTracker * e_focus_tracker_new (GtkWindow *window);
GtkWidget * e_focus_tracker_get_focus (EFocusTracker *focus_tracker);
GtkWindow * e_focus_tracker_get_window (EFocusTracker *focus_tracker);
diff --git a/e-util/e-image-chooser.h b/e-util/e-image-chooser.h
index d9bfb34b71..1acfd6d875 100644
--- a/e-util/e-image-chooser.h
+++ b/e-util/e-image-chooser.h
@@ -65,7 +65,7 @@ struct _EImageChooserClass {
void (*changed) (EImageChooser *chooser);
};
-GType e_image_chooser_get_type (void);
+GType e_image_chooser_get_type (void) G_GNUC_CONST;
GtkWidget * e_image_chooser_new (const gchar *icon_name);
const gchar * e_image_chooser_get_icon_name (EImageChooser *chooser);
gboolean e_image_chooser_set_from_file (EImageChooser *chooser,
diff --git a/e-util/e-import-assistant.h b/e-util/e-import-assistant.h
index 0ee580e31e..a2783721a5 100644
--- a/e-util/e-import-assistant.h
+++ b/e-util/e-import-assistant.h
@@ -62,7 +62,7 @@ struct _EImportAssistantClass {
GtkAssistantClass parent_class;
};
-GType e_import_assistant_get_type (void);
+GType e_import_assistant_get_type (void) G_GNUC_CONST;
GtkWidget * e_import_assistant_new (GtkWindow *parent);
GtkWidget * e_import_assistant_new_simple (GtkWindow *parent,
const gchar * const *uris);
diff --git a/e-util/e-import.h b/e-util/e-import.h
index 69d40cfced..79d6bf0d43 100644
--- a/e-util/e-import.h
+++ b/e-util/e-import.h
@@ -198,7 +198,7 @@ struct _EImportClass {
EImportTarget *target);
};
-GType e_import_get_type (void);
+GType e_import_get_type (void) G_GNUC_CONST;
EImport * e_import_new (const gchar *id);
void e_import_class_add_importer (EImportClass *klass,
EImportImporter *importer,
diff --git a/e-util/e-interval-chooser.c b/e-util/e-interval-chooser.c
index 70e90bdf92..cf93a112db 100644
--- a/e-util/e-interval-chooser.c
+++ b/e-util/e-interval-chooser.c
@@ -162,7 +162,7 @@ e_interval_chooser_get_interval_minutes (EIntervalChooser *chooser)
EDurationType units;
gdouble interval_minutes;
- g_return_val_if_fail (E_IS_SOURCE_CONFIG_REFRESH (chooser), 0);
+ g_return_val_if_fail (E_IS_INTERVAL_CHOOSER (chooser), 0);
units = gtk_combo_box_get_active (chooser->priv->combo_box);
@@ -189,7 +189,7 @@ e_interval_chooser_set_interval_minutes (EIntervalChooser *chooser,
{
EDurationType units;
- g_return_if_fail (E_IS_SOURCE_CONFIG_REFRESH (chooser));
+ g_return_if_fail (E_IS_INTERVAL_CHOOSER (chooser));
if (interval_minutes == 0) {
units = E_DURATION_MINUTES;
diff --git a/e-util/e-interval-chooser.h b/e-util/e-interval-chooser.h
index 477ae1895c..6664962e8f 100644
--- a/e-util/e-interval-chooser.h
+++ b/e-util/e-interval-chooser.h
@@ -34,10 +34,10 @@
#define E_INTERVAL_CHOOSER_CLASS(cls) \
(G_TYPE_CHECK_CLASS_CAST \
((cls), E_TYPE_INTERVAL_CHOOSER, EIntervalChooserClass))
-#define E_IS_SOURCE_CONFIG_REFRESH(obj) \
+#define E_IS_INTERVAL_CHOOSER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE \
((obj), E_TYPE_INTERVAL_CHOOSER))
-#define E_IS_SOURCE_CONFIG_REFRESH_CLASS(cls) \
+#define E_IS_INTERVAL_CHOOSER_CLASS(cls) \
(G_TYPE_CHECK_CLASS_TYPE \
((cls), E_TYPE_INTERVAL_CHOOSER))
#define E_INTERVAL_CHOOSER_GET_CLASS(obj) \
diff --git a/e-util/e-map.h b/e-util/e-map.h
index cb2923d3fb..461230ea92 100644
--- a/e-util/e-map.h
+++ b/e-util/e-map.h
@@ -84,7 +84,7 @@ struct _EMapPoint {
/* --- Widget --- */
-GType e_map_get_type (void);
+GType e_map_get_type (void) G_GNUC_CONST;
EMap *e_map_new (void);
diff --git a/e-util/e-menu-tool-action.h b/e-util/e-menu-tool-action.h
index aee47686e2..132d3d9dbe 100644
--- a/e-util/e-menu-tool-action.h
+++ b/e-util/e-menu-tool-action.h
@@ -63,7 +63,7 @@ struct _EMenuToolActionClass {
GtkActionClass parent_class;
};
-GType e_menu_tool_action_get_type (void);
+GType e_menu_tool_action_get_type (void) G_GNUC_CONST;
EMenuToolAction *
e_menu_tool_action_new (const gchar *name,
const gchar *label,
diff --git a/e-util/e-menu-tool-button.h b/e-util/e-menu-tool-button.h
index 04519958d2..c16ba09b64 100644
--- a/e-util/e-menu-tool-button.h
+++ b/e-util/e-menu-tool-button.h
@@ -66,7 +66,7 @@ struct _EMenuToolButtonClass {
GtkMenuToolButtonClass parent_class;
};
-GType e_menu_tool_button_get_type (void);
+GType e_menu_tool_button_get_type (void) G_GNUC_CONST;
GtkToolItem * e_menu_tool_button_new (const gchar *label);
void e_menu_tool_button_set_prefer_item (EMenuToolButton *button,
const gchar *prefer_item);
diff --git a/e-util/e-misc-utils.h b/e-util/e-misc-utils.h
index f17cf3cdab..e41689bd43 100644
--- a/e-util/e-misc-utils.h
+++ b/e-util/e-misc-utils.h
@@ -50,6 +50,9 @@ typedef enum {
E_RESTORE_WINDOW_POSITION = 1 << 1
} ERestoreWindowFlags;
+typedef void (*EForeachFunc) (gint model_row,
+ gpointer closure);
+
const gchar * e_get_accels_filename (void);
void e_show_uri (GtkWindow *parent,
const gchar *uri);
diff --git a/e-util/e-name-selector-dialog.h b/e-util/e-name-selector-dialog.h
index fe10544bb5..69bd969704 100644
--- a/e-util/e-name-selector-dialog.h
+++ b/e-util/e-name-selector-dialog.h
@@ -68,7 +68,7 @@ struct _ENameSelectorDialogClass {
GtkDialogClass parent_class;
};
-GType e_name_selector_dialog_get_type (void);
+GType e_name_selector_dialog_get_type (void) G_GNUC_CONST;
ENameSelectorDialog *
e_name_selector_dialog_new (ESourceRegistry *registry);
ESourceRegistry *
diff --git a/e-util/e-name-selector-entry.h b/e-util/e-name-selector-entry.h
index 63ce9aa437..6aa0943e56 100644
--- a/e-util/e-name-selector-entry.h
+++ b/e-util/e-name-selector-entry.h
@@ -74,7 +74,7 @@ struct _ENameSelectorEntryClass {
gpointer reserved2;
};
-GType e_name_selector_entry_get_type (void);
+GType e_name_selector_entry_get_type (void) G_GNUC_CONST;
ENameSelectorEntry *
e_name_selector_entry_new (ESourceRegistry *registry);
ESourceRegistry *
diff --git a/e-util/e-name-selector-list.h b/e-util/e-name-selector-list.h
index 7b1d11c0c6..28f7451592 100644
--- a/e-util/e-name-selector-list.h
+++ b/e-util/e-name-selector-list.h
@@ -71,7 +71,7 @@ struct _ENameSelectorListClass {
ENameSelectorEntryClass parent_class;
};
-GType e_name_selector_list_get_type (void);
+GType e_name_selector_list_get_type (void) G_GNUC_CONST;
ENameSelectorList *
e_name_selector_list_new (ESourceRegistry *registry);
void e_name_selector_list_expand_clicked
diff --git a/e-util/e-name-selector-model.h b/e-util/e-name-selector-model.h
index ed37f2af30..259ac2b44e 100644
--- a/e-util/e-name-selector-model.h
+++ b/e-util/e-name-selector-model.h
@@ -69,7 +69,7 @@ struct _ENameSelectorModelClass {
void (*section_removed) (gchar *name);
};
-GType e_name_selector_model_get_type (void);
+GType e_name_selector_model_get_type (void) G_GNUC_CONST;
ENameSelectorModel *
e_name_selector_model_new (void);
EContactStore * e_name_selector_model_peek_contact_store
diff --git a/e-util/e-name-selector.h b/e-util/e-name-selector.h
index 1049699d63..c6949c5417 100644
--- a/e-util/e-name-selector.h
+++ b/e-util/e-name-selector.h
@@ -68,7 +68,7 @@ struct _ENameSelectorClass {
GObjectClass parent_class;
};
-GType e_name_selector_get_type (void);
+GType e_name_selector_get_type (void) G_GNUC_CONST;
ENameSelector * e_name_selector_new (ESourceRegistry *registry);
ESourceRegistry *
e_name_selector_get_registry (ENameSelector *name_selector);
diff --git a/e-util/e-online-button.h b/e-util/e-online-button.h
index 073489fef9..b34167335d 100644
--- a/e-util/e-online-button.h
+++ b/e-util/e-online-button.h
@@ -58,7 +58,7 @@ struct _EOnlineButtonClass {
GtkButtonClass parent_class;
};
-GType e_online_button_get_type (void);
+GType e_online_button_get_type (void) G_GNUC_CONST;
GtkWidget * e_online_button_new (void);
gboolean e_online_button_get_online (EOnlineButton *button);
void e_online_button_set_online (EOnlineButton *button,
diff --git a/e-util/e-paned.h b/e-util/e-paned.h
index 79fa3ddfa4..608f0d688a 100644
--- a/e-util/e-paned.h
+++ b/e-util/e-paned.h
@@ -62,7 +62,7 @@ struct _EPanedClass {
GtkPanedClass parent_class;
};
-GType e_paned_get_type (void);
+GType e_paned_get_type (void) G_GNUC_CONST;
GtkWidget * e_paned_new (GtkOrientation orientation);
gint e_paned_get_hposition (EPaned *paned);
void e_paned_set_hposition (EPaned *paned,
diff --git a/e-util/e-picture-gallery.h b/e-util/e-picture-gallery.h
index 653d9906af..ab79980805 100644
--- a/e-util/e-picture-gallery.h
+++ b/e-util/e-picture-gallery.h
@@ -62,7 +62,7 @@ struct _EPictureGalleryClass {
GtkIconViewClass parent_class;
};
-GType e_picture_gallery_get_type (void);
+GType e_picture_gallery_get_type (void) G_GNUC_CONST;
GtkWidget * e_picture_gallery_new (const gchar *path);
const gchar * e_picture_gallery_get_path (EPictureGallery *gallery);
diff --git a/e-util/e-plugin-ui.h b/e-util/e-plugin-ui.h
index f56a6e095c..0590c7e01f 100644
--- a/e-util/e-plugin-ui.h
+++ b/e-util/e-plugin-ui.h
@@ -65,7 +65,7 @@ struct _EPluginUIHookClass {
typedef gboolean (*EPluginUIInitFunc) (GtkUIManager *ui_manager,
gpointer user_data);
-GType e_plugin_ui_hook_get_type (void);
+GType e_plugin_ui_hook_get_type (void) G_GNUC_CONST;
void e_plugin_ui_register_manager (GtkUIManager *ui_manager,
const gchar *id,
diff --git a/e-util/e-plugin.h b/e-util/e-plugin.h
index b67bde548c..2b8cd822be 100644
--- a/e-util/e-plugin.h
+++ b/e-util/e-plugin.h
@@ -62,6 +62,14 @@ struct _EPluginAuthor {
gchar *email;
};
+/* README: Currently there is only one flag.
+ * But we may need more in the future and hence makes
+ * sense to keep as an enum */
+
+typedef enum {
+ E_PLUGIN_FLAGS_SYSTEM_PLUGIN = 1 << 0
+} EPluginFlags;
+
/**
* struct _EPlugin - An EPlugin instance.
*
@@ -91,7 +99,7 @@ struct _EPlugin {
GSList *hooks;
GSList *authors; /* EPluginAuthor structures */
- guint32 flags;
+ EPluginFlags flags;
guint enabled : 1;
};
@@ -130,7 +138,7 @@ struct _EPluginClass {
GtkWidget *(*get_configure_widget)(EPlugin *);
};
-GType e_plugin_get_type (void);
+GType e_plugin_get_type (void) G_GNUC_CONST;
gint e_plugin_construct (EPlugin *plugin,
xmlNodePtr root);
gint e_plugin_load_plugins (void);
@@ -275,13 +283,5 @@ guint32 e_plugin_hook_id (xmlNodePtr root,
const EPluginHookTargetKey *map,
const gchar *prop);
-/* README: Currently there is only one flag.
- * But we may need more in the future and hence makes
- * sense to keep as an enum */
-
-typedef enum _EPluginFlags {
- E_PLUGIN_FLAGS_SYSTEM_PLUGIN = 1 << 0
-} EPluginFlags;
-
#endif /* _E_PLUGIN_H */
diff --git a/e-util/e-popup-action.h b/e-util/e-popup-action.h
index 62e7b8ec0f..391b0e7aff 100644
--- a/e-util/e-popup-action.h
+++ b/e-util/e-popup-action.h
@@ -83,7 +83,7 @@ struct _EPopupActionEntry {
const gchar *related; /* name of the related action */
};
-GType e_popup_action_get_type (void);
+GType e_popup_action_get_type (void) G_GNUC_CONST;
EPopupAction * e_popup_action_new (const gchar *name);
void e_action_group_add_popup_actions
diff --git a/e-util/e-preferences-window.h b/e-util/e-preferences-window.h
index f2efa015e6..c1f7b4d696 100644
--- a/e-util/e-preferences-window.h
+++ b/e-util/e-preferences-window.h
@@ -66,7 +66,7 @@ typedef GtkWidget *
(*EPreferencesWindowCreatePageFn)
(EPreferencesWindow *window);
-GType e_preferences_window_get_type (void);
+GType e_preferences_window_get_type (void) G_GNUC_CONST;
GtkWidget * e_preferences_window_new (gpointer shell);
gpointer e_preferences_window_get_shell (EPreferencesWindow *window);
void e_preferences_window_setup (EPreferencesWindow *window);
diff --git a/e-util/e-preview-pane.h b/e-util/e-preview-pane.h
index 3720744b6c..88cd0f3c31 100644
--- a/e-util/e-preview-pane.h
+++ b/e-util/e-preview-pane.h
@@ -68,7 +68,7 @@ struct _EPreviewPaneClass {
void (*show_search_bar) (EPreviewPane *preview_pane);
};
-GType e_preview_pane_get_type (void);
+GType e_preview_pane_get_type (void) G_GNUC_CONST;
GtkWidget * e_preview_pane_new (EWebView *web_view);
EWebView * e_preview_pane_get_web_view (EPreviewPane *preview_pane);
ESearchBar * e_preview_pane_get_search_bar (EPreviewPane *preview_pane);
diff --git a/e-util/e-printable.c b/e-util/e-printable.c
index 3f1403f03c..56f421297a 100644
--- a/e-util/e-printable.c
+++ b/e-util/e-printable.c
@@ -128,7 +128,7 @@ e_printable_init (EPrintable *e_printable)
EPrintable *
e_printable_new (void)
{
- return E_PRINTABLE (g_object_new (E_PRINTABLE_TYPE, NULL));
+ return g_object_new (E_TYPE_PRINTABLE, NULL);
}
void
@@ -138,7 +138,6 @@ e_printable_print_page (EPrintable *e_printable,
gdouble height,
gboolean quantized)
{
- g_return_if_fail (e_printable != NULL);
g_return_if_fail (E_IS_PRINTABLE (e_printable));
g_signal_emit (
@@ -155,7 +154,6 @@ e_printable_data_left (EPrintable *e_printable)
{
gboolean ret_val;
- g_return_val_if_fail (e_printable != NULL, FALSE);
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE);
g_signal_emit (
@@ -169,7 +167,6 @@ e_printable_data_left (EPrintable *e_printable)
void
e_printable_reset (EPrintable *e_printable)
{
- g_return_if_fail (e_printable != NULL);
g_return_if_fail (E_IS_PRINTABLE (e_printable));
g_signal_emit (
@@ -186,7 +183,6 @@ e_printable_height (EPrintable *e_printable,
{
gdouble ret_val;
- g_return_val_if_fail (e_printable != NULL, -1);
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), -1);
g_signal_emit (
@@ -210,7 +206,6 @@ e_printable_will_fit (EPrintable *e_printable,
{
gboolean ret_val;
- g_return_val_if_fail (e_printable != NULL, FALSE);
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE);
g_signal_emit (
diff --git a/e-util/e-printable.h b/e-util/e-printable.h
index 292756076d..395c8a282d 100644
--- a/e-util/e-printable.h
+++ b/e-util/e-printable.h
@@ -25,34 +25,55 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _E_PRINTABLE_H_
-#define _E_PRINTABLE_H_
+#ifndef E_PRINTABLE_H
+#define E_PRINTABLE_H
#include <gtk/gtk.h>
+/* Standard GObject macros */
+#define E_TYPE_PRINTABLE \
+ (e_printable_get_type ())
+#define E_PRINTABLE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_PRINTABLE, EPrintable))
+#define E_PRINTABLE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_PRINTABLE, EPrintableClass))
+#define E_IS_PRINTABLE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_PRINTABLE))
+#define E_IS_PRINTABLE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_PRINTABLE))
+#define E_PRINTABLE_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_PRINTABLE, EPrintableClass))
+
G_BEGIN_DECLS
-#define E_PRINTABLE_TYPE (e_printable_get_type ())
-#define E_PRINTABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_PRINTABLE_TYPE, EPrintable))
-#define E_PRINTABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_PRINTABLE_TYPE, EPrintableClass))
-#define E_IS_PRINTABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_PRINTABLE_TYPE))
-#define E_IS_PRINTABLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_PRINTABLE_TYPE))
+typedef struct _EPrintable EPrintable;
+typedef struct _EPrintableClass EPrintableClass;
-typedef struct {
- GObject base;
-} EPrintable;
+struct _EPrintable {
+ GObject parent;
+};
-typedef struct {
+struct _EPrintableClass {
GObjectClass parent_class;
- /*
- * Signals
- */
-
- void (*print_page) (EPrintable *etm, GtkPrintContext *context, gdouble width, gdouble height, gboolean quantized);
- gboolean (*data_left) (EPrintable *etm);
- void (*reset) (EPrintable *etm);
- gdouble (*height) (EPrintable *etm, GtkPrintContext *context, gdouble width, gdouble max_height, gboolean quantized);
+ /* Signals */
+ void (*print_page) (EPrintable *printable,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble height,
+ gboolean quantized);
+ gboolean (*data_left) (EPrintable *printable);
+ void (*reset) (EPrintable *printable);
+ gdouble (*height) (EPrintable *printable,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble max_height,
+ gboolean quantized);
/* e_printable_will_fit (ep, ...) should be equal in value to
* (e_printable_print_page (ep, ...),
@@ -60,34 +81,33 @@ typedef struct {
* side effect of doing the printing and advancing the
* position of the printable.
*/
-
- gboolean (*will_fit) (EPrintable *etm, GtkPrintContext *context, gdouble width, gdouble max_height, gboolean quantized);
-} EPrintableClass;
-
-GType e_printable_get_type (void);
-
-EPrintable *e_printable_new (void);
-
-/*
- * Routines for emitting signals on the e_table */
-void e_printable_print_page (EPrintable *e_printable,
- GtkPrintContext *context,
- gdouble width,
- gdouble height,
- gboolean quantized);
-gboolean e_printable_data_left (EPrintable *e_printable);
-void e_printable_reset (EPrintable *e_printable);
-gdouble e_printable_height (EPrintable *e_printable,
- GtkPrintContext *context,
- gdouble width,
- gdouble max_height,
- gboolean quantized);
-gboolean e_printable_will_fit (EPrintable *e_printable,
- GtkPrintContext *context,
- gdouble width,
- gdouble max_height,
- gboolean quantized);
+ gboolean (*will_fit) (EPrintable *printable,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble max_height,
+ gboolean quantized);
+};
+
+GType e_printable_get_type (void) G_GNUC_CONST;
+EPrintable * e_printable_new (void);
+void e_printable_print_page (EPrintable *e_printable,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble height,
+ gboolean quantized);
+gboolean e_printable_data_left (EPrintable *printable);
+void e_printable_reset (EPrintable *printable);
+gdouble e_printable_height (EPrintable *printable,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble max_height,
+ gboolean quantized);
+gboolean e_printable_will_fit (EPrintable *printable,
+ GtkPrintContext *context,
+ gdouble width,
+ gdouble max_height,
+ gboolean quantized);
G_END_DECLS
-#endif /* _E_PRINTABLE_H_ */
+#endif /* E_PRINTABLE_H */
diff --git a/e-util/e-reflow-model.h b/e-util/e-reflow-model.h
index 4a5f710084..9061b026f3 100644
--- a/e-util/e-reflow-model.h
+++ b/e-util/e-reflow-model.h
@@ -25,8 +25,8 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _E_REFLOW_MODEL_H_
-#define _E_REFLOW_MODEL_H_
+#ifndef E_REFLOW_MODEL_H
+#define E_REFLOW_MODEL_H
#include <libgnomecanvas/libgnomecanvas.h>
@@ -61,69 +61,75 @@ struct _EReflowModel {
struct _EReflowModelClass {
GObjectClass parent_class;
- /*
- * Virtual methods
- */
- void (*set_width) (EReflowModel *etm, gint width);
-
- gint (*count) (EReflowModel *etm);
- gint (*height) (EReflowModel *etm, gint n, GnomeCanvasGroup *parent);
- GnomeCanvasItem *(*incarnate) (EReflowModel *etm, gint n, GnomeCanvasGroup *parent);
- GHashTable * (*create_cmp_cache) (EReflowModel *etm);
- gint (*compare) (EReflowModel *etm, gint n1, gint n2, GHashTable *cmp_cache);
- void (*reincarnate) (EReflowModel *etm, gint n, GnomeCanvasItem *item);
-
- /*
- * Signals
- */
-
- /*
+ /* Method */
+ void (*set_width) (EReflowModel *reflow_model,
+ gint width);
+ gint (*count) (EReflowModel *reflow_model);
+ gint (*height) (EReflowModel *reflow_model,
+ gint n,
+ GnomeCanvasGroup *parent);
+ GnomeCanvasItem *
+ (*incarnate) (EReflowModel *reflow_model,
+ gint n,
+ GnomeCanvasGroup *parent);
+ GHashTable * (*create_cmp_cache) (EReflowModel *reflow_model);
+ gint (*compare) (EReflowModel *reflow_model,
+ gint n1,
+ gint n2,
+ GHashTable *cmp_cache);
+ void (*reincarnate) (EReflowModel *reflow_model,
+ gint n,
+ GnomeCanvasItem *item);
+
+ /* Signals
+ *
* These all come after the change has been made.
* Major structural changes: model_changed
* Changes to the sorting of elements: comparison_changed
* Changes only in an item: item_changed
*/
- void (*model_changed) (EReflowModel *etm);
- void (*comparison_changed) (EReflowModel *etm);
- void (*model_items_inserted) (EReflowModel *etm, gint position, gint count);
- void (*model_item_removed) (EReflowModel *etm, gint position);
- void (*model_item_changed) (EReflowModel *etm, gint n);
+ void (*model_changed) (EReflowModel *reflow_model);
+ void (*comparison_changed) (EReflowModel *reflow_model);
+ void (*model_items_inserted) (EReflowModel *reflow_model,
+ gint position,
+ gint count);
+ void (*model_item_removed) (EReflowModel *reflow_model,
+ gint position);
+ void (*model_item_changed) (EReflowModel *reflow_model,
+ gint n);
};
-GType e_reflow_model_get_type (void);
-
-/**/
-void e_reflow_model_set_width (EReflowModel *e_reflow_model,
- gint width);
-gint e_reflow_model_count (EReflowModel *e_reflow_model);
-gint e_reflow_model_height (EReflowModel *e_reflow_model,
- gint n,
+GType e_reflow_model_get_type (void) G_GNUC_CONST;
+void e_reflow_model_set_width (EReflowModel *reflow_model,
+ gint width);
+gint e_reflow_model_count (EReflowModel *reflow_model);
+gint e_reflow_model_height (EReflowModel *reflow_model,
+ gint n,
GnomeCanvasGroup *parent);
-GnomeCanvasItem *e_reflow_model_incarnate (EReflowModel *e_reflow_model,
- gint n,
+GnomeCanvasItem *
+ e_reflow_model_incarnate (EReflowModel *reflow_model,
+ gint n,
GnomeCanvasGroup *parent);
-GHashTable * e_reflow_model_create_cmp_cache (EReflowModel *e_reflow_model);
-gint e_reflow_model_compare (EReflowModel *e_reflow_model,
- gint n1,
- gint n2,
- GHashTable *cmp_cache);
-void e_reflow_model_reincarnate (EReflowModel *e_reflow_model,
- gint n,
- GnomeCanvasItem *item);
-
-/*
- * Routines for emitting signals on the e_reflow
- */
-void e_reflow_model_changed (EReflowModel *e_reflow_model);
-void e_reflow_model_comparison_changed (EReflowModel *e_reflow_model);
-void e_reflow_model_items_inserted (EReflowModel *e_reflow_model,
- gint position,
- gint count);
-void e_reflow_model_item_removed (EReflowModel *e_reflow_model,
- gint n);
-void e_reflow_model_item_changed (EReflowModel *e_reflow_model,
- gint n);
+GHashTable * e_reflow_model_create_cmp_cache (EReflowModel *reflow_model);
+gint e_reflow_model_compare (EReflowModel *reflow_model,
+ gint n1,
+ gint n2,
+ GHashTable *cmp_cache);
+void e_reflow_model_reincarnate (EReflowModel *reflow_model,
+ gint n,
+ GnomeCanvasItem *item);
+void e_reflow_model_changed (EReflowModel *reflow_model);
+void e_reflow_model_comparison_changed
+ (EReflowModel *reflow_model);
+void e_reflow_model_items_inserted (EReflowModel *reflow_model,
+ gint position,
+ gint count);
+void e_reflow_model_item_removed (EReflowModel *reflow_model,
+ gint n);
+void e_reflow_model_item_changed (EReflowModel *reflow_model,
+ gint n);
G_END_DECLS
-#endif /* _E_REFLOW_MODEL_H_ */
+#endif /* E_REFLOW_MODEL_H */
+
diff --git a/e-util/e-reflow.h b/e-util/e-reflow.h
index a891e98f38..72b92f5c52 100644
--- a/e-util/e-reflow.h
+++ b/e-util/e-reflow.h
@@ -138,7 +138,7 @@ struct _EReflowClass
* should also do an ECanvas parent reflow request if its size
* changes.
*/
-GType e_reflow_get_type (void);
+GType e_reflow_get_type (void) G_GNUC_CONST;
G_END_DECLS
diff --git a/e-util/e-rule-context.h b/e-util/e-rule-context.h
index f543edd187..316d7c33ff 100644
--- a/e-util/e-rule-context.h
+++ b/e-util/e-rule-context.h
@@ -142,7 +142,7 @@ struct _rule_set_map {
ERuleContextNextRuleFunc next;
};
-GType e_rule_context_get_type (void);
+GType e_rule_context_get_type (void) G_GNUC_CONST;
ERuleContext * e_rule_context_new (void);
gint e_rule_context_load (ERuleContext *context,
diff --git a/e-util/e-rule-editor.h b/e-util/e-rule-editor.h
index d983b81c27..39d2066274 100644
--- a/e-util/e-rule-editor.h
+++ b/e-util/e-rule-editor.h
@@ -106,7 +106,7 @@ struct _ERuleEditorUndo {
gint newrank;
};
-GType e_rule_editor_get_type (void);
+GType e_rule_editor_get_type (void) G_GNUC_CONST;
ERuleEditor * e_rule_editor_new (ERuleContext *context,
const gchar *source,
const gchar *label);
diff --git a/e-util/e-search-bar.h b/e-util/e-search-bar.h
index 43e16453bd..0681bce9f7 100644
--- a/e-util/e-search-bar.h
+++ b/e-util/e-search-bar.h
@@ -68,17 +68,14 @@ struct _ESearchBarClass {
void (*clear) (ESearchBar *search_bar);
};
-GType e_search_bar_get_type (void);
+GType e_search_bar_get_type (void) G_GNUC_CONST;
GtkWidget * e_search_bar_new (EWebView *web_view);
void e_search_bar_clear (ESearchBar *search_bar);
void e_search_bar_changed (ESearchBar *search_bar);
EWebView * e_search_bar_get_web_view (ESearchBar *search_bar);
-gboolean e_search_bar_get_active_search
- (ESearchBar *search_bar);
-gboolean e_search_bar_get_case_sensitive
- (ESearchBar *search_bar);
-void e_search_bar_set_case_sensitive
- (ESearchBar *search_bar,
+gboolean e_search_bar_get_active_search (ESearchBar *search_bar);
+gboolean e_search_bar_get_case_sensitive (ESearchBar *search_bar);
+void e_search_bar_set_case_sensitive (ESearchBar *search_bar,
gboolean case_sensitive);
gchar * e_search_bar_get_text (ESearchBar *search_bar);
void e_search_bar_set_text (ESearchBar *search_bar,
diff --git a/e-util/e-selectable.h b/e-util/e-selectable.h
index 4e7faa8581..6aeaa5e8c4 100644
--- a/e-util/e-selectable.h
+++ b/e-util/e-selectable.h
@@ -65,7 +65,7 @@ struct _ESelectableInterface {
void (*select_all) (ESelectable *selectable);
};
-GType e_selectable_get_type (void);
+GType e_selectable_get_type (void) G_GNUC_CONST;
void e_selectable_update_actions (ESelectable *selectable,
EFocusTracker *focus_tracker,
GdkAtom *clipboard_targets,
diff --git a/e-util/e-selection-model-array.c b/e-util/e-selection-model-array.c
index fe73857a8a..f019f8c66b 100644
--- a/e-util/e-selection-model-array.c
+++ b/e-util/e-selection-model-array.c
@@ -57,8 +57,8 @@ static gint
es_row_model_to_sorted (ESelectionModelArray *esma,
gint model_row)
{
- if (model_row >= 0 && esma && esma->base.sorter && e_sorter_needs_sorting (esma->base.sorter))
- return e_sorter_model_to_sorted (esma->base.sorter, model_row);
+ if (model_row >= 0 && esma && esma->parent.sorter && e_sorter_needs_sorting (esma->parent.sorter))
+ return e_sorter_model_to_sorted (esma->parent.sorter, model_row);
return model_row;
}
@@ -67,8 +67,8 @@ static gint
es_row_sorted_to_model (ESelectionModelArray *esma,
gint sorted_row)
{
- if (sorted_row >= 0 && esma && esma->base.sorter && e_sorter_needs_sorting (esma->base.sorter))
- return e_sorter_sorted_to_model (esma->base.sorter, sorted_row);
+ if (sorted_row >= 0 && esma && esma->parent.sorter && e_sorter_needs_sorting (esma->parent.sorter))
+ return e_sorter_sorted_to_model (esma->parent.sorter, sorted_row);
return sorted_row;
}
diff --git a/e-util/e-selection-model-array.h b/e-util/e-selection-model-array.h
index 7292a3365e..bb3e3f7c40 100644
--- a/e-util/e-selection-model-array.h
+++ b/e-util/e-selection-model-array.h
@@ -25,23 +25,38 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _E_SELECTION_MODEL_ARRAY_H_
-#define _E_SELECTION_MODEL_ARRAY_H_
+#ifndef E_SELECTION_MODEL_ARRAY_H
+#define E_SELECTION_MODEL_ARRAY_H
#include <e-util/e-bit-array.h>
#include <e-util/e-selection-model.h>
+/* Standard GObject macros */
+#define E_TYPE_SELECTION_MODEL_ARRAY \
+ (e_selection_model_array_get_type ())
+#define E_SELECTION_MODEL_ARRAY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SELECTION_MODEL_ARRAY, ESelectionModelArray))
+#define E_SELECTION_MODEL_ARRAY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SELECTION_MODEL_ARRAY, ESelectionModelArrayClass))
+#define E_IS_SELECTION_MODEL_ARRAY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SELECTION_MODEL_ARRAY))
+#define E_IS_SELECTION_MODEL_ARRAY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SELECTION_MODEL_ARRAY))
+#define E_SELECTION_MODEL_ARRAY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SELECTION_MODEL_ARRAY, ESelectionModelArrayClass))
+
G_BEGIN_DECLS
-#define E_SELECTION_MODEL_ARRAY_TYPE (e_selection_model_array_get_type ())
-#define E_SELECTION_MODEL_ARRAY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_SELECTION_MODEL_ARRAY_TYPE, ESelectionModelArray))
-#define E_SELECTION_MODEL_ARRAY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_SELECTION_MODEL_ARRAY_TYPE, ESelectionModelArrayClass))
-#define E_IS_SELECTION_MODEL_ARRAY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_SELECTION_MODEL_ARRAY_TYPE))
-#define E_IS_SELECTION_MODEL_ARRAY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_SELECTION_MODEL_ARRAY_TYPE))
-#define E_SELECTION_MODEL_ARRAY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), E_SELECTION_MODEL_ARRAY_TYPE, ESelectionModelArrayClass))
+typedef struct _ESelectionModelArray ESelectionModelArray;
+typedef struct _ESelectionModelArrayClass ESelectionModelArrayClass;
-typedef struct {
- ESelectionModel base;
+struct _ESelectionModelArray {
+ ESelectionModel parent;
EBitArray *eba;
@@ -55,41 +70,45 @@ typedef struct {
/* Anything other than -1 means that the selection is a single
* row. This being -1 does not impart any information. */
- gint selected_row;
+ gint selected_row;
+
/* Anything other than -1 means that the selection is a all
* rows between selection_start_path and cursor_path where
* selected_range_end is the rwo number of cursor_path. This
* being -1 does not impart any information. */
- gint selected_range_end;
+ gint selected_range_end;
guint frozen : 1;
guint selection_model_changed : 1;
guint group_info_changed : 1;
-} ESelectionModelArray;
+};
-typedef struct {
+struct _ESelectionModelArrayClass {
ESelectionModelClass parent_class;
- gint (*get_row_count) (ESelectionModelArray *selection);
-} ESelectionModelArrayClass;
-
-GType e_selection_model_array_get_type (void);
-
-/* Protected Functions */
-void e_selection_model_array_insert_rows (ESelectionModelArray *esm,
- gint row,
- gint count);
-void e_selection_model_array_delete_rows (ESelectionModelArray *esm,
- gint row,
- gint count);
-void e_selection_model_array_move_row (ESelectionModelArray *esm,
- gint old_row,
- gint new_row);
-void e_selection_model_array_confirm_row_count (ESelectionModelArray *esm);
-
-/* Protected Virtual Function */
-gint e_selection_model_array_get_row_count (ESelectionModelArray *esm);
+ gint (*get_row_count)
+ (ESelectionModelArray *selection);
+};
+
+GType e_selection_model_array_get_type
+ (void) G_GNUC_CONST;
+void e_selection_model_array_insert_rows
+ (ESelectionModelArray *selection,
+ gint row,
+ gint count);
+void e_selection_model_array_delete_rows
+ (ESelectionModelArray *selection,
+ gint row,
+ gint count);
+void e_selection_model_array_move_row
+ (ESelectionModelArray *selection,
+ gint old_row,
+ gint new_row);
+void e_selection_model_array_confirm_row_count
+ (ESelectionModelArray *selection);
+gint e_selection_model_array_get_row_count
+ (ESelectionModelArray *selection);
G_END_DECLS
-#endif /* _E_SELECTION_MODEL_ARRAY_H_ */
+#endif /* E_SELECTION_MODEL_ARRAY_H */
diff --git a/e-util/e-selection-model-simple.c b/e-util/e-selection-model-simple.c
index f7123dd09e..d194e95453 100644
--- a/e-util/e-selection-model-simple.c
+++ b/e-util/e-selection-model-simple.c
@@ -33,7 +33,7 @@ static gint esms_get_row_count (ESelectionModelArray *esma);
G_DEFINE_TYPE (
ESelectionModelSimple,
e_selection_model_simple,
- E_SELECTION_MODEL_ARRAY_TYPE)
+ E_TYPE_SELECTION_MODEL_ARRAY)
static void
e_selection_model_simple_init (ESelectionModelSimple *selection)
@@ -60,7 +60,7 @@ e_selection_model_simple_class_init (ESelectionModelSimpleClass *class)
ESelectionModelSimple *
e_selection_model_simple_new (void)
{
- return g_object_new (E_SELECTION_MODEL_SIMPLE_TYPE, NULL);
+ return g_object_new (E_TYPE_SELECTION_MODEL_SIMPLE, NULL);
}
void
diff --git a/e-util/e-selection-model-simple.h b/e-util/e-selection-model-simple.h
index b4551dd51f..e0990bb0ba 100644
--- a/e-util/e-selection-model-simple.h
+++ b/e-util/e-selection-model-simple.h
@@ -25,46 +25,67 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _E_SELECTION_MODEL_SIMPLE_H_
-#define _E_SELECTION_MODEL_SIMPLE_H_
+#ifndef E_SELECTION_MODEL_SIMPLE_H
+#define E_SELECTION_MODEL_SIMPLE_H
#include <e-util/e-selection-model-array.h>
+/* Standard GObject macros */
+#define E_TYPE_SELECTION_MODEL_SIMPLE \
+ (e_selection_model_simple_get_type ())
+#define E_SELECTION_MODEL_SIMPLE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SELECTION_MODEL_SIMPLE, ESelectionModelSimple))
+#define E_SELECTION_MODEL_SIMPLE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SELECTION_MODEL_SIMPLE, ESelectionModelSimpleClass))
+#define E_IS_SELECTION_MODEL_SIMPLE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SELECTION_MODEL_SIMPLE))
+#define E_IS_SELECTION_MODEL_SIMPLE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SELECTION_MODEL_SIMPLE))
+#define E_SELECTION_MODEL_SIMPLE_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SELECTION_MODEL_SIMPLE, ESelectionModelSimpleClass))
+
G_BEGIN_DECLS
-#define E_SELECTION_MODEL_SIMPLE_TYPE (e_selection_model_simple_get_type ())
-#define E_SELECTION_MODEL_SIMPLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_SELECTION_MODEL_SIMPLE_TYPE, ESelectionModelSimple))
-#define E_SELECTION_MODEL_SIMPLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_SELECTION_MODEL_SIMPLE_TYPE, ESelectionModelSimpleClass))
-#define E_IS_SELECTION_MODEL_SIMPLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_SELECTION_MODEL_SIMPLE_TYPE))
-#define E_IS_SELECTION_MODEL_SIMPLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_SELECTION_MODEL_SIMPLE_TYPE))
+typedef struct _ESelectionModelSimple ESelectionModelSimple;
+typedef struct _ESelectionModelSimpleClass ESelectionModelSimpleClass;
-typedef struct {
+struct _ESelectionModelSimple {
ESelectionModelArray parent;
gint row_count;
-} ESelectionModelSimple;
+};
-typedef struct {
+struct _ESelectionModelSimpleClass {
ESelectionModelArrayClass parent_class;
-} ESelectionModelSimpleClass;
-
-GType e_selection_model_simple_get_type (void);
-ESelectionModelSimple *e_selection_model_simple_new (void);
-
-void e_selection_model_simple_insert_rows (ESelectionModelSimple *esms,
- gint row,
- gint count);
-void e_selection_model_simple_delete_rows (ESelectionModelSimple *esms,
- gint row,
- gint count);
-void e_selection_model_simple_move_row (ESelectionModelSimple *esms,
- gint old_row,
- gint new_row);
+};
-void e_selection_model_simple_set_row_count (ESelectionModelSimple *selection,
- gint row_count);
+GType e_selection_model_simple_get_type
+ (void) G_GNUC_CONST;
+ESelectionModelSimple *
+ e_selection_model_simple_new
+ (void);
+void e_selection_model_simple_insert_rows
+ (ESelectionModelSimple *selection,
+ gint row,
+ gint count);
+void e_selection_model_simple_delete_rows
+ (ESelectionModelSimple *selection,
+ gint row,
+ gint count);
+void e_selection_model_simple_move_row
+ (ESelectionModelSimple *selection,
+ gint old_row,
+ gint new_row);
+void e_selection_model_simple_set_row_count
+ (ESelectionModelSimple *selection,
+ gint row_count);
G_END_DECLS
-#endif /* _E_SELECTION_MODEL_SIMPLE_H_ */
+#endif /* E_SELECTION_MODEL_SIMPLE_H */
diff --git a/e-util/e-selection-model.c b/e-util/e-selection-model.c
index 4c553f485a..ddd2a104b7 100644
--- a/e-util/e-selection-model.c
+++ b/e-util/e-selection-model.c
@@ -205,7 +205,7 @@ e_selection_model_class_init (ESelectionModelClass *class)
"sorter",
"Sorter",
NULL,
- E_SORTER_TYPE,
+ E_TYPE_SORTER,
G_PARAM_READWRITE));
g_object_class_install_property (
diff --git a/e-util/e-selection-model.h b/e-util/e-selection-model.h
index 1d59e28fe1..5450910bbe 100644
--- a/e-util/e-selection-model.h
+++ b/e-util/e-selection-model.h
@@ -29,6 +29,7 @@
#define E_SELECTION_MODEL_H
#include <gtk/gtk.h>
+#include <e-util/e-misc-utils.h>
#include <e-util/e-sorter.h>
/* Standard GObject macros */
@@ -52,12 +53,6 @@
G_BEGIN_DECLS
-#ifndef _E_FOREACH_FUNC_H_
-#define _E_FOREACH_FUNC_H_
-typedef void (*EForeachFunc) (gint model_row,
- gpointer closure);
-#endif
-
typedef struct _ESelectionModel ESelectionModel;
typedef struct _ESelectionModelClass ESelectionModelClass;
@@ -125,7 +120,7 @@ struct _ESelectionModelClass {
void (*selection_changed) (ESelectionModel *esm);
};
-GType e_selection_model_get_type (void);
+GType e_selection_model_get_type (void) G_GNUC_CONST;
void e_selection_model_do_something (ESelectionModel *esm,
guint row,
guint col,
@@ -153,10 +148,10 @@ void e_selection_model_select_as_key_press
/* Virtual functions */
gboolean e_selection_model_is_row_selected
(ESelectionModel *esm,
- gint n);
+ gint n);
void e_selection_model_foreach (ESelectionModel *esm,
- EForeachFunc callback,
- gpointer closure);
+ EForeachFunc callback,
+ gpointer closure);
void e_selection_model_clear (ESelectionModel *esm);
gint e_selection_model_selected_count
(ESelectionModel *esm);
diff --git a/e-util/e-send-options.h b/e-util/e-send-options.h
index 2cd8336f3c..605a0cae85 100644
--- a/e-util/e-send-options.h
+++ b/e-util/e-send-options.h
@@ -25,21 +25,36 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef __E_SEND_OPTIONS_DIALOG_H__
-#define __E_SEND_OPTIONS_DIALOG_H__
+#ifndef E_SEND_OPTIONS_DIALOG_H
+#define E_SEND_OPTIONS_DIALOG_H
#include <gtk/gtk.h>
#include <time.h>
-#define E_TYPE_SEND_OPTIONS_DIALOG (e_send_options_dialog_get_type ())
-#define E_SEND_OPTIONS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SEND_OPTIONS_DIALOG, ESendOptionsDialog))
-#define E_SEND_OPTIONS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SEND_OPTIONS_DIALOG, ESendOptionsDialogClass))
-#define E_IS_SEND_OPTIONS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SEND_OPTIONS_DIALOG))
-#define E_IS_SEND_OPTIONS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_SEND_OPTIONS_DIALOG))
-
-typedef struct _ESendOptionsDialog ESendOptionsDialog;
-typedef struct _ESendOptionsDialogClass ESendOptionsDialogClass;
-typedef struct _ESendOptionsDialogPrivate ESendOptionsDialogPrivate;
+/* Standard GObject macros */
+#define E_TYPE_SEND_OPTIONS_DIALOG \
+ (e_send_options_dialog_get_type ())
+#define E_SEND_OPTIONS_DIALOG(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SEND_OPTIONS_DIALOG, ESendOptionsDialog))
+#define E_SEND_OPTIONS_DIALOG_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SEND_OPTIONS_DIALOG, ESendOptionsDialogClass))
+#define E_IS_SEND_OPTIONS_DIALOG(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SEND_OPTIONS_DIALOG))
+#define E_IS_SEND_OPTIONS_DIALOG_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SEND_OPTIONS_DIALOG))
+#define E_SEND_OPTIONS_DIALOG_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SEND_OPTIONS_DIALOG, ESendOptionsDialogClass))
+
+G_BEGIN_DECLS
+
+typedef struct _ESendOptionsDialog ESendOptionsDialog;
+typedef struct _ESendOptionsDialogClass ESendOptionsDialogClass;
+typedef struct _ESendOptionsDialogPrivate ESendOptionsDialogPrivate;
typedef enum {
E_ITEM_NONE,
@@ -106,26 +121,34 @@ typedef struct {
ESendOptionsStatusTracking *mopts;
ESendOptionsStatusTracking *copts;
ESendOptionsStatusTracking *topts;
-
} ESendOptionsData;
struct _ESendOptionsDialog {
- GObject object;
+ GObject parent;
ESendOptionsData *data;
- /* Private data */
ESendOptionsDialogPrivate *priv;
};
struct _ESendOptionsDialogClass {
GObjectClass parent_class;
- void (* sod_response) (ESendOptionsDialog *sd, gint status);
+
+ void (*sod_response) (ESendOptionsDialog *sod,
+ gint status);
};
-GType e_send_options_dialog_get_type (void);
-ESendOptionsDialog *e_send_options_dialog_new (void);
-void e_send_options_set_need_general_options (ESendOptionsDialog *sod, gboolean needed);
-gboolean e_send_options_get_need_general_options (ESendOptionsDialog *sod);
-gboolean e_send_options_dialog_run (ESendOptionsDialog *sod, GtkWidget *parent, Item_type type);
-gboolean e_send_options_set_global (ESendOptionsDialog *sod, gboolean set);
-#endif
+GType e_send_options_dialog_get_type (void) G_GNUC_CONST;
+ESendOptionsDialog *
+ e_send_options_dialog_new (void);
+void e_send_options_set_need_general_options
+ (ESendOptionsDialog *sod,
+ gboolean needed);
+gboolean e_send_options_get_need_general_options
+ (ESendOptionsDialog *sod);
+gboolean e_send_options_dialog_run (ESendOptionsDialog *sod,
+ GtkWidget *parent,
+ Item_type type);
+gboolean e_send_options_set_global (ESendOptionsDialog *sod,
+ gboolean set);
+
+#endif /* E_SEND_OPTIONS_DIALOG_H */
diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c
index 1c373160df..fc411e12ec 100644
--- a/e-util/e-sorter-array.c
+++ b/e-util/e-sorter-array.c
@@ -38,7 +38,7 @@
G_DEFINE_TYPE (
ESorterArray,
e_sorter_array,
- E_SORTER_TYPE)
+ E_TYPE_SORTER)
static void esa_sort (ESorterArray *esa);
static void esa_backsort (ESorterArray *esa);
@@ -278,7 +278,7 @@ e_sorter_array_new (ECreateCmpCacheFunc create_cmp_cache,
ECompareRowsFunc compare,
gpointer closure)
{
- ESorterArray *esa = g_object_new (E_SORTER_ARRAY_TYPE, NULL);
+ ESorterArray *esa = g_object_new (E_TYPE_SORTER_ARRAY, NULL);
return e_sorter_array_construct (esa, create_cmp_cache, compare, closure);
}
diff --git a/e-util/e-sorter-array.h b/e-util/e-sorter-array.h
index 07a32b4b82..04899d21b6 100644
--- a/e-util/e-sorter-array.h
+++ b/e-util/e-sorter-array.h
@@ -24,62 +24,78 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _E_SORTER_ARRAY_H_
-#define _E_SORTER_ARRAY_H_
+#ifndef E_SORTER_ARRAY_H
+#define E_SORTER_ARRAY_H
#include <e-util/e-sorter.h>
+/* Standard GObject macros */
+#define E_TYPE_SORTER_ARRAY \
+ (e_sorter_array_get_type ())
+#define E_SORTER_ARRAY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SORTER_ARRAY, ESorterArray))
+#define E_SORTER_ARRAY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SORTER_ARRAY, ESorterArrayClass))
+#define E_IS_SORTER_ARRAY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SORTER_ARRAY))
+#define E_IS_SORTER_ARRAY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SORTER_ARRAY))
+#define E_SORTER_ARRAY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SORTER_ARRAY, ESorterArrayClass))
+
G_BEGIN_DECLS
-#define E_SORTER_ARRAY_TYPE (e_sorter_array_get_type ())
-#define E_SORTER_ARRAY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_SORTER_ARRAY_TYPE, ESorterArray))
-#define E_SORTER_ARRAY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_SORTER_ARRAY_TYPE, ESorterArrayClass))
-#define E_IS_SORTER_ARRAY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_SORTER_ARRAY_TYPE))
-#define E_IS_SORTER_ARRAY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_SORTER_ARRAY_TYPE))
+typedef struct _ESorterArray ESorterArray;
+typedef struct _ESorterArrayClass ESorterArrayClass;
-#ifndef _E_COMPARE_ROWS_FUNC_H_
-#define _E_COMPARE_ROWS_FUNC_H_
typedef gint (*ECompareRowsFunc) (gint row1,
gint row2,
GHashTable *cmp_cache,
gpointer closure);
-#endif
typedef GHashTable * (*ECreateCmpCacheFunc) (gpointer closure);
-typedef struct {
- ESorter base;
+struct _ESorterArray {
+ ESorter parent;
GHashTable *cmp_cache;
ECreateCmpCacheFunc create_cmp_cache;
ECompareRowsFunc compare;
- gpointer closure;
+ gpointer closure;
- /* If needs_sorting is 0, then model_to_sorted and sorted_to_model are no-ops. */
- gint *sorted;
- gint *backsorted;
+ /* If needs_sorting is 0, then
+ * model_to_sorted and sorted_to_model are no-ops. */
+ gint *sorted;
+ gint *backsorted;
gint rows;
-} ESorterArray;
+};
-typedef struct {
+struct _ESorterArrayClass {
ESorterClass parent_class;
-} ESorterArrayClass;
+};
-GType e_sorter_array_get_type (void);
-ESorterArray *e_sorter_array_construct (ESorterArray *sorter,
+GType e_sorter_array_get_type (void) G_GNUC_CONST;
+ESorterArray * e_sorter_array_construct
+ (ESorterArray *sorter,
ECreateCmpCacheFunc create_cmp_cache,
- ECompareRowsFunc compare,
- gpointer closure);
-ESorterArray *e_sorter_array_new (ECreateCmpCacheFunc create_cmp_cache,
- ECompareRowsFunc compare,
- gpointer closure);
-void e_sorter_array_clean (ESorterArray *esa);
-void e_sorter_array_set_count (ESorterArray *esa,
- gint count);
-void e_sorter_array_append (ESorterArray *esa,
- gint count);
+ ECompareRowsFunc compare,
+ gpointer closure);
+ESorterArray * e_sorter_array_new (ECreateCmpCacheFunc create_cmp_cache,
+ ECompareRowsFunc compare,
+ gpointer closure);
+void e_sorter_array_clean (ESorterArray *sorter);
+void e_sorter_array_set_count
+ (ESorterArray *sorter,
+ gint count);
+void e_sorter_array_append (ESorterArray *sorter,
+ gint count);
G_END_DECLS
-#endif /* _E_SORTER_ARRAY_H_ */
+#endif /* E_SORTER_ARRAY_H */
diff --git a/e-util/e-sorter.c b/e-util/e-sorter.c
index ecb597a832..935304a8fb 100644
--- a/e-util/e-sorter.c
+++ b/e-util/e-sorter.c
@@ -62,7 +62,7 @@ e_sorter_init (ESorter *es)
ESorter *
e_sorter_new (void)
{
- ESorter *es = g_object_new (E_SORTER_TYPE, NULL);
+ ESorter *es = g_object_new (E_TYPE_SORTER, NULL);
return es;
}
diff --git a/e-util/e-sorter.h b/e-util/e-sorter.h
index 94b63f3bd4..45f8c53af1 100644
--- a/e-util/e-sorter.h
+++ b/e-util/e-sorter.h
@@ -25,58 +25,75 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _E_SORTER_H_
-#define _E_SORTER_H_
+#ifndef E_SORTER_H
+#define E_SORTER_H
#include <glib-object.h>
+/* Standard GObject macros */
+#define E_TYPE_SORTER \
+ (e_sorter_get_type ())
+#define E_SORTER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SORTER, ESorter))
+#define E_SORTER_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SORTER, ESorterClass))
+#define E_IS_SORTER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SORTER))
+#define E_IS_SORTER_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SORTER))
+#define E_SORTER_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SORTER, ESorterClass))
+
G_BEGIN_DECLS
-#define E_SORTER_TYPE (e_sorter_get_type ())
-#define E_SORTER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_SORTER_TYPE, ESorter))
-#define E_SORTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_SORTER_TYPE, ESorterClass))
-#define E_IS_SORTER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_SORTER_TYPE))
-#define E_IS_SORTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_SORTER_TYPE))
-#define E_SORTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), E_SORTER_TYPE, ESorterClass))
+typedef struct _ESorter ESorter;
+typedef struct _ESorterClass ESorterClass;
-typedef struct {
- GObject base;
-} ESorter;
+struct _ESorter {
+ GObject parent;
+};
-typedef struct {
+struct _ESorterClass {
GObjectClass parent_class;
- gint (*model_to_sorted) (ESorter *sorter,
- gint row);
- gint (*sorted_to_model) (ESorter *sorter,
- gint row);
-
- void (*get_model_to_sorted_array) (ESorter *sorter,
- gint **array,
- gint *count);
- void (*get_sorted_to_model_array) (ESorter *sorter,
- gint **array,
- gint *count);
-
- gboolean (*needs_sorting) (ESorter *sorter);
-} ESorterClass;
-GType e_sorter_get_type (void);
-ESorter *e_sorter_new (void);
+ gint (*model_to_sorted) (ESorter *sorter,
+ gint row);
+ gint (*sorted_to_model) (ESorter *sorter,
+ gint row);
-gint e_sorter_model_to_sorted (ESorter *sorter,
- gint row);
-gint e_sorter_sorted_to_model (ESorter *sorter,
- gint row);
+ void (*get_model_to_sorted_array)
+ (ESorter *sorter,
+ gint **array,
+ gint *count);
+ void (*get_sorted_to_model_array)
+ (ESorter *sorter,
+ gint **array,
+ gint *count);
-void e_sorter_get_model_to_sorted_array (ESorter *sorter,
- gint **array,
- gint *count);
-void e_sorter_get_sorted_to_model_array (ESorter *sorter,
- gint **array,
- gint *count);
+ gboolean (*needs_sorting) (ESorter *sorter);
+};
-gboolean e_sorter_needs_sorting (ESorter *sorter);
+GType e_sorter_get_type (void) G_GNUC_CONST;
+ESorter * e_sorter_new (void);
+gint e_sorter_model_to_sorted (ESorter *sorter,
+ gint row);
+gint e_sorter_sorted_to_model (ESorter *sorter,
+ gint row);
+void e_sorter_get_model_to_sorted_array
+ (ESorter *sorter,
+ gint **array,
+ gint *count);
+void e_sorter_get_sorted_to_model_array
+ (ESorter *sorter,
+ gint **array,
+ gint *count);
+gboolean e_sorter_needs_sorting (ESorter *sorter);
G_END_DECLS
-#endif /* _E_SORTER_H_ */
+#endif /* E_SORTER_H */
diff --git a/e-util/e-source-combo-box.h b/e-util/e-source-combo-box.h
index d022f4a8ce..6a2cb3191a 100644
--- a/e-util/e-source-combo-box.h
+++ b/e-util/e-source-combo-box.h
@@ -64,7 +64,7 @@ struct _ESourceComboBoxClass {
GtkComboBoxClass parent_class;
};
-GType e_source_combo_box_get_type (void);
+GType e_source_combo_box_get_type (void) G_GNUC_CONST;
GtkWidget * e_source_combo_box_new (ESourceRegistry *registry,
const gchar *extension_name);
ESourceRegistry *
diff --git a/e-util/e-source-selector-dialog.h b/e-util/e-source-selector-dialog.h
index eae45ba62f..d787934106 100644
--- a/e-util/e-source-selector-dialog.h
+++ b/e-util/e-source-selector-dialog.h
@@ -65,7 +65,7 @@ struct _ESourceSelectorDialogClass {
GtkDialogClass parent_class;
};
-GType e_source_selector_dialog_get_type (void);
+GType e_source_selector_dialog_get_type (void) G_GNUC_CONST;
GtkWidget * e_source_selector_dialog_new (GtkWindow *parent,
ESourceRegistry *registry,
const gchar *extension_name);
diff --git a/e-util/e-source-selector.h b/e-util/e-source-selector.h
index d4d92284fc..37ce0ef4b1 100644
--- a/e-util/e-source-selector.h
+++ b/e-util/e-source-selector.h
@@ -89,7 +89,7 @@ struct _ESourceSelectorClass {
gpointer padding3;
};
-GType e_source_selector_get_type (void);
+GType e_source_selector_get_type (void) G_GNUC_CONST;
GtkWidget * e_source_selector_new (ESourceRegistry *registry,
const gchar *extension_name);
ESourceRegistry *
diff --git a/e-util/e-spell-entry.h b/e-util/e-spell-entry.h
index 07c4c0d24d..5da4696168 100644
--- a/e-util/e-spell-entry.h
+++ b/e-util/e-spell-entry.h
@@ -25,38 +25,49 @@
#include <gtk/gtk.h>
-#define E_TYPE_SPELL_ENTRY (e_spell_entry_get_type())
-#define E_SPELL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), E_TYPE_SPELL_ENTRY, ESpellEntry))
-#define E_SPELL_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), E_TYPE_SPELL_ENTRY, ESpellEntryClass))
-#define E_IS_SPELL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), E_TYPE_SPELL_ENTRY))
-#define E_IS_SPELL_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), E_TYPE_SPELL_ENTRY))
-#define E_SPELL_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), E_TYPE_SPELL_ENTRY, ESpellEntryClass))
+/* Standard GObject macros */
+#define E_TYPE_SPELL_ENTRY \
+ (e_spell_entry_get_type())
+#define E_SPELL_ENTRY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_SPELL_ENTRY, ESpellEntry))
+#define E_SPELL_ENTRY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_SPELL_ENTRY, ESpellEntryClass))
+#define E_IS_SPELL_ENTRY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_SPELL_ENTRY))
+#define E_IS_SPELL_ENTRY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_SPELL_ENTRY))
+#define E_SPELL_ENTRY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_SPELL_ENTRY, ESpellEntryClass))
G_BEGIN_DECLS
-typedef struct _ESpellEntry ESpellEntry;
-typedef struct _ESpellEntryClass ESpellEntryClass;
-typedef struct _ESpellEntryPrivate ESpellEntryPrivate;
-
-struct _ESpellEntry
-{
- GtkEntry parent_object;
+typedef struct _ESpellEntry ESpellEntry;
+typedef struct _ESpellEntryClass ESpellEntryClass;
+typedef struct _ESpellEntryPrivate ESpellEntryPrivate;
+struct _ESpellEntry {
+ GtkEntry parent;
ESpellEntryPrivate *priv;
};
-struct _ESpellEntryClass
-{
+struct _ESpellEntryClass {
GtkEntryClass parent_class;
};
-GType e_spell_entry_get_type (void);
-GtkWidget * e_spell_entry_new (void);
-void e_spell_entry_set_languages (ESpellEntry *spell_entry,
- GList *languages);
-gboolean e_spell_entry_get_checking_enabled (ESpellEntry *spell_entry);
-void e_spell_entry_set_checking_enabled (ESpellEntry *spell_entry,
- gboolean enable_checking);
+GType e_spell_entry_get_type (void) G_GNUC_CONST;
+GtkWidget * e_spell_entry_new (void);
+void e_spell_entry_set_languages (ESpellEntry *spell_entry,
+ GList *languages);
+gboolean e_spell_entry_get_checking_enabled
+ (ESpellEntry *spell_entry);
+void e_spell_entry_set_checking_enabled
+ (ESpellEntry *spell_entry,
+ gboolean enable_checking);
G_END_DECLS
diff --git a/e-util/e-stock-request.h b/e-util/e-stock-request.h
index b482d7fada..bfca1ff020 100644
--- a/e-util/e-stock-request.h
+++ b/e-util/e-stock-request.h
@@ -62,7 +62,7 @@ struct _EStockRequestClass {
SoupRequestClass parent;
};
-GType e_stock_request_get_type (void) G_GNUC_CONST;
+GType e_stock_request_get_type (void) G_GNUC_CONST;
G_END_DECLS
diff --git a/e-util/e-table-config.h b/e-util/e-table-config.h
index 7fc74d9f27..ffbab7219e 100644
--- a/e-util/e-table-config.h
+++ b/e-util/e-table-config.h
@@ -122,7 +122,7 @@ ETableConfig * e_table_config_new (const gchar *header,
ETableSpecification *spec,
ETableState *state,
GtkWindow *parent_window);
-ETableConfig *e_table_config_construct (ETableConfig *etco,
+ETableConfig * e_table_config_construct (ETableConfig *etco,
const gchar *header,
ETableSpecification *spec,
ETableState *state,
diff --git a/e-util/e-table-extras.h b/e-util/e-table-extras.h
index 93acc4cea0..bc48b50b89 100644
--- a/e-util/e-table-extras.h
+++ b/e-util/e-table-extras.h
@@ -75,7 +75,8 @@ ECell * e_table_extras_get_cell (ETableExtras *extras,
void e_table_extras_add_compare (ETableExtras *extras,
const gchar *id,
GCompareDataFunc compare);
-GCompareDataFunc e_table_extras_get_compare (ETableExtras *extras,
+GCompareDataFunc
+ e_table_extras_get_compare (ETableExtras *extras,
const gchar *id);
void e_table_extras_add_search (ETableExtras *extras,
const gchar *id,
diff --git a/e-util/e-table-field-chooser-item.h b/e-util/e-table-field-chooser-item.h
index 08bfeb6729..aefc8bd334 100644
--- a/e-util/e-table-field-chooser-item.h
+++ b/e-util/e-table-field-chooser-item.h
@@ -58,32 +58,34 @@ typedef struct _ETableFieldChooserItem ETableFieldChooserItem;
typedef struct _ETableFieldChooserItemClass ETableFieldChooserItemClass;
struct _ETableFieldChooserItem {
- GnomeCanvasItem parent;
+ GnomeCanvasItem parent;
- ETableHeader *full_header;
- ETableHeader *header;
- ETableHeader *combined_header;
+ ETableHeader *full_header;
+ ETableHeader *header;
+ ETableHeader *combined_header;
- gdouble height, width;
+ gdouble height, width;
PangoFontDescription *font_desc;
/*
* Ids
*/
- gint full_header_structure_change_id, full_header_dimension_change_id;
- gint table_header_structure_change_id, table_header_dimension_change_id;
+ gint full_header_structure_change_id;
+ gint full_header_dimension_change_id;
+ gint table_header_structure_change_id;
+ gint table_header_dimension_change_id;
- gchar *dnd_code;
+ gchar *dnd_code;
/*
* For dragging columns
*/
- guint maybe_drag : 1;
- gint click_x, click_y;
- gint drag_col;
- guint drag_data_get_id;
- guint drag_end_id;
+ guint maybe_drag : 1;
+ gint click_x, click_y;
+ gint drag_col;
+ guint drag_data_get_id;
+ guint drag_end_id;
};
struct _ETableFieldChooserItemClass {
diff --git a/e-util/e-table-group-container.h b/e-util/e-table-group-container.h
index 3f6fb03b7a..2f1457d279 100644
--- a/e-util/e-table-group-container.h
+++ b/e-util/e-table-group-container.h
@@ -67,8 +67,8 @@ struct _ETableGroupContainer {
/*
* The ETableCol used to group this set
*/
- ETableCol *ecol;
- gint ascending;
+ ETableCol *ecol;
+ gint ascending;
/*
* List of ETableGroups we stack
diff --git a/e-util/e-table-header-item.h b/e-util/e-table-header-item.h
index 1cd0c717ab..a0b594aeb7 100644
--- a/e-util/e-table-header-item.h
+++ b/e-util/e-table-header-item.h
@@ -77,7 +77,7 @@ struct _ETableHeaderItem {
gint resize_start_pos;
gint resize_min_width;
- gpointer resize_guide;
+ gpointer resize_guide;
gint group_indent_width;
diff --git a/e-util/e-table-item.h b/e-util/e-table-item.h
index 09fdab90cc..04629b4af1 100644
--- a/e-util/e-table-item.h
+++ b/e-util/e-table-item.h
@@ -62,113 +62,113 @@ typedef struct _ETableItem ETableItem;
typedef struct _ETableItemClass ETableItemClass;
struct _ETableItem {
- GnomeCanvasItem parent;
- ETableModel *table_model;
- ETableHeader *header;
+ GnomeCanvasItem parent;
+ ETableModel *table_model;
+ ETableHeader *header;
- ETableModel *source_model;
+ ETableModel *source_model;
ESelectionModel *selection;
- gint minimum_width, width, height;
+ gint minimum_width, width, height;
- gint cols, rows;
+ gint cols, rows;
- gint click_count;
+ gint click_count;
/*
* Ids for the signals we connect to
*/
- gint header_dim_change_id;
- gint header_structure_change_id;
- gint header_request_width_id;
- gint table_model_pre_change_id;
- gint table_model_no_change_id;
- gint table_model_change_id;
- gint table_model_row_change_id;
- gint table_model_cell_change_id;
- gint table_model_rows_inserted_id;
- gint table_model_rows_deleted_id;
-
- gint selection_change_id;
- gint selection_row_change_id;
- gint cursor_change_id;
- gint cursor_activated_id;
-
- guint cursor_idle_id;
+ gint header_dim_change_id;
+ gint header_structure_change_id;
+ gint header_request_width_id;
+ gint table_model_pre_change_id;
+ gint table_model_no_change_id;
+ gint table_model_change_id;
+ gint table_model_row_change_id;
+ gint table_model_cell_change_id;
+ gint table_model_rows_inserted_id;
+ gint table_model_rows_deleted_id;
+
+ gint selection_change_id;
+ gint selection_row_change_id;
+ gint cursor_change_id;
+ gint cursor_activated_id;
+
+ guint cursor_idle_id;
/* View row, -1 means unknown */
- gint old_cursor_row;
+ gint old_cursor_row;
- guint alternating_row_colors : 1;
- guint horizontal_draw_grid : 1;
- guint vertical_draw_grid : 1;
- guint draw_focus : 1;
- guint uniform_row_height : 1;
- guint cell_views_realized : 1;
+ guint alternating_row_colors : 1;
+ guint horizontal_draw_grid : 1;
+ guint vertical_draw_grid : 1;
+ guint draw_focus : 1;
+ guint uniform_row_height : 1;
+ guint cell_views_realized : 1;
- guint needs_redraw : 1;
- guint needs_compute_height : 1;
- guint needs_compute_width : 1;
+ guint needs_redraw : 1;
+ guint needs_compute_height : 1;
+ guint needs_compute_width : 1;
- guint uses_source_model : 1;
+ guint uses_source_model : 1;
- guint in_key_press : 1;
+ guint in_key_press : 1;
- guint maybe_in_drag : 1;
- guint in_drag : 1;
- guint grabbed : 1;
+ guint maybe_in_drag : 1;
+ guint in_drag : 1;
+ guint grabbed : 1;
- guint maybe_did_something : 1;
+ guint maybe_did_something : 1;
- guint cursor_on_screen : 1;
- guint gtk_grabbed : 1;
+ guint cursor_on_screen : 1;
+ guint gtk_grabbed : 1;
- guint queue_show_cursor : 1;
- guint grab_cancelled : 1;
+ guint queue_show_cursor : 1;
+ guint grab_cancelled : 1;
- gint frozen_count;
+ gint frozen_count;
- gint cursor_x1;
- gint cursor_y1;
- gint cursor_x2;
- gint cursor_y2;
+ gint cursor_x1;
+ gint cursor_y1;
+ gint cursor_x2;
+ gint cursor_y2;
- gint drag_col;
- gint drag_row;
- gint drag_x;
- gint drag_y;
- guint drag_state;
+ gint drag_col;
+ gint drag_row;
+ gint drag_x;
+ gint drag_y;
+ guint drag_state;
/*
* Realized views, per column
*/
- ECellView **cell_views;
- gint n_cells;
+ ECellView **cell_views;
+ gint n_cells;
- gint *height_cache;
- gint uniform_row_height_cache;
- gint height_cache_idle_id;
- gint height_cache_idle_count;
+ gint *height_cache;
+ gint uniform_row_height_cache;
+ gint height_cache_idle_id;
+ gint height_cache_idle_count;
/*
* Lengh Threshold: above this, we stop computing correctly
* the size
*/
- gint length_threshold;
+ gint length_threshold;
- gint row_guess;
- ECursorMode cursor_mode;
+ gint row_guess;
+ ECursorMode cursor_mode;
- gint motion_col, motion_row;
+ gint motion_col, motion_row;
/*
* During editing
*/
- gint editing_col, editing_row;
- void *edit_ctx;
+ gint editing_col, editing_row;
+ void *edit_ctx;
- gint save_col, save_row;
- void *save_state;
+ gint save_col, save_row;
+ void *save_state;
gint grabbed_col, grabbed_row;
gint grabbed_count;
diff --git a/e-util/e-table-memory-callbacks.h b/e-util/e-table-memory-callbacks.h
index a71cac1d91..08c346f604 100644
--- a/e-util/e-table-memory-callbacks.h
+++ b/e-util/e-table-memory-callbacks.h
@@ -107,18 +107,18 @@ typedef gchar * (*ETableMemoryCallbacksValueToStringFn)
struct _ETableMemoryCallbacks {
ETableMemory parent;
- ETableMemoryCallbacksColumnCountFn col_count;
- ETableMemoryCallbacksAppendRowFn append_row;
+ ETableMemoryCallbacksColumnCountFn col_count;
+ ETableMemoryCallbacksAppendRowFn append_row;
- ETableMemoryCallbacksValueAtFn value_at;
- ETableMemoryCallbacksSetValueAtFn set_value_at;
- ETableMemoryCallbacksIsCellEditableFn is_cell_editable;
+ ETableMemoryCallbacksValueAtFn value_at;
+ ETableMemoryCallbacksSetValueAtFn set_value_at;
+ ETableMemoryCallbacksIsCellEditableFn is_cell_editable;
- ETableMemoryCallbacksDuplicateValueFn duplicate_value;
- ETableMemoryCallbacksFreeValueFn free_value;
+ ETableMemoryCallbacksDuplicateValueFn duplicate_value;
+ ETableMemoryCallbacksFreeValueFn free_value;
ETableMemoryCallbacksInitializeValueFn initialize_value;
- ETableMemoryCallbacksValueIsEmptyFn value_is_empty;
- ETableMemoryCallbacksValueToStringFn value_to_string;
+ ETableMemoryCallbacksValueIsEmptyFn value_is_empty;
+ ETableMemoryCallbacksValueToStringFn value_to_string;
gpointer data;
};
diff --git a/e-util/e-table-memory-store.h b/e-util/e-table-memory-store.h
index c8167f8608..89625d28be 100644
--- a/e-util/e-table-memory-store.h
+++ b/e-util/e-table-memory-store.h
@@ -62,17 +62,17 @@ typedef enum {
} ETableMemoryStoreColumnType;
typedef struct {
- ETableMemoryCallbacksDuplicateValueFn duplicate_value;
- ETableMemoryCallbacksFreeValueFn free_value;
+ ETableMemoryCallbacksDuplicateValueFn duplicate_value;
+ ETableMemoryCallbacksFreeValueFn free_value;
ETableMemoryCallbacksInitializeValueFn initialize_value;
- ETableMemoryCallbacksValueIsEmptyFn value_is_empty;
- ETableMemoryCallbacksValueToStringFn value_to_string;
+ ETableMemoryCallbacksValueIsEmptyFn value_is_empty;
+ ETableMemoryCallbacksValueToStringFn value_to_string;
} ETableMemoryStoreCustomColumn;
typedef struct {
- ETableMemoryStoreColumnType type;
+ ETableMemoryStoreColumnType type;
ETableMemoryStoreCustomColumn custom;
- guint editable : 1;
+ guint editable : 1;
} ETableMemoryStoreColumnInfo;
#define E_TABLE_MEMORY_STORE_TERMINATOR \
diff --git a/e-util/e-table-selection-model.c b/e-util/e-table-selection-model.c
index abe4b0c3ff..bea728762c 100644
--- a/e-util/e-table-selection-model.c
+++ b/e-util/e-table-selection-model.c
@@ -32,7 +32,10 @@
#include "e-table-selection-model.h"
-G_DEFINE_TYPE (ETableSelectionModel, e_table_selection_model, E_SELECTION_MODEL_ARRAY_TYPE)
+G_DEFINE_TYPE (
+ ETableSelectionModel,
+ e_table_selection_model,
+ E_TYPE_SELECTION_MODEL_ARRAY)
static gint etsm_get_row_count (ESelectionModelArray *esm);
diff --git a/e-util/e-table-sorter.c b/e-util/e-table-sorter.c
index 5fdc077503..f67b635cb8 100644
--- a/e-util/e-table-sorter.c
+++ b/e-util/e-table-sorter.c
@@ -41,7 +41,7 @@ enum {
/* workaround for avoiding API breakage */
#define ets_get_type e_table_sorter_get_type
-G_DEFINE_TYPE (ETableSorter, ets, E_SORTER_TYPE)
+G_DEFINE_TYPE (ETableSorter, ets, E_TYPE_SORTER)
#define INCREMENT_AMOUNT 100
diff --git a/e-util/e-table.h b/e-util/e-table.h
index 8370e440df..3509888a69 100644
--- a/e-util/e-table.h
+++ b/e-util/e-table.h
@@ -293,7 +293,7 @@ GtkWidget * e_table_new_from_spec_file (ETableModel *etm,
gchar * e_table_get_state (ETable *e_table);
void e_table_save_state (ETable *e_table,
const gchar *filename);
-ETableState *e_table_get_state_object (ETable *e_table);
+ETableState * e_table_get_state_object (ETable *e_table);
/* note that it is more efficient to provide the state at creation time */
void e_table_set_state (ETable *e_table,
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
index c734cf84d4..1fa8c6f13a 100644
--- a/e-util/e-text-event-processor-emacs-like.c
+++ b/e-util/e-text-event-processor-emacs-like.c
@@ -37,7 +37,7 @@ static gint e_text_event_processor_emacs_like_event
G_DEFINE_TYPE (
ETextEventProcessorEmacsLike,
e_text_event_processor_emacs_like,
- E_TEXT_EVENT_PROCESSOR_TYPE)
+ E_TYPE_TEXT_EVENT_PROCESSOR)
static const ETextEventProcessorCommand control_keys[26] = {
{ E_TEP_START_OF_LINE, E_TEP_MOVE, 0, "" }, /* a */
@@ -560,6 +560,6 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep,
ETextEventProcessor *
e_text_event_processor_emacs_like_new (void)
{
- return g_object_new (E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, NULL);
+ return g_object_new (E_TYPE_TEXT_EVENT_PROCESSOR_EMACS_LIKE, NULL);
}
diff --git a/e-util/e-text-event-processor-emacs-like.h b/e-util/e-text-event-processor-emacs-like.h
index 5a8890d519..ed6df5b8d1 100644
--- a/e-util/e-text-event-processor-emacs-like.h
+++ b/e-util/e-text-event-processor-emacs-like.h
@@ -21,46 +21,58 @@
*
*/
+/* ETextEventProcessorEmacsLike - Turns events on a text widget into commands.
+ * Uses an emacs-ish interface. */
+
#if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__
-#define __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__
+#ifndef E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H
+#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H
#include <e-util/e-text-event-processor.h>
-G_BEGIN_DECLS
-
-/* ETextEventProcessorEmacsLike - Turns events on a text widget into commands. Uses an emacs-ish interface.
- *
- */
+/* Standard GObject macros */
+#define E_TYPE_TEXT_EVENT_PROCESSOR_EMACS_LIKE \
+ (e_text_event_processor_emacs_like_get_type ())
+#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_TEXT_EVENT_PROCESSOR_EMACS_LIKE, ETextEventProcessorEmacsLike))
+#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_TEXT_EVENT_PROCESSOR_EMACS_LIKE, ETextEventProcessorEmacsLikeClass))
+#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_TEXT_EVENT_PROCESSOR_EMACS_LIKE))
+#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_TEXT_EVENT_PROCESSOR_EMACS_LIKE))
+#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_TEXT_EVENT_PROCESSOR_EMACS_LIKE, ETextEventProcessorEmacsLikeClass))
-#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE (e_text_event_processor_emacs_like_get_type ())
-#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, ETextEventProcessorEmacsLike))
-#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, ETextEventProcessorEmacsLikeClass))
-#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE))
-#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE))
+G_BEGIN_DECLS
typedef struct _ETextEventProcessorEmacsLike ETextEventProcessorEmacsLike;
typedef struct _ETextEventProcessorEmacsLikeClass ETextEventProcessorEmacsLikeClass;
-struct _ETextEventProcessorEmacsLike
-{
+struct _ETextEventProcessorEmacsLike {
ETextEventProcessor parent;
/* object specific fields */
guint mouse_down : 1;
};
-struct _ETextEventProcessorEmacsLikeClass
-{
+struct _ETextEventProcessorEmacsLikeClass {
ETextEventProcessorClass parent_class;
};
-GType e_text_event_processor_emacs_like_get_type (void);
-ETextEventProcessor *e_text_event_processor_emacs_like_new (void);
+GType e_text_event_processor_emacs_like_get_type
+ (void) G_GNUC_CONST;
+ETextEventProcessor *
+ e_text_event_processor_emacs_like_new (void);
G_END_DECLS
-#endif /* __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__ */
+#endif /* E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H */
diff --git a/e-util/e-text-event-processor-types.h b/e-util/e-text-event-processor-types.h
index cf7da4f5aa..ab60c11caf 100644
--- a/e-util/e-text-event-processor-types.h
+++ b/e-util/e-text-event-processor-types.h
@@ -25,8 +25,8 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef __E_TEXT_EVENT_PROCESSOR_TYPES_H__
-#define __E_TEXT_EVENT_PROCESSOR_TYPES_H__
+#ifndef E_TEXT_EVENT_PROCESSOR_TYPES_H
+#define E_TEXT_EVENT_PROCESSOR_TYPES_H
#include <gtk/gtk.h>
@@ -133,4 +133,4 @@ typedef enum _ETextEventProcessorCaps {
G_END_DECLS
-#endif /* __E_TEXT_EVENT_PROCESSOR_TYPES_H__ */
+#endif /* E_TEXT_EVENT_PROCESSOR_TYPES_H */
diff --git a/e-util/e-text-event-processor.h b/e-util/e-text-event-processor.h
index 203e2de236..8eef9fcf96 100644
--- a/e-util/e-text-event-processor.h
+++ b/e-util/e-text-event-processor.h
@@ -20,53 +20,67 @@
*
*/
+/* ETextEventProcessor - Turns events on a text widget into commands. */
+
#if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef __E_TEXT_EVENT_PROCESSOR_H__
-#define __E_TEXT_EVENT_PROCESSOR_H__
+#ifndef E_TEXT_EVENT_PROCESSOR_H
+#define E_TEXT_EVENT_PROCESSOR_H
#include <gtk/gtk.h>
#include <e-util/e-text-event-processor-types.h>
-G_BEGIN_DECLS
+/* Standard GObject macros */
+#define E_TYPE_TEXT_EVENT_PROCESSOR \
+ (e_text_event_processor_get_type ())
+#define E_TEXT_EVENT_PROCESSOR(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_TEXT_EVENT_PROCESSOR, ETextEventProcessor))
+#define E_TEXT_EVENT_PROCESSOR_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_TEXT_EVENT_PROCESSOR, ETextEventProcessorClass))
+#define E_IS_TEXT_EVENT_PROCESSOR(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_TEXT_EVENT_PROCESSOR))
+#define E_IS_TEXT_EVENT_PROCESSOR_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((obj), E_TYPE_TEXT_EVENT_PROCESSOR))
+#define E_TEXT_EVENT_PROCESSOR_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_TEXT_EVENT_PROCESSOR, ETextEventProcessorClass))
-/* ETextEventProcessor - Turns events on a text widget into commands.
- *
- */
+G_BEGIN_DECLS
-#define E_TEXT_EVENT_PROCESSOR_TYPE (e_text_event_processor_get_type ())
-#define E_TEXT_EVENT_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessor))
-#define E_TEXT_EVENT_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessorClass))
-#define E_IS_TEXT_EVENT_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_TYPE))
-#define E_IS_TEXT_EVENT_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_TYPE))
-#define E_TEXT_EVENT_PROCESSOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessorClass))
-typedef struct _ETextEventProcessor ETextEventProcessor;
+typedef struct _ETextEventProcessor ETextEventProcessor;
typedef struct _ETextEventProcessorClass ETextEventProcessorClass;
-struct _ETextEventProcessor
-{
+struct _ETextEventProcessor {
GObject parent;
/* object specific fields */
guint allow_newlines : 1;
};
-struct _ETextEventProcessorClass
-{
+struct _ETextEventProcessorClass {
GObjectClass parent_class;
/* signals */
- void (* command) (ETextEventProcessor *tep, ETextEventProcessorCommand *command);
+ void (*command) (ETextEventProcessor *tep,
+ ETextEventProcessorCommand *command);
/* virtual functions */
- gint (* event) (ETextEventProcessor *tep, ETextEventProcessorEvent *event);
+ gint (*event) (ETextEventProcessor *tep,
+ ETextEventProcessorEvent *event);
};
-GType e_text_event_processor_get_type (void);
-gint e_text_event_processor_handle_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event);
+GType e_text_event_processor_get_type
+ (void) G_GNUC_CONST;
+gint e_text_event_processor_handle_event
+ (ETextEventProcessor *tep,
+ ETextEventProcessorEvent *event);
G_END_DECLS
-#endif /* __E_TEXT_EVENT_PROCESSOR_H__ */
+#endif /* E_TEXT_EVENT_PROCESSOR_H */
diff --git a/e-util/e-text-model.h b/e-util/e-text-model.h
index 3426c183e2..4b0914e97a 100644
--- a/e-util/e-text-model.h
+++ b/e-util/e-text-model.h
@@ -29,14 +29,26 @@
#include <glib-object.h>
-G_BEGIN_DECLS
+/* Standard GObject macros */
+#define E_TYPE_TEXT_MODEL \
+ (e_text_model_get_type ())
+#define E_TEXT_MODEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_TEXT_MODEL, ETextModel))
+#define E_TEXT_MODEL_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_TEXT_MODEL, ETextModelClass))
+#define E_IS_TEXT_MODEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_TEXT_MODEL))
+#define E_IS_TEXT_MODEL_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_TEXT_MODEL))
+#define E_TEXT_MODEL_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_TEXT_MODEL_TYPE, ETextModelClass))
-#define E_TYPE_TEXT_MODEL (e_text_model_get_type ())
-#define E_TEXT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_TEXT_MODEL, ETextModel))
-#define E_TEXT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_TEXT_MODEL, ETextModelClass))
-#define E_IS_TEXT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_TEXT_MODEL))
-#define E_IS_TEXT_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_TEXT_MODEL))
-#define E_TEXT_MODEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), E_TYPE_TEXT_MODEL_TYPE, ETextModelClass))
+G_BEGIN_DECLS
typedef struct _ETextModel ETextModel;
typedef struct _ETextModelClass ETextModelClass;
@@ -46,7 +58,6 @@ typedef gint (*ETextModelReposFn) (gint, gpointer);
struct _ETextModel {
GObject item;
-
ETextModelPrivate *priv;
};
@@ -54,59 +65,91 @@ struct _ETextModelClass {
GObjectClass parent_class;
/* Signal */
- void (* changed) (ETextModel *model);
- void (* reposition) (ETextModel *model, ETextModelReposFn fn, gpointer repos_fn_data);
- void (* object_activated) (ETextModel *model, gint obj_num);
- void (* cancel_completion) (ETextModel *model);
+ void (*changed) (ETextModel *model);
+ void (*reposition) (ETextModel *model,
+ ETextModelReposFn fn,
+ gpointer repos_fn_data);
+ void (*object_activated) (ETextModel *model,
+ gint obj_num);
+ void (*cancel_completion) (ETextModel *model);
/* Virtual methods */
- gint (* validate_pos) (ETextModel *model, gint pos);
-
- const gchar *(* get_text) (ETextModel *model);
- gint (* get_text_len) (ETextModel *model);
- void (* set_text) (ETextModel *model, const gchar *text);
- void (* insert) (ETextModel *model, gint position, const gchar *text);
- void (* insert_length) (ETextModel *model, gint position, const gchar *text, gint length);
- void (* delete) (ETextModel *model, gint position, gint length);
-
- void (* objectify) (ETextModel *model);
- gint (* obj_count) (ETextModel *model);
- const gchar *(* get_nth_obj) (ETextModel *model, gint n, gint *len);
- gint (* obj_at_offset) (ETextModel *model, gint offset);
+ gint (*validate_pos) (ETextModel *model,
+ gint pos);
+
+ const gchar * (*get_text) (ETextModel *model);
+ gint (*get_text_len) (ETextModel *model);
+ void (*set_text) (ETextModel *model,
+ const gchar *text);
+ void (*insert) (ETextModel *model,
+ gint position,
+ const gchar *text);
+ void (*insert_length) (ETextModel *model,
+ gint position,
+ const gchar *text,
+ gint length);
+ void (*delete) (ETextModel *model,
+ gint position,
+ gint length);
+
+ void (*objectify) (ETextModel *model);
+ gint (*obj_count) (ETextModel *model);
+ const gchar * (*get_nth_obj) (ETextModel *model,
+ gint n,
+ gint *len);
+ gint (*obj_at_offset) (ETextModel *model,
+ gint offset);
};
-GType e_text_model_get_type (void);
-
-ETextModel *e_text_model_new (void);
-
-void e_text_model_changed (ETextModel *model);
-void e_text_model_cancel_completion (ETextModel *model);
-
-void e_text_model_reposition (ETextModel *model, ETextModelReposFn fn, gpointer repos_data);
-gint e_text_model_validate_position (ETextModel *model, gint pos);
-
-/* Functions for manipulating the underlying text. */
-
-const gchar *e_text_model_get_text (ETextModel *model);
-gint e_text_model_get_text_length (ETextModel *model);
-void e_text_model_set_text (ETextModel *model, const gchar *text);
-void e_text_model_insert (ETextModel *model, gint position, const gchar *text);
-void e_text_model_insert_length (ETextModel *model, gint position, const gchar *text, gint length);
-void e_text_model_prepend (ETextModel *model, const gchar *text);
-void e_text_model_append (ETextModel *model, const gchar *text);
-void e_text_model_delete (ETextModel *model, gint position, gint length);
-
-/* Functions for accessing embedded objects. */
-
-gint e_text_model_object_count (ETextModel *model);
-const gchar *e_text_model_get_nth_object (ETextModel *model, gint n, gint *len);
-gchar *e_text_model_strdup_nth_object (ETextModel *model, gint n);
-void e_text_model_get_nth_object_bounds (ETextModel *model, gint n, gint *start_pos, gint *end_pos);
-gint e_text_model_get_object_at_offset (ETextModel *model, gint offset);
-gint e_text_model_get_object_at_pointer (ETextModel *model, const gchar *c);
-void e_text_model_activate_nth_object (ETextModel *model, gint n);
+GType e_text_model_get_type (void) G_GNUC_CONST;
+ETextModel * e_text_model_new (void);
+void e_text_model_changed (ETextModel *model);
+void e_text_model_cancel_completion (ETextModel *model);
+void e_text_model_reposition (ETextModel *model,
+ ETextModelReposFn fn,
+ gpointer repos_data);
+gint e_text_model_validate_position (ETextModel *model,
+ gint pos);
+const gchar * e_text_model_get_text (ETextModel *model);
+gint e_text_model_get_text_length (ETextModel *model);
+void e_text_model_set_text (ETextModel *model,
+ const gchar *text);
+void e_text_model_insert (ETextModel *model,
+ gint position,
+ const gchar *text);
+void e_text_model_insert_length (ETextModel *model,
+ gint position,
+ const gchar *text,
+ gint length);
+void e_text_model_prepend (ETextModel *model,
+ const gchar *text);
+void e_text_model_append (ETextModel *model,
+ const gchar *text);
+void e_text_model_delete (ETextModel *model,
+ gint position,
+ gint length);
+gint e_text_model_object_count (ETextModel *model);
+const gchar * e_text_model_get_nth_object (ETextModel *model,
+ gint n,
+ gint *len);
+gchar * e_text_model_strdup_nth_object (ETextModel *model,
+ gint n);
+void e_text_model_get_nth_object_bounds
+ (ETextModel *model,
+ gint n,
+ gint *start_pos,
+ gint *end_pos);
+gint e_text_model_get_object_at_offset
+ (ETextModel *model,
+ gint offset);
+gint e_text_model_get_object_at_pointer
+ (ETextModel *model,
+ const gchar *c);
+void e_text_model_activate_nth_object
+ (ETextModel *model,
+ gint n);
G_END_DECLS
-#endif
+#endif /* E_TEXT_MODEL_H */
diff --git a/e-util/e-text.c b/e-util/e-text.c
index d23decad86..574f5e1903 100644
--- a/e-util/e-text.c
+++ b/e-util/e-text.c
@@ -2985,7 +2985,7 @@ e_text_class_init (ETextClass *class)
"event_processor",
"Event Processor",
"Event Processor",
- E_TEXT_EVENT_PROCESSOR_TYPE,
+ E_TYPE_TEXT_EVENT_PROCESSOR,
G_PARAM_READWRITE));
g_object_class_install_property (
diff --git a/e-util/e-text.h b/e-util/e-text.h
index 40e92bf585..921ee4d22d 100644
--- a/e-util/e-text.h
+++ b/e-util/e-text.h
@@ -48,8 +48,6 @@
#include <e-util/e-text-event-processor.h>
#include <e-util/e-text-model.h>
-G_BEGIN_DECLS
-
/* Text item for the canvas. Text items are positioned by an anchor point and an anchor direction.
*
* A clipping rectangle may be specified for the text. The rectangle is anchored at the text's anchor
@@ -89,11 +87,26 @@ G_BEGIN_DECLS
* max_lines gint RW Number of lines possible when doing line wrap.
*/
-#define E_TYPE_TEXT (e_text_get_type ())
-#define E_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_TEXT, EText))
-#define E_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_TEXT, ETextClass))
-#define E_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_TEXT))
-#define E_IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_TEXT))
+/* Standard GObject macros */
+#define E_TYPE_TEXT \
+ (e_text_get_type ())
+#define E_TEXT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_TEXT, EText))
+#define E_TEXT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_TEXT, ETextClass))
+#define E_IS_TEXT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_TEXT))
+#define E_IS_TEXT_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_TEXT))
+#define E_TEXT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_TEXT, ETextClass))
+
+G_BEGIN_DECLS
typedef struct _EText EText;
typedef struct _ETextClass ETextClass;
@@ -196,16 +209,16 @@ struct _EText {
gint dbl_timeout; /* Double click timeout */
gint tpl_timeout; /* Triple click timeout */
- gint last_type_request; /* Last selection type requested. */
- guint32 last_time_request; /* The time of the last selection request. */
- GdkAtom last_selection_request; /* The time of the last selection request. */
- GList *queued_requests; /* Queued selection requests. */
+ gint last_type_request; /* Last selection type requested. */
+ guint32 last_time_request; /* The time of the last selection request. */
+ GdkAtom last_selection_request; /* The time of the last selection request. */
+ GList *queued_requests; /* Queued selection requests. */
GtkIMContext *im_context;
- gboolean need_im_reset;
- gboolean im_context_signals_registered;
+ gboolean need_im_reset;
+ gboolean im_context_signals_registered;
- gboolean handle_popup;
+ gboolean handle_popup;
PangoFontDescription *font_desc;
};
@@ -213,24 +226,29 @@ struct _EText {
struct _ETextClass {
GnomeCanvasItemClass parent_class;
- void (* changed) (EText *text);
- void (* activate) (EText *text);
- void (* keypress) (EText *text, guint keyval, guint state);
- void (* populate_popup) (EText *text, GdkEvent *button_event, gint pos, GtkMenu *menu);
- void (* style_set) (EText *text, GtkStyle *previous_style);
+ void (*changed) (EText *text);
+ void (*activate) (EText *text);
+ void (*keypress) (EText *text,
+ guint keyval,
+ guint state);
+ void (*populate_popup) (EText *text,
+ GdkEvent *button_event,
+ gint pos,
+ GtkMenu *menu);
+ void (*style_set) (EText *text,
+ GtkStyle *previous_style);
};
-/* Standard Gtk function */
-GType e_text_get_type (void);
-void e_text_cancel_editing (EText *text);
-void e_text_stop_editing (EText *text);
-
-void e_text_delete_selection (EText *text);
-void e_text_cut_clipboard (EText *text);
-void e_text_copy_clipboard (EText *text);
-void e_text_paste_clipboard (EText *text);
-void e_text_select_all (EText *text);
+GType e_text_get_type (void) G_GNUC_CONST;
+void e_text_cancel_editing (EText *text);
+void e_text_stop_editing (EText *text);
+void e_text_delete_selection (EText *text);
+void e_text_cut_clipboard (EText *text);
+void e_text_copy_clipboard (EText *text);
+void e_text_paste_clipboard (EText *text);
+void e_text_select_all (EText *text);
G_END_DECLS
-#endif
+#endif /* E_TEXT_H */
+
diff --git a/e-util/e-timezone-dialog.h b/e-util/e-timezone-dialog.h
index df87e80941..fbf08f39d9 100644
--- a/e-util/e-timezone-dialog.h
+++ b/e-util/e-timezone-dialog.h
@@ -64,7 +64,7 @@ struct _ETimezoneDialogClass {
GObjectClass parent_class;
};
-GType e_timezone_dialog_get_type (void);
+GType e_timezone_dialog_get_type (void) G_GNUC_CONST;
ETimezoneDialog *
e_timezone_dialog_construct (ETimezoneDialog *etd);
ETimezoneDialog *
diff --git a/e-util/e-tree-model-generator.h b/e-util/e-tree-model-generator.h
index e85a1adc12..7dbb9455f7 100644
--- a/e-util/e-tree-model-generator.h
+++ b/e-util/e-tree-model-generator.h
@@ -69,7 +69,7 @@ struct _ETreeModelGeneratorClass {
GObjectClass parent_class;
};
-GType e_tree_model_generator_get_type (void);
+GType e_tree_model_generator_get_type (void) G_GNUC_CONST;
ETreeModelGenerator *
e_tree_model_generator_new (GtkTreeModel *child_model);
GtkTreeModel * e_tree_model_generator_get_model (ETreeModelGenerator *tree_model_generator);
diff --git a/e-util/e-tree-model.h b/e-util/e-tree-model.h
index 1d02615a45..56b0474239 100644
--- a/e-util/e-tree-model.h
+++ b/e-util/e-tree-model.h
@@ -57,9 +57,6 @@ typedef gpointer ETreePath;
typedef struct _ETreeModel ETreeModel;
typedef struct _ETreeModelClass ETreeModelClass;
-typedef gint (*ETreePathCompareFunc) (ETreeModel *model,
- ETreePath path1,
- ETreePath path2);
typedef gboolean (*ETreePathFunc) (ETreeModel *model,
ETreePath path,
gpointer data);
@@ -222,10 +219,10 @@ gboolean e_tree_model_has_get_node_by_id (ETreeModel *model);
ETreePath e_tree_model_get_node_by_id (ETreeModel *model,
const gchar *save_id);
gboolean e_tree_model_has_change_pending (ETreeModel *model);
-void *e_tree_model_sort_value_at (ETreeModel *etree,
+gpointer e_tree_model_sort_value_at (ETreeModel *etree,
ETreePath node,
gint col);
-void *e_tree_model_value_at (ETreeModel *etree,
+gpointer e_tree_model_value_at (ETreeModel *etree,
ETreePath node,
gint col);
void e_tree_model_set_value_at (ETreeModel *etree,
@@ -235,13 +232,13 @@ void e_tree_model_set_value_at (ETreeModel *etree,
gboolean e_tree_model_node_is_editable (ETreeModel *etree,
ETreePath node,
gint col);
-void *e_tree_model_duplicate_value (ETreeModel *etree,
+gpointer e_tree_model_duplicate_value (ETreeModel *etree,
gint col,
gconstpointer value);
void e_tree_model_free_value (ETreeModel *etree,
gint col,
gpointer value);
-void *e_tree_model_initialize_value (ETreeModel *etree,
+gpointer e_tree_model_initialize_value (ETreeModel *etree,
gint col);
gboolean e_tree_model_value_is_empty (ETreeModel *etree,
gint col,
diff --git a/e-util/e-tree.c b/e-util/e-tree.c
index ee451cd28a..139171c07d 100644
--- a/e-util/e-tree.c
+++ b/e-util/e-tree.c
@@ -44,16 +44,11 @@
#include "e-table-sort-info.h"
#include "e-table-utils.h"
#include "e-text.h"
+#include "e-tree-selection-model.h"
#include "e-tree-table-adapter.h"
#include "e-tree.h"
#include "gal-a11y-e-tree.h"
-#ifdef E_TREE_USE_TREE_SELECTION
-#include "e-tree-selection-model.h"
-#else
-#include "e-table-selection-model.h"
-#endif
-
#define COLUMN_HEADER_HEIGHT 16
#define d(x)
@@ -62,6 +57,8 @@
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_TREE, ETreePrivate))
+typedef struct _ETreeDragSourceSite ETreeDragSourceSite;
+
enum {
CURSOR_CHANGE,
CURSOR_ACTIVATED,
@@ -628,13 +625,8 @@ e_tree_init (ETree *e_tree)
e_tree->priv->drag_row = -1;
e_tree->priv->drag_col = -1;
-#ifdef E_TREE_USE_TREE_SELECTION
e_tree->priv->selection =
E_SELECTION_MODEL (e_tree_selection_model_new ());
-#else
- e_tree->priv->selection =
- E_SELECTION_MODEL (e_table_selection_model_new ());
-#endif
e_tree->priv->search = e_table_search_new ();
@@ -1625,12 +1617,8 @@ et_real_construct (ETree *e_tree,
g_object_set (
e_tree->priv->selection,
"sorter", e_tree->priv->sorter,
-#ifdef E_TREE_USE_TREE_SELECTION
"model", e_tree->priv->model,
"etta", e_tree->priv->etta,
-#else
- "model", e_tree->priv->etta,
-#endif
"selection_mode", specification->selection_mode,
"cursor_mode", specification->cursor_mode,
NULL);
@@ -1910,53 +1898,21 @@ void
e_tree_set_cursor (ETree *e_tree,
ETreePath path)
{
-#ifndef E_TREE_USE_TREE_SELECTION
- gint row;
-#endif
g_return_if_fail (e_tree != NULL);
g_return_if_fail (E_IS_TREE (e_tree));
g_return_if_fail (path != NULL);
-#ifdef E_TREE_USE_TREE_SELECTION
e_tree_selection_model_select_single_path (
E_TREE_SELECTION_MODEL (e_tree->priv->selection), path);
e_tree_selection_model_change_cursor (
E_TREE_SELECTION_MODEL (e_tree->priv->selection), path);
-#else
- row = e_tree_table_adapter_row_of_node (
- E_TREE_TABLE_ADAPTER (e_tree->priv->etta), path);
-
- if (row == -1)
- return;
-
- g_object_set (
- e_tree->priv->selection,
- "cursor_row", row,
- NULL);
-#endif
}
ETreePath
e_tree_get_cursor (ETree *e_tree)
{
-#ifdef E_TREE_USE_TREE_SELECTION
return e_tree_selection_model_get_cursor (
E_TREE_SELECTION_MODEL (e_tree->priv->selection));
-#else
- gint row;
- g_return_val_if_fail (e_tree != NULL, NULL);
- g_return_val_if_fail (E_IS_TREE (e_tree), NULL);
-
- g_object_get (
- e_tree->priv->selection,
- "cursor_row", &row,
- NULL);
- if (row == -1)
- return NULL;
-
- return e_tree_table_adapter_node_at_row (
- E_TREE_TABLE_ADAPTER (e_tree->priv->etta), row);
-#endif
}
void
@@ -1972,7 +1928,6 @@ e_tree_selected_row_foreach (ETree *e_tree,
closure);
}
-#ifdef E_TREE_USE_TREE_SELECTION
void
e_tree_selected_path_foreach (ETree *e_tree,
ETreeForeachFunc callback,
@@ -2021,7 +1976,6 @@ e_tree_path_foreach (ETree *e_tree,
callback,
closure);
}
-#endif
EPrintable *
e_tree_get_printable (ETree *e_tree)
diff --git a/e-util/e-tree.h b/e-util/e-tree.h
index 1d6243cc61..ace9aedb39 100644
--- a/e-util/e-tree.h
+++ b/e-util/e-tree.h
@@ -38,12 +38,7 @@
#include <e-util/e-table-state.h>
#include <e-util/e-tree-model.h>
#include <e-util/e-tree-table-adapter.h>
-
-#define E_TREE_USE_TREE_SELECTION
-
-#ifdef E_TREE_USE_TREE_SELECTION
#include <e-util/e-tree-selection-model.h>
-#endif
/* Standard GObject macros */
#define E_TYPE_TREE \
@@ -66,8 +61,6 @@
G_BEGIN_DECLS
-typedef struct _ETreeDragSourceSite ETreeDragSourceSite;
-
typedef struct _ETree ETree;
typedef struct _ETreeClass ETreeClass;
typedef struct _ETreePrivate ETreePrivate;
@@ -227,15 +220,13 @@ ETreePath e_tree_get_cursor (ETree *e_tree);
void e_tree_selected_row_foreach (ETree *e_tree,
EForeachFunc callback,
gpointer closure);
-#ifdef E_TREE_USE_TREE_SELECTION
void e_tree_selected_path_foreach (ETree *e_tree,
ETreeForeachFunc callback,
gpointer closure);
void e_tree_path_foreach (ETree *e_tree,
ETreeForeachFunc callback,
gpointer closure);
-#endif
-EPrintable *e_tree_get_printable (ETree *e_tree);
+EPrintable * e_tree_get_printable (ETree *e_tree);
gint e_tree_get_next_row (ETree *e_tree,
gint model_row);
gint e_tree_get_prev_row (ETree *e_tree,
diff --git a/e-util/e-ui-manager.h b/e-util/e-ui-manager.h
index 4c295888d0..65948d1678 100644
--- a/e-util/e-ui-manager.h
+++ b/e-util/e-ui-manager.h
@@ -62,7 +62,7 @@ struct _EUIManagerClass {
const gchar *ui_definition);
};
-GType e_ui_manager_get_type (void);
+GType e_ui_manager_get_type (void) G_GNUC_CONST;
GtkUIManager * e_ui_manager_new (void);
gboolean e_ui_manager_get_express_mode (EUIManager *ui_manager);
void e_ui_manager_set_express_mode (EUIManager *ui_manager,
diff --git a/e-util/e-unicode.h b/e-util/e-unicode.h
index 2901744f8b..1ddbc7dc53 100644
--- a/e-util/e-unicode.h
+++ b/e-util/e-unicode.h
@@ -26,8 +26,8 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _E_UNICODE_H_
-#define _E_UNICODE_H_
+#ifndef E_UNICODE_H
+#define E_UNICODE_H
#include <sys/types.h>
#include <gtk/gtk.h>
@@ -36,34 +36,35 @@
G_BEGIN_DECLS
-gchar *e_utf8_from_gtk_event_key (GtkWidget *widget,
- guint keyval,
- const gchar *string);
-gchar *e_utf8_from_iconv_string_sized (iconv_t ic,
- const gchar *string,
- gint bytes);
-gchar *e_utf8_to_iconv_string_sized (iconv_t ic,
- const gchar *string,
- gint bytes);
-gchar *e_utf8_to_charset_string_sized (const gchar *charset,
- const gchar *string,
- gint bytes);
-gchar *e_utf8_from_locale_string_sized (const gchar *string,
- gint bytes);
-gchar *e_utf8_ensure_valid (const gchar *string);
+gchar * e_utf8_from_gtk_event_key (GtkWidget *widget,
+ guint keyval,
+ const gchar *string);
+gchar * e_utf8_from_iconv_string_sized (iconv_t ic,
+ const gchar *string,
+ gint bytes);
+gchar * e_utf8_to_iconv_string_sized (iconv_t ic,
+ const gchar *string,
+ gint bytes);
+gchar * e_utf8_to_charset_string_sized (const gchar *charset,
+ const gchar *string,
+ gint bytes);
+gchar * e_utf8_from_locale_string_sized (const gchar *string,
+ gint bytes);
+gchar * e_utf8_ensure_valid (const gchar *string);
/*
* These are simple wrappers that save us some typing
*/
/* NB! This return newly allocated string, not const as gtk+ one */
-gint e_unichar_to_utf8 (gint c,
- gchar *outbuf);
-gchar *e_unicode_get_utf8 (const gchar *text,
- gunichar *out);
-gchar *e_xml_get_translated_utf8_string_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
+gint e_unichar_to_utf8 (gint c,
+ gchar *outbuf);
+gchar * e_unicode_get_utf8 (const gchar *text,
+ gunichar *out);
+gchar * e_xml_get_translated_utf8_string_prop_by_name
+ (const xmlNode *parent,
+ const xmlChar *prop_name);
G_END_DECLS
-#endif
+#endif /* E_UNICODE_H */
diff --git a/e-util/e-url-entry.h b/e-util/e-url-entry.h
index 0925287b63..af1b95d639 100644
--- a/e-util/e-url-entry.h
+++ b/e-util/e-url-entry.h
@@ -24,26 +24,38 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _E_URL_ENTRY_H_
-#define _E_URL_ENTRY_H_
+#ifndef E_URL_ENTRY_H
+#define E_URL_ENTRY_H
#include <gtk/gtk.h>
-G_BEGIN_DECLS
+/* Standard GObject macros */
+#define E_TYPE_URL_ENTRY \
+ (e_url_entry_get_type ())
+#define E_URL_ENTRY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_URL_ENTRY, EUrlEntry))
+#define E_URL_ENTRY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_URL_ENTRY, EUrlEntryClass))
+#define E_IS_URL_ENTRY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_URL_ENTRY))
+#define E_IS_URL_ENTRY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_URL_ENTRY))
+#define E_URL_ENTRY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_URL_ENTRY, EUrlEntryClass))
-#define E_TYPE_URL_ENTRY (e_url_entry_get_type ())
-#define E_URL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_URL_ENTRY, EUrlEntry))
-#define E_URL_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_URL_ENTRY, EUrlEntryClass))
-#define E_IS_URL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_URL_ENTRY))
-#define E_IS_URL_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_URL_ENTRY))
+G_BEGIN_DECLS
-typedef struct _EUrlEntry EUrlEntry;
+typedef struct _EUrlEntry EUrlEntry;
+typedef struct _EUrlEntryClass EUrlEntryClass;
typedef struct _EUrlEntryPrivate EUrlEntryPrivate;
-typedef struct _EUrlEntryClass EUrlEntryClass;
struct _EUrlEntry {
GtkBox parent;
-
EUrlEntryPrivate *priv;
};
@@ -51,10 +63,10 @@ struct _EUrlEntryClass {
GtkBoxClass parent_class;
};
-GType e_url_entry_get_type (void);
-GtkWidget *e_url_entry_new (void);
-GtkWidget *e_url_entry_get_entry (EUrlEntry *url_entry);
+GType e_url_entry_get_type (void) G_GNUC_CONST;
+GtkWidget * e_url_entry_new (void);
+GtkWidget * e_url_entry_get_entry (EUrlEntry *url_entry);
G_END_DECLS
-#endif /* _E_URL_ENTRY_H_ */
+#endif /* E_URL_ENTRY_H */
diff --git a/e-util/e-web-view-gtkhtml.h b/e-util/e-web-view-gtkhtml.h
index ebe965c61b..139c3bbe61 100644
--- a/e-util/e-web-view-gtkhtml.h
+++ b/e-util/e-web-view-gtkhtml.h
@@ -93,84 +93,117 @@ struct _EWebViewGtkHTMLClass {
const gchar *mailto_uri);
};
-GType e_web_view_gtkhtml_get_type (void);
-GtkWidget * e_web_view_gtkhtml_new (void);
-void e_web_view_gtkhtml_clear (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_load_string (EWebViewGtkHTML *web_view,
- const gchar *string);
-gboolean e_web_view_gtkhtml_get_animate (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_animate (EWebViewGtkHTML *web_view,
- gboolean animate);
-gboolean e_web_view_gtkhtml_get_caret_mode (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_caret_mode (EWebViewGtkHTML *web_view,
- gboolean caret_mode);
-GtkTargetList * e_web_view_gtkhtml_get_copy_target_list (EWebViewGtkHTML *web_view);
-gboolean e_web_view_gtkhtml_get_disable_printing (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_disable_printing (EWebViewGtkHTML *web_view,
- gboolean disable_printing);
+GType e_web_view_gtkhtml_get_type (void) G_GNUC_CONST;
+GtkWidget * e_web_view_gtkhtml_new (void);
+void e_web_view_gtkhtml_clear (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_load_string (EWebViewGtkHTML *web_view,
+ const gchar *string);
+gboolean e_web_view_gtkhtml_get_animate (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_animate (EWebViewGtkHTML *web_view,
+ gboolean animate);
+gboolean e_web_view_gtkhtml_get_caret_mode
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_caret_mode
+ (EWebViewGtkHTML *web_view,
+ gboolean caret_mode);
+GtkTargetList * e_web_view_gtkhtml_get_copy_target_list
+ (EWebViewGtkHTML *web_view);
+gboolean e_web_view_gtkhtml_get_disable_printing
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_disable_printing
+ (EWebViewGtkHTML *web_view,
+ gboolean disable_printing);
gboolean e_web_view_gtkhtml_get_disable_save_to_disk
- (EWebViewGtkHTML *web_view);
+ (EWebViewGtkHTML *web_view);
void e_web_view_gtkhtml_set_disable_save_to_disk
- (EWebViewGtkHTML *web_view,
- gboolean disable_save_to_disk);
-gboolean e_web_view_gtkhtml_get_editable (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_editable (EWebViewGtkHTML *web_view,
- gboolean editable);
-gboolean e_web_view_gtkhtml_get_inline_spelling (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_inline_spelling (EWebViewGtkHTML *web_view,
- gboolean inline_spelling);
-gboolean e_web_view_gtkhtml_get_magic_links (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_magic_links (EWebViewGtkHTML *web_view,
- gboolean magic_links);
-gboolean e_web_view_gtkhtml_get_magic_smileys (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_magic_smileys (EWebViewGtkHTML *web_view,
- gboolean magic_smileys);
-const gchar * e_web_view_gtkhtml_get_selected_uri (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_selected_uri (EWebViewGtkHTML *web_view,
- const gchar *selected_uri);
+ (EWebViewGtkHTML *web_view,
+ gboolean disable_save_to_disk);
+gboolean e_web_view_gtkhtml_get_editable (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_editable (EWebViewGtkHTML *web_view,
+ gboolean editable);
+gboolean e_web_view_gtkhtml_get_inline_spelling
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_inline_spelling
+ (EWebViewGtkHTML *web_view,
+ gboolean inline_spelling);
+gboolean e_web_view_gtkhtml_get_magic_links
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_magic_links
+ (EWebViewGtkHTML *web_view,
+ gboolean magic_links);
+gboolean e_web_view_gtkhtml_get_magic_smileys
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_magic_smileys
+ (EWebViewGtkHTML *web_view,
+ gboolean magic_smileys);
+const gchar * e_web_view_gtkhtml_get_selected_uri
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_selected_uri
+ (EWebViewGtkHTML *web_view,
+ const gchar *selected_uri);
GdkPixbufAnimation *
- e_web_view_gtkhtml_get_cursor_image (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_cursor_image (EWebViewGtkHTML *web_view,
- GdkPixbufAnimation *animation);
-GtkAction * e_web_view_gtkhtml_get_open_proxy (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_open_proxy (EWebViewGtkHTML *web_view,
- GtkAction *open_proxy);
+ e_web_view_gtkhtml_get_cursor_image
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_cursor_image
+ (EWebViewGtkHTML *web_view,
+ GdkPixbufAnimation *animation);
+GtkAction * e_web_view_gtkhtml_get_open_proxy
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_open_proxy
+ (EWebViewGtkHTML *web_view,
+ GtkAction *open_proxy);
GtkTargetList * e_web_view_gtkhtml_get_paste_target_list
- (EWebViewGtkHTML *web_view);
-GtkAction * e_web_view_gtkhtml_get_print_proxy (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_print_proxy (EWebViewGtkHTML *web_view,
- GtkAction *print_proxy);
-GtkAction * e_web_view_gtkhtml_get_save_as_proxy (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_set_save_as_proxy (EWebViewGtkHTML *web_view,
- GtkAction *save_as_proxy);
-GtkAction * e_web_view_gtkhtml_get_action (EWebViewGtkHTML *web_view,
- const gchar *action_name);
-GtkActionGroup *e_web_view_gtkhtml_get_action_group (EWebViewGtkHTML *web_view,
- const gchar *group_name);
-gchar * e_web_view_gtkhtml_extract_uri (EWebViewGtkHTML *web_view,
- GdkEventButton *event,
- GtkHTML *frame);
-void e_web_view_gtkhtml_copy_clipboard (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_cut_clipboard (EWebViewGtkHTML *web_view);
-gboolean e_web_view_gtkhtml_is_selection_active (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_paste_clipboard (EWebViewGtkHTML *web_view);
-gboolean e_web_view_gtkhtml_scroll_forward (EWebViewGtkHTML *web_view);
-gboolean e_web_view_gtkhtml_scroll_backward (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_select_all (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_unselect_all (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_zoom_100 (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_zoom_in (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_zoom_out (EWebViewGtkHTML *web_view);
-GtkUIManager * e_web_view_gtkhtml_get_ui_manager (EWebViewGtkHTML *web_view);
-GtkWidget * e_web_view_gtkhtml_get_popup_menu (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_show_popup_menu (EWebViewGtkHTML *web_view,
- GdkEventButton *event,
- GtkMenuPositionFunc func,
- gpointer user_data);
-void e_web_view_gtkhtml_status_message (EWebViewGtkHTML *web_view,
- const gchar *status_message);
-void e_web_view_gtkhtml_stop_loading (EWebViewGtkHTML *web_view);
-void e_web_view_gtkhtml_update_actions (EWebViewGtkHTML *web_view);
+ (EWebViewGtkHTML *web_view);
+GtkAction * e_web_view_gtkhtml_get_print_proxy
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_print_proxy
+ (EWebViewGtkHTML *web_view,
+ GtkAction *print_proxy);
+GtkAction * e_web_view_gtkhtml_get_save_as_proxy
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_set_save_as_proxy
+ (EWebViewGtkHTML *web_view,
+ GtkAction *save_as_proxy);
+GtkAction * e_web_view_gtkhtml_get_action (EWebViewGtkHTML *web_view,
+ const gchar *action_name);
+GtkActionGroup *e_web_view_gtkhtml_get_action_group
+ (EWebViewGtkHTML *web_view,
+ const gchar *group_name);
+gchar * e_web_view_gtkhtml_extract_uri (EWebViewGtkHTML *web_view,
+ GdkEventButton *event,
+ GtkHTML *frame);
+void e_web_view_gtkhtml_copy_clipboard
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_cut_clipboard
+ (EWebViewGtkHTML *web_view);
+gboolean e_web_view_gtkhtml_is_selection_active
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_paste_clipboard
+ (EWebViewGtkHTML *web_view);
+gboolean e_web_view_gtkhtml_scroll_forward
+ (EWebViewGtkHTML *web_view);
+gboolean e_web_view_gtkhtml_scroll_backward
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_select_all (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_unselect_all (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_zoom_100 (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_zoom_in (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_zoom_out (EWebViewGtkHTML *web_view);
+GtkUIManager * e_web_view_gtkhtml_get_ui_manager
+ (EWebViewGtkHTML *web_view);
+GtkWidget * e_web_view_gtkhtml_get_popup_menu
+ (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_show_popup_menu
+ (EWebViewGtkHTML *web_view,
+ GdkEventButton *event,
+ GtkMenuPositionFunc func,
+ gpointer user_data);
+void e_web_view_gtkhtml_status_message
+ (EWebViewGtkHTML *web_view,
+ const gchar *status_message);
+void e_web_view_gtkhtml_stop_loading (EWebViewGtkHTML *web_view);
+void e_web_view_gtkhtml_update_actions
+ (EWebViewGtkHTML *web_view);
G_END_DECLS
diff --git a/e-util/e-web-view-preview.c b/e-util/e-web-view-preview.c
index b75814fa83..0c59d33ef1 100644
--- a/e-util/e-web-view-preview.c
+++ b/e-util/e-web-view-preview.c
@@ -202,7 +202,6 @@ e_web_view_preview_new (void)
GtkTreeView *
e_web_view_preview_get_tree_view (EWebViewPreview *preview)
{
- g_return_val_if_fail (preview != NULL, NULL);
g_return_val_if_fail (E_IS_WEB_VIEW_PREVIEW (preview), NULL);
return GTK_TREE_VIEW (gtk_bin_get_child (GTK_BIN (gtk_paned_get_child1 (GTK_PANED (preview)))));
@@ -211,7 +210,6 @@ e_web_view_preview_get_tree_view (EWebViewPreview *preview)
GtkWidget *
e_web_view_preview_get_preview (EWebViewPreview *preview)
{
- g_return_val_if_fail (preview != NULL, NULL);
g_return_val_if_fail (E_IS_WEB_VIEW_PREVIEW (preview), NULL);
return gtk_bin_get_child (GTK_BIN (gtk_paned_get_child2 (GTK_PANED (preview))));
@@ -251,6 +249,14 @@ e_web_view_preview_hide_tree_view (EWebViewPreview *preview)
gtk_widget_hide (gtk_paned_get_child1 (GTK_PANED (preview)));
}
+gboolean
+e_web_view_preview_get_escape_values (EWebViewPreview *preview)
+{
+ g_return_val_if_fail (E_IS_WEB_VIEW_PREVIEW (preview), FALSE);
+
+ return preview->priv->escape_values;
+}
+
void
e_web_view_preview_set_escape_values (EWebViewPreview *preview,
gboolean escape)
@@ -260,16 +266,6 @@ e_web_view_preview_set_escape_values (EWebViewPreview *preview,
preview->priv->escape_values = escape;
}
-gboolean
-e_web_view_preview_get_escape_values (EWebViewPreview *preview)
-{
- g_return_val_if_fail (preview != NULL, FALSE);
- g_return_val_if_fail (E_IS_WEB_VIEW_PREVIEW (preview), FALSE);
- g_return_val_if_fail (preview->priv != NULL, FALSE);
-
- return preview->priv->escape_values;
-}
-
void
e_web_view_preview_begin_update (EWebViewPreview *preview)
{
diff --git a/e-util/e-web-view-preview.h b/e-util/e-web-view-preview.h
index 54963b6fe6..00239fea1d 100644
--- a/e-util/e-web-view-preview.h
+++ b/e-util/e-web-view-preview.h
@@ -77,7 +77,7 @@ struct _EWebViewPreviewClass {
GtkVPanedClass parent_class;
};
-GType e_web_view_preview_get_type (void);
+GType e_web_view_preview_get_type (void) G_GNUC_CONST;
GtkWidget * e_web_view_preview_new (void);
GtkTreeView * e_web_view_preview_get_tree_view
(EWebViewPreview *preview);
@@ -88,11 +88,11 @@ void e_web_view_preview_show_tree_view
(EWebViewPreview *preview);
void e_web_view_preview_hide_tree_view
(EWebViewPreview *preview);
+gboolean e_web_view_preview_get_escape_values
+ (EWebViewPreview *preview);
void e_web_view_preview_set_escape_values
(EWebViewPreview *preview,
gboolean escape);
-gboolean e_web_view_preview_get_escape_values
- (EWebViewPreview *preview);
void e_web_view_preview_begin_update (EWebViewPreview *preview);
void e_web_view_preview_end_update (EWebViewPreview *preview);
void e_web_view_preview_add_header (EWebViewPreview *preview,
diff --git a/e-util/e-web-view.h b/e-util/e-web-view.h
index 6690725b86..f03be60014 100644
--- a/e-util/e-web-view.h
+++ b/e-util/e-web-view.h
@@ -57,18 +57,12 @@ G_BEGIN_DECLS
typedef struct _EWebView EWebView;
typedef struct _EWebViewClass EWebViewClass;
typedef struct _EWebViewPrivate EWebViewPrivate;
-struct PangoFontDescription;
struct _EWebView {
WebKitWebView parent;
EWebViewPrivate *priv;
};
-typedef void (*EWebViewJSFunctionCallback) (EWebView *web_view,
- size_t arg_count,
- const JSValueRef args[],
- gpointer user_data);
-
struct _EWebViewClass {
WebKitWebViewClass parent_class;
@@ -109,7 +103,7 @@ struct _EWebViewClass {
const gchar *mailto_uri);
};
-GType e_web_view_get_type (void);
+GType e_web_view_get_type (void) G_GNUC_CONST;
GtkWidget * e_web_view_new (void);
void e_web_view_clear (EWebView *web_view);
void e_web_view_load_string (EWebView *web_view,
@@ -139,11 +133,11 @@ gboolean e_web_view_get_disable_save_to_disk
void e_web_view_set_disable_save_to_disk
(EWebView *web_view,
gboolean disable_save_to_disk);
-gboolean e_web_view_get_enable_frame_flattening
- (EWebView *web_view);
-void e_web_view_set_enable_frame_flattening
- (EWebView *web_view,
- gboolean enable_frame_flattening);
+gboolean e_web_view_get_enable_frame_flattening
+ (EWebView *web_view);
+void e_web_view_set_enable_frame_flattening
+ (EWebView *web_view,
+ gboolean enable_frame_flattening);
gboolean e_web_view_get_editable (EWebView *web_view);
void e_web_view_set_editable (EWebView *web_view,
gboolean editable);
@@ -177,10 +171,10 @@ void e_web_view_set_print_proxy (EWebView *web_view,
GtkAction * e_web_view_get_save_as_proxy (EWebView *web_view);
void e_web_view_set_save_as_proxy (EWebView *web_view,
GtkAction *save_as_proxy);
-GSList * e_web_view_get_highlights (EWebView *web_view);
-void e_web_view_add_highlight (EWebView *web_view,
- const gchar *highlight);
-void e_web_view_clear_highlights (EWebView *web_view);
+GSList * e_web_view_get_highlights (EWebView *web_view);
+void e_web_view_add_highlight (EWebView *web_view,
+ const gchar *highlight);
+void e_web_view_clear_highlights (EWebView *web_view);
GtkAction * e_web_view_get_action (EWebView *web_view,
const gchar *action_name);
GtkActionGroup *e_web_view_get_action_group (EWebView *web_view,
@@ -205,7 +199,7 @@ void e_web_view_status_message (EWebView *web_view,
const gchar *status_message);
void e_web_view_stop_loading (EWebView *web_view);
void e_web_view_update_actions (EWebView *web_view);
-gchar * e_web_view_get_selection_html (EWebView *web_view);
+gchar * e_web_view_get_selection_html (EWebView *web_view);
void e_web_view_set_settings (EWebView *web_view,
WebKitWebSettings *settings);
diff --git a/e-util/gal-define-views-dialog.c b/e-util/gal-define-views-dialog.c
index 4bed5944e1..d2c839ed8a 100644
--- a/e-util/gal-define-views-dialog.c
+++ b/e-util/gal-define-views-dialog.c
@@ -78,7 +78,7 @@ gal_define_views_dialog_class_init (GalDefineViewsDialogClass *class)
"collection",
"Collection",
NULL,
- GAL_VIEW_COLLECTION_TYPE,
+ GAL_TYPE_VIEW_COLLECTION,
G_PARAM_READWRITE));
}
diff --git a/e-util/gal-define-views-model.c b/e-util/gal-define-views-model.c
index f9963acbfe..8d8dd519a5 100644
--- a/e-util/gal-define-views-model.c
+++ b/e-util/gal-define-views-model.c
@@ -32,7 +32,10 @@
#include "gal-define-views-model.h"
-G_DEFINE_TYPE (GalDefineViewsModel, gal_define_views_model, E_TYPE_TABLE_MODEL)
+G_DEFINE_TYPE (
+ GalDefineViewsModel,
+ gal_define_views_model,
+ E_TYPE_TABLE_MODEL)
enum {
PROP_0,
@@ -261,7 +264,7 @@ gal_define_views_model_class_init (GalDefineViewsModelClass *class)
"collection",
"Collection",
NULL,
- GAL_VIEW_COLLECTION_TYPE,
+ GAL_TYPE_VIEW_COLLECTION,
G_PARAM_READWRITE));
model_class->column_count = gdvm_col_count;
@@ -294,11 +297,7 @@ gal_define_views_model_init (GalDefineViewsModel *model)
ETableModel *
gal_define_views_model_new (void)
{
- GalDefineViewsModel *et;
-
- et = g_object_new (GAL_DEFINE_VIEWS_MODEL_TYPE, NULL);
-
- return E_TABLE_MODEL (et);
+ return g_object_new (GAL_TYPE_DEFINE_VIEWS_MODEL, NULL);
}
/**
diff --git a/e-util/gal-define-views-model.h b/e-util/gal-define-views-model.h
index 7219384a59..19a5028aa6 100644
--- a/e-util/gal-define-views-model.h
+++ b/e-util/gal-define-views-model.h
@@ -25,46 +25,63 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _GAL_DEFINE_VIEWS_MODEL_H_
-#define _GAL_DEFINE_VIEWS_MODEL_H_
+#ifndef GAL_DEFINE_VIEWS_MODEL_H
+#define GAL_DEFINE_VIEWS_MODEL_H
#include <e-util/e-table-model.h>
#include <e-util/gal-view.h>
#include <e-util/gal-view-collection.h>
+/* Standard GObject macros */
+#define GAL_TYPE_DEFINE_VIEWS_MODEL \
+ (gal_define_views_model_get_type ())
+#define GAL_DEFINE_VIEWS_MODEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), GAL_TYPE_DEFINE_VIEWS_MODEL, GalDefineViewsModel))
+#define GAL_DEFINE_VIEWS_MODEL_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), GAL_TYPE_DEFINE_VIEWS_MODEL, GalDefineViewsModelClass))
+#define GAL_IS_DEFINE_VIEWS_MODEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), GAL_TYPE_DEFINE_VIEWS_MODEL))
+#define GAL_IS_DEFINE_VIEWS_MODEL_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), GAL_TYPE_DEFINE_VIEWS_MODEL))
+#define GAL_DEFINE_VIEWS_MODEL_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), GAL_TYPE_DEFINE_VIEWS_MODEL, GalDefineViewsModelClass))
+
G_BEGIN_DECLS
-#define GAL_DEFINE_VIEWS_MODEL_TYPE (gal_define_views_model_get_type ())
-#define GAL_DEFINE_VIEWS_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_DEFINE_VIEWS_MODEL_TYPE, GalDefineViewsModel))
-#define GAL_DEFINE_VIEWS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAL_DEFINE_VIEWS_MODEL_TYPE, GalDefineViewsModelClass))
-#define GAL_IS_DEFINE_VIEWS_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GAL_DEFINE_VIEWS_MODEL_TYPE))
-#define GAL_IS_DEFINE_VIEWS_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GAL_DEFINE_VIEWS_MODEL_TYPE))
+typedef struct _GalDefineViewsModel GalDefineViewsModel;
+typedef struct _GalDefineViewsModelClass GalDefineViewsModelClass;
-typedef struct {
+struct _GalDefineViewsModel {
ETableModel parent;
/* item specific fields */
GalViewCollection *collection;
guint editable : 1;
-} GalDefineViewsModel;
+};
-typedef struct {
+struct _GalDefineViewsModelClass {
ETableModelClass parent_class;
-} GalDefineViewsModelClass;
-
-GType gal_define_views_model_get_type (void);
-ETableModel *gal_define_views_model_new (void);
+};
-void gal_define_views_model_append (GalDefineViewsModel *model,
- GalView *view);
-GalView *gal_define_views_model_get_view (GalDefineViewsModel *model,
- gint i);
-void gal_define_views_model_delete_view (GalDefineViewsModel *model,
- gint i);
-void gal_define_views_model_copy_view (GalDefineViewsModel *model,
- gint i);
+GType gal_define_views_model_get_type (void) G_GNUC_CONST;
+ETableModel * gal_define_views_model_new (void);
+void gal_define_views_model_append (GalDefineViewsModel *model,
+ GalView *view);
+GalView * gal_define_views_model_get_view (GalDefineViewsModel *model,
+ gint i);
+void gal_define_views_model_delete_view
+ (GalDefineViewsModel *model,
+ gint i);
+void gal_define_views_model_copy_view
+ (GalDefineViewsModel *model,
+ gint i);
G_END_DECLS
-#endif /* _GAL_DEFINE_VIEWS_MODEL_H_ */
+#endif /* GAL_DEFINE_VIEWS_MODEL_H */
diff --git a/e-util/gal-view-collection.c b/e-util/gal-view-collection.c
index bcbad52fea..24d70a67b6 100644
--- a/e-util/gal-view-collection.c
+++ b/e-util/gal-view-collection.c
@@ -250,7 +250,7 @@ gal_view_collection_init (GalViewCollection *collection)
GalViewCollection *
gal_view_collection_new (void)
{
- return g_object_new (GAL_VIEW_COLLECTION_TYPE, NULL);
+ return g_object_new (GAL_TYPE_VIEW_COLLECTION, NULL);
}
void
diff --git a/e-util/gal-view-collection.h b/e-util/gal-view-collection.h
index 980f7c0365..0457a19675 100644
--- a/e-util/gal-view-collection.h
+++ b/e-util/gal-view-collection.h
@@ -24,24 +24,39 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _GAL_VIEW_SET_H_
-#define _GAL_VIEW_SET_H_
+#ifndef GAL_VIEW_COLLECTION_H
+#define GAL_VIEW_COLLECTION_H
#include <e-util/gal-view-factory.h>
+/* Standard GObject macros */
+#define GAL_TYPE_VIEW_COLLECTION \
+ (gal_view_collection_get_type ())
+#define GAL_VIEW_COLLECTION(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), GAL_TYPE_VIEW_COLLECTION, GalViewCollection))
+#define GAL_VIEW_COLLECTION_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), GAL_TYPE_VIEW_COLLECTION, GalViewCollectionClass))
+#define GAL_IS_VIEW_COLLECTION(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), GAL_TYPE_VIEW_COLLECTION))
+#define GAL_IS_VIEW_COLLECTION_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), GAL_TYPE_VIEW_COLLECTION))
+#define GAL_VIEW_COLLECTION_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), GAL_TYPE_VIEW_COLLECTION, GalViewCollectionClass))
+
G_BEGIN_DECLS
-#define GAL_VIEW_COLLECTION_TYPE (gal_view_collection_get_type ())
-#define GAL_VIEW_COLLECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_VIEW_COLLECTION_TYPE, GalViewCollection))
-#define GAL_VIEW_COLLECTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAL_VIEW_COLLECTION_TYPE, GalViewCollectionClass))
-#define GAL_IS_VIEW_COLLECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GAL_VIEW_COLLECTION_TYPE))
-#define GAL_IS_VIEW_COLLECTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GAL_VIEW_COLLECTION_TYPE))
-#define GAL_VIEW_COLLECTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GAL_VIEW_COLLECTION_TYPE, GalViewCollectionClass))
+typedef struct _GalViewCollection GalViewCollection;
+typedef struct _GalViewCollectionClass GalViewCollectionClass;
-typedef struct GalViewCollectionItem GalViewCollectionItem;
+typedef struct _GalViewCollectionItem GalViewCollectionItem;
-typedef struct {
- GObject base;
+struct _GalViewCollection {
+ GObject parent;
GalViewCollectionItem **view_data;
gint view_count;
@@ -60,20 +75,18 @@ typedef struct {
gchar *default_view;
gchar *title;
-} GalViewCollection;
+};
-typedef struct {
+struct _GalViewCollectionClass {
GObjectClass parent_class;
- /*
- * Signals
- */
- void (*display_view) (GalViewCollection *collection,
- GalView *view);
- void (*changed) (GalViewCollection *collection);
-} GalViewCollectionClass;
+ /* Signals */
+ void (*display_view) (GalViewCollection *collection,
+ GalView *view);
+ void (*changed) (GalViewCollection *collection);
+};
-struct GalViewCollectionItem {
+struct _GalViewCollectionItem {
GalView *view;
gchar *id;
guint changed : 1;
@@ -86,64 +99,77 @@ struct GalViewCollectionItem {
guint view_changed_id;
};
-/* Standard functions */
-GType gal_view_collection_get_type (void);
-GalViewCollection *gal_view_collection_new (void);
-
-void gal_view_collection_set_title (GalViewCollection *collection,
- const gchar *title);
-/* Set up the view collection. Call these two functions before ever doing load or save and never call them again. */
-void gal_view_collection_set_storage_directories (GalViewCollection *collection,
- const gchar *system_dir,
- const gchar *local_dir);
-void gal_view_collection_add_factory (GalViewCollection *collection,
- GalViewFactory *factory);
+GType gal_view_collection_get_type (void) G_GNUC_CONST;
+GalViewCollection *
+ gal_view_collection_new (void);
+void gal_view_collection_set_title (GalViewCollection *collection,
+ const gchar *title);
+
+/* Set up the view collection. Call these two functions
+ * before ever doing load or save and never call them again. */
+void gal_view_collection_set_storage_directories
+ (GalViewCollection *collection,
+ const gchar *system_dir,
+ const gchar *local_dir);
+void gal_view_collection_add_factory (GalViewCollection *collection,
+ GalViewFactory *factory);
/* Send the display view signal. This function is deprecated. */
-void gal_view_collection_display_view (GalViewCollection *collection,
- GalView *view);
+void gal_view_collection_display_view
+ (GalViewCollection *collection,
+ GalView *view);
/* Query the view collection. */
-gint gal_view_collection_get_count (GalViewCollection *collection);
-GalView *gal_view_collection_get_view (GalViewCollection *collection,
- gint n);
-GalViewCollectionItem *gal_view_collection_get_view_item (GalViewCollection *collection,
- gint n);
-gint gal_view_collection_get_view_index_by_id (GalViewCollection *collection,
- const gchar *view_id);
-gchar *gal_view_collection_get_view_id_by_index (GalViewCollection *collection,
- gint n);
+gint gal_view_collection_get_count (GalViewCollection *collection);
+GalView * gal_view_collection_get_view (GalViewCollection *collection,
+ gint n);
+GalViewCollectionItem *
+ gal_view_collection_get_view_item
+ (GalViewCollection *collection,
+ gint n);
+gint gal_view_collection_get_view_index_by_id
+ (GalViewCollection *collection,
+ const gchar *view_id);
+gchar * gal_view_collection_get_view_id_by_index
+ (GalViewCollection *collection,
+ gint n);
/* Manipulate the view collection */
-void gal_view_collection_append (GalViewCollection *collection,
- GalView *view);
-void gal_view_collection_delete_view (GalViewCollection *collection,
- gint i);
-void gal_view_collection_copy_view (GalViewCollection *collection,
- gint i);
-/* Call set_storage_directories and add factories for anything that
- * might be found there before doing either of these. */
-void gal_view_collection_load (GalViewCollection *collection);
-void gal_view_collection_save (GalViewCollection *collection);
-gboolean gal_view_collection_loaded (GalViewCollection *collection);
+void gal_view_collection_append (GalViewCollection *collection,
+ GalView *view);
+void gal_view_collection_delete_view (GalViewCollection *collection,
+ gint i);
+void gal_view_collection_copy_view (GalViewCollection *collection,
+ gint i);
+
+/* Call set_storage_directories and add factories for anything
+ * that might be found there before doing either of these. */
+void gal_view_collection_load (GalViewCollection *collection);
+void gal_view_collection_save (GalViewCollection *collection);
+gboolean gal_view_collection_loaded (GalViewCollection *collection);
/* Use factory list to load a GalView file. */
-GalView *gal_view_collection_load_view_from_file (GalViewCollection *collection,
- const gchar *type,
- const gchar *filename);
+GalView * gal_view_collection_load_view_from_file
+ (GalViewCollection *collection,
+ const gchar *type,
+ const gchar *filename);
/* Returns id of the new view. These functions are used for
* GalViewInstanceSaveAsDialog. */
-const gchar *gal_view_collection_append_with_title (GalViewCollection *collection,
- const gchar *title,
- GalView *view);
-const gchar *gal_view_collection_set_nth_view (GalViewCollection *collection,
- gint i,
- GalView *view);
-
-const gchar *gal_view_collection_get_default_view (GalViewCollection *collection);
-void gal_view_collection_set_default_view (GalViewCollection *collection,
- const gchar *id);
+const gchar * gal_view_collection_append_with_title
+ (GalViewCollection *collection,
+ const gchar *title,
+ GalView *view);
+const gchar * gal_view_collection_set_nth_view
+ (GalViewCollection *collection,
+ gint i,
+ GalView *view);
+
+const gchar * gal_view_collection_get_default_view
+ (GalViewCollection *collection);
+void gal_view_collection_set_default_view
+ (GalViewCollection *collection,
+ const gchar *id);
G_END_DECLS
diff --git a/e-util/gal-view-factory-etable.h b/e-util/gal-view-factory-etable.h
index cc4b617448..b26fa4e768 100644
--- a/e-util/gal-view-factory-etable.h
+++ b/e-util/gal-view-factory-etable.h
@@ -67,10 +67,10 @@ struct _GalViewFactoryEtableClass {
};
GType gal_view_factory_etable_get_type (void);
+GalViewFactory *gal_view_factory_etable_new (ETableSpecification *specification);
ETableSpecification *
gal_view_factory_etable_get_specification
(GalViewFactoryEtable *factory);
-GalViewFactory *gal_view_factory_etable_new (ETableSpecification *specification);
G_END_DECLS
diff --git a/e-util/gal-view-instance-save-as-dialog.c b/e-util/gal-view-instance-save-as-dialog.c
index c71892e4ff..b383001c17 100644
--- a/e-util/gal-view-instance-save-as-dialog.c
+++ b/e-util/gal-view-instance-save-as-dialog.c
@@ -239,7 +239,7 @@ gal_view_instance_save_as_dialog_class_init (GalViewInstanceSaveAsDialogClass *c
"instance",
"Instance",
NULL,
- GAL_VIEW_INSTANCE_TYPE,
+ GAL_TYPE_VIEW_INSTANCE,
G_PARAM_READWRITE));
}
diff --git a/e-util/gal-view-instance.c b/e-util/gal-view-instance.c
index e0a107f146..2b526c1d4a 100644
--- a/e-util/gal-view-instance.c
+++ b/e-util/gal-view-instance.c
@@ -329,7 +329,7 @@ GalViewInstance *
gal_view_instance_new (GalViewCollection *collection,
const gchar *instance_id)
{
- GalViewInstance *instance = g_object_new (GAL_VIEW_INSTANCE_TYPE, NULL);
+ GalViewInstance *instance = g_object_new (GAL_TYPE_VIEW_INSTANCE, NULL);
if (gal_view_instance_construct (instance, collection, instance_id))
return instance;
else {
diff --git a/e-util/gal-view-instance.h b/e-util/gal-view-instance.h
index c5debd1c3a..33427d42e6 100644
--- a/e-util/gal-view-instance.h
+++ b/e-util/gal-view-instance.h
@@ -25,21 +25,37 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef _GAL_VIEW_INSTANCE_H_
-#define _GAL_VIEW_INSTANCE_H_
+#ifndef GAL_VIEW_INSTANCE_H
+#define GAL_VIEW_INSTANCE_H
#include <e-util/gal-view-collection.h>
+/* Standard GObject macros */
+#define GAL_TYPE_VIEW_INSTANCE \
+ (gal_view_instance_get_type ())
+#define GAL_VIEW_INSTANCE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), GAL_TYPE_VIEW_INSTANCE, GalViewInstance))
+#define GAL_VIEW_INSTANCE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), GAL_TYPE_VIEW_INSTANCE, GalViewInstanceClass))
+#define GAL_IS_VIEW_INSTANCE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), GAL_TYPE_VIEW_INSTANCE))
+#define GAL_IS_VIEW_INSTANCE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), GAL_TYPE_VIEW_INSTANCE))
+#define GAL_VIEW_INSTANCE_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), GAL_TYPE_VIEW_INSTANCE, GalViewInstanceClass))
+
G_BEGIN_DECLS
-#define GAL_VIEW_INSTANCE_TYPE (gal_view_instance_get_type ())
-#define GAL_VIEW_INSTANCE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_VIEW_INSTANCE_TYPE, GalViewInstance))
-#define GAL_VIEW_INSTANCE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAL_VIEW_INSTANCE_TYPE, GalViewInstanceClass))
-#define GAL_IS_VIEW_INSTANCE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GAL_VIEW_INSTANCE_TYPE))
-#define GAL_IS_VIEW_INSTANCE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GAL_VIEW_INSTANCE_TYPE))
+typedef struct _GalViewInstance GalViewInstance;
+typedef struct _GalViewInstanceClass GalViewInstanceClass;
-typedef struct {
- GObject base;
+struct _GalViewInstance {
+ GObject parent;
GalViewCollection *collection;
@@ -58,57 +74,62 @@ typedef struct {
guint loaded : 1;
gchar *default_view;
-} GalViewInstance;
+};
-typedef struct {
+struct _GalViewInstanceClass {
GObjectClass parent_class;
- /*
- * Signals
- */
- void (*display_view) (GalViewInstance *instance,
- GalView *view);
- void (*changed) (GalViewInstance *instance);
- void (*loaded) (GalViewInstance *instance);
-} GalViewInstanceClass;
+ /* Signals */
+ void (*display_view) (GalViewInstance *instance,
+ GalView *view);
+ void (*changed) (GalViewInstance *instance);
+ void (*loaded) (GalViewInstance *instance);
+};
-/* Standard functions */
-GType gal_view_instance_get_type (void);
+GType gal_view_instance_get_type (void) G_GNUC_CONST;
-/* */
/*collection should be loaded when you call this.
instance_id: Which instance of this type of object is this (for most of evo, this is the folder id.) */
-GalViewInstance *gal_view_instance_new (GalViewCollection *collection,
- const gchar *instance_id);
-GalViewInstance *gal_view_instance_construct (GalViewInstance *instance,
- GalViewCollection *collection,
- const gchar *instance_id);
+GalViewInstance *
+ gal_view_instance_new (GalViewCollection *collection,
+ const gchar *instance_id);
+GalViewInstance *
+ gal_view_instance_construct (GalViewInstance *instance,
+ GalViewCollection *collection,
+ const gchar *instance_id);
/* Manipulate the current view. */
-gchar *gal_view_instance_get_current_view_id (GalViewInstance *instance);
-void gal_view_instance_set_current_view_id (GalViewInstance *instance,
- const gchar *view_id);
-GalView *gal_view_instance_get_current_view (GalViewInstance *instance);
+gchar * gal_view_instance_get_current_view_id
+ (GalViewInstance *instance);
+void gal_view_instance_set_current_view_id
+ (GalViewInstance *instance,
+ const gchar *view_id);
+GalView * gal_view_instance_get_current_view
+ (GalViewInstance *instance);
/* Sets the current view to the given custom view. */
-void gal_view_instance_set_custom_view (GalViewInstance *instance,
- GalView *view);
+void gal_view_instance_set_custom_view
+ (GalViewInstance *instance,
+ GalView *view);
/* Returns true if this instance has ever been used before. */
-gboolean gal_view_instance_exists (GalViewInstance *instance);
+gboolean gal_view_instance_exists (GalViewInstance *instance);
/* Manipulate the view collection */
-/* void gal_view_instance_set_as_default (GalViewInstance *instance); */
-void gal_view_instance_save_as (GalViewInstance *instance);
+void gal_view_instance_save_as (GalViewInstance *instance);
-/* This is idempotent. Once it's been called once, the rest of the calls are ignored. */
-void gal_view_instance_load (GalViewInstance *instance);
+/* This is idempotent. Once it's been called
+ * once, the rest of the calls are ignored. */
+void gal_view_instance_load (GalViewInstance *instance);
-/* These only mean anything before gal_view_instance_load is called the first time. */
-const gchar *gal_view_instance_get_default_view (GalViewInstance *instance);
-void gal_view_instance_set_default_view (GalViewInstance *instance,
- const gchar *id);
+/* These only mean anything before gal_view_instance_load()
+ * is called the first time. */
+const gchar * gal_view_instance_get_default_view
+ (GalViewInstance *instance);
+void gal_view_instance_set_default_view
+ (GalViewInstance *instance,
+ const gchar *id);
G_END_DECLS
-#endif /* _GAL_VIEW_INSTANCE_H_ */
+#endif /* GAL_VIEW_INSTANCE_H */
diff --git a/e-util/gal-view-new-dialog.c b/e-util/gal-view-new-dialog.c
index 1df95a1985..aef751b9fc 100644
--- a/e-util/gal-view-new-dialog.c
+++ b/e-util/gal-view-new-dialog.c
@@ -181,7 +181,7 @@ gal_view_new_dialog_new (GalViewCollection *collection)
{
GtkWidget *widget =
gal_view_new_dialog_construct (
- g_object_new (GAL_VIEW_NEW_DIALOG_TYPE, NULL),
+ g_object_new (GAL_TYPE_VIEW_NEW_DIALOG, NULL),
collection);
return widget;
}
diff --git a/e-util/gal-view-new-dialog.h b/e-util/gal-view-new-dialog.h
index 503a594abb..0d0be9c412 100644
--- a/e-util/gal-view-new-dialog.h
+++ b/e-util/gal-view-new-dialog.h
@@ -24,33 +24,37 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
-#ifndef __GAL_VIEW_NEW_DIALOG_H__
-#define __GAL_VIEW_NEW_DIALOG_H__
+#ifndef GAL_VIEW_NEW_DIALOG_H
+#define GAL_VIEW_NEW_DIALOG_H
#include <gtk/gtk.h>
#include <e-util/gal-view-collection.h>
-G_BEGIN_DECLS
+/* Standard GObject macros */
+#define GAL_TYPE_VIEW_NEW_DIALOG \
+ (gal_view_new_dialog_get_type ())
+#define GAL_VIEW_NEW_DIALOG(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), GAL_TYPE_VIEW_NEW_DIALOG, GalViewNewDialog))
+#define GAL_VIEW_NEW_DIALOG_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), GAL_TYPE_VIEW_NEW_DIALOG, GalViewNewDialogClass))
+#define GAL_IS_VIEW_NEW_DIALOG(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), GAL_TYPE_VIEW_NEW_DIALOG))
+#define GAL_IS_VIEW_NEW_DIALOG_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), GAL_TYPE_VIEW_NEW_DIALOG))
+#define GAL_VIEW_NEW_DIALOG_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), GAL_TYPE_VIEW_NEW_DIALOG, GalViewNewDialogClass))
-/* GalViewNewDialog - A dialog displaying information about a contact.
- *
- * The following arguments are available:
- *
- * name type read/write description
- * --------------------------------------------------------------------------------
- */
-
-#define GAL_VIEW_NEW_DIALOG_TYPE (gal_view_new_dialog_get_type ())
-#define GAL_VIEW_NEW_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_VIEW_NEW_DIALOG_TYPE, GalViewNewDialog))
-#define GAL_VIEW_NEW_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_VIEW_NEW_DIALOG_TYPE, GalViewNewDialogClass))
-#define GAL_IS_VIEW_NEW_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_VIEW_NEW_DIALOG_TYPE))
-#define GAL_IS_VIEW_NEW_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GAL_VIEW_NEW_DIALOG_TYPE))
+G_BEGIN_DECLS
-typedef struct _GalViewNewDialog GalViewNewDialog;
+typedef struct _GalViewNewDialog GalViewNewDialog;
typedef struct _GalViewNewDialogClass GalViewNewDialogClass;
-struct _GalViewNewDialog
-{
+struct _GalViewNewDialog {
GtkDialog parent;
/* item specific fields */
@@ -65,17 +69,15 @@ struct _GalViewNewDialog
GtkWidget *list;
};
-struct _GalViewNewDialogClass
-{
+struct _GalViewNewDialogClass {
GtkDialogClass parent_class;
};
-GtkWidget *gal_view_new_dialog_new (GalViewCollection *collection);
-GType gal_view_new_dialog_get_type (void);
-
-GtkWidget *gal_view_new_dialog_construct (GalViewNewDialog *dialog,
- GalViewCollection *collection);
+GType gal_view_new_dialog_get_type (void) G_GNUC_CONST;
+GtkWidget * gal_view_new_dialog_new (GalViewCollection *collection);
+GtkWidget * gal_view_new_dialog_construct (GalViewNewDialog *dialog,
+ GalViewCollection *collection);
G_END_DECLS
-#endif /* __GAL_VIEW_NEW_DIALOG_H__ */
+#endif /* GAL_VIEW_NEW_DIALOG_H */