aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c102
-rw-r--r--widgets/menus/gal-define-views-dialog.c88
-rw-r--r--widgets/menus/gal-define-views-model.c32
-rw-r--r--widgets/menus/gal-view-collection.c61
-rw-r--r--widgets/menus/gal-view-etable.c26
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.c41
-rw-r--r--widgets/menus/gal-view-instance.c99
-rw-r--r--widgets/menus/gal-view-new-dialog.c7
-rw-r--r--widgets/misc/e-alert-bar.c10
-rw-r--r--widgets/misc/e-attachment-bar.c8
-rw-r--r--widgets/misc/e-attachment-button.c4
-rw-r--r--widgets/misc/e-attachment-paned.c4
-rw-r--r--widgets/misc/e-attachment.c3
-rw-r--r--widgets/misc/e-buffer-tagger.c23
-rw-r--r--widgets/misc/e-calendar-item.c398
-rw-r--r--widgets/misc/e-calendar.c218
-rw-r--r--widgets/misc/e-canvas-background.c79
-rw-r--r--widgets/misc/e-canvas-vbox.c132
-rw-r--r--widgets/misc/e-canvas.c23
-rw-r--r--widgets/misc/e-contact-map-window.c24
-rw-r--r--widgets/misc/e-contact-map.c3
-rw-r--r--widgets/misc/e-contact-marker.c52
-rw-r--r--widgets/misc/e-dateedit.c162
-rw-r--r--widgets/misc/e-import-assistant.c5
-rw-r--r--widgets/misc/e-mail-signature-manager.c2
-rw-r--r--widgets/misc/e-map.c57
-rw-r--r--widgets/misc/e-online-button.c2
-rw-r--r--widgets/misc/e-picture-gallery.c9
-rw-r--r--widgets/misc/e-popup-action.c2
-rw-r--r--widgets/misc/e-preferences-window.c3
-rw-r--r--widgets/misc/e-printable.c160
-rw-r--r--widgets/misc/e-selection-model-array.c54
-rw-r--r--widgets/misc/e-selection-model.c49
-rw-r--r--widgets/misc/e-send-options.c2
-rw-r--r--widgets/misc/e-source-config.c6
-rw-r--r--widgets/misc/e-spell-entry.c18
-rw-r--r--widgets/misc/e-web-view.c35
-rw-r--r--widgets/misc/ea-calendar-cell.c45
-rw-r--r--widgets/misc/ea-calendar-item.c124
-rw-r--r--widgets/misc/test-calendar.c48
-rw-r--r--widgets/misc/test-dateedit.c45
-rw-r--r--widgets/misc/test-preferences-window.c21
-rw-r--r--widgets/table/e-cell-checkbox.c5
-rw-r--r--widgets/table/e-cell-combo.c33
-rw-r--r--widgets/table/e-cell-date-edit.c53
-rw-r--r--widgets/table/e-cell-hbox.c2
-rw-r--r--widgets/table/e-cell-percent.c5
-rw-r--r--widgets/table/e-cell-pixbuf.c49
-rw-r--r--widgets/table/e-cell-popup.c80
-rw-r--r--widgets/table/e-cell-text.c282
-rw-r--r--widgets/table/e-cell-toggle.c11
-rw-r--r--widgets/table/e-cell-tree.c44
-rw-r--r--widgets/table/e-cell.h2
-rw-r--r--widgets/table/e-table-click-to-add.c250
-rw-r--r--widgets/table/e-table-col.c15
-rw-r--r--widgets/table/e-table-config.c69
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c32
-rw-r--r--widgets/table/e-table-field-chooser-item.c112
-rw-r--r--widgets/table/e-table-field-chooser.c147
-rw-r--r--widgets/table/e-table-group-container.c459
-rw-r--r--widgets/table/e-table-group-leaf.c98
-rw-r--r--widgets/table/e-table-group.c205
-rw-r--r--widgets/table/e-table-header-item.c218
-rw-r--r--widgets/table/e-table-header.c149
-rw-r--r--widgets/table/e-table-item.c966
-rw-r--r--widgets/table/e-table-memory-store.c29
-rw-r--r--widgets/table/e-table-model.c20
-rw-r--r--widgets/table/e-table-search.c48
-rw-r--r--widgets/table/e-table-selection-model.c69
-rw-r--r--widgets/table/e-table-sort-info.c40
-rw-r--r--widgets/table/e-table-sorted-variable.c5
-rw-r--r--widgets/table/e-table-sorted.c5
-rw-r--r--widgets/table/e-table-sorter.c50
-rw-r--r--widgets/table/e-table-specification.c2
-rw-r--r--widgets/table/e-table-subset.c35
-rw-r--r--widgets/table/e-table-utils.c7
-rw-r--r--widgets/table/e-table.c176
-rw-r--r--widgets/table/e-tree-memory.c21
-rw-r--r--widgets/table/e-tree-model.c189
-rw-r--r--widgets/table/e-tree-sorted.c35
-rw-r--r--widgets/table/e-tree-table-adapter.c22
-rw-r--r--widgets/table/e-tree.c992
-rw-r--r--widgets/table/gal-a11y-e-cell-popup.c43
-rw-r--r--widgets/table/gal-a11y-e-cell-toggle.c35
-rw-r--r--widgets/table/gal-a11y-e-cell-tree.c73
-rw-r--r--widgets/table/gal-a11y-e-cell-vbox.c12
-rw-r--r--widgets/table/gal-a11y-e-cell.c47
-rw-r--r--widgets/table/gal-a11y-e-table-click-to-add.c8
-rw-r--r--widgets/table/gal-a11y-e-table-item.c167
-rw-r--r--widgets/table/gal-a11y-e-table.c8
-rw-r--r--widgets/table/gal-a11y-e-tree.c13
-rw-r--r--widgets/text/e-reflow.c378
-rw-r--r--widgets/text/e-text-model.c87
-rw-r--r--widgets/text/e-text.c709
-rw-r--r--widgets/text/gal-a11y-e-text.c27
95 files changed, 5000 insertions, 3924 deletions
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index a35dd57105..337cb0ad99 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -188,10 +188,11 @@ e_timezone_dialog_add_timezones (ETimezoneDialog *etd)
location = _(icaltimezone_get_location (zone));
- e_map_add_point (priv->map, location,
- icaltimezone_get_longitude (zone),
- icaltimezone_get_latitude (zone),
- E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
+ e_map_add_point (
+ priv->map, location,
+ icaltimezone_get_longitude (zone),
+ icaltimezone_get_latitude (zone),
+ E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
list_items = g_list_prepend (list_items, location);
}
@@ -268,9 +269,11 @@ e_timezone_dialog_construct (ETimezoneDialog *etd)
g_object_weak_ref (G_OBJECT (map), map_destroy_cb, priv);
- gtk_widget_set_events (map, gtk_widget_get_events (map)
- | GDK_LEAVE_NOTIFY_MASK
- | GDK_VISIBILITY_NOTIFY_MASK);
+ gtk_widget_set_events (
+ map,
+ gtk_widget_get_events (map) |
+ GDK_LEAVE_NOTIFY_MASK |
+ GDK_VISIBILITY_NOTIFY_MASK);
e_timezone_dialog_add_timezones (etd);
@@ -474,11 +477,13 @@ on_map_timeout (gpointer data)
if (e_map_point_get_color_rgba (priv->point_selected)
== E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_1_RGBA)
- e_map_point_set_color_rgba (priv->map, priv->point_selected,
- E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_2_RGBA);
+ e_map_point_set_color_rgba (
+ priv->map, priv->point_selected,
+ E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_2_RGBA);
else
- e_map_point_set_color_rgba (priv->map, priv->point_selected,
- E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_1_RGBA);
+ e_map_point_set_color_rgba (
+ priv->map, priv->point_selected,
+ E_TIMEZONE_DIALOG_MAP_POINT_SELECTED_1_RGBA);
return TRUE;
}
@@ -497,19 +502,23 @@ on_map_motion (GtkWidget *widget,
etd = E_TIMEZONE_DIALOG (data);
priv = etd->priv;
- e_map_window_to_world (priv->map, (gdouble) event->x, (gdouble) event->y,
- &longitude, &latitude);
+ e_map_window_to_world (
+ priv->map, (gdouble) event->x, (gdouble) event->y,
+ &longitude, &latitude);
if (priv->point_hover && priv->point_hover != priv->point_selected)
- e_map_point_set_color_rgba (priv->map, priv->point_hover,
- E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
+ e_map_point_set_color_rgba (
+ priv->map, priv->point_hover,
+ E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
- priv->point_hover = e_map_get_closest_point (priv->map, longitude,
- latitude, TRUE);
+ priv->point_hover = e_map_get_closest_point (
+ priv->map, longitude,
+ latitude, TRUE);
if (priv->point_hover != priv->point_selected)
- e_map_point_set_color_rgba (priv->map, priv->point_hover,
- E_TIMEZONE_DIALOG_MAP_POINT_HOVER_RGBA);
+ e_map_point_set_color_rgba (
+ priv->map, priv->point_hover,
+ E_TIMEZONE_DIALOG_MAP_POINT_HOVER_RGBA);
new_zone = get_zone_from_point (etd, priv->point_hover);
@@ -539,11 +548,13 @@ on_map_leave (GtkWidget *widget,
return FALSE;
if (priv->point_hover && priv->point_hover != priv->point_selected)
- e_map_point_set_color_rgba (priv->map, priv->point_hover,
- E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
+ e_map_point_set_color_rgba (
+ priv->map, priv->point_hover,
+ E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
- timezone_combo_set_active_text (GTK_COMBO_BOX (priv->timezone_combo),
- zone_display_name (priv->zone));
+ timezone_combo_set_active_text (
+ GTK_COMBO_BOX (priv->timezone_combo),
+ zone_display_name (priv->zone));
gtk_label_set_text (GTK_LABEL (priv->preview_label), "");
priv->point_hover = NULL;
@@ -590,25 +601,28 @@ on_map_button_pressed (GtkWidget *w,
etd = E_TIMEZONE_DIALOG (data);
priv = etd->priv;
- e_map_window_to_world (priv->map, (gdouble) event->x, (gdouble) event->y,
- &longitude, &latitude);
+ e_map_window_to_world (
+ priv->map, (gdouble) event->x, (gdouble) event->y,
+ &longitude, &latitude);
if (event->button != 1) {
e_map_zoom_out (priv->map);
} else {
if (e_map_get_magnification (priv->map) <= 1.0)
- e_map_zoom_to_location (priv->map, longitude,
- latitude);
+ e_map_zoom_to_location (
+ priv->map, longitude, latitude);
if (priv->point_selected)
- e_map_point_set_color_rgba (priv->map,
- priv->point_selected,
- E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
+ e_map_point_set_color_rgba (
+ priv->map,
+ priv->point_selected,
+ E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
priv->point_selected = priv->point_hover;
priv->zone = get_zone_from_point (etd, priv->point_selected);
- timezone_combo_set_active_text (GTK_COMBO_BOX (priv->timezone_combo),
- zone_display_name (priv->zone));
+ timezone_combo_set_active_text (
+ GTK_COMBO_BOX (priv->timezone_combo),
+ zone_display_name (priv->zone));
}
return TRUE;
@@ -700,10 +714,12 @@ e_timezone_dialog_set_timezone (ETimezoneDialog *etd,
priv->zone = zone;
- gtk_label_set_text (GTK_LABEL (priv->preview_label),
- zone ? display : "");
- timezone_combo_set_active_text (GTK_COMBO_BOX (priv->timezone_combo),
- zone ? zone_display_name (zone) : "");
+ gtk_label_set_text (
+ GTK_LABEL (priv->preview_label),
+ zone ? display : "");
+ timezone_combo_set_active_text (
+ GTK_COMBO_BOX (priv->timezone_combo),
+ zone ? zone_display_name (zone) : "");
set_map_timezone (etd, zone);
g_free (display);
@@ -735,16 +751,18 @@ set_map_timezone (ETimezoneDialog *etd,
if (zone) {
zone_longitude = icaltimezone_get_longitude (zone);
zone_latitude = icaltimezone_get_latitude (zone);
- point = e_map_get_closest_point (priv->map,
- zone_longitude,
- zone_latitude,
- FALSE);
+ point = e_map_get_closest_point (
+ priv->map,
+ zone_longitude,
+ zone_latitude,
+ FALSE);
} else
point = NULL;
if (priv->point_selected)
- e_map_point_set_color_rgba (priv->map, priv->point_selected,
- E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
+ e_map_point_set_color_rgba (
+ priv->map, priv->point_selected,
+ E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
priv->point_selected = point;
}
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c
index 79d3104a08..974cdad323 100644
--- a/widgets/menus/gal-define-views-dialog.c
+++ b/widgets/menus/gal-define-views-dialog.c
@@ -71,12 +71,15 @@ gal_define_views_dialog_class_init (GalDefineViewsDialogClass *class)
object_class->get_property = gal_define_views_dialog_get_property;
object_class->dispose = gal_define_views_dialog_dispose;
- g_object_class_install_property (object_class, PROP_COLLECTION,
- g_param_spec_object ("collection",
- "Collection",
- NULL,
- GAL_VIEW_COLLECTION_TYPE,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_COLLECTION,
+ g_param_spec_object (
+ "collection",
+ "Collection",
+ NULL,
+ GAL_VIEW_COLLECTION_TYPE,
+ G_PARAM_READWRITE));
}
/* Button callbacks */
@@ -94,10 +97,11 @@ gdvd_button_new_dialog_callback (GtkWidget *widget,
switch (id) {
case GTK_RESPONSE_OK:
- g_object_get (widget,
- "name", &name,
- "factory", &factory,
- NULL);
+ g_object_get (
+ widget,
+ "name", &name,
+ "factory", &factory,
+ NULL);
if (name && factory) {
g_strchomp (name);
@@ -107,10 +111,11 @@ gdvd_button_new_dialog_callback (GtkWidget *widget,
item = dialog->collection->view_data[dialog->collection->view_count - 1];
gtk_list_store_append (GTK_LIST_STORE (dialog->model), &iter);
- gtk_list_store_set (GTK_LIST_STORE (dialog->model), &iter,
- COL_GALVIEW_NAME, name,
- COL_GALVIEW_DATA, item,
- -1);
+ gtk_list_store_set (
+ GTK_LIST_STORE (dialog->model), &iter,
+ COL_GALVIEW_NAME, name,
+ COL_GALVIEW_DATA, item,
+ -1);
if (view && GAL_VIEW_GET_CLASS (view)->edit)
gal_view_edit (view, GTK_WINDOW (dialog));
@@ -268,9 +273,10 @@ gal_define_views_dialog_init (GalDefineViewsDialog *dialog)
g_object_unref (widget);
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
- NULL);
+ gtk_dialog_add_buttons (
+ GTK_DIALOG (dialog),
+ GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+ NULL);
dialog->treeview = GTK_TREE_VIEW (e_builder_get_widget (dialog->builder, "treeview1"));
gtk_tree_view_set_reorderable (GTK_TREE_VIEW (dialog->treeview), FALSE);
@@ -330,16 +336,18 @@ gal_define_views_dialog_set_collection (GalDefineViewsDialog *dialog,
title = e_str_without_underscores (item->title);
gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter,
- COL_GALVIEW_NAME, title,
- COL_GALVIEW_DATA, item,
- -1);
+ gtk_list_store_set (
+ store, &iter,
+ COL_GALVIEW_NAME, title,
+ COL_GALVIEW_DATA, item,
+ -1);
g_free (title);
}
- gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store),
- COL_GALVIEW_NAME, GTK_SORT_ASCENDING);
+ gtk_tree_sortable_set_sort_column_id (
+ GTK_TREE_SORTABLE (store),
+ COL_GALVIEW_NAME, GTK_SORT_ASCENDING);
/* attaching treeview to model */
gtk_tree_view_set_model (dialog->treeview, GTK_TREE_MODEL (store));
@@ -348,30 +356,36 @@ gal_define_views_dialog_set_collection (GalDefineViewsDialog *dialog,
dialog->model = GTK_TREE_MODEL (store);
renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (dialog->treeview,
- COL_GALVIEW_NAME, _("Name"),
- renderer, "text", COL_GALVIEW_NAME,
- NULL);
+ gtk_tree_view_insert_column_with_attributes (
+ dialog->treeview,
+ COL_GALVIEW_NAME, _("Name"),
+ renderer, "text", COL_GALVIEW_NAME,
+ NULL);
/* set sort column */
- gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (dialog->model),
- COL_GALVIEW_NAME, GTK_SORT_ASCENDING);
+ gtk_tree_sortable_set_sort_column_id (
+ GTK_TREE_SORTABLE (dialog->model),
+ COL_GALVIEW_NAME, GTK_SORT_ASCENDING);
if (dialog->builder) {
GtkWidget *widget = e_builder_get_widget (dialog->builder, "label-views");
if (widget && GTK_IS_LABEL (widget)) {
if (collection->title) {
- gchar *text = g_strdup_printf (_("Define Views for %s"),
- collection->title);
- gtk_label_set_text (GTK_LABEL (widget),
- text);
+ gchar *text = g_strdup_printf (
+ _("Define Views for %s"),
+ collection->title);
+ gtk_label_set_text (
+ GTK_LABEL (widget),
+ text);
gtk_window_set_title (GTK_WINDOW (dialog), text);
g_free (text);
} else {
- gtk_label_set_text (GTK_LABEL (widget),
- _("Define Views"));
- gtk_window_set_title (GTK_WINDOW (dialog),
- _("Define Views"));
+ gtk_label_set_text (
+ GTK_LABEL (widget),
+ _("Define Views"));
+ gtk_window_set_title (
+ GTK_WINDOW (dialog),
+ _("Define Views"));
}
}
}
diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c
index 3fc6d701f5..d9432d24cc 100644
--- a/widgets/menus/gal-define-views-model.c
+++ b/widgets/menus/gal-define-views-model.c
@@ -245,19 +245,25 @@ gal_define_views_model_class_init (GalDefineViewsModelClass *class)
object_class->set_property = gal_define_views_model_set_property;
object_class->get_property = gal_define_views_model_get_property;
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- "Editable",
- NULL,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_COLLECTION,
- g_param_spec_object ("collection",
- "Collection",
- NULL,
- GAL_VIEW_COLLECTION_TYPE,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_EDITABLE,
+ g_param_spec_boolean (
+ "editable",
+ "Editable",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_COLLECTION,
+ g_param_spec_object (
+ "collection",
+ "Collection",
+ NULL,
+ GAL_VIEW_COLLECTION_TYPE,
+ G_PARAM_READWRITE));
model_class->column_count = gdvm_col_count;
model_class->row_count = gdvm_row_count;
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c
index 662b928b95..85dcc32f13 100644
--- a/widgets/menus/gal-view-collection.c
+++ b/widgets/menus/gal-view-collection.c
@@ -63,9 +63,10 @@ gal_view_collection_display_view (GalViewCollection *collection,
g_return_if_fail (GAL_IS_VIEW_COLLECTION (collection));
g_return_if_fail (GAL_IS_VIEW (view));
- g_signal_emit (collection,
- gal_view_collection_signals[DISPLAY_VIEW], 0,
- view);
+ g_signal_emit (
+ collection,
+ gal_view_collection_signals[DISPLAY_VIEW], 0,
+ view);
}
static void
@@ -73,8 +74,9 @@ gal_view_collection_changed (GalViewCollection *collection)
{
g_return_if_fail (GAL_IS_VIEW_COLLECTION (collection));
- g_signal_emit (collection,
- gal_view_collection_signals[CHANGED], 0);
+ g_signal_emit (
+ collection,
+ gal_view_collection_signals[CHANGED], 0);
}
static void
@@ -83,8 +85,9 @@ gal_view_collection_item_free (GalViewCollectionItem *item)
g_free (item->id);
if (item->view) {
if (item->view_changed_id)
- g_signal_handler_disconnect (item->view,
- item->view_changed_id);
+ g_signal_handler_disconnect (
+ item->view,
+ item->view_changed_id);
g_object_unref (item->view);
}
g_free (item);
@@ -196,23 +199,24 @@ gal_view_collection_class_init (GalViewCollectionClass *class)
object_class->dispose = gal_view_collection_dispose;
- gal_view_collection_signals[DISPLAY_VIEW] =
- g_signal_new ("display_view",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GalViewCollectionClass, display_view),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1, GAL_TYPE_VIEW);
-
- gal_view_collection_signals[CHANGED] =
- g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GalViewCollectionClass, changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ gal_view_collection_signals[DISPLAY_VIEW] = g_signal_new (
+ "display_view",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GalViewCollectionClass, display_view),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ GAL_TYPE_VIEW);
+
+ gal_view_collection_signals[CHANGED] = g_signal_new (
+ "changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GalViewCollectionClass, changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
class->display_view = NULL;
class->changed = NULL;
@@ -310,9 +314,9 @@ view_changed (GalView *view,
item->changed = TRUE;
item->ever_changed = TRUE;
- g_signal_handler_block (G_OBJECT (item->view), item->view_changed_id);
+ g_signal_handler_block (item->view, item->view_changed_id);
gal_view_collection_changed (item->collection);
- g_signal_handler_unblock (G_OBJECT (item->view), item->view_changed_id);
+ g_signal_handler_unblock (item->view, item->view_changed_id);
}
/* Use factory list to load a GalView file. */
@@ -788,8 +792,9 @@ gal_view_collection_set_nth_view (GalViewCollection *collection,
gal_view_set_title (view, item->title);
g_object_ref (view);
if (item->view) {
- g_signal_handler_disconnect (item->view,
- item->view_changed_id);
+ g_signal_handler_disconnect (
+ item->view,
+ item->view_changed_id);
g_object_unref (item->view);
}
item->view = view;
diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c
index c097db0ded..01435f94d3 100644
--- a/widgets/menus/gal-view-etable.c
+++ b/widgets/menus/gal-view-etable.c
@@ -36,8 +36,9 @@ detach_table (GalViewEtable *view)
if (view->table == NULL)
return;
if (view->table_state_changed_id) {
- g_signal_handler_disconnect (view->table,
- view->table_state_changed_id);
+ g_signal_handler_disconnect (
+ view->table,
+ view->table_state_changed_id);
view->table_state_changed_id = 0;
}
g_object_unref (view->table);
@@ -50,8 +51,9 @@ detach_tree (GalViewEtable *view)
if (view->tree == NULL)
return;
if (view->tree_state_changed_id) {
- g_signal_handler_disconnect (view->tree,
- view->tree_state_changed_id);
+ g_signal_handler_disconnect (
+ view->tree,
+ view->tree_state_changed_id);
view->tree_state_changed_id = 0;
}
g_object_unref (view->tree);
@@ -65,9 +67,10 @@ config_changed (ETableConfig *config,
ETableState *state;
if (view->state)
g_object_unref (view->state);
- g_object_get (config,
- "state", &state,
- NULL);
+ g_object_get (
+ config,
+ "state", &state,
+ NULL);
view->state = e_table_state_duplicate (state);
g_object_unref (state);
@@ -81,10 +84,11 @@ gal_view_etable_edit (GalView *view,
GalViewEtable *etable_view = GAL_VIEW_ETABLE (view);
ETableConfig *config;
- config = e_table_config_new (etable_view->title,
- etable_view->spec,
- etable_view->state,
- parent);
+ config = e_table_config_new (
+ etable_view->title,
+ etable_view->spec,
+ etable_view->state,
+ parent);
g_signal_connect (
config, "changed",
diff --git a/widgets/menus/gal-view-instance-save-as-dialog.c b/widgets/menus/gal-view-instance-save-as-dialog.c
index a213082702..df1d1ca743 100644
--- a/widgets/menus/gal-view-instance-save-as-dialog.c
+++ b/widgets/menus/gal-view-instance-save-as-dialog.c
@@ -68,15 +68,17 @@ gal_view_instance_save_as_dialog_set_instance (GalViewInstanceSaveAsDialog *dial
title = e_str_without_underscores (item->title);
gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter,
- COL_GALVIEW_NAME, title,
- COL_GALVIEW_DATA, item,
- -1);
+ gtk_list_store_set (
+ store, &iter,
+ COL_GALVIEW_NAME, title,
+ COL_GALVIEW_DATA, item,
+ -1);
g_free (title);
}
- gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store),
+ gtk_tree_sortable_set_sort_column_id (
+ GTK_TREE_SORTABLE (store),
COL_GALVIEW_NAME, GTK_SORT_ASCENDING);
/* attaching treeview to model */
@@ -87,14 +89,16 @@ gal_view_instance_save_as_dialog_set_instance (GalViewInstanceSaveAsDialog *dial
renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (dialog->treeview,
- COL_GALVIEW_NAME, _("Name"),
- renderer, "text", COL_GALVIEW_NAME,
- NULL);
+ gtk_tree_view_insert_column_with_attributes (
+ dialog->treeview,
+ COL_GALVIEW_NAME, _("Name"),
+ renderer, "text", COL_GALVIEW_NAME,
+ NULL);
/* set sort column */
- gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (dialog->model),
- COL_GALVIEW_NAME, GTK_SORT_ASCENDING);
+ gtk_tree_sortable_set_sort_column_id (
+ GTK_TREE_SORTABLE (dialog->model),
+ COL_GALVIEW_NAME, GTK_SORT_ASCENDING);
}
static void
@@ -227,12 +231,15 @@ gal_view_instance_save_as_dialog_class_init (GalViewInstanceSaveAsDialogClass *c
object_class->get_property = gal_view_instance_save_as_dialog_get_property;
object_class->dispose = gal_view_instance_save_as_dialog_dispose;
- g_object_class_install_property (object_class, PROP_INSTANCE,
- g_param_spec_object ("instance",
- "Instance",
- NULL,
- GAL_VIEW_INSTANCE_TYPE,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_INSTANCE,
+ g_param_spec_object (
+ "instance",
+ "Instance",
+ NULL,
+ GAL_VIEW_INSTANCE_TYPE,
+ G_PARAM_READWRITE));
}
static void
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index e73b6fb304..97ba252a0b 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -65,8 +65,9 @@ gal_view_instance_changed (GalViewInstance *instance)
g_return_if_fail (instance != NULL);
g_return_if_fail (GAL_IS_VIEW_INSTANCE (instance));
- g_signal_emit (instance,
- gal_view_instance_signals[CHANGED], 0);
+ g_signal_emit (
+ instance,
+ gal_view_instance_signals[CHANGED], 0);
}
static void
@@ -76,9 +77,10 @@ gal_view_instance_display_view (GalViewInstance *instance,
g_return_if_fail (instance != NULL);
g_return_if_fail (GAL_IS_VIEW_INSTANCE (instance));
- g_signal_emit (instance,
- gal_view_instance_signals[DISPLAY_VIEW], 0,
- view);
+ g_signal_emit (
+ instance,
+ gal_view_instance_signals[DISPLAY_VIEW], 0,
+ view);
}
static void
@@ -120,8 +122,9 @@ disconnect_view (GalViewInstance *instance)
{
if (instance->current_view) {
if (instance->view_changed_id) {
- g_signal_handler_disconnect (instance->current_view,
- instance->view_changed_id);
+ g_signal_handler_disconnect (
+ instance->current_view,
+ instance->view_changed_id);
}
g_object_unref (instance->current_view);
@@ -158,8 +161,9 @@ gal_view_instance_dispose (GObject *object)
if (instance->collection) {
if (instance->collection_changed_id) {
- g_signal_handler_disconnect (instance->collection,
- instance->collection_changed_id);
+ g_signal_handler_disconnect (
+ instance->collection,
+ instance->collection_changed_id);
}
g_object_unref (instance->collection);
}
@@ -184,32 +188,33 @@ gal_view_instance_class_init (GalViewInstanceClass *class)
object_class->dispose = gal_view_instance_dispose;
- gal_view_instance_signals[DISPLAY_VIEW] =
- g_signal_new ("display_view",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GalViewInstanceClass, display_view),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1, GAL_TYPE_VIEW);
-
- gal_view_instance_signals[CHANGED] =
- g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GalViewInstanceClass, changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- gal_view_instance_signals[LOADED] =
- g_signal_new ("loaded",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GalViewInstanceClass, loaded),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ gal_view_instance_signals[DISPLAY_VIEW] = g_signal_new (
+ "display_view",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GalViewInstanceClass, display_view),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ GAL_TYPE_VIEW);
+
+ gal_view_instance_signals[CHANGED] = g_signal_new (
+ "changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GalViewInstanceClass, changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ gal_view_instance_signals[LOADED] = g_signal_new (
+ "loaded",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (GalViewInstanceClass, loaded),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
class->display_view = NULL;
class->changed = NULL;
@@ -270,12 +275,13 @@ load_current_view (GalViewInstance *instance)
instance->current_id = g_strdup (gal_view_instance_get_default_view (instance));
if (instance->current_id) {
- gint index = gal_view_collection_get_view_index_by_id (instance->collection,
- instance->current_id);
+ gint index = gal_view_collection_get_view_index_by_id (
+ instance->collection,
+ instance->current_id);
if (index != -1) {
- view = gal_view_collection_get_view (instance->collection,
- index);
+ view = gal_view_collection_get_view (
+ instance->collection, index);
view = gal_view_clone (view);
connect_view (instance, view);
}
@@ -287,21 +293,22 @@ load_current_view (GalViewInstance *instance)
instance->current_id = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"current_view", NULL);
if (instance->current_id != NULL) {
- gint index = gal_view_collection_get_view_index_by_id (instance->collection,
- instance->current_id);
+ gint index = gal_view_collection_get_view_index_by_id (
+ instance->collection,
+ instance->current_id);
if (index != -1) {
- view = gal_view_collection_get_view (instance->collection,
- index);
+ view = gal_view_collection_get_view (
+ instance->collection, index);
view = gal_view_clone (view);
}
}
if (view == NULL) {
gchar *type;
type = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"current_view_type", NULL);
- view = gal_view_collection_load_view_from_file (instance->collection,
- type,
- instance->custom_filename);
+ view = gal_view_collection_load_view_from_file (
+ instance->collection, type,
+ instance->custom_filename);
g_free (type);
}
diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c
index 0e99e3271c..b0de7156dc 100644
--- a/widgets/menus/gal-view-new-dialog.c
+++ b/widgets/menus/gal-view-new-dialog.c
@@ -179,8 +179,9 @@ GtkWidget *
gal_view_new_dialog_new (GalViewCollection *collection)
{
GtkWidget *widget =
- gal_view_new_dialog_construct (g_object_new (GAL_VIEW_NEW_DIALOG_TYPE, NULL),
- collection);
+ gal_view_new_dialog_construct (
+ g_object_new (GAL_VIEW_NEW_DIALOG_TYPE, NULL),
+ collection);
return widget;
}
@@ -255,7 +256,7 @@ gal_view_new_dialog_construct (GalViewNewDialog *dialog,
gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->list), column);
iterator = dialog->collection->factory_list;
- for (; iterator; iterator = g_list_next (iterator) ) {
+ for (; iterator; iterator = g_list_next (iterator)) {
GalViewFactory *factory = iterator->data;
GtkTreeIter iter;
diff --git a/widgets/misc/e-alert-bar.c b/widgets/misc/e-alert-bar.c
index 7700ef5f2a..2022af99f1 100644
--- a/widgets/misc/e-alert-bar.c
+++ b/widgets/misc/e-alert-bar.c
@@ -353,10 +353,12 @@ alert_bar_find_duplicate_cb (EAlert *alert,
dd->found |= (
e_alert_get_message_type (alert) ==
e_alert_get_message_type (dd->looking_for) &&
- g_strcmp0 (e_alert_get_primary_text (alert),
- e_alert_get_primary_text (dd->looking_for)) == 0 &&
- g_strcmp0 (e_alert_get_secondary_text (alert),
- e_alert_get_secondary_text (dd->looking_for)) == 0);
+ g_strcmp0 (
+ e_alert_get_primary_text (alert),
+ e_alert_get_primary_text (dd->looking_for)) == 0 &&
+ g_strcmp0 (
+ e_alert_get_secondary_text (alert),
+ e_alert_get_secondary_text (dd->looking_for)) == 0);
}
void
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index 2f57a7f339..3fc4753055 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -126,9 +126,11 @@ attachment_bar_set_store (EAttachmentBar *bar,
bar->priv->model = g_object_ref (store);
- gtk_icon_view_set_model (GTK_ICON_VIEW (bar->priv->icon_view),
+ gtk_icon_view_set_model (
+ GTK_ICON_VIEW (bar->priv->icon_view),
bar->priv->model);
- gtk_tree_view_set_model (GTK_TREE_VIEW (bar->priv->tree_view),
+ gtk_tree_view_set_model (
+ GTK_TREE_VIEW (bar->priv->tree_view),
bar->priv->model);
g_signal_connect_object (
@@ -759,7 +761,7 @@ e_attachment_bar_set_expanded (EAttachmentBar *bar,
{
g_return_if_fail (E_IS_ATTACHMENT_BAR (bar));
- if ((bar->priv->expanded ? 1 : 0) == (expanded ? 1 : 0))
+ if (bar->priv->expanded == expanded)
return;
bar->priv->expanded = expanded;
diff --git a/widgets/misc/e-attachment-button.c b/widgets/misc/e-attachment-button.c
index d3fda0985a..a2057e3354 100644
--- a/widgets/misc/e-attachment-button.c
+++ b/widgets/misc/e-attachment-button.c
@@ -834,7 +834,7 @@ e_attachment_button_set_expandable (EAttachmentButton *button,
{
g_return_if_fail (E_IS_ATTACHMENT_BUTTON (button));
- if ((button->priv->expandable ? 1 : 0) == (expandable ? 1 : 0))
+ if (button->priv->expandable == expandable)
return;
button->priv->expandable = expandable;
@@ -859,7 +859,7 @@ e_attachment_button_set_expanded (EAttachmentButton *button,
{
g_return_if_fail (E_IS_ATTACHMENT_BUTTON (button));
- if ((button->priv->expanded ? 1 : 0) == (expanded ? 1 : 0))
+ if (button->priv->expanded == expanded)
return;
button->priv->expanded = expanded;
diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c
index 565d91c4de..a3c4efb187 100644
--- a/widgets/misc/e-attachment-paned.c
+++ b/widgets/misc/e-attachment-paned.c
@@ -843,7 +843,7 @@ e_attachment_paned_set_expanded (EAttachmentPaned *paned,
{
g_return_if_fail (E_IS_ATTACHMENT_PANED (paned));
- if ((paned->priv->expanded ? 1 : 0) == (expanded ? 1 : 0))
+ if (paned->priv->expanded == expanded)
return;
paned->priv->expanded = expanded;
@@ -865,7 +865,7 @@ e_attachment_paned_set_resize_toplevel (EAttachmentPaned *paned,
{
g_return_if_fail (E_IS_ATTACHMENT_PANED (paned));
- if ((paned->priv->resize_toplevel ? 1 : 0) == (resize_toplevel ? 1 : 0))
+ if (paned->priv->resize_toplevel == resize_toplevel)
return;
paned->priv->resize_toplevel = resize_toplevel;
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index 7b245e8b0d..113312ac48 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -1916,7 +1916,8 @@ e_attachment_load_async (EAttachment *attachment,
} else if (mime_part != NULL) {
g_object_set_data (G_OBJECT (load_context->simple), ATTACHMENT_LOAD_CONTEXT, load_context);
- g_simple_async_result_run_in_thread (load_context->simple,
+ g_simple_async_result_run_in_thread (
+ load_context->simple,
attachment_load_from_mime_part_thread,
G_PRIORITY_DEFAULT,
cancellable);
diff --git a/widgets/misc/e-buffer-tagger.c b/widgets/misc/e-buffer-tagger.c
index c57632ea69..650abb3d9d 100644
--- a/widgets/misc/e-buffer-tagger.c
+++ b/widgets/misc/e-buffer-tagger.c
@@ -374,9 +374,10 @@ textview_query_tooltip (GtkTextView *text_view,
gchar *url;
GtkTextIter iter;
- gtk_text_view_window_to_buffer_coords (text_view,
- GTK_TEXT_WINDOW_WIDGET,
- x, y, &x, &y);
+ gtk_text_view_window_to_buffer_coords (
+ text_view,
+ GTK_TEXT_WINDOW_WIDGET,
+ x, y, &x, &y);
gtk_text_view_get_iter_at_location (text_view, &iter, x, y);
url = get_url_at_iter (buffer, &iter);
@@ -493,9 +494,10 @@ textview_event_after (GtkTextView *textview,
if (gtk_text_iter_get_offset (&start) != gtk_text_iter_get_offset (&end))
return FALSE;
- gtk_text_view_window_to_buffer_coords (textview,
- GTK_TEXT_WINDOW_WIDGET,
- event->x, event->y, &x, &y);
+ gtk_text_view_window_to_buffer_coords (
+ textview,
+ GTK_TEXT_WINDOW_WIDGET,
+ event->x, event->y, &x, &y);
gtk_text_view_get_iter_at_location (textview, &iter, x, y);
@@ -513,7 +515,8 @@ textview_motion_notify_event (GtkTextView *textview,
g_return_val_if_fail (GTK_IS_TEXT_VIEW (textview), FALSE);
- gtk_text_view_window_to_buffer_coords (textview,
+ gtk_text_view_window_to_buffer_coords (
+ textview,
GTK_TEXT_WINDOW_WIDGET,
event->x, event->y, &x, &y);
@@ -532,7 +535,8 @@ textview_visibility_notify_event (GtkTextView *textview,
gdk_window_get_pointer (gtk_text_view_get_window (textview, GTK_TEXT_WINDOW_WIDGET), &wx, &wy, NULL);
- gtk_text_view_window_to_buffer_coords (textview,
+ gtk_text_view_window_to_buffer_coords (
+ textview,
GTK_TEXT_WINDOW_WIDGET,
wx, wy, &bx, &by);
@@ -560,7 +564,8 @@ e_buffer_tagger_connect (GtkTextView *textview)
/* if tag is there already, then it is connected, thus claim */
g_return_if_fail (tag == NULL);
- gtk_text_buffer_create_tag (buffer, E_BUFFER_TAGGER_LINK_TAG,
+ gtk_text_buffer_create_tag (
+ buffer, E_BUFFER_TAGGER_LINK_TAG,
"foreground", "blue",
"underline", PANGO_UNDERLINE_SINGLE,
NULL);
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index 34f1696c5b..0f38c7b16a 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -528,30 +528,32 @@ e_calendar_item_class_init (ECalendarItemClass *class)
TRUE,
G_PARAM_READWRITE));
- e_calendar_item_signals[DATE_RANGE_CHANGED] =
- g_signal_new ("date_range_changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalendarItemClass, date_range_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- e_calendar_item_signals[SELECTION_CHANGED] =
- g_signal_new ("selection_changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECalendarItemClass, selection_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- e_calendar_item_signals[SELECTION_PREVIEW_CHANGED] =
- g_signal_new ("selection_preview_changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECalendarItemClass, selection_preview_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ e_calendar_item_signals[DATE_RANGE_CHANGED] = g_signal_new (
+ "date_range_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalendarItemClass, date_range_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ e_calendar_item_signals[SELECTION_CHANGED] = g_signal_new (
+ "selection_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECalendarItemClass, selection_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ e_calendar_item_signals[SELECTION_PREVIEW_CHANGED] = g_signal_new (
+ "selection_preview_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ECalendarItemClass, selection_preview_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
e_calendar_item_a11y_init ();
}
@@ -751,13 +753,13 @@ e_calendar_item_set_property (GObject *object,
switch (property_id) {
case PROP_YEAR:
ivalue = g_value_get_int (value);
- e_calendar_item_set_first_month (calitem, ivalue,
- calitem->month);
+ e_calendar_item_set_first_month (
+ calitem, ivalue, calitem->month);
return;
case PROP_MONTH:
ivalue = g_value_get_int (value);
- e_calendar_item_set_first_month (calitem, calitem->year,
- ivalue);
+ e_calendar_item_set_first_month (
+ calitem, calitem->year, ivalue);
return;
case PROP_X1:
dvalue = g_value_get_double (value);
@@ -935,8 +937,9 @@ e_calendar_item_update (GnomeCanvasItem *item,
/* Set up Pango prerequisites */
font_desc = style->font_desc;
pango_context = gtk_widget_get_pango_context (GTK_WIDGET (item->canvas));
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
+ font_metrics = pango_context_get_metrics (
+ pango_context, font_desc,
+ pango_context_get_language (pango_context));
/*
* Calculate the new layout of the calendar.
@@ -1029,8 +1032,9 @@ e_calendar_item_update (GnomeCanvasItem *item,
space = MAX (0, space);
calitem->x_offset = space / 2;
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1,
- item->x2, item->y2);
+ gnome_canvas_request_redraw (
+ item->canvas, item->x1, item->y1,
+ item->x2, item->y2);
pango_font_metrics_unref (font_metrics);
}
@@ -1056,8 +1060,9 @@ e_calendar_item_draw (GnomeCanvasItem *canvas_item,
GdkColor base, bg;
#if 0
- g_print ("In e_calendar_item_draw %i,%i %ix%i\n",
- x, y, width, height);
+ g_print (
+ "In e_calendar_item_draw %i,%i %ix%i\n",
+ x, y, width, height);
#endif
calitem = E_CALENDAR_ITEM (canvas_item);
style = gtk_widget_get_style (GTK_WIDGET (canvas_item->canvas));
@@ -1067,8 +1072,9 @@ e_calendar_item_draw (GnomeCanvasItem *canvas_item,
if (!font_desc)
font_desc = style->font_desc;
pango_context = gtk_widget_get_pango_context (GTK_WIDGET (canvas_item->canvas));
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
+ font_metrics = pango_context_get_metrics (
+ pango_context, font_desc,
+ pango_context_get_language (pango_context));
char_height =
PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
@@ -1082,18 +1088,20 @@ e_calendar_item_draw (GnomeCanvasItem *canvas_item,
/* Clear the entire background. */
cairo_save (cr);
gdk_cairo_set_source_color (cr, &base);
- cairo_rectangle (cr, calitem->x1 - x, calitem->y1 - y,
- calitem->x2 - calitem->x1 + 1,
- calitem->y2 - calitem->y1 + 1);
+ cairo_rectangle (
+ cr, calitem->x1 - x, calitem->y1 - y,
+ calitem->x2 - calitem->x1 + 1,
+ calitem->y2 - calitem->y1 + 1);
cairo_fill (cr);
cairo_restore (cr);
/* Draw the shadow around the entire item. */
- gtk_paint_shadow (style, cr, GTK_STATE_NORMAL, GTK_SHADOW_IN,
- NULL, "entry",
- calitem->x1 - x, calitem->y1 - y,
- calitem->x2 - calitem->x1 + 1,
- calitem->y2 - calitem->y1 + 1);
+ gtk_paint_shadow (
+ style, cr, GTK_STATE_NORMAL, GTK_SHADOW_IN,
+ NULL, "entry",
+ calitem->x1 - x, calitem->y1 - y,
+ calitem->x2 - calitem->x1 + 1,
+ calitem->y2 - calitem->y1 + 1);
row_y = canvas_item->y1 + ythickness;
bar_height = ythickness * 2
@@ -1106,36 +1114,40 @@ e_calendar_item_draw (GnomeCanvasItem *canvas_item,
cairo_save (cr);
gdk_cairo_set_source_color (cr, &bg);
- cairo_rectangle (cr, calitem->x1 + xthickness - x, row_y - y,
- calitem->x2 - calitem->x1 + 1
- - xthickness * 2,
- bar_height);
+ cairo_rectangle (
+ cr, calitem->x1 + xthickness - x, row_y - y,
+ calitem->x2 - calitem->x1 + 1
+ - xthickness * 2,
+ bar_height);
cairo_fill (cr);
cairo_restore (cr);
- gtk_paint_shadow (style, cr,
- GTK_STATE_NORMAL, GTK_SHADOW_OUT,
- NULL, "calendar-header",
- calitem->x1 + xthickness - x, row_y - y,
- calitem->x2 - calitem->x1 + 1
- - xthickness * 2,
- bar_height);
+ gtk_paint_shadow (
+ style, cr,
+ GTK_STATE_NORMAL, GTK_SHADOW_OUT,
+ NULL, "calendar-header",
+ calitem->x1 + xthickness - x, row_y - y,
+ calitem->x2 - calitem->x1 + 1
+ - xthickness * 2,
+ bar_height);
for (col = 0; col < calitem->cols; col++) {
if (col != 0) {
col_x = calitem->x1 + calitem->x_offset
+ calitem->month_width * col;
- gtk_paint_vline (style, cr,
- GTK_STATE_NORMAL, NULL,
- "calendar-separator",
- row_y + ythickness + 1 - y,
- row_y + bar_height
- - ythickness - 2 - y,
- col_x - 1 - x);
+ gtk_paint_vline (
+ style, cr,
+ GTK_STATE_NORMAL, NULL,
+ "calendar-separator",
+ row_y + ythickness + 1 - y,
+ row_y + bar_height
+ - ythickness - 2 - y,
+ col_x - 1 - x);
}
- e_calendar_item_draw_month (calitem, cr, x, y,
- width, height, row, col);
+ e_calendar_item_draw_month (
+ calitem, cr, x, y,
+ width, height, row, col);
}
row_y += calitem->month_height;
@@ -1184,8 +1196,9 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
PangoLayout *layout;
#if 0
- g_print ("In e_calendar_item_draw_month: %i,%i %ix%i row:%i col:%i\n",
- x, y, width, height, row, col);
+ g_print (
+ "In e_calendar_item_draw_month: %i,%i %ix%i row:%i col:%i\n",
+ x, y, width, height, row, col);
#endif
item = GNOME_CANVAS_ITEM (calitem);
widget = GTK_WIDGET (item->canvas);
@@ -1196,8 +1209,9 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
if (!font_desc)
font_desc = style->font_desc;
pango_context = gtk_widget_get_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
+ font_metrics = pango_context_get_metrics (
+ pango_context, font_desc,
+ pango_context_get_language (pango_context));
char_height =
PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
@@ -1215,8 +1229,8 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
/* Calculate the top-left position of the entire month display. */
month_x = item->x1 + xthickness + calitem->x_offset
- + ( (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- ? (calitem->cols - 1 - col) : col ) * calitem->month_width - x;
+ + ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
+ ? (calitem->cols - 1 - col) : col) * calitem->month_width - x;
month_w = item->x2 - item->x1 - xthickness * 2;
month_w = MIN (month_w, calitem->month_width);
month_y = item->y1 + ythickness + row * calitem->month_height - y;
@@ -1379,9 +1393,10 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
cairo_save (cr);
gdk_cairo_set_source_color (cr, &style->base[GTK_STATE_SELECTED]);
- cairo_rectangle (cr, cells_x ,
- text_y - E_CALENDAR_ITEM_YPAD_ABOVE_CELLS - 1,
- calitem->cell_width * 7 , cells_y - text_y );
+ cairo_rectangle (
+ cr, cells_x ,
+ text_y - E_CALENDAR_ITEM_YPAD_ABOVE_CELLS - 1,
+ calitem->cell_width * 7 , cells_y - text_y);
cairo_fill (cr);
cairo_restore (cr);
@@ -1393,9 +1408,10 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
for (day = 0; day < 7; day++) {
cairo_save (cr);
layout_set_day_text (calitem, layout, day_index);
- cairo_move_to (cr,
- text_x - calitem->day_widths[day_index],
- text_y);
+ cairo_move_to (
+ cr,
+ text_x - calitem->day_widths[day_index],
+ text_y);
pango_cairo_show_layout (cr, layout);
text_x += (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
? -calitem->cell_width : calitem->cell_width;
@@ -1409,7 +1425,8 @@ e_calendar_item_draw_month (ECalendarItem *calitem,
if (calitem->show_week_numbers) {
cairo_save (cr);
gdk_cairo_set_source_color (cr, &style->base[GTK_STATE_SELECTED]);
- cairo_rectangle (cr, cells_x, cells_y - (cells_y - text_y + 2) ,
+ cairo_rectangle (
+ cr, cells_x, cells_y - (cells_y - text_y + 2) ,
-20, E_CALENDAR_ROWS_PER_MONTH * calitem->cell_height + 18);
cairo_fill (cr);
cairo_restore (cr);
@@ -1496,8 +1513,9 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
font_desc = style->font_desc;
pango_context = gtk_widget_get_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
+ font_metrics = pango_context_get_metrics (
+ pango_context, font_desc,
+ pango_context_get_language (pango_context));
char_height =
PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
@@ -1607,8 +1625,8 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
for (dcol = 0; dcol < 7; dcol++) {
if (draw_day) {
day_x = cells_x +
- ( (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- ? 7 - 1 - dcol : dcol ) * calitem->cell_width;
+ ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
+ ? 7 - 1 - dcol : dcol) * calitem->cell_width;
day_y = cells_y + drow * calitem->cell_height;
@@ -1658,20 +1676,20 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
else
e_calendar_item_get_day_style (
calitem,
- years[mon],
- months[mon],
- day_num,
- day_style,
- today,
- mon != 1,
- selected,
- has_focus,
- drop_target,
- &bg_color,
- &fg_color,
- &box_color,
- &bold,
- &italic);
+ years[mon],
+ months[mon],
+ day_num,
+ day_style,
+ today,
+ mon != 1,
+ selected,
+ has_focus,
+ drop_target,
+ &bg_color,
+ &fg_color,
+ &box_color,
+ &bold,
+ &italic);
/* Draw the background, if set. */
if (bg_color) {
@@ -1860,11 +1878,13 @@ e_calendar_item_stop_selecting (ECalendarItem *calitem,
* after the last month, we move backwards or forwards one month.
* The set_month () call should take care of updating the selection. */
if (calitem->selection_end_month_offset == -1)
- e_calendar_item_set_first_month (calitem, calitem->year,
- calitem->month - 1);
+ e_calendar_item_set_first_month (
+ calitem, calitem->year,
+ calitem->month - 1);
else if (calitem->selection_start_month_offset == calitem->rows * calitem->cols)
- e_calendar_item_set_first_month (calitem, calitem->year,
- calitem->month + 1);
+ e_calendar_item_set_first_month (
+ calitem, calitem->year,
+ calitem->month + 1);
calitem->selection_changed = TRUE;
if (calitem->selecting_axis) {
@@ -1931,11 +1951,10 @@ e_calendar_item_selection_add_days (ECalendarItem *calitem,
calitem->selecting = TRUE;
- e_calendar_item_set_selection_if_emission (calitem,
- &gdate_start, &gdate_end,
- FALSE);
- g_signal_emit_by_name (G_OBJECT (calitem),
- "selection_preview_changed");
+ e_calendar_item_set_selection_if_emission (
+ calitem, &gdate_start, &gdate_end, FALSE);
+
+ g_signal_emit_by_name (calitem, "selection_preview_changed");
}
static gint
@@ -1952,20 +1971,24 @@ e_calendar_item_key_press_event (ECalendarItem *calitem,
multi_selection = event->key.state & GDK_SHIFT_MASK;
switch (keyval) {
case GDK_KEY_Up:
- e_calendar_item_selection_add_days (calitem, -7,
- multi_selection);
+ e_calendar_item_selection_add_days (
+ calitem, -7,
+ multi_selection);
break;
case GDK_KEY_Down:
- e_calendar_item_selection_add_days (calitem, 7,
- multi_selection);
+ e_calendar_item_selection_add_days (
+ calitem, 7,
+ multi_selection);
break;
case GDK_KEY_Left:
- e_calendar_item_selection_add_days (calitem, -1,
- multi_selection);
+ e_calendar_item_selection_add_days (
+ calitem, -1,
+ multi_selection);
break;
case GDK_KEY_Right:
- e_calendar_item_selection_add_days (calitem, 1,
- multi_selection);
+ e_calendar_item_selection_add_days (
+ calitem, 1,
+ multi_selection);
break;
case GDK_KEY_space:
case GDK_KEY_Return:
@@ -2211,11 +2234,13 @@ e_calendar_item_button_press (ECalendarItem *calitem,
gboolean all_week, round_up_end = FALSE, round_down_start = FALSE;
if (event->button.button == 4)
- e_calendar_item_set_first_month (calitem, calitem->year,
- calitem->month - 1);
+ e_calendar_item_set_first_month (
+ calitem, calitem->year,
+ calitem->month - 1);
else if (event->button.button == 5)
- e_calendar_item_set_first_month (calitem, calitem->year,
- calitem->month + 1);
+ e_calendar_item_set_first_month (
+ calitem, calitem->year,
+ calitem->month + 1);
if (!e_calendar_item_convert_position_to_day (calitem,
event->button.x,
@@ -2227,9 +2252,10 @@ e_calendar_item_button_press (ECalendarItem *calitem,
if (event->button.button == 3 && day == -1
&& e_calendar_item_get_display_popup (calitem)) {
- e_calendar_item_show_popup_menu (calitem,
- (GdkEventButton *) event,
- month_offset);
+ e_calendar_item_show_popup_menu (
+ calitem,
+ (GdkEventButton *) event,
+ month_offset);
return TRUE;
}
@@ -2398,25 +2424,29 @@ e_calendar_item_motion (ECalendarItem *calitem,
}
if (round_up_end)
- e_calendar_item_round_up_selection (calitem, &end_month,
- &end_day);
+ e_calendar_item_round_up_selection (
+ calitem, &end_month,
+ &end_day);
if (round_down_start)
- e_calendar_item_round_down_selection (calitem, &start_month,
- &start_day);
+ e_calendar_item_round_down_selection (
+ calitem, &start_month,
+ &start_day);
/* Check we don't go over the maximum number of days to select. */
if (calitem->selection_dragging_end) {
- e_calendar_item_check_selection_end (calitem,
- start_month,
- start_day,
- &end_month,
- &end_day);
+ e_calendar_item_check_selection_end (
+ calitem,
+ start_month,
+ start_day,
+ &end_month,
+ &end_day);
} else {
- e_calendar_item_check_selection_start (calitem,
- &start_month,
- &start_day,
- end_month,
- end_day);
+ e_calendar_item_check_selection_start (
+ calitem,
+ &start_month,
+ &start_day,
+ end_month,
+ end_day);
}
if (start_month == calitem->selection_start_month_offset
@@ -2547,8 +2577,9 @@ e_calendar_item_convert_position_to_day (ECalendarItem *calitem,
if (!font_desc)
font_desc = style->font_desc;
pango_context = gtk_widget_create_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
+ font_metrics = pango_context_get_metrics (
+ pango_context, font_desc,
+ pango_context_get_language (pango_context));
char_height =
PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
@@ -2625,8 +2656,9 @@ e_calendar_item_convert_position_to_day (ECalendarItem *calitem,
*day = day_row * E_CALENDAR_COLS_PER_MONTH + day_col;
- e_calendar_item_get_month_info (calitem, row, col, &first_day_offset,
- &days_in_month, &days_in_prev_month);
+ e_calendar_item_get_month_info (
+ calitem, row, col, &first_day_offset,
+ &days_in_month, &days_in_prev_month);
if (*day < first_day_offset) {
if (*entire_week || (row == 0 && col == 0)) {
(*month_offset)--;
@@ -2957,8 +2989,9 @@ e_calendar_item_get_date_range (ECalendarItem *calitem,
/* Calculate the first day shown. This will be one of the greyed-out
* days before the first full month begins. */
- e_calendar_item_get_month_info (calitem, 0, 0, &first_day_offset,
- &days_in_month, &days_in_prev_month);
+ e_calendar_item_get_month_info (
+ calitem, 0, 0, &first_day_offset,
+ &days_in_month, &days_in_prev_month);
*start_year = calitem->year;
*start_month = calitem->month - 1;
if (*start_month == -1) {
@@ -2969,9 +3002,10 @@ e_calendar_item_get_date_range (ECalendarItem *calitem,
/* Calculate the last day shown. This will be one of the greyed-out
* days after the last full month ends. */
- e_calendar_item_get_month_info (calitem, calitem->rows - 1,
- calitem->cols - 1, &first_day_offset,
- &days_in_month, &days_in_prev_month);
+ e_calendar_item_get_month_info (
+ calitem, calitem->rows - 1,
+ calitem->cols - 1, &first_day_offset,
+ &days_in_month, &days_in_prev_month);
*end_month = calitem->month + calitem->rows * calitem->cols;
*end_year = calitem->year + *end_month / 12;
*end_month %= 12;
@@ -2993,8 +3027,9 @@ e_calendar_item_clear_marks (ECalendarItem *calitem)
g_free (calitem->styles);
calitem->styles = NULL;
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1,
- item->x2, item->y2);
+ gnome_canvas_request_redraw (
+ item->canvas, item->x1, item->y1,
+ item->x2, item->y2);
}
/* add_day_style - whether bit-or with the actual style or change the style fully */
@@ -3277,14 +3312,15 @@ e_calendar_item_set_selection_if_emission (ECalendarItem *calitem,
end_month = g_date_get_month (end_date) - 1;
end_day = g_date_get_day (end_date);
- need_update = e_calendar_item_ensure_days_visible (calitem,
- start_year,
- start_month,
- start_day,
- end_year,
- end_month,
- end_day,
- emission);
+ need_update = e_calendar_item_ensure_days_visible (
+ calitem,
+ start_year,
+ start_month,
+ start_day,
+ end_year,
+ end_month,
+ end_day,
+ emission);
new_start_month_offset = (start_year - calitem->year) * 12
+ start_month - calitem->month;
@@ -3358,8 +3394,9 @@ e_calendar_item_set_selection (ECalendarItem *calitem,
{
/* If the user is in the middle of a selection, we must abort it. */
if (calitem->selecting) {
- gnome_canvas_item_ungrab (GNOME_CANVAS_ITEM (calitem),
- GDK_CURRENT_TIME);
+ gnome_canvas_item_ungrab (
+ GNOME_CANVAS_ITEM (calitem),
+ GDK_CURRENT_TIME);
calitem->selecting = FALSE;
}
@@ -3392,8 +3429,9 @@ e_calendar_item_ensure_days_visible (ECalendarItem *calitem,
/* Calculate the range of months currently displayed. */
current_end_year = calitem->year;
current_end_month = calitem->month + months_shown - 1;
- e_calendar_item_normalize_date (calitem, &current_end_year,
- &current_end_month);
+ e_calendar_item_normalize_date (
+ calitem, &current_end_year,
+ &current_end_month);
/* Try to ensure that the end month is shown. */
if ((end_year == current_end_year + 1 &&
@@ -3402,13 +3440,15 @@ e_calendar_item_ensure_days_visible (ECalendarItem *calitem,
/* See if the end of the selection will fit in the
* leftover days of the month after the last one shown. */
calitem->month += (months_shown - 1);
- e_calendar_item_normalize_date (calitem, &calitem->year,
- &calitem->month);
+ e_calendar_item_normalize_date (
+ calitem, &calitem->year,
+ &calitem->month);
- e_calendar_item_get_month_info (calitem, 0, 0,
- &first_day_offset,
- &days_in_month,
- &days_in_prev_month);
+ e_calendar_item_get_month_info (
+ calitem, 0, 0,
+ &first_day_offset,
+ &days_in_month,
+ &days_in_prev_month);
if (end_day >= E_CALENDAR_ROWS_PER_MONTH * E_CALENDAR_COLS_PER_MONTH -
first_day_offset - days_in_month) {
@@ -3420,8 +3460,9 @@ e_calendar_item_ensure_days_visible (ECalendarItem *calitem,
calitem->month -= (months_shown - 1);
}
- e_calendar_item_normalize_date (calitem, &calitem->year,
- &calitem->month);
+ e_calendar_item_normalize_date (
+ calitem, &calitem->year,
+ &calitem->month);
}
else if (end_year > current_end_year ||
(end_year == current_end_year && end_month > current_end_month)) {
@@ -3432,8 +3473,9 @@ e_calendar_item_ensure_days_visible (ECalendarItem *calitem,
calitem->year = end_year;
calitem->month = end_month - months_shown + 1;
- e_calendar_item_normalize_date (calitem, &calitem->year,
- &calitem->month);
+ e_calendar_item_normalize_date (
+ calitem, &calitem->year,
+ &calitem->month);
}
/* Now try to ensure that the start month is shown. We do this after
@@ -3447,13 +3489,15 @@ e_calendar_item_ensure_days_visible (ECalendarItem *calitem,
* leftover days of the month before the first one shown. */
calitem->year = start_year;
calitem->month = start_month + 1;
- e_calendar_item_normalize_date (calitem, &calitem->year,
- &calitem->month);
+ e_calendar_item_normalize_date (
+ calitem, &calitem->year,
+ &calitem->month);
- e_calendar_item_get_month_info (calitem, 0, 0,
- &first_day_offset,
- &days_in_month,
- &days_in_prev_month);
+ e_calendar_item_get_month_info (
+ calitem, 0, 0,
+ &first_day_offset,
+ &days_in_month,
+ &days_in_prev_month);
if (start_day <= days_in_prev_month - first_day_offset) {
calitem->year = start_year;
@@ -3504,10 +3548,12 @@ e_calendar_item_show_popup_menu (ECalendarItem *calitem,
submenu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu);
- g_object_set_data (G_OBJECT (submenu), "year",
- GINT_TO_POINTER (year));
- g_object_set_data (G_OBJECT (submenu), "month_offset",
- GINT_TO_POINTER (month_offset));
+ g_object_set_data (
+ G_OBJECT (submenu), "year",
+ GINT_TO_POINTER (year));
+ g_object_set_data (
+ G_OBJECT (submenu), "month_offset",
+ GINT_TO_POINTER (month_offset));
for (month = 0; month < 12; month++) {
name = e_get_month_name (month + 1, FALSE);
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c
index fcad4edb4b..38336cb618 100644
--- a/widgets/misc/e-calendar.c
+++ b/widgets/misc/e-calendar.c
@@ -154,10 +154,12 @@ e_calendar_init (ECalendar *cal)
canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (cal)->root);
- cal->calitem = E_CALENDAR_ITEM (gnome_canvas_item_new (canvas_group,
- e_calendar_item_get_type (),
- "week_number_font_desc", small_font_desc,
- NULL));
+ cal->calitem = E_CALENDAR_ITEM (
+ gnome_canvas_item_new (
+ canvas_group,
+ e_calendar_item_get_type (),
+ "week_number_font_desc", small_font_desc,
+ NULL));
pango_font_description_free (small_font_desc);
@@ -179,10 +181,11 @@ e_calendar_init (ECalendar *cal)
gtk_widget_show (pixmap);
gtk_container_add (GTK_CONTAINER (button), pixmap);
- cal->prev_item = gnome_canvas_item_new (canvas_group,
- gnome_canvas_widget_get_type (),
- "widget", button,
- NULL);
+ cal->prev_item = gnome_canvas_item_new (
+ canvas_group,
+ gnome_canvas_widget_get_type (),
+ "widget", button,
+ NULL);
a11y = gtk_widget_get_accessible (button);
atk_object_set_name (a11y, _("Previous month"));
@@ -203,10 +206,11 @@ e_calendar_init (ECalendar *cal)
gtk_widget_show (pixmap);
gtk_container_add (GTK_CONTAINER (button), pixmap);
- cal->next_item = gnome_canvas_item_new (canvas_group,
- gnome_canvas_widget_get_type (),
- "widget", button,
- NULL);
+ cal->next_item = gnome_canvas_item_new (
+ canvas_group,
+ gnome_canvas_widget_get_type (),
+ "widget", button,
+ NULL);
a11y = gtk_widget_get_accessible (button);
atk_object_set_name (a11y, _("Next month"));
@@ -214,42 +218,50 @@ e_calendar_init (ECalendar *cal)
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_widget_show (button);
- g_signal_connect_swapped (button, "pressed",
- G_CALLBACK (e_calendar_on_prev_year_pressed), cal);
- g_signal_connect_swapped (button, "released",
- G_CALLBACK (e_calendar_on_prev_year_released), cal);
- g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (e_calendar_on_prev_year_clicked), cal);
+ g_signal_connect_swapped (
+ button, "pressed",
+ G_CALLBACK (e_calendar_on_prev_year_pressed), cal);
+ g_signal_connect_swapped (
+ button, "released",
+ G_CALLBACK (e_calendar_on_prev_year_released), cal);
+ g_signal_connect_swapped (
+ button, "clicked",
+ G_CALLBACK (e_calendar_on_prev_year_clicked), cal);
pixmap = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
gtk_widget_show (pixmap);
gtk_container_add (GTK_CONTAINER (button), pixmap);
- cal->prev_item_year = gnome_canvas_item_new (canvas_group,
- gnome_canvas_widget_get_type (),
- "widget", button,
- NULL);
+ cal->prev_item_year = gnome_canvas_item_new (
+ canvas_group,
+ gnome_canvas_widget_get_type (),
+ "widget", button,
+ NULL);
a11y = gtk_widget_get_accessible (button);
atk_object_set_name (a11y, _("Previous year"));
button = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
gtk_widget_show (button);
- g_signal_connect_swapped (button, "pressed",
- G_CALLBACK (e_calendar_on_next_year_pressed), cal);
- g_signal_connect_swapped (button, "released",
- G_CALLBACK (e_calendar_on_next_year_released), cal);
- g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (e_calendar_on_next_year_clicked), cal);
+ g_signal_connect_swapped (
+ button, "pressed",
+ G_CALLBACK (e_calendar_on_next_year_pressed), cal);
+ g_signal_connect_swapped (
+ button, "released",
+ G_CALLBACK (e_calendar_on_next_year_released), cal);
+ g_signal_connect_swapped (
+ button, "clicked",
+ G_CALLBACK (e_calendar_on_next_year_clicked), cal);
pixmap = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
gtk_widget_show (pixmap);
gtk_container_add (GTK_CONTAINER (button), pixmap);
- cal->next_item_year = gnome_canvas_item_new (canvas_group,
- gnome_canvas_widget_get_type (),
- "widget", button,
- NULL);
+ cal->next_item_year = gnome_canvas_item_new (
+ canvas_group,
+ gnome_canvas_widget_get_type (),
+ "widget", button,
+ NULL);
a11y = gtk_widget_get_accessible (button);
atk_object_set_name (a11y, _("Next year"));
@@ -396,26 +408,30 @@ e_calendar_size_allocate (GtkWidget *widget,
/* Set up Pango prerequisites */
font_desc = gtk_widget_get_style (widget)->font_desc;
pango_context = gtk_widget_get_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
+ font_metrics = pango_context_get_metrics (
+ pango_context, font_desc,
+ pango_context_get_language (pango_context));
/* Set the scroll region to its allocated size, if changed. */
- gnome_canvas_get_scroll_region (GNOME_CANVAS (cal),
- NULL, NULL, &old_x2, &old_y2);
+ gnome_canvas_get_scroll_region (
+ GNOME_CANVAS (cal),
+ NULL, NULL, &old_x2, &old_y2);
gtk_widget_get_allocation (widget, &old_allocation);
new_x2 = old_allocation.width - 1;
new_y2 = old_allocation.height - 1;
if (old_x2 != new_x2 || old_y2 != new_y2)
- gnome_canvas_set_scroll_region (GNOME_CANVAS (cal),
- 0, 0, new_x2, new_y2);
+ gnome_canvas_set_scroll_region (
+ GNOME_CANVAS (cal),
+ 0, 0, new_x2, new_y2);
/* Take off space for line & buttons if shown. */
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (cal->calitem),
- "x1", 0.0,
- "y1", 0.0,
- "x2", new_x2,
- "y2", new_y2,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (cal->calitem),
+ "x1", 0.0,
+ "y1", 0.0,
+ "x2", new_x2,
+ "y2", new_y2,
+ NULL);
if (cal->calitem->month_width > 0)
month_width = cal->calitem->month_width;
@@ -436,41 +452,45 @@ e_calendar_size_allocate (GtkWidget *widget,
(month_width - 2 * xthickness - E_CALENDAR_ARROW_BUTTON_X_PAD - arrow_button_size) :
(xthickness);
- gnome_canvas_item_set (cal->prev_item,
- "x", current_x,
- "y", ythickness + E_CALENDAR_ARROW_BUTTON_Y_PAD,
- "width", arrow_button_size,
- "height", arrow_button_size,
- NULL);
+ gnome_canvas_item_set (
+ cal->prev_item,
+ "x", current_x,
+ "y", ythickness + E_CALENDAR_ARROW_BUTTON_Y_PAD,
+ "width", arrow_button_size,
+ "height", arrow_button_size,
+ NULL);
current_x += (is_rtl ? -1.0 : +1.0) * (cal->calitem->max_month_name_width - xthickness + 2 * arrow_button_size);
- gnome_canvas_item_set (cal->next_item,
- "x", current_x,
- "y", ythickness + E_CALENDAR_ARROW_BUTTON_Y_PAD,
- "width", arrow_button_size,
- "height", arrow_button_size,
- NULL);
+ gnome_canvas_item_set (
+ cal->next_item,
+ "x", current_x,
+ "y", ythickness + E_CALENDAR_ARROW_BUTTON_Y_PAD,
+ "width", arrow_button_size,
+ "height", arrow_button_size,
+ NULL);
current_x = is_rtl ?
(xthickness) :
(month_width - 2 * xthickness - E_CALENDAR_ARROW_BUTTON_X_PAD - arrow_button_size);
- gnome_canvas_item_set (cal->next_item_year,
- "x", current_x,
- "y", ythickness + E_CALENDAR_ARROW_BUTTON_Y_PAD,
- "width", arrow_button_size,
- "height", arrow_button_size,
- NULL);
+ gnome_canvas_item_set (
+ cal->next_item_year,
+ "x", current_x,
+ "y", ythickness + E_CALENDAR_ARROW_BUTTON_Y_PAD,
+ "width", arrow_button_size,
+ "height", arrow_button_size,
+ NULL);
current_x += (is_rtl ? +1.0 : -1.0) * (cal->calitem->max_digit_width * 5 - xthickness + 2 * arrow_button_size);
- gnome_canvas_item_set (cal->prev_item_year,
- "x", current_x,
- "y", ythickness + E_CALENDAR_ARROW_BUTTON_Y_PAD,
- "width", arrow_button_size,
- "height", arrow_button_size,
- NULL);
+ gnome_canvas_item_set (
+ cal->prev_item_year,
+ "x", current_x,
+ "y", ythickness + E_CALENDAR_ARROW_BUTTON_Y_PAD,
+ "width", arrow_button_size,
+ "height", arrow_button_size,
+ NULL);
pango_font_metrics_unref (font_metrics);
}
@@ -485,10 +505,11 @@ e_calendar_set_minimum_size (ECalendar *cal,
cal->min_rows = rows;
cal->min_cols = cols;
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (cal->calitem),
- "minimum_rows", rows,
- "minimum_columns", cols,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (cal->calitem),
+ "minimum_rows", rows,
+ "minimum_columns", cols,
+ NULL);
gtk_widget_queue_resize (GTK_WIDGET (cal));
}
@@ -503,10 +524,11 @@ e_calendar_set_maximum_size (ECalendar *cal,
cal->max_rows = rows;
cal->max_cols = cols;
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (cal->calitem),
- "maximum_rows", rows,
- "maximum_columns", cols,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (cal->calitem),
+ "maximum_rows", rows,
+ "maximum_columns", cols,
+ NULL);
gtk_widget_queue_resize (GTK_WIDGET (cal));
}
@@ -564,9 +586,10 @@ e_calendar_start_auto_move (ECalendar *cal,
gboolean moving_forward)
{
if (cal->timeout_id == 0) {
- cal->timeout_id = g_timeout_add (E_CALENDAR_AUTO_MOVE_TIMEOUT,
- e_calendar_auto_move_handler,
- cal);
+ cal->timeout_id = g_timeout_add (
+ E_CALENDAR_AUTO_MOVE_TIMEOUT,
+ e_calendar_auto_move_handler,
+ cal);
}
cal->timeout_delay = E_CALENDAR_AUTO_MOVE_TIMEOUT_DELAY;
cal->moving_forward = moving_forward;
@@ -578,9 +601,10 @@ e_calendar_start_auto_move_year (ECalendar *cal,
gboolean moving_forward)
{
if (cal->timeout_id == 0) {
- cal->timeout_id = g_timeout_add (E_CALENDAR_AUTO_MOVE_TIMEOUT,
- e_calendar_auto_move_year_handler,
- cal);
+ cal->timeout_id = g_timeout_add (
+ E_CALENDAR_AUTO_MOVE_TIMEOUT,
+ e_calendar_auto_move_year_handler,
+ cal);
}
cal->timeout_delay = E_CALENDAR_AUTO_MOVE_TIMEOUT_DELAY;
cal->moving_forward = moving_forward;
@@ -602,8 +626,9 @@ e_calendar_auto_move_year_handler (gpointer data)
cal->timeout_delay--;
} else {
offset = cal->moving_forward ? 12 : -12;
- e_calendar_item_set_first_month (calitem, calitem->year,
- calitem->month + offset);
+ e_calendar_item_set_first_month (
+ calitem, calitem->year,
+ calitem->month + offset);
}
return TRUE;
@@ -625,8 +650,9 @@ e_calendar_auto_move_handler (gpointer data)
cal->timeout_delay--;
} else {
offset = cal->moving_forward ? 1 : -1;
- e_calendar_item_set_first_month (calitem, calitem->year,
- calitem->month + offset);
+ e_calendar_item_set_first_month (
+ calitem, calitem->year,
+ calitem->month + offset);
}
return TRUE;
@@ -668,29 +694,33 @@ e_calendar_stop_auto_move (ECalendar *cal)
static void
e_calendar_on_prev_clicked (ECalendar *cal)
{
- e_calendar_item_set_first_month (cal->calitem, cal->calitem->year,
- cal->calitem->month - 1);
+ e_calendar_item_set_first_month (
+ cal->calitem, cal->calitem->year,
+ cal->calitem->month - 1);
}
static void
e_calendar_on_next_clicked (ECalendar *cal)
{
- e_calendar_item_set_first_month (cal->calitem, cal->calitem->year,
- cal->calitem->month + 1);
+ e_calendar_item_set_first_month (
+ cal->calitem, cal->calitem->year,
+ cal->calitem->month + 1);
}
static void
e_calendar_on_prev_year_clicked (ECalendar *cal)
{
- e_calendar_item_set_first_month (cal->calitem, cal->calitem->year,
- cal->calitem->month - 12);
+ e_calendar_item_set_first_month (
+ cal->calitem, cal->calitem->year,
+ cal->calitem->month - 12);
}
static void
e_calendar_on_next_year_clicked (ECalendar *cal)
{
- e_calendar_item_set_first_month (cal->calitem, cal->calitem->year,
- cal->calitem->month + 12);
+ e_calendar_item_set_first_month (
+ cal->calitem, cal->calitem->year,
+ cal->calitem->month + 12);
}
static gint
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index a12a36471d..0b1f05a6b8 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -188,11 +188,12 @@ ecb_draw (GnomeCanvasItem *item,
ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item);
cairo_save (cr);
- cairo_set_source_rgba (cr,
- ((ecb->priv->rgba >> 24) & 0xff) / 255.0,
- ((ecb->priv->rgba >> 16) & 0xff) / 255.0,
- ((ecb->priv->rgba >> 8) & 0xff) / 255.0,
- ( ecb->priv->rgba & 0xff) / 255.0);
+ cairo_set_source_rgba (
+ cr,
+ ((ecb->priv->rgba >> 24) & 0xff) / 255.0,
+ ((ecb->priv->rgba >> 16) & 0xff) / 255.0,
+ ((ecb->priv->rgba >> 8) & 0xff) / 255.0,
+ ( ecb->priv->rgba & 0xff) / 255.0);
cairo_paint (cr);
cairo_restore (cr);
}
@@ -235,34 +236,44 @@ ecb_class_init (ECanvasBackgroundClass *ecb_class)
ecb_class->style_set = ecb_style_set;
- g_object_class_install_property (object_class, PROP_FILL_COLOR,
- g_param_spec_string ("fill_color",
- "Fill color",
- "Fill color",
- NULL,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_FILL_COLOR_GDK,
- g_param_spec_boxed ("fill_color_gdk",
- "GDK fill color",
- "GDK fill color",
- GDK_TYPE_COLOR,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_FILL_COLOR_RGBA,
- g_param_spec_uint ("fill_color_rgba",
- "GDK fill color",
- "GDK fill color",
- 0, G_MAXUINT, 0,
- G_PARAM_READWRITE));
-
- ecb_signals[STYLE_SET] =
- g_signal_new ("style_set",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ECanvasBackgroundClass, style_set),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1, GTK_TYPE_STYLE);
+ g_object_class_install_property (
+ object_class,
+ PROP_FILL_COLOR,
+ g_param_spec_string (
+ "fill_color",
+ "Fill color",
+ "Fill color",
+ NULL,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_FILL_COLOR_GDK,
+ g_param_spec_boxed (
+ "fill_color_gdk",
+ "GDK fill color",
+ "GDK fill color",
+ GDK_TYPE_COLOR,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_FILL_COLOR_RGBA,
+ g_param_spec_uint (
+ "fill_color_rgba",
+ "GDK fill color",
+ "GDK fill color",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE));
+
+ ecb_signals[STYLE_SET] = g_signal_new (
+ "style_set",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ECanvasBackgroundClass, style_set),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ GTK_TYPE_STYLE);
}
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index 888563c0d8..1767c1ac14 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -82,30 +82,42 @@ e_canvas_vbox_class_init (ECanvasVboxClass *class)
item_class->event = e_canvas_vbox_event;
item_class->realize = e_canvas_vbox_realize;
- g_object_class_install_property (object_class, PROP_WIDTH,
- g_param_spec_double ("width",
- "Width",
- "Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_MINIMUM_WIDTH,
- g_param_spec_double ("minimum_width",
- "Minimum width",
- "Minimum Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_HEIGHT,
- g_param_spec_double ("height",
- "Height",
- "Height",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READABLE));
- g_object_class_install_property (object_class, PROP_SPACING,
- g_param_spec_double ("spacing",
- "Spacing",
- "Spacing",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_WIDTH,
+ g_param_spec_double (
+ "width",
+ "Width",
+ "Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_MINIMUM_WIDTH,
+ g_param_spec_double (
+ "minimum_width",
+ "Minimum width",
+ "Minimum Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_HEIGHT,
+ g_param_spec_double (
+ "height",
+ "Height",
+ "Height",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READABLE));
+ g_object_class_install_property (
+ object_class,
+ PROP_SPACING,
+ g_param_spec_double (
+ "spacing",
+ "Spacing",
+ "Spacing",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
}
static void
@@ -187,10 +199,11 @@ disconnect_item_cb (gpointer data,
vbox = E_CANVAS_VBOX (user_data);
item = GNOME_CANVAS_ITEM (data);
- g_signal_handlers_disconnect_matched (item,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL,
- vbox);
+ g_signal_handlers_disconnect_matched (
+ item,
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL,
+ vbox);
}
static void
@@ -268,12 +281,14 @@ e_canvas_vbox_real_add_item (ECanvasVbox *e_canvas_vbox,
GnomeCanvasItem *item)
{
e_canvas_vbox->items = g_list_append (e_canvas_vbox->items, item);
- g_object_weak_ref (G_OBJECT (item),
- e_canvas_vbox_remove_item, e_canvas_vbox);
+ g_object_weak_ref (
+ G_OBJECT (item),
+ e_canvas_vbox_remove_item, e_canvas_vbox);
if (GNOME_CANVAS_ITEM (e_canvas_vbox)->flags & GNOME_CANVAS_ITEM_REALIZED) {
- gnome_canvas_item_set (item,
- "width", (gdouble) e_canvas_vbox->minimum_width,
- NULL);
+ gnome_canvas_item_set (
+ item,
+ "width", (gdouble) e_canvas_vbox->minimum_width,
+ NULL);
e_canvas_item_request_reflow (item);
}
}
@@ -283,12 +298,14 @@ e_canvas_vbox_real_add_item_start (ECanvasVbox *e_canvas_vbox,
GnomeCanvasItem *item)
{
e_canvas_vbox->items = g_list_prepend (e_canvas_vbox->items, item);
- g_object_weak_ref (G_OBJECT (item),
- e_canvas_vbox_remove_item, e_canvas_vbox);
+ g_object_weak_ref (
+ G_OBJECT (item),
+ e_canvas_vbox_remove_item, e_canvas_vbox);
if (GNOME_CANVAS_ITEM (e_canvas_vbox)->flags & GNOME_CANVAS_ITEM_REALIZED) {
- gnome_canvas_item_set (item,
- "width", (gdouble) e_canvas_vbox->minimum_width,
- NULL);
+ gnome_canvas_item_set (
+ item,
+ "width", (gdouble) e_canvas_vbox->minimum_width,
+ NULL);
e_canvas_item_request_reflow (item);
}
}
@@ -302,9 +319,10 @@ e_canvas_vbox_resize_children (GnomeCanvasItem *item)
e_canvas_vbox = E_CANVAS_VBOX (item);
for (list = e_canvas_vbox->items; list; list = list->next) {
GnomeCanvasItem *child = GNOME_CANVAS_ITEM (list->data);
- gnome_canvas_item_set (child,
- "width", (gdouble) e_canvas_vbox->minimum_width,
- NULL);
+ gnome_canvas_item_set (
+ child,
+ "width", (gdouble) e_canvas_vbox->minimum_width,
+ NULL);
}
}
@@ -333,13 +351,15 @@ e_canvas_vbox_reflow (GnomeCanvasItem *item,
gdouble item_width;
list = e_canvas_vbox->items;
- g_object_get (list->data,
- "height", &item_height,
- "width", &item_width,
- NULL);
- e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (list->data),
- (gdouble) 0,
- (gdouble) running_height);
+ g_object_get (
+ list->data,
+ "height", &item_height,
+ "width", &item_width,
+ NULL);
+ e_canvas_item_move_absolute (
+ GNOME_CANVAS_ITEM (list->data),
+ (gdouble) 0,
+ (gdouble) running_height);
running_height += item_height;
if (max_width < item_width)
max_width = item_width;
@@ -348,14 +368,16 @@ e_canvas_vbox_reflow (GnomeCanvasItem *item,
for (; list; list = g_list_next (list)) {
running_height += e_canvas_vbox->spacing;
- g_object_get (list->data,
- "height", &item_height,
- "width", &item_width,
- NULL);
+ g_object_get (
+ list->data,
+ "height", &item_height,
+ "width", &item_width,
+ NULL);
- e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (list->data),
- (gdouble) 0,
- (gdouble) running_height);
+ e_canvas_item_move_absolute (
+ GNOME_CANVAS_ITEM (list->data),
+ (gdouble) 0,
+ (gdouble) running_height);
running_height += item_height;
if (max_width < item_width)
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 8cd1338db6..e2e9ddd0cc 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -356,7 +356,7 @@ canvas_style_set_recursive (GnomeCanvasItem *item,
}
}
- if (GNOME_IS_CANVAS_GROUP (item) ) {
+ if (GNOME_IS_CANVAS_GROUP (item)) {
GList *items = GNOME_CANVAS_GROUP (item)->item_list;
for (; items; items = items->next)
canvas_style_set_recursive (
@@ -379,8 +379,9 @@ canvas_dispose (GObject *object)
if (canvas->toplevel) {
if (canvas->visibility_notify_id)
- g_signal_handler_disconnect (canvas->toplevel,
- canvas->visibility_notify_id);
+ g_signal_handler_disconnect (
+ canvas->toplevel,
+ canvas->visibility_notify_id);
canvas->visibility_notify_id = 0;
g_object_unref (canvas->toplevel);
@@ -454,11 +455,12 @@ canvas_button_event (GtkWidget *widget,
canvas = GNOME_CANVAS (widget);
bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (canvas));
- d (g_print ("button %d, event type %d, grabbed=%p, current=%p\n",
- event->button,
- event->type,
- canvas->grabbed_item,
- canvas->current_item));
+ d (
+ g_print ("button %d, event type %d, grabbed=%p, current=%p\n",
+ event->button,
+ event->type,
+ canvas->grabbed_item,
+ canvas->current_item));
/* dispatch normally regardless of the event's window if an item has
has a pointer grab in effect */
@@ -709,8 +711,9 @@ e_canvas_item_invoke_reflow (GnomeCanvasItem *item,
if (item->flags & E_CANVAS_ITEM_NEEDS_REFLOW) {
ECanvasItemReflowFunc func;
func = (ECanvasItemReflowFunc)
- g_object_get_data (G_OBJECT (item),
- "ECanvasItem::reflow_callback");
+ g_object_get_data (
+ G_OBJECT (item),
+ "ECanvasItem::reflow_callback");
if (func)
func (item, flags);
}
diff --git a/widgets/misc/e-contact-map-window.c b/widgets/misc/e-contact-map-window.c
index 2d31cc8592..2e3aec5bcb 100644
--- a/widgets/misc/e-contact-map-window.c
+++ b/widgets/misc/e-contact-map-window.c
@@ -136,10 +136,12 @@ zoom_level_changed_cb (ChamplainView *view,
EContactMapWindow *window = user_data;
gint zoom_level = champlain_view_get_zoom_level (view);
- gtk_widget_set_sensitive (window->priv->zoom_in_btn,
+ gtk_widget_set_sensitive (
+ window->priv->zoom_in_btn,
(zoom_level < champlain_view_get_max_zoom_level (view)));
- gtk_widget_set_sensitive (window->priv->zoom_out_btn,
+ gtk_widget_set_sensitive (
+ window->priv->zoom_out_btn,
(zoom_level > champlain_view_get_min_zoom_level (view)));
}
@@ -158,11 +160,13 @@ map_contact_added_cb (EContactMap *map,
name = champlain_label_get_text (CHAMPLAIN_LABEL (marker));
- g_hash_table_insert (priv->hash_table,
+ g_hash_table_insert (
+ priv->hash_table,
g_strdup (name), marker);
gtk_list_store_append (priv->completion_model, &iter);
- gtk_list_store_set (priv->completion_model, &iter,
+ gtk_list_store_set (
+ priv->completion_model, &iter,
0, name, -1);
g_signal_connect (
@@ -236,8 +240,9 @@ contact_map_window_find_contact_cb (GtkButton *button,
EContactMapWindowPrivate *priv = E_CONTACT_MAP_WINDOW (user_data)->priv;
ClutterActor *marker;
- marker = g_hash_table_lookup (priv->hash_table,
- gtk_entry_get_text (GTK_ENTRY (priv->search_entry)));
+ marker = g_hash_table_lookup (
+ priv->hash_table,
+ gtk_entry_get_text (GTK_ENTRY (priv->search_entry)));
if (marker)
e_contact_map_zoom_on_marker (priv->map, marker);
@@ -349,8 +354,11 @@ e_contact_map_window_init (EContactMapWindow *window)
priv->tasks_cnt = 0;
- hash_table = g_hash_table_new_full (g_str_hash, g_str_equal,
- (GDestroyNotify) g_free, NULL);
+ hash_table = g_hash_table_new_full (
+ (GHashFunc) g_str_hash,
+ (GEqualFunc) g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) NULL);
priv->hash_table = hash_table;
gtk_window_set_title (GTK_WINDOW (window), _("Contacts Map"));
diff --git a/widgets/misc/e-contact-map.c b/widgets/misc/e-contact-map.c
index 38ca2d9609..3ad17b441f 100644
--- a/widgets/misc/e-contact-map.c
+++ b/widgets/misc/e-contact-map.c
@@ -266,7 +266,8 @@ e_contact_map_init (EContactMap *map)
map->priv = E_CONTACT_MAP_GET_PRIVATE (map);
- hash_table = g_hash_table_new_full (g_str_hash, g_str_equal,
+ hash_table = g_hash_table_new_full (
+ g_str_hash, g_str_equal,
(GDestroyNotify) g_free, NULL);
map->priv->markers = hash_table;
diff --git a/widgets/misc/e-contact-marker.c b/widgets/misc/e-contact-marker.c
index 98f1ea1cd4..9ac9417c9f 100644
--- a/widgets/misc/e-contact-marker.c
+++ b/widgets/misc/e-contact-marker.c
@@ -106,7 +106,8 @@ texture_new_from_pixbuf (GdkPixbuf *pixbuf,
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
texture = clutter_texture_new ();
- success = clutter_texture_set_from_rgb_data (CLUTTER_TEXTURE (texture),
+ success = clutter_texture_set_from_rgb_data (
+ CLUTTER_TEXTURE (texture),
data, has_alpha, width, height, rowstride,
(has_alpha ? 4: 3), flags, NULL);
@@ -227,7 +228,8 @@ draw_shadow (EContactMarker *marker,
clutter_container_add_actor (CLUTTER_CONTAINER (priv->content_group), shadow);
if (priv->shadow != NULL) {
- clutter_container_remove_actor (CLUTTER_CONTAINER (priv->content_group),
+ clutter_container_remove_actor (
+ CLUTTER_CONTAINER (priv->content_group),
priv->shadow);
}
@@ -263,7 +265,8 @@ draw_background (EContactMarker *marker,
clutter_color_darken (color, &darker_color);
- cairo_set_source_rgba (cr,
+ cairo_set_source_rgba (
+ cr,
color->red / 255.0,
color->green / 255.0,
color->blue / 255.0,
@@ -271,7 +274,8 @@ draw_background (EContactMarker *marker,
cairo_fill_preserve (cr);
cairo_set_line_width (cr, 1.0);
- cairo_set_source_rgba (cr,
+ cairo_set_source_rgba (
+ cr,
darker_color.red / 255.0,
darker_color.green / 255.0,
darker_color.blue / 255.0,
@@ -282,7 +286,8 @@ draw_background (EContactMarker *marker,
clutter_container_add_actor (CLUTTER_CONTAINER (priv->content_group), bg);
if (priv->background != NULL) {
- clutter_container_remove_actor (CLUTTER_CONTAINER (priv->content_group),
+ clutter_container_remove_actor (
+ CLUTTER_CONTAINER (priv->content_group),
priv->background);
}
@@ -307,33 +312,41 @@ draw_marker (EContactMarker *marker)
}
if (priv->text_actor == NULL) {
- priv->text_actor = clutter_text_new_with_text ("Serif 8",
- champlain_label_get_text (label));
+ priv->text_actor = clutter_text_new_with_text (
+ "Serif 8",
+ champlain_label_get_text (label));
champlain_label_set_font_name (label, "Serif 8");
}
text = CLUTTER_TEXT (priv->text_actor);
- clutter_text_set_text (text,
+ clutter_text_set_text (
+ text,
champlain_label_get_text (label));
- clutter_text_set_font_name (text,
+ clutter_text_set_font_name (
+ text,
champlain_label_get_font_name (label));
clutter_text_set_line_alignment (text, PANGO_ALIGN_CENTER);
clutter_text_set_line_wrap (text, TRUE);
clutter_text_set_line_wrap_mode (text, PANGO_WRAP_WORD);
- clutter_text_set_ellipsize (text,
+ clutter_text_set_ellipsize (
+ text,
champlain_label_get_ellipsize (label));
- clutter_text_set_attributes (text,
+ clutter_text_set_attributes (
+ text,
champlain_label_get_attributes (label));
- clutter_text_set_use_markup (text,
+ clutter_text_set_use_markup (
+ text,
champlain_label_get_use_markup (label));
if (priv->image) {
- clutter_actor_set_width (priv->text_actor,
+ clutter_actor_set_width (
+ priv->text_actor,
clutter_actor_get_width (priv->image));
total_height = clutter_actor_get_height (priv->image) + 2 *PADDING +
clutter_actor_get_height (priv->text_actor) + 2 *PADDING;
total_width = clutter_actor_get_width (priv->image) + 4 *PADDING;
- clutter_actor_set_position (priv->text_actor, PADDING,
+ clutter_actor_set_position (
+ priv->text_actor, PADDING,
clutter_actor_get_height (priv->image) + 2 *PADDING + 3);
} else {
total_height = clutter_actor_get_height (priv->text_actor) + 2 *PADDING;
@@ -345,8 +358,9 @@ draw_marker (EContactMarker *marker)
if (height > total_height)
total_height = height;
- clutter_text_set_color (CLUTTER_TEXT (priv->text_actor),
- (champlain_marker_get_selected (CHAMPLAIN_MARKER (marker)) ?
+ clutter_text_set_color (
+ CLUTTER_TEXT (priv->text_actor),
+ (champlain_marker_get_selected (CHAMPLAIN_MARKER (marker)) ?
champlain_marker_get_selection_text_color () :
champlain_label_get_text_color (CHAMPLAIN_LABEL (marker))));
if (clutter_actor_get_parent (priv->text_actor) == NULL)
@@ -390,7 +404,8 @@ queue_redraw (EContactMarker *marker)
EContactMarkerPrivate *priv = marker->priv;
if (!priv->redraw_id) {
- priv->redraw_id = g_idle_add_full (G_PRIORITY_DEFAULT,
+ priv->redraw_id = g_idle_add_full (
+ G_PRIORITY_DEFAULT,
(GSourceFunc) redraw_on_idle,
g_object_ref (marker),
(GDestroyNotify) g_object_unref);
@@ -457,7 +472,8 @@ pick (ClutterActor *self,
cogl_path_new ();
- cogl_set_source_color4ub (color->red,
+ cogl_set_source_color4ub (
+ color->red,
color->green,
color->blue,
color->alpha);
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index 7418a7f4a9..45c4f7148b 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -541,8 +541,9 @@ create_children (EDateEdit *dedit)
g_signal_connect (
priv->date_button, "clicked",
G_CALLBACK (on_date_button_clicked), dedit);
- gtk_box_pack_start (GTK_BOX (dedit), priv->date_button,
- FALSE, FALSE, 0);
+ gtk_box_pack_start (
+ GTK_BOX (dedit), priv->date_button,
+ FALSE, FALSE, 0);
a11y = gtk_widget_get_accessible (priv->date_button);
atk_object_set_description (a11y, _("Click this button to show a calendar"));
atk_object_set_name (a11y, _("Date"));
@@ -618,11 +619,13 @@ create_children (EDateEdit *dedit)
gtk_widget_show (priv->space);
priv->cal_popup = gtk_window_new (GTK_WINDOW_POPUP);
- gtk_window_set_type_hint (GTK_WINDOW (priv->cal_popup),
- GDK_WINDOW_TYPE_HINT_COMBO);
- gtk_widget_set_events (priv->cal_popup,
- gtk_widget_get_events (priv->cal_popup)
- | GDK_KEY_PRESS_MASK);
+ gtk_window_set_type_hint (
+ GTK_WINDOW (priv->cal_popup),
+ GDK_WINDOW_TYPE_HINT_COMBO);
+ gtk_widget_set_events (
+ priv->cal_popup,
+ gtk_widget_get_events (priv->cal_popup)
+ | GDK_KEY_PRESS_MASK);
g_signal_connect (
priv->cal_popup, "delete_event",
G_CALLBACK (on_date_popup_delete_event), dedit);
@@ -645,10 +648,11 @@ create_children (EDateEdit *dedit)
priv->calendar = e_calendar_new ();
calendar = E_CALENDAR (priv->calendar);
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (calendar->calitem),
- "maximum_days_selected", 1,
- "move_selection_when_moving", FALSE,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (calendar->calitem),
+ "maximum_days_selected", 1,
+ "move_selection_when_moving", FALSE,
+ NULL);
g_signal_connect (
calendar->calitem, "selection_changed",
@@ -813,10 +817,12 @@ e_date_edit_set_time (EDateEdit *dedit,
priv = dedit->priv;
if (the_time == -1) {
- date_changed = e_date_edit_set_date_internal (dedit, TRUE,
- TRUE, 0, 0, 0);
- time_changed = e_date_edit_set_time_internal (dedit, TRUE,
- TRUE, 0, 0);
+ date_changed = e_date_edit_set_date_internal (
+ dedit, TRUE,
+ TRUE, 0, 0, 0);
+ time_changed = e_date_edit_set_time_internal (
+ dedit, TRUE,
+ TRUE, 0, 0);
} else {
if (the_time == 0) {
if (priv->time_callback) {
@@ -829,15 +835,17 @@ e_date_edit_set_time (EDateEdit *dedit,
tmp_tm = *localtime (&the_time);
}
- date_changed = e_date_edit_set_date_internal (dedit, TRUE,
- FALSE,
- tmp_tm.tm_year,
- tmp_tm.tm_mon,
- tmp_tm.tm_mday);
- time_changed = e_date_edit_set_time_internal (dedit, TRUE,
- FALSE,
- tmp_tm.tm_hour,
- tmp_tm.tm_min);
+ date_changed = e_date_edit_set_date_internal (
+ dedit, TRUE,
+ FALSE,
+ tmp_tm.tm_year,
+ tmp_tm.tm_mon,
+ tmp_tm.tm_mday);
+ time_changed = e_date_edit_set_time_internal (
+ dedit, TRUE,
+ FALSE,
+ tmp_tm.tm_hour,
+ tmp_tm.tm_min);
}
e_date_edit_update_date_entry (dedit);
@@ -904,9 +912,10 @@ e_date_edit_set_date (EDateEdit *dedit,
g_return_if_fail (E_IS_DATE_EDIT (dedit));
- date_changed = e_date_edit_set_date_internal (dedit, TRUE, FALSE,
- year - 1900, month - 1,
- day);
+ date_changed = e_date_edit_set_date_internal (
+ dedit, TRUE, FALSE,
+ year - 1900, month - 1,
+ day);
e_date_edit_update_date_entry (dedit);
e_date_edit_update_time_combo_state (dedit);
@@ -1004,10 +1013,12 @@ e_date_edit_set_date_and_time_of_day (EDateEdit *dedit,
g_return_if_fail (E_IS_DATE_EDIT (dedit));
- date_changed = e_date_edit_set_date_internal (dedit, TRUE, FALSE,
- year - 1900, month - 1, day);
- time_changed = e_date_edit_set_time_internal (dedit, TRUE, FALSE,
- hour, minute);
+ date_changed = e_date_edit_set_date_internal (
+ dedit, TRUE, FALSE,
+ year - 1900, month - 1, day);
+ time_changed = e_date_edit_set_time_internal (
+ dedit, TRUE, FALSE,
+ hour, minute);
e_date_edit_update_date_entry (dedit);
e_date_edit_update_time_entry (dedit);
@@ -1050,7 +1061,7 @@ e_date_edit_set_show_date (EDateEdit *dedit,
priv = dedit->priv;
- if ((priv->show_date ? 1 : 0) == (show_date ? 1 : 0))
+ if (priv->show_date == show_date)
return;
priv->show_date = show_date;
@@ -1107,7 +1118,7 @@ e_date_edit_set_show_time (EDateEdit *dedit,
priv = dedit->priv;
- if ((priv->show_time ? 1 : 0) == (show_time ? 1 : 0))
+ if (priv->show_time == show_time)
return;
priv->show_time = show_time;
@@ -1250,7 +1261,7 @@ e_date_edit_set_use_24_hour_format (EDateEdit *dedit,
{
g_return_if_fail (E_IS_DATE_EDIT (dedit));
- if ((dedit->priv->use_24_hour_format ? 1 : 0) == (use_24_hour_format ? 1 : 0))
+ if (dedit->priv->use_24_hour_format == use_24_hour_format)
return;
dedit->priv->use_24_hour_format = use_24_hour_format;
@@ -1278,7 +1289,7 @@ e_date_edit_set_allow_no_date_set (EDateEdit *dedit,
{
g_return_if_fail (E_IS_DATE_EDIT (dedit));
- if ((dedit->priv->allow_no_date_set ? 1 : 0) == (allow_no_date_set ? 1 : 0))
+ if (dedit->priv->allow_no_date_set == allow_no_date_set)
return;
dedit->priv->allow_no_date_set = allow_no_date_set;
@@ -1369,10 +1380,12 @@ e_date_edit_show_date_popup (EDateEdit *dedit)
e_calendar_item_set_selection (calendar->calitem, NULL, NULL);
} else {
g_date_clear (&selected_day, 1);
- g_date_set_dmy (&selected_day, mtm.tm_mday, mtm.tm_mon + 1,
- mtm.tm_year + 1900);
- e_calendar_item_set_selection (calendar->calitem,
- &selected_day, NULL);
+ g_date_set_dmy (
+ &selected_day, mtm.tm_mday, mtm.tm_mon + 1,
+ mtm.tm_year + 1900);
+ e_calendar_item_set_selection (
+ calendar->calitem,
+ &selected_day, NULL);
}
/* FIXME: Hack. Change ECalendarItem so it doesn't queue signal
@@ -1450,9 +1463,10 @@ on_date_popup_date_selected (ECalendarItem *calitem,
if (!e_calendar_item_get_selection (calitem, &start_date, &end_date))
return;
- e_date_edit_set_date (dedit, g_date_get_year (&start_date),
- g_date_get_month (&start_date),
- g_date_get_day (&start_date));
+ e_date_edit_set_date (
+ dedit, g_date_get_year (&start_date),
+ g_date_get_month (&start_date),
+ g_date_get_day (&start_date));
}
static void
@@ -1482,8 +1496,9 @@ on_date_popup_today_button_clicked (GtkWidget *button,
tmp_tm = *localtime (&t);
}
- e_date_edit_set_date (dedit, tmp_tm.tm_year + 1900,
- tmp_tm.tm_mon + 1, tmp_tm.tm_mday);
+ e_date_edit_set_date (
+ dedit, tmp_tm.tm_year + 1900,
+ tmp_tm.tm_mon + 1, tmp_tm.tm_mday);
}
static void
@@ -1728,8 +1743,8 @@ on_date_entry_key_press (GtkWidget *widget,
if (event->state & GDK_MOD1_MASK
&& (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down
|| event->keyval == GDK_KEY_Return)) {
- g_signal_stop_emission_by_name (widget,
- "key_press_event");
+ g_signal_stop_emission_by_name (
+ widget, "key_press_event");
e_date_edit_show_date_popup (dedit);
return TRUE;
}
@@ -1769,7 +1784,8 @@ on_time_entry_key_press (GtkWidget *widget,
/* Stop the return key from emitting the activate signal, and check
* if we need to emit a "time_changed" signal. */
if (event->keyval == GDK_KEY_Return) {
- g_signal_stop_emission_by_name (widget,
+ g_signal_stop_emission_by_name (
+ widget,
"key_press_event");
e_date_edit_check_time_changed (dedit);
return TRUE;
@@ -1793,7 +1809,8 @@ on_time_entry_key_release (GtkWidget *widget,
EDateEdit *dedit)
{
if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down) {
- g_signal_stop_emission_by_name (widget,
+ g_signal_stop_emission_by_name (
+ widget,
"key_release_event");
e_date_edit_check_time_changed (dedit);
return TRUE;
@@ -1817,11 +1834,12 @@ on_date_entry_focus_out (GtkEntry *entry,
e_date_edit_check_date_changed (dedit);
if (!e_date_edit_date_is_valid (dedit)) {
- msg_dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- "%s", _("Invalid Date Value"));
+ msg_dialog = gtk_message_dialog_new (
+ NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ "%s", _("Invalid Date Value"));
gtk_dialog_run (GTK_DIALOG (msg_dialog));
gtk_widget_destroy (msg_dialog);
e_date_edit_get_date (
@@ -1861,11 +1879,12 @@ on_time_entry_focus_out (GtkEntry *entry,
e_date_edit_check_time_changed (dedit);
if (!e_date_edit_time_is_valid (dedit)) {
- msg_dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- "%s", _("Invalid Time Value"));
+ msg_dialog = gtk_message_dialog_new (
+ NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ "%s", _("Invalid Time Value"));
gtk_dialog_run (GTK_DIALOG (msg_dialog));
gtk_widget_destroy (msg_dialog);
e_date_edit_set_time (dedit,e_date_edit_get_time (dedit));
@@ -1892,8 +1911,8 @@ add_relation (EDateEdit *dedit,
set = atk_object_ref_relation_set (a11yWidget);
if (set != NULL) {
- relation = atk_relation_set_get_relation_by_type (set,
- ATK_RELATION_LABELLED_BY);
+ relation = atk_relation_set_get_relation_by_type (
+ set, ATK_RELATION_LABELLED_BY);
/* check whether has a labelled_by relation already */
if (relation != NULL)
return;
@@ -1903,13 +1922,14 @@ add_relation (EDateEdit *dedit,
if (!set)
return;
- relation = atk_relation_set_get_relation_by_type (set,
- ATK_RELATION_LABELLED_BY);
+ relation = atk_relation_set_get_relation_by_type (
+ set, ATK_RELATION_LABELLED_BY);
if (relation != NULL) {
target = atk_relation_get_target (relation);
target_object = g_ptr_array_index (target, 0);
if (ATK_IS_OBJECT (target_object)) {
- atk_object_add_relationship (a11yWidget,
+ atk_object_add_relationship (
+ a11yWidget,
ATK_RELATION_LABELLED_BY,
ATK_OBJECT (target_object));
}
@@ -2127,10 +2147,11 @@ e_date_edit_check_date_changed (EDateEdit *dedit)
tmp_tm.tm_mday = 0;
}
- date_changed = e_date_edit_set_date_internal (dedit, valid, none,
- tmp_tm.tm_year,
- tmp_tm.tm_mon,
- tmp_tm.tm_mday);
+ date_changed = e_date_edit_set_date_internal (
+ dedit, valid, none,
+ tmp_tm.tm_year,
+ tmp_tm.tm_mon,
+ tmp_tm.tm_mday);
if (date_changed) {
priv->has_been_changed = TRUE;
@@ -2161,9 +2182,10 @@ e_date_edit_check_time_changed (EDateEdit *dedit)
else if (!e_date_edit_parse_time (dedit, time_text, &tmp_tm))
valid = FALSE;
- time_changed = e_date_edit_set_time_internal (dedit, valid, none,
- tmp_tm.tm_hour,
- tmp_tm.tm_min);
+ time_changed = e_date_edit_set_time_internal (
+ dedit, valid, none,
+ tmp_tm.tm_hour,
+ tmp_tm.tm_min);
if (time_changed) {
e_date_edit_update_time_entry (dedit);
diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c
index 75cee65e3c..9e06324ab6 100644
--- a/widgets/misc/e-import-assistant.c
+++ b/widgets/misc/e-import-assistant.c
@@ -914,7 +914,8 @@ prepare_simple_page (GtkAssistant *assistant,
gchar *title;
/* only one importer found, make it even simpler */
- gtk_label_set_text (GTK_LABEL (page->actionlabel),
+ gtk_label_set_text (
+ GTK_LABEL (page->actionlabel),
page->has_preview ?
_("Preview data to be imported") :
_("Choose the destination for this import"));
@@ -931,7 +932,7 @@ prepare_simple_page (GtkAssistant *assistant,
gtk_label_set_text (
GTK_LABEL (page->actionlabel),
_("Select what type of file you "
- "want to import from the list."));
+ "want to import from the list."));
gtk_widget_show (page->filetypetable);
diff --git a/widgets/misc/e-mail-signature-manager.c b/widgets/misc/e-mail-signature-manager.c
index 56237541dd..66463336ea 100644
--- a/widgets/misc/e-mail-signature-manager.c
+++ b/widgets/misc/e-mail-signature-manager.c
@@ -691,7 +691,7 @@ e_mail_signature_manager_set_prefer_html (EMailSignatureManager *manager,
{
g_return_if_fail (E_IS_MAIL_SIGNATURE_MANAGER (manager));
- if ((manager->priv->prefer_html ? 1 : 0) == (prefer_html ? 1 : 0))
+ if (manager->priv->prefer_html == prefer_html)
return;
manager->priv->prefer_html = prefer_html;
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index d35988cb50..40fe589a8c 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -342,9 +342,10 @@ e_map_tweens_compute_matrix (EMap *map,
}
gtk_widget_get_allocation (GTK_WIDGET (map), &allocation);
- cairo_matrix_init_translate (matrix,
- allocation.width / 2.0,
- allocation.height / 2.0);
+ cairo_matrix_init_translate (
+ matrix,
+ allocation.width / 2.0,
+ allocation.height / 2.0);
e_map_world_to_render_surface (map, longitude, latitude, &x, &y);
cairo_matrix_scale (matrix, zoom, zoom);
@@ -385,7 +386,8 @@ e_map_set_hadjustment_values (EMap *map)
old_value = gtk_adjustment_get_value (adj);
new_upper = MAX (allocation.width, gdk_pixbuf_get_width (priv->map_pixbuf));
- g_object_set (adj,
+ g_object_set (
+ adj,
"lower", 0.0,
"upper", new_upper,
"page-size", (gdouble) allocation.height,
@@ -413,7 +415,8 @@ e_map_set_vadjustment_values (EMap *map)
old_value = gtk_adjustment_get_value (adj);
new_upper = MAX (allocation.height, gdk_pixbuf_get_height (priv->map_pixbuf));
- g_object_set (adj,
+ g_object_set (
+ adj,
"lower", 0.0,
"upper", new_upper,
"page-size", (gdouble) allocation.height,
@@ -1305,11 +1308,12 @@ update_render_point (EMap *map,
cairo_mask_surface (cr, mask, px - 2, py - 2);
cairo_surface_destroy (mask);
- cairo_set_source_rgba (cr,
- ((point->rgba >> 24) & 0xff) / 255.0,
- ((point->rgba >> 16) & 0xff) / 255.0,
- ((point->rgba >> 8) & 0xff) / 255.0,
- ( point->rgba & 0xff) / 255.0);
+ cairo_set_source_rgba (
+ cr,
+ ((point->rgba >> 24) & 0xff) / 255.0,
+ ((point->rgba >> 16) & 0xff) / 255.0,
+ ((point->rgba >> 8) & 0xff) / 255.0,
+ ( point->rgba & 0xff) / 255.0);
mask = cairo_image_surface_create_for_data (mask2, CAIRO_FORMAT_A8, 3, 3, 4);
cairo_mask_surface (cr, mask, px - 1, py - 1);
cairo_surface_destroy (mask);
@@ -1330,9 +1334,10 @@ repaint_point (EMap *map,
e_map_world_to_window (map, point->longitude, point->latitude, &px, &py);
- gtk_widget_queue_draw_area (GTK_WIDGET (map),
- (gint) px - 2, (gint) py - 2,
- 5, 5);
+ gtk_widget_queue_draw_area (
+ GTK_WIDGET (map),
+ (gint) px - 2, (gint) py - 2,
+ 5, 5);
}
static void
@@ -1407,18 +1412,20 @@ set_scroll_area (EMap *view,
priv->xofs = CLAMP (priv->xofs, 0, width - allocation.width);
priv->yofs = CLAMP (priv->yofs, 0, height - allocation.height);
- gtk_adjustment_configure (priv->hadjustment,
- priv->xofs,
- 0, width,
- SCROLL_STEP_SIZE,
- allocation.width / 2,
- allocation.width);
- gtk_adjustment_configure (priv->vadjustment,
- priv->yofs,
- 0, height,
- SCROLL_STEP_SIZE,
- allocation.height / 2,
- allocation.height);
+ gtk_adjustment_configure (
+ priv->hadjustment,
+ priv->xofs,
+ 0, width,
+ SCROLL_STEP_SIZE,
+ allocation.width / 2,
+ allocation.width);
+ gtk_adjustment_configure (
+ priv->vadjustment,
+ priv->yofs,
+ 0, height,
+ SCROLL_STEP_SIZE,
+ allocation.height / 2,
+ allocation.height);
g_object_thaw_notify (G_OBJECT (priv->hadjustment));
g_object_thaw_notify (G_OBJECT (priv->vadjustment));
diff --git a/widgets/misc/e-online-button.c b/widgets/misc/e-online-button.c
index 41b81f4b94..a3921a779f 100644
--- a/widgets/misc/e-online-button.c
+++ b/widgets/misc/e-online-button.c
@@ -190,7 +190,7 @@ e_online_button_set_online (EOnlineButton *button,
g_return_if_fail (E_IS_ONLINE_BUTTON (button));
- if ((button->priv->online ? 1 : 0) == (online ? 1 : 0))
+ if (button->priv->online == online)
return;
button->priv->online = online;
diff --git a/widgets/misc/e-picture-gallery.c b/widgets/misc/e-picture-gallery.c
index dc455400b3..40e621b1ca 100644
--- a/widgets/misc/e-picture-gallery.c
+++ b/widgets/misc/e-picture-gallery.c
@@ -66,7 +66,8 @@ update_file_iter (GtkListStore *list_store,
uri = g_file_get_uri (file);
- file_info = g_file_query_info (file,
+ file_info = g_file_query_info (
+ file,
G_FILE_ATTRIBUTE_THUMBNAIL_PATH ","
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED ","
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME ","
@@ -111,7 +112,8 @@ update_file_iter (GtkListStore *list_store,
}
res = TRUE;
- gtk_list_store_set (list_store, iter,
+ gtk_list_store_set (
+ list_store, iter,
COL_PIXBUF, pixbuf,
COL_URI, uri,
COL_FILENAME_TEXT, filename_text ? filename_text : filename,
@@ -165,7 +167,8 @@ find_file_uri (GtkListStore *list_store,
do {
gchar *iter_uri = NULL;
- gtk_tree_model_get (model, iter,
+ gtk_tree_model_get (
+ model, iter,
COL_URI, &iter_uri,
-1);
diff --git a/widgets/misc/e-popup-action.c b/widgets/misc/e-popup-action.c
index f5d8445d77..27c90f67c3 100644
--- a/widgets/misc/e-popup-action.c
+++ b/widgets/misc/e-popup-action.c
@@ -139,7 +139,7 @@ popup_action_set_use_action_appearance (EPopupAction *popup_action,
GtkActivatable *activatable;
GtkAction *related_action;
- if ((popup_action->priv->use_action_appearance ? 1 : 0) == (use_action_appearance ? 1 : 0))
+ if (popup_action->priv->use_action_appearance == use_action_appearance)
return;
popup_action->priv->use_action_appearance = use_action_appearance;
diff --git a/widgets/misc/e-preferences-window.c b/widgets/misc/e-preferences-window.c
index 741cd74fd8..83c5ed0fd6 100644
--- a/widgets/misc/e-preferences-window.c
+++ b/widgets/misc/e-preferences-window.c
@@ -595,7 +595,8 @@ e_preferences_window_setup (EPreferencesWindow *window)
gtk_scrolled_window_set_policy (scrolled, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (scrolled, GTK_SHADOW_NONE);
- gtk_viewport_set_shadow_type (GTK_VIEWPORT (gtk_bin_get_child (GTK_BIN (scrolled))),
+ gtk_viewport_set_shadow_type (
+ GTK_VIEWPORT (gtk_bin_get_child (GTK_BIN (scrolled))),
GTK_SHADOW_NONE);
gtk_widget_show (content);
diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c
index 29c85c5b29..2e98143b1a 100644
--- a/widgets/misc/e-printable.c
+++ b/widgets/misc/e-printable.c
@@ -53,53 +53,64 @@ e_printable_class_init (EPrintableClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
- e_printable_signals[PRINT_PAGE] =
- g_signal_new ("print_page",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EPrintableClass, print_page),
- NULL, NULL,
- e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOLEAN,
- G_TYPE_NONE, 4, G_TYPE_OBJECT, G_TYPE_DOUBLE,
- G_TYPE_DOUBLE, G_TYPE_BOOLEAN);
-
- e_printable_signals[DATA_LEFT] =
- g_signal_new ("data_left",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EPrintableClass, data_left),
- NULL, NULL,
- e_marshal_BOOLEAN__NONE,
- G_TYPE_BOOLEAN, 0, G_TYPE_NONE);
-
- e_printable_signals[RESET] =
- g_signal_new ("reset",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EPrintableClass, reset),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0, G_TYPE_NONE);
-
- e_printable_signals[HEIGHT] =
- g_signal_new ("height",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EPrintableClass, height),
- NULL, NULL,
- e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOLEAN,
- G_TYPE_DOUBLE, 4, G_TYPE_OBJECT, G_TYPE_DOUBLE,
- G_TYPE_DOUBLE, G_TYPE_BOOLEAN);
-
- e_printable_signals[WILL_FIT] =
- g_signal_new ("will_fit",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EPrintableClass, will_fit),
- NULL, NULL,
- e_marshal_BOOLEAN__OBJECT_DOUBLE_DOUBLE_BOOLEAN,
- G_TYPE_BOOLEAN, 4, G_TYPE_OBJECT, G_TYPE_DOUBLE,
- G_TYPE_DOUBLE, G_TYPE_BOOLEAN);
+ e_printable_signals[PRINT_PAGE] = g_signal_new (
+ "print_page",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EPrintableClass, print_page),
+ NULL, NULL,
+ e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOLEAN,
+ G_TYPE_NONE, 4,
+ G_TYPE_OBJECT,
+ G_TYPE_DOUBLE,
+ G_TYPE_DOUBLE,
+ G_TYPE_BOOLEAN);
+
+ e_printable_signals[DATA_LEFT] = g_signal_new (
+ "data_left",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EPrintableClass, data_left),
+ NULL, NULL,
+ e_marshal_BOOLEAN__NONE,
+ G_TYPE_BOOLEAN, 0,
+ G_TYPE_NONE);
+
+ e_printable_signals[RESET] = g_signal_new (
+ "reset",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EPrintableClass, reset),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0,
+ G_TYPE_NONE);
+
+ e_printable_signals[HEIGHT] = g_signal_new (
+ "height",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EPrintableClass, height),
+ NULL, NULL,
+ e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOLEAN,
+ G_TYPE_DOUBLE, 4,
+ G_TYPE_OBJECT,
+ G_TYPE_DOUBLE,
+ G_TYPE_DOUBLE,
+ G_TYPE_BOOLEAN);
+
+ e_printable_signals[WILL_FIT] = g_signal_new (
+ "will_fit",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EPrintableClass, will_fit),
+ NULL, NULL,
+ e_marshal_BOOLEAN__OBJECT_DOUBLE_DOUBLE_BOOLEAN,
+ G_TYPE_BOOLEAN, 4,
+ G_TYPE_OBJECT,
+ G_TYPE_DOUBLE,
+ G_TYPE_DOUBLE,
+ G_TYPE_BOOLEAN);
class->print_page = NULL;
class->data_left = NULL;
@@ -130,12 +141,13 @@ e_printable_print_page (EPrintable *e_printable,
g_return_if_fail (e_printable != NULL);
g_return_if_fail (E_IS_PRINTABLE (e_printable));
- g_signal_emit (e_printable,
- e_printable_signals[PRINT_PAGE], 0,
- context,
- width,
- height,
- quantized);
+ g_signal_emit (
+ e_printable,
+ e_printable_signals[PRINT_PAGE], 0,
+ context,
+ width,
+ height,
+ quantized);
}
gboolean
@@ -146,9 +158,10 @@ e_printable_data_left (EPrintable *e_printable)
g_return_val_if_fail (e_printable != NULL, FALSE);
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE);
- g_signal_emit (e_printable,
- e_printable_signals[DATA_LEFT], 0,
- &ret_val);
+ g_signal_emit (
+ e_printable,
+ e_printable_signals[DATA_LEFT], 0,
+ &ret_val);
return ret_val;
}
@@ -159,8 +172,9 @@ 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 (e_printable,
- e_printable_signals[RESET], 0);
+ g_signal_emit (
+ e_printable,
+ e_printable_signals[RESET], 0);
}
gdouble
@@ -175,13 +189,14 @@ e_printable_height (EPrintable *e_printable,
g_return_val_if_fail (e_printable != NULL, -1);
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), -1);
- g_signal_emit (e_printable,
- e_printable_signals[HEIGHT], 0,
- context,
- width,
- max_height,
- quantized,
- &ret_val);
+ g_signal_emit (
+ e_printable,
+ e_printable_signals[HEIGHT], 0,
+ context,
+ width,
+ max_height,
+ quantized,
+ &ret_val);
return ret_val;
}
@@ -198,13 +213,14 @@ e_printable_will_fit (EPrintable *e_printable,
g_return_val_if_fail (e_printable != NULL, FALSE);
g_return_val_if_fail (E_IS_PRINTABLE (e_printable), FALSE);
- g_signal_emit (e_printable,
- e_printable_signals[WILL_FIT], 0,
- context,
- width,
- max_height,
- quantized,
- &ret_val);
+ g_signal_emit (
+ e_printable,
+ e_printable_signals[WILL_FIT], 0,
+ context,
+ width,
+ max_height,
+ quantized,
+ &ret_val);
return ret_val;
}
diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c
index 71990f1bd3..f2f5b93379 100644
--- a/widgets/misc/e-selection-model-array.c
+++ b/widgets/misc/e-selection-model-array.c
@@ -421,7 +421,7 @@ esma_change_range (ESelectionModel *selection,
ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY (selection);
if (start != end) {
if (selection->sorter && e_sorter_needs_sorting (selection->sorter)) {
- for ( i = start; i < end; i++) {
+ for (i = start; i < end; i++) {
e_bit_array_change_one_row (esma->eba, e_sorter_sorted_to_model (selection->sorter, i), grow);
}
} else {
@@ -503,14 +503,18 @@ esma_real_move_selection_end (ESelectionModel *selection,
gint new_start;
gint new_end;
if (selection->sorter && e_sorter_needs_sorting (selection->sorter)) {
- old_start = MIN (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
- e_sorter_model_to_sorted (selection->sorter, esma->cursor_row));
- old_end = MAX (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
- e_sorter_model_to_sorted (selection->sorter, esma->cursor_row)) + 1;
- new_start = MIN (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
- e_sorter_model_to_sorted (selection->sorter, row));
- new_end = MAX (e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
- e_sorter_model_to_sorted (selection->sorter, row)) + 1;
+ old_start = MIN (
+ e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
+ e_sorter_model_to_sorted (selection->sorter, esma->cursor_row));
+ old_end = MAX (
+ e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
+ e_sorter_model_to_sorted (selection->sorter, esma->cursor_row)) + 1;
+ new_start = MIN (
+ e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
+ e_sorter_model_to_sorted (selection->sorter, row));
+ new_end = MAX (
+ e_sorter_model_to_sorted (selection->sorter, esma->selection_start_row),
+ e_sorter_model_to_sorted (selection->sorter, row)) + 1;
} else {
old_start = MIN (esma->selection_start_row, esma->cursor_row);
old_end = MAX (esma->selection_start_row, esma->cursor_row) + 1;
@@ -620,18 +624,24 @@ e_selection_model_array_class_init (ESelectionModelArrayClass *class)
class->get_row_count = NULL;
- g_object_class_install_property (object_class, PROP_CURSOR_ROW,
- g_param_spec_int ("cursor_row",
- "Cursor Row",
- NULL,
- 0, G_MAXINT, 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CURSOR_COL,
- g_param_spec_int ("cursor_col",
- "Cursor Column",
- NULL,
- 0, G_MAXINT, 0,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_CURSOR_ROW,
+ g_param_spec_int (
+ "cursor_row",
+ "Cursor Row",
+ NULL,
+ 0, G_MAXINT, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_CURSOR_COL,
+ g_param_spec_int (
+ "cursor_col",
+ "Cursor Column",
+ NULL,
+ 0, G_MAXINT, 0,
+ G_PARAM_READWRITE));
}
diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c
index fc73df6b5e..fece615838 100644
--- a/widgets/misc/e-selection-model.c
+++ b/widgets/misc/e-selection-model.c
@@ -538,12 +538,14 @@ e_selection_model_do_something (ESelectionModel *selection,
break;
}
e_selection_model_change_cursor (selection, row, col);
- g_signal_emit (selection,
- signals[CURSOR_CHANGED], 0,
- row, col);
- g_signal_emit (selection,
- signals[CURSOR_ACTIVATED], 0,
- row, col);
+ g_signal_emit (
+ selection,
+ signals[CURSOR_CHANGED], 0,
+ row, col);
+ g_signal_emit (
+ selection,
+ signals[CURSOR_ACTIVATED], 0,
+ row, col);
}
}
@@ -572,9 +574,10 @@ e_selection_model_maybe_do_something (ESelectionModel *selection,
if (e_selection_model_is_row_selected (selection, row)) {
e_selection_model_change_cursor (selection, row, col);
- g_signal_emit (selection,
- signals[CURSOR_CHANGED], 0,
- row, col);
+ g_signal_emit (
+ selection,
+ signals[CURSOR_CHANGED], 0,
+ row, col);
return FALSE;
} else {
e_selection_model_do_something (selection, row, col, state);
@@ -649,13 +652,15 @@ e_selection_model_select_as_key_press (ESelectionModel *selection,
}
if (row != -1) {
e_selection_model_change_cursor (selection, row, col);
- g_signal_emit (selection,
- signals[CURSOR_CHANGED], 0,
- row, col);
+ g_signal_emit (
+ selection,
+ signals[CURSOR_CHANGED], 0,
+ row, col);
if (cursor_activated)
- g_signal_emit (selection,
- signals[CURSOR_ACTIVATED], 0,
- row, col);
+ g_signal_emit (
+ selection,
+ signals[CURSOR_ACTIVATED], 0,
+ row, col);
}
}
@@ -722,9 +727,10 @@ e_selection_model_key_press (ESelectionModel *selection,
break;
e_selection_model_toggle_single_row (selection, row);
- g_signal_emit (selection,
- signals[CURSOR_ACTIVATED], 0,
- row, col);
+ g_signal_emit (
+ selection,
+ signals[CURSOR_ACTIVATED], 0,
+ row, col);
return TRUE;
}
break;
@@ -734,9 +740,10 @@ e_selection_model_key_press (ESelectionModel *selection,
gint row = e_selection_model_cursor_row (selection);
gint col = e_selection_model_cursor_col (selection);
e_selection_model_select_single_row (selection, row);
- g_signal_emit (selection,
- signals[CURSOR_ACTIVATED], 0,
- row, col);
+ g_signal_emit (
+ selection,
+ signals[CURSOR_ACTIVATED], 0,
+ row, col);
return TRUE;
}
break;
diff --git a/widgets/misc/e-send-options.c b/widgets/misc/e-send-options.c
index 4b54c58157..748f7b83b5 100644
--- a/widgets/misc/e-send-options.c
+++ b/widgets/misc/e-send-options.c
@@ -648,7 +648,7 @@ e_send_options_cb (GtkDialog *dialog,
break;
}
- g_signal_emit (G_OBJECT (func_data), signals[SOD_RESPONSE], 0, state);
+ g_signal_emit (func_data, signals[SOD_RESPONSE], 0, state);
}
gboolean
diff --git a/widgets/misc/e-source-config.c b/widgets/misc/e-source-config.c
index 9b4ad13f26..f5ef35287c 100644
--- a/widgets/misc/e-source-config.c
+++ b/widgets/misc/e-source-config.c
@@ -1335,9 +1335,9 @@ e_source_config_add_secure_connection (ESourceConfig *config,
static gboolean
secure_to_port_cb (GBinding *binding,
- const GValue *source_value,
- GValue *target_value,
- gpointer user_data)
+ const GValue *source_value,
+ GValue *target_value,
+ gpointer user_data)
{
GObject *authentication_extension;
guint16 port;
diff --git a/widgets/misc/e-spell-entry.c b/widgets/misc/e-spell-entry.c
index afc8c0e3bf..56f7c14f8c 100644
--- a/widgets/misc/e-spell-entry.c
+++ b/widgets/misc/e-spell-entry.c
@@ -323,8 +323,9 @@ replace_word (GtkWidget *menuitem,
gtk_editable_delete_text (GTK_EDITABLE (entry), start, end);
gtk_editable_set_position (GTK_EDITABLE (entry), start);
- gtk_editable_insert_text (GTK_EDITABLE (entry), newword, strlen (newword),
- &start);
+ gtk_editable_insert_text (
+ GTK_EDITABLE (entry), newword, strlen (newword),
+ &start);
gtk_editable_set_position (GTK_EDITABLE (entry), cursor);
checker = g_object_get_data (G_OBJECT (menuitem), "spell-entry-checker");
@@ -382,7 +383,7 @@ build_suggestion_menu (ESpellEntry *entry,
mi = gtk_menu_item_new_with_label (iter->data);
g_object_set_data (G_OBJECT (mi), "spell-entry-checker", checker);
- g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (replace_word), entry);
+ g_signal_connect (mi, "activate", G_CALLBACK (replace_word), entry);
gtk_widget_show (mi);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
}
@@ -450,7 +451,7 @@ build_spelling_menu (ESpellEntry *entry,
if (!entry->priv->checkers->next) {
checker = entry->priv->checkers->data;
g_object_set_data (G_OBJECT (mi), "spell-entry-checker", checker);
- g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (add_to_dictionary), entry);
+ g_signal_connect (mi, "activate", G_CALLBACK (add_to_dictionary), entry);
} else {
GSList *li;
GtkWidget *menu, *submi;
@@ -473,7 +474,7 @@ build_spelling_menu (ESpellEntry *entry,
submi = gtk_menu_item_new_with_label (lang_name ? lang_name : "???");
g_object_set_data (G_OBJECT (submi), "spell-entry-checker", checker);
- g_signal_connect (G_OBJECT (submi), "activate", G_CALLBACK (add_to_dictionary), entry);
+ g_signal_connect (submi, "activate", G_CALLBACK (add_to_dictionary), entry);
gtk_widget_show (submi);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), submi);
@@ -486,7 +487,7 @@ build_spelling_menu (ESpellEntry *entry,
/* - Ignore All */
mi = gtk_image_menu_item_new_with_label (_("Ignore All"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU));
- g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (ignore_all), entry);
+ g_signal_connect (mi, "activate", G_CALLBACK (ignore_all), entry);
gtk_widget_show_all (mi);
gtk_menu_shell_append (GTK_MENU_SHELL (topmenu), mi);
@@ -829,7 +830,8 @@ e_spell_entry_set_languages (ESpellEntry *spell_entry,
const GtkhtmlSpellLanguage *language = iter->data;
if (language)
- spell_entry->priv->checkers = g_slist_prepend (spell_entry->priv->checkers,
+ spell_entry->priv->checkers = g_slist_prepend (
+ spell_entry->priv->checkers,
gtkhtml_spell_checker_new (language));
}
@@ -853,7 +855,7 @@ e_spell_entry_set_checking_enabled (ESpellEntry *spell_entry,
{
g_return_if_fail (spell_entry != NULL);
- if ((enable_checking ? 1 : 0) == (spell_entry->priv->checking_enabled ? 1 : 0))
+ if (spell_entry->priv->checking_enabled == enable_checking)
return;
spell_entry->priv->checking_enabled = enable_checking;
diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c
index 9c434d6cf8..0d0903c7bd 100644
--- a/widgets/misc/e-web-view.c
+++ b/widgets/misc/e-web-view.c
@@ -480,7 +480,8 @@ web_view_update_document_highlights (EWebView *web_view)
webkit_dom_node_append_child (
WEBKIT_DOM_NODE (frag), WEBKIT_DOM_NODE (span), NULL);
- replace_text (WEBKIT_DOM_NODE (document),
+ replace_text (
+ WEBKIT_DOM_NODE (document),
iter->data, WEBKIT_DOM_NODE (frag));
}
}
@@ -868,9 +869,9 @@ web_view_constructed (GObject *object)
static gboolean
web_view_context_menu_cb (WebKitWebView *webkit_web_view,
- GtkWidget *default_menu,
- WebKitHitTestResult *hit_test_result,
- gboolean triggered_with_keyboard)
+ GtkWidget *default_menu,
+ WebKitHitTestResult *hit_test_result,
+ gboolean triggered_with_keyboard)
{
WebKitHitTestResultContext context;
EWebView *web_view;
@@ -1447,10 +1448,10 @@ web_view_selectable_select_all (ESelectable *selectable)
static gboolean
web_view_drag_motion (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time_)
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time_)
{
return FALSE;
}
@@ -2109,7 +2110,8 @@ e_web_view_set_enable_frame_flattening (EWebView *web_view,
settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (web_view));
g_return_if_fail (settings != NULL);
- g_object_set (G_OBJECT (settings), "enable-frame-flattening",
+ g_object_set (
+ G_OBJECT (settings), "enable-frame-flattening",
enable_frame_flattening, NULL);
}
@@ -2816,7 +2818,8 @@ e_web_view_update_fonts (EWebView *web_view)
}
stylesheet = g_string_new ("");
- g_string_append_printf (stylesheet,
+ g_string_append_printf (
+ stylesheet,
"body {\n"
" font-family: '%s';\n"
" font-size: %dpt;\n"
@@ -2848,7 +2851,8 @@ e_web_view_update_fonts (EWebView *web_view)
g_string_append (stylesheet, "}\n");
- g_string_append_printf (stylesheet,
+ g_string_append_printf (
+ stylesheet,
"pre,code,.pre {\n"
" font-family: '%s';\n"
" font-size: %dpt;\n"
@@ -2861,7 +2865,8 @@ e_web_view_update_fonts (EWebView *web_view)
styles[pango_font_description_get_style (ms)]);
context = gtk_widget_get_style_context (GTK_WIDGET (web_view));
- gtk_style_context_get_style (context,
+ gtk_style_context_get_style (
+ context,
"link-color", &link,
"visited-link-color", &visited,
NULL);
@@ -2876,7 +2881,8 @@ e_web_view_update_fonts (EWebView *web_view)
visited->red = G_MAXINT16;
}
- g_string_append_printf (stylesheet,
+ g_string_append_printf (
+ stylesheet,
"a {\n"
" color: #%06x;\n"
"}\n"
@@ -2897,7 +2903,8 @@ e_web_view_update_fonts (EWebView *web_view)
g_free (base64);
settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (web_view));
- g_object_set (G_OBJECT (settings),
+ g_object_set (
+ G_OBJECT (settings),
"default-font-size", pango_font_description_get_size (vw) / PANGO_SCALE,
"default-font-family", pango_font_description_get_family (vw),
"monospace-font-family", pango_font_description_get_family (ms),
diff --git a/widgets/misc/ea-calendar-cell.c b/widgets/misc/ea-calendar-cell.c
index b66a991bba..90a889ef18 100644
--- a/widgets/misc/ea-calendar-cell.c
+++ b/widgets/misc/ea-calendar-cell.c
@@ -56,8 +56,9 @@ e_calendar_cell_get_type (void)
NULL /* value table */
};
- type = g_type_register_static (G_TYPE_OBJECT,
- "ECalendarCell", &tinfo, 0);
+ type = g_type_register_static (
+ G_TYPE_OBJECT,
+ "ECalendarCell", &tinfo, 0);
}
return type;
@@ -143,10 +144,12 @@ ea_calendar_cell_get_type (void)
NULL
};
- type = g_type_register_static (ATK_TYPE_GOBJECT_ACCESSIBLE,
- "EaCalendarCell", &tinfo, 0);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT,
- &atk_component_info);
+ type = g_type_register_static (
+ ATK_TYPE_GOBJECT_ACCESSIBLE,
+ "EaCalendarCell", &tinfo, 0);
+ g_type_add_interface_static (
+ type, ATK_TYPE_COMPONENT,
+ &atk_component_info);
}
return type;
@@ -198,7 +201,8 @@ ea_calendar_cell_new (GObject *obj)
#ifdef ACC_DEBUG
++n_ea_calendar_cell_created;
- g_print ("ACC_DEBUG: n_ea_calendar_cell_created = %d\n",
+ g_print (
+ "ACC_DEBUG: n_ea_calendar_cell_created = %d\n",
n_ea_calendar_cell_created);
#endif
return atk_object;
@@ -210,7 +214,8 @@ static void ea_calendar_cell_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
++n_ea_calendar_cell_destroyed;
- g_print ("ACC_DEBUG: n_ea_calendar_cell_destroyed = %d\n",
+ g_print (
+ "ACC_DEBUG: n_ea_calendar_cell_destroyed = %d\n",
n_ea_calendar_cell_destroyed);
}
#endif
@@ -238,8 +243,9 @@ ea_calendar_cell_get_name (AtkObject *accessible)
cell = E_CALENDAR_CELL (g_obj);
atk_obj = ea_calendar_cell_get_parent (accessible);
ea_calitem = EA_CALENDAR_ITEM (atk_obj);
- day_index = atk_table_get_index_at (ATK_TABLE (ea_calitem),
- cell->row, cell->column);
+ day_index = atk_table_get_index_at (
+ ATK_TABLE (ea_calitem),
+ cell->row, cell->column);
e_calendar_item_get_date_for_offset (cell->calitem, day_index,
&year, &month, &day);
@@ -288,8 +294,9 @@ ea_calendar_cell_get_index_in_parent (AtkObject *accessible)
return -1;
cell = E_CALENDAR_CELL (g_obj);
parent = atk_object_get_parent (accessible);
- return atk_table_get_index_at (ATK_TABLE (parent),
- cell->row, cell->column);
+ return atk_table_get_index_at (
+ ATK_TABLE (parent),
+ cell->row, cell->column);
}
static AtkStateSet *
@@ -346,8 +353,9 @@ component_interface_get_extents (AtkComponent *component,
calitem = cell->calitem;
atk_obj = atk_gobject_accessible_for_object (G_OBJECT (calitem));
ea_calitem = EA_CALENDAR_ITEM (atk_obj);
- day_index = atk_table_get_index_at (ATK_TABLE (ea_calitem),
- cell->row, cell->column);
+ day_index = atk_table_get_index_at (
+ ATK_TABLE (ea_calitem),
+ cell->row, cell->column);
e_calendar_item_get_date_for_offset (calitem, day_index,
&year, &month, &day);
@@ -356,10 +364,11 @@ component_interface_get_extents (AtkComponent *component,
x, y, width, height))
return;
atk_canvas = atk_object_get_parent (ATK_OBJECT (ea_calitem));
- atk_component_get_extents (ATK_COMPONENT (atk_canvas),
- &canvas_x, &canvas_y,
- &canvas_width, &canvas_height,
- coord_type);
+ atk_component_get_extents (
+ ATK_COMPONENT (atk_canvas),
+ &canvas_x, &canvas_y,
+ &canvas_width, &canvas_height,
+ coord_type);
*x += canvas_x;
*y += canvas_y;
}
diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c
index 80b90105d4..dc878c4e1d 100644
--- a/widgets/misc/ea-calendar-item.c
+++ b/widgets/misc/ea-calendar-item.c
@@ -182,20 +182,24 @@ ea_calendar_item_get_type (void)
* we are run-time deriving from (GailCanvasItem, in this case)
*/
- factory = atk_registry_get_factory (atk_get_default_registry (),
- GNOME_TYPE_CANVAS_ITEM);
+ factory = atk_registry_get_factory (
+ atk_get_default_registry (),
+ GNOME_TYPE_CANVAS_ITEM);
derived_atk_type = atk_object_factory_get_accessible_type (factory);
g_type_query (derived_atk_type, &query);
tinfo.class_size = query.class_size;
tinfo.instance_size = query.instance_size;
- type = g_type_register_static (derived_atk_type,
- "EaCalendarItem", &tinfo, 0);
- g_type_add_interface_static (type, ATK_TYPE_TABLE,
- &atk_table_info);
- g_type_add_interface_static (type, ATK_TYPE_SELECTION,
- &atk_selection_info);
+ type = g_type_register_static (
+ derived_atk_type,
+ "EaCalendarItem", &tinfo, 0);
+ g_type_add_interface_static (
+ type, ATK_TYPE_TABLE,
+ &atk_table_info);
+ g_type_add_interface_static (
+ type, ATK_TYPE_SELECTION,
+ &atk_selection_info);
}
return type;
@@ -231,14 +235,15 @@ ea_calendar_item_new (GObject *obj)
atk_object_initialize (atk_object, obj);
atk_object->role = ATK_ROLE_CALENDAR;
- item_cell = atk_selection_ref_selection (ATK_SELECTION (atk_object),
- 0);
+ item_cell = atk_selection_ref_selection (
+ ATK_SELECTION (atk_object), 0);
if (item_cell)
ea_calendar_set_focus_object (EA_CALENDAR_ITEM (atk_object), item_cell);
#ifdef ACC_DEBUG
++n_ea_calendar_item_created;
- g_print ("ACC_DEBUG: n_ea_calendar_item_created = %d\n",
+ g_print (
+ "ACC_DEBUG: n_ea_calendar_item_created = %d\n",
n_ea_calendar_item_created);
#endif
/* connect signal handlers */
@@ -267,7 +272,8 @@ ea_calendar_item_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
#ifdef ACC_DEBUG
++n_ea_calendar_item_destroyed;
- printf ("ACC_DEBUG: n_ea_calendar_item_destroyed = %d\n",
+ printf (
+ "ACC_DEBUG: n_ea_calendar_item_destroyed = %d\n",
n_ea_calendar_item_destroyed);
#endif
}
@@ -334,10 +340,11 @@ ea_calendar_item_get_name (AtkObject *accessible)
month2 = g_date_get_month (&select_end);
day2 = g_date_get_day (&select_end);
- sprintf (new_name + strlen (new_name),
- " : current selection: from %d-%d-%d to %d-%d-%d.",
- year1, month1, day1,
- year2, month2, day2);
+ sprintf (
+ new_name + strlen (new_name),
+ " : current selection: from %d-%d-%d to %d-%d-%d.",
+ year1, month1, day1,
+ year2, month2, day2);
}
#endif
@@ -440,16 +447,18 @@ ea_calendar_item_ref_child (AtkObject *accessible,
cell = ea_cell_table_get_cell_at_index (cell_data, index);
if (!cell) {
- cell = e_calendar_cell_new (calitem,
- index / EA_CALENDAR_COLUMN_NUM,
- index % EA_CALENDAR_COLUMN_NUM);
+ cell = e_calendar_cell_new (
+ calitem,
+ index / EA_CALENDAR_COLUMN_NUM,
+ index % EA_CALENDAR_COLUMN_NUM);
ea_cell_table_set_cell_at_index (cell_data, index, cell);
g_object_unref (cell);
}
#ifdef ACC_DEBUG
- g_print ("AccDebug: ea_calendar_item children[%d]=%p\n", index,
- (gpointer) cell);
+ g_print (
+ "AccDebug: ea_calendar_item children[%d]=%p\n", index,
+ (gpointer) cell);
#endif
return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT (cell)));
}
@@ -829,11 +838,12 @@ table_interface_get_column_description (AtkTable *table,
description = ea_cell_table_get_column_label (cell_data, in_col);
if (!description) {
gchar buffer[128] = "column description";
- ea_calendar_item_get_column_label (ea_calitem, in_col,
- buffer, sizeof (buffer));
+ ea_calendar_item_get_column_label (
+ ea_calitem, in_col,
+ buffer, sizeof (buffer));
ea_cell_table_set_column_label (cell_data, in_col, buffer);
- description = ea_cell_table_get_column_label (cell_data,
- in_col);
+ description = ea_cell_table_get_column_label (
+ cell_data, in_col);
}
return description;
}
@@ -864,11 +874,13 @@ table_interface_get_row_description (AtkTable *table,
description = ea_cell_table_get_row_label (cell_data, row);
if (!description) {
gchar buffer[128] = "row description";
- ea_calendar_item_get_row_label (ea_calitem, row,
+ ea_calendar_item_get_row_label (
+ ea_calitem, row,
buffer, sizeof (buffer));
ea_cell_table_set_row_label (cell_data, row, buffer);
- description = ea_cell_table_get_row_label (cell_data,
- row);
+ description = ea_cell_table_get_row_label (
+ cell_data,
+ row);
}
return description;
}
@@ -1028,15 +1040,16 @@ selection_preview_change_cb (ECalendarItem *calitem)
ea_calendar_item_destory_cell_data (EA_CALENDAR_ITEM (atk_obj));
/* only deal with the first selected child, for now */
- item_cell = atk_selection_ref_selection (ATK_SELECTION (atk_obj),
- 0);
+ item_cell = atk_selection_ref_selection (
+ ATK_SELECTION (atk_obj), 0);
if (item_cell)
ea_calendar_set_focus_object (EA_CALENDAR_ITEM (atk_obj), item_cell);
- g_signal_emit_by_name (atk_obj,
- "active-descendant-changed",
- item_cell);
+ g_signal_emit_by_name (
+ atk_obj,
+ "active-descendant-changed",
+ item_cell);
g_signal_emit_by_name (atk_obj, "selection_changed");
}
@@ -1050,8 +1063,8 @@ date_range_changed_cb (ECalendarItem *calitem)
atk_obj = atk_gobject_accessible_for_object (G_OBJECT (calitem));
ea_calendar_item_destory_cell_data (EA_CALENDAR_ITEM (atk_obj));
- item_cell = atk_selection_ref_selection (ATK_SELECTION (atk_obj),
- 0);
+ item_cell = atk_selection_ref_selection (
+ ATK_SELECTION (atk_obj), 0);
if (item_cell)
ea_calendar_set_focus_object (EA_CALENDAR_ITEM (atk_obj), item_cell);
@@ -1074,16 +1087,19 @@ ea_calendar_item_get_cell_data (EaCalendarItem *ea_calitem)
if (!g_obj)
return NULL;
- cell_data = g_object_get_data (G_OBJECT (ea_calitem),
- "ea-calendar-cell-table");
+ cell_data = g_object_get_data (
+ G_OBJECT (ea_calitem),
+ "ea-calendar-cell-table");
if (!cell_data) {
gint n_cells = ea_calendar_item_get_n_children (ATK_OBJECT (ea_calitem));
- cell_data = ea_cell_table_create (n_cells / EA_CALENDAR_COLUMN_NUM,
- EA_CALENDAR_COLUMN_NUM,
- FALSE);
- g_object_set_data (G_OBJECT (ea_calitem),
- "ea-calendar-cell-table", cell_data);
+ cell_data = ea_cell_table_create (
+ n_cells / EA_CALENDAR_COLUMN_NUM,
+ EA_CALENDAR_COLUMN_NUM,
+ FALSE);
+ g_object_set_data (
+ G_OBJECT (ea_calitem),
+ "ea-calendar-cell-table", cell_data);
}
return cell_data;
}
@@ -1095,11 +1111,13 @@ ea_calendar_item_destory_cell_data (EaCalendarItem *ea_calitem)
g_return_if_fail (ea_calitem);
- cell_data = g_object_get_data (G_OBJECT (ea_calitem),
- "ea-calendar-cell-table");
+ cell_data = g_object_get_data (
+ G_OBJECT (ea_calitem),
+ "ea-calendar-cell-table");
if (cell_data) {
- g_object_set_data (G_OBJECT (ea_calitem),
- "ea-calendar-cell-table", NULL);
+ g_object_set_data (
+ G_OBJECT (ea_calitem),
+ "ea-calendar-cell-table", NULL);
ea_cell_table_destroy (cell_data);
}
}
@@ -1130,8 +1148,8 @@ ea_calendar_item_get_row_label (EaCalendarItem *ea_calitem,
&year, &month, &day))
return FALSE;
- week_num = e_calendar_item_get_week_number (calitem,
- day, month, year);
+ week_num = e_calendar_item_get_week_number (
+ calitem, day, month, year);
g_snprintf (buffer, buffer_size, "week number : %d", week_num);
return TRUE;
@@ -1196,8 +1214,9 @@ e_calendar_item_get_day_extents (ECalendarItem *calitem,
if (!font_desc)
font_desc = style->font_desc;
pango_context = gtk_widget_get_pango_context (widget);
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
+ font_metrics = pango_context_get_metrics (
+ pango_context, font_desc,
+ pango_context_get_language (pango_context));
char_height =
PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
@@ -1234,9 +1253,8 @@ e_calendar_item_get_day_extents (ECalendarItem *calitem,
+ E_CALENDAR_ITEM_YPAD_BELOW_DAY_LETTERS + 1
+ E_CALENDAR_ITEM_YPAD_ABOVE_CELLS;
- days_from_week_start =
- e_calendar_item_get_n_days_from_week_start (calitem, new_year,
- new_month);
+ days_from_week_start = e_calendar_item_get_n_days_from_week_start (
+ calitem, new_year, new_month);
day_row = (date + days_from_week_start - 1) / EA_CALENDAR_COLUMN_NUM;
day_col = (date + days_from_week_start - 1) % EA_CALENDAR_COLUMN_NUM;
diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c
index 2127fc0715..7d3584a424 100644
--- a/widgets/misc/test-calendar.c
+++ b/widgets/misc/test-calendar.c
@@ -85,10 +85,11 @@ main (gint argc,
calitem, "selection_changed",
G_CALLBACK (on_selection_changed), NULL);
- gtk_drag_dest_set (cal,
- GTK_DEST_DEFAULT_ALL,
- target_table, G_N_ELEMENTS (target_table),
- GDK_ACTION_COPY | GDK_ACTION_MOVE);
+ gtk_drag_dest_set (
+ cal,
+ GTK_DEST_DEFAULT_ALL,
+ target_table, G_N_ELEMENTS (target_table),
+ GDK_ACTION_COPY | GDK_ACTION_MOVE);
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), cal, TRUE, TRUE, 0);
@@ -108,19 +109,23 @@ on_date_range_changed (ECalendarItem *calitem)
gint start_year, start_month, start_day;
gint end_year, end_month, end_day;
- e_calendar_item_get_date_range (calitem,
- &start_year, &start_month, &start_day,
- &end_year, &end_month, &end_day);
+ e_calendar_item_get_date_range (
+ calitem,
+ &start_year, &start_month, &start_day,
+ &end_year, &end_month, &end_day);
- g_print ("Date range changed (D/M/Y): %i/%i/%i - %i/%i/%i\n",
- start_day, start_month + 1, start_year,
- end_day, end_month + 1, end_year);
+ g_print (
+ "Date range changed (D/M/Y): %i/%i/%i - %i/%i/%i\n",
+ start_day, start_month + 1, start_year,
+ end_day, end_month + 1, end_year);
/* These days should windowear bold. Remember month is 0 to 11. */
- e_calendar_item_mark_day (calitem, 2000, 7, 26, /* 26th Aug 2000. */
- E_CALENDAR_ITEM_MARK_BOLD, FALSE);
- e_calendar_item_mark_day (calitem, 2000, 8, 13, /* 13th Sep 2000. */
- E_CALENDAR_ITEM_MARK_BOLD, FALSE);
+ e_calendar_item_mark_day (
+ calitem, 2000, 7, 26, /* 26th Aug 2000. */
+ E_CALENDAR_ITEM_MARK_BOLD, FALSE);
+ e_calendar_item_mark_day (
+ calitem, 2000, 8, 13, /* 13th Sep 2000. */
+ E_CALENDAR_ITEM_MARK_BOLD, FALSE);
}
static void
@@ -130,11 +135,12 @@ on_selection_changed (ECalendarItem *calitem)
e_calendar_item_get_selection (calitem, &start_date, &end_date);
- g_print ("Selection changed (D/M/Y): %i/%i/%i - %i/%i/%i\n",
- g_date_get_day (&start_date),
- g_date_get_month (&start_date),
- g_date_get_year (&start_date),
- g_date_get_day (&end_date),
- g_date_get_month (&end_date),
- g_date_get_year (&end_date));
+ g_print (
+ "Selection changed (D/M/Y): %i/%i/%i - %i/%i/%i\n",
+ g_date_get_day (&start_date),
+ g_date_get_month (&start_date),
+ g_date_get_year (&start_date),
+ g_date_get_day (&end_date),
+ g_date_get_month (&end_date),
+ g_date_get_year (&end_date));
}
diff --git a/widgets/misc/test-dateedit.c b/widgets/misc/test-dateedit.c
index 46c853cea6..5592afbc70 100644
--- a/widgets/misc/test-dateedit.c
+++ b/widgets/misc/test-dateedit.c
@@ -78,8 +78,9 @@ main (gint argc,
/* EDateEdit 1. */
dedit = E_DATE_EDIT (e_date_edit_new ());
- gtk_table_attach (GTK_TABLE (table), GTK_WIDGET (dedit),
- 0, 1, 0, 1, GTK_FILL, GTK_EXPAND, 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (table), GTK_WIDGET (dedit),
+ 0, 1, 0, 1, GTK_FILL, GTK_EXPAND, 0, 0);
gtk_widget_show (GTK_WIDGET (dedit));
#if 0
@@ -96,8 +97,9 @@ main (gint argc,
#endif
button = gtk_button_new_with_label ("Print Date");
- gtk_table_attach (GTK_TABLE (table), button,
- 1, 2, 0, 1, 0, 0, 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (table), button,
+ 1, 2, 0, 1, 0, 0, 0, 0);
gtk_widget_show (button);
g_signal_connect (
button, "clicked",
@@ -105,8 +107,9 @@ main (gint argc,
/* EDateEdit 2. */
dedit = E_DATE_EDIT (e_date_edit_new ());
- gtk_table_attach (GTK_TABLE (table), (GtkWidget *) dedit,
- 0, 1, 1, 2, GTK_FILL, GTK_EXPAND, 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (table), (GtkWidget *) dedit,
+ 0, 1, 1, 2, GTK_FILL, GTK_EXPAND, 0, 0);
gtk_widget_show ((GtkWidget *) (dedit));
e_date_edit_set_week_start_day (dedit, 1);
e_date_edit_set_show_week_numbers (dedit, TRUE);
@@ -128,8 +131,9 @@ main (gint argc,
#endif
button = gtk_button_new_with_label ("Print Date");
- gtk_table_attach (GTK_TABLE (table), button,
- 1, 2, 1, 2, 0, 0, 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (table), button,
+ 1, 2, 1, 2, 0, 0, 0, 0);
gtk_widget_show (button);
g_signal_connect (
button, "clicked",
@@ -137,8 +141,9 @@ main (gint argc,
/* EDateEdit 3. */
dedit = E_DATE_EDIT (e_date_edit_new ());
- gtk_table_attach (GTK_TABLE (table), (GtkWidget *) dedit,
- 0, 1, 2, 3, GTK_FILL, GTK_EXPAND, 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (table), (GtkWidget *) dedit,
+ 0, 1, 2, 3, GTK_FILL, GTK_EXPAND, 0, 0);
gtk_widget_show ((GtkWidget *) (dedit));
e_date_edit_set_week_start_day (dedit, 1);
e_date_edit_set_show_week_numbers (dedit, TRUE);
@@ -160,16 +165,18 @@ main (gint argc,
#endif
button = gtk_button_new_with_label ("Print Date");
- gtk_table_attach (GTK_TABLE (table), button,
- 1, 2, 2, 3, 0, 0, 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (table), button,
+ 1, 2, 2, 3, 0, 0, 0, 0);
gtk_widget_show (button);
g_signal_connect (
button, "clicked",
G_CALLBACK (on_get_date_clicked), dedit);
button = gtk_button_new_with_label ("Toggle 24-hour");
- gtk_table_attach (GTK_TABLE (table), button,
- 2, 3, 2, 3, 0, 0, 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (table), button,
+ 2, 3, 2, 3, 0, 0, 0, 0);
gtk_widget_show (button);
g_signal_connect (
button, "clicked",
@@ -230,8 +237,9 @@ on_date_changed (EDateEdit *dedit,
if (e_date_edit_date_is_valid (dedit)) {
if (e_date_edit_get_date (dedit, &year, &month, &day)) {
- g_print ("Date %s changed to: %i/%i/%i (M/D/Y)\n",
- name, month, day, year);
+ g_print (
+ "Date %s changed to: %i/%i/%i (M/D/Y)\n",
+ name, month, day, year);
} else {
g_print ("Date %s changed to: None\n", name);
}
@@ -248,8 +256,9 @@ on_time_changed (EDateEdit *dedit,
if (e_date_edit_time_is_valid (dedit)) {
if (e_date_edit_get_time_of_day (dedit, &hour, &minute)) {
- g_print ("Time %s changed to: %02i:%02i\n", name,
- hour, minute);
+ g_print (
+ "Time %s changed to: %02i:%02i\n", name,
+ hour, minute);
} else {
g_print ("Time %s changed to: None\n", name);
}
diff --git a/widgets/misc/test-preferences-window.c b/widgets/misc/test-preferences-window.c
index ae0a570c6d..4ad30e2245 100644
--- a/widgets/misc/test-preferences-window.c
+++ b/widgets/misc/test-preferences-window.c
@@ -58,15 +58,18 @@ create_page_two (EPreferencesWindow *preferences_window)
static void
add_pages (EPreferencesWindow *preferences_window)
{
- e_preferences_window_add_page (preferences_window, "page-0",
- "gtk-properties", "title 0", NULL,
- create_page_zero, 0);
- e_preferences_window_add_page (preferences_window, "page-1",
- "gtk-properties", "title 1", NULL,
- create_page_one, 1);
- e_preferences_window_add_page (preferences_window, "page-2",
- "gtk-properties", "title 2", NULL,
- create_page_two, 2);
+ e_preferences_window_add_page (
+ preferences_window, "page-0",
+ "gtk-properties", "title 0", NULL,
+ create_page_zero, 0);
+ e_preferences_window_add_page (
+ preferences_window, "page-1",
+ "gtk-properties", "title 1", NULL,
+ create_page_one, 1);
+ e_preferences_window_add_page (
+ preferences_window, "page-2",
+ "gtk-properties", "title 2", NULL,
+ create_page_two, 2);
}
static gint
diff --git a/widgets/table/e-cell-checkbox.c b/widgets/table/e-cell-checkbox.c
index 9e775761c7..0d30031397 100644
--- a/widgets/table/e-cell-checkbox.c
+++ b/widgets/table/e-cell-checkbox.c
@@ -52,10 +52,11 @@ ecc_print (ECellView *ecell_view,
{
cairo_t *cr = gtk_print_context_get_cairo_context (context);
const gint value = GPOINTER_TO_INT (
- e_table_model_value_at (ecell_view->e_table_model, model_col, row));
+ e_table_model_value_at (
+ ecell_view->e_table_model, model_col, row));
cairo_save (cr);
- if ( value == 1) {
+ if (value == 1) {
cairo_set_line_width (cr, 2);
cairo_move_to (cr, 3, 11);
cairo_line_to (cr, 7, 14);
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 422f9da815..48bf24724d 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -319,8 +319,9 @@ e_cell_combo_select_matching_item (ECellCombo *ecc)
eti = E_TABLE_ITEM (ecp->popup_cell_view->cell_view.e_table_item_view);
ecol = e_table_header_get_column (eti->header, ecp->popup_view_col);
- cell_text = e_cell_text_get_text (ecell_text, ecv->e_table_model,
- ecol->col_idx, ecp->popup_row);
+ cell_text = e_cell_text_get_text (
+ ecell_text, ecv->e_table_model,
+ ecol->col_idx, ecp->popup_row);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (ecc->popup_tree_view));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ecc->popup_tree_view));
@@ -432,25 +433,21 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
x1 = e_table_header_col_diff (eti->header, 0, view_col + 1);
y1 = e_table_item_row_diff (eti, 0, row + 1);
- column_width = e_table_header_col_diff (eti->header, view_col,
- view_col + 1);
- row_height = e_table_item_row_diff (eti, row,
- row + 1);
+ column_width = e_table_header_col_diff (
+ eti->header, view_col, view_col + 1);
+ row_height = e_table_item_row_diff (eti, row, row + 1);
gnome_canvas_item_i2w (GNOME_CANVAS_ITEM (eti), &x1, &y1);
- gnome_canvas_world_to_window (GNOME_CANVAS (canvas),
- x1,
- y1,
- &wx,
- &wy);
+ gnome_canvas_world_to_window (
+ GNOME_CANVAS (canvas), x1, y1, &wx, &wy);
x1 = wx;
y1 = wy;
*x += x1;
/* The ETable positions don't include the grid lines, I think, so we add 1. */
- *y += y1 + 1
- - (gint) gtk_adjustment_get_value (
+ *y += y1 + 1 - (gint)
+ gtk_adjustment_get_value (
gtk_scrollable_get_vadjustment (
GTK_SCROLLABLE (&((GnomeCanvas *) canvas)->layout)))
+ ((GnomeCanvas *) canvas)->zoom_yofs;
@@ -712,13 +709,15 @@ e_cell_combo_update_cell (ECellCombo *ecc)
/* Compare it with the existing cell contents. */
ecol = e_table_header_get_column (eti->header, ecp->popup_view_col);
- old_text = e_cell_text_get_text (ecell_text, ecv->e_table_model,
- ecol->col_idx, ecp->popup_row);
+ old_text = e_cell_text_get_text (
+ ecell_text, ecv->e_table_model,
+ ecol->col_idx, ecp->popup_row);
/* If they are different, update the cell contents. */
if (old_text && strcmp (old_text, text)) {
- e_cell_text_set_value (ecell_text, ecv->e_table_model,
- ecol->col_idx, ecp->popup_row, text);
+ e_cell_text_set_value (
+ ecell_text, ecv->e_table_model,
+ ecol->col_idx, ecp->popup_row, text);
}
e_cell_text_free_text (ecell_text, old_text);
diff --git a/widgets/table/e-cell-date-edit.c b/widgets/table/e-cell-date-edit.c
index 70c15dfafd..46f224f315 100644
--- a/widgets/table/e-cell-date-edit.c
+++ b/widgets/table/e-cell-date-edit.c
@@ -222,8 +222,9 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
* ever be one popup in use at a time. */
ecde->popup_window = gtk_window_new (GTK_WINDOW_POPUP);
- gtk_window_set_type_hint (GTK_WINDOW (ecde->popup_window),
- GDK_WINDOW_TYPE_HINT_COMBO);
+ gtk_window_set_type_hint (
+ GTK_WINDOW (ecde->popup_window),
+ GDK_WINDOW_TYPE_HINT_COMBO);
gtk_window_set_resizable (GTK_WINDOW (ecde->popup_window), TRUE);
frame = gtk_frame_new (NULL);
@@ -240,9 +241,10 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
gtk_widget_show (hbox);
ecde->calendar = e_calendar_new ();
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (E_CALENDAR (ecde->calendar)->calitem),
- "move_selection_when_moving", FALSE,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (E_CALENDAR (ecde->calendar)->calitem),
+ "move_selection_when_moving", FALSE,
+ NULL);
gtk_box_pack_start (GTK_BOX (hbox), ecde->calendar, TRUE, TRUE, 0);
gtk_widget_show (ecde->calendar);
@@ -252,15 +254,16 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
ecde->time_entry = gtk_entry_new ();
gtk_widget_set_size_request (ecde->time_entry, 50, -1);
- gtk_box_pack_start (GTK_BOX (vbox2), ecde->time_entry,
- FALSE, FALSE, 0);
+ gtk_box_pack_start (
+ GTK_BOX (vbox2), ecde->time_entry,
+ FALSE, FALSE, 0);
gtk_widget_show (ecde->time_entry);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_box_pack_start (GTK_BOX (vbox2), scrolled_window, TRUE, TRUE, 0);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
- GTK_POLICY_NEVER,
- GTK_POLICY_ALWAYS);
+ gtk_scrolled_window_set_policy (
+ GTK_SCROLLED_WINDOW (scrolled_window),
+ GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
gtk_widget_show (scrolled_window);
store = gtk_list_store_new (1, G_TYPE_STRING);
@@ -541,14 +544,18 @@ e_cell_date_edit_set_popup_values (ECellDateEdit *ecde)
if (is_date) {
buffer[0] = '\0';
} else {
- e_time_format_time (&date_tm, ecde->use_24_hour_format,
- FALSE, buffer, sizeof (buffer));
+ e_time_format_time (
+ &date_tm, ecde->use_24_hour_format,
+ FALSE, buffer, sizeof (buffer));
}
gtk_entry_set_text (GTK_ENTRY (ecde->time_entry), buffer);
g_date_clear (&date, 1);
- g_date_set_dmy (&date, date_tm.tm_mday, date_tm.tm_mon + 1,
- date_tm.tm_year + 1900);
+ g_date_set_dmy (
+ &date,
+ date_tm.tm_mday,
+ date_tm.tm_mon + 1,
+ date_tm.tm_year + 1900);
e_calendar_item_set_selection (calitem, &date, &date);
if (is_date) {
@@ -660,17 +667,13 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
x1 = e_table_header_col_diff (eti->header, 0, view_col + 1);
y1 = e_table_item_row_diff (eti, 0, row + 1);
- column_width = e_table_header_col_diff (eti->header, view_col,
- view_col + 1);
- row_height = e_table_item_row_diff (eti, row,
- row + 1);
+ column_width = e_table_header_col_diff (
+ eti->header, view_col, view_col + 1);
+ row_height = e_table_item_row_diff (eti, row, row + 1);
gnome_canvas_item_i2w (GNOME_CANVAS_ITEM (eti), &x1, &y1);
- gnome_canvas_world_to_window (GNOME_CANVAS (canvas),
- x1,
- y1,
- &wx,
- &wy);
+ gnome_canvas_world_to_window (
+ GNOME_CANVAS (canvas), x1, y1, &wx, &wy);
x1 = wx;
y1 = wy;
@@ -816,8 +819,8 @@ e_cell_date_edit_on_ok_clicked (GtkWidget *button,
gboolean is_date = FALSE;
calitem = E_CALENDAR_ITEM (E_CALENDAR (ecde->calendar)->calitem);
- day_selected = e_calendar_item_get_selection (calitem, &start_date,
- &end_date);
+ day_selected = e_calendar_item_get_selection (
+ calitem, &start_date, &end_date);
text = gtk_entry_get_text (GTK_ENTRY (ecde->time_entry));
status = e_time_parse_time (text, &date_tm);
diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c
index 6bca769174..74301a773c 100644
--- a/widgets/table/e-cell-hbox.c
+++ b/widgets/table/e-cell-hbox.c
@@ -166,7 +166,7 @@ ecv_draw (ECellView *ecell_view,
/* e_cell_max_width_by_row (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col, row);
if (width < hbox_view->def_size_cols[i])
width = hbox_view->def_size_cols[i];
- printf ("width of %d %d of %d\n", width,hbox_view->def_size_cols[i], allotted_width ); */
+ printf ("width of %d %d of %d\n", width,hbox_view->def_size_cols[i], allotted_width); */
e_cell_draw (
hbox_view->subcell_views[i], cr,
diff --git a/widgets/table/e-cell-percent.c b/widgets/table/e-cell-percent.c
index 61543b0e0c..81465d5a62 100644
--- a/widgets/table/e-cell-percent.c
+++ b/widgets/table/e-cell-percent.c
@@ -115,8 +115,9 @@ ecp_set_value (ECellText *cell,
}
}
- e_table_model_set_value_at (model, col, row,
- GINT_TO_POINTER (percent));
+ e_table_model_set_value_at (
+ model, col, row,
+ GINT_TO_POINTER (percent));
}
static void
diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c
index b2cf3e2a2d..41b030ec5a 100644
--- a/widgets/table/e-cell-pixbuf.c
+++ b/widgets/table/e-cell-pixbuf.c
@@ -356,25 +356,34 @@ e_cell_pixbuf_class_init (ECellPixbufClass *class)
ecc->print_height = pixbuf_print_height;
ecc->max_width = pixbuf_max_width;
- g_object_class_install_property (object_class, PROP_SELECTED_COLUMN,
- g_param_spec_int ("selected_column",
- "Selected Column",
- NULL,
- 0, G_MAXINT, 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_FOCUSED_COLUMN,
- g_param_spec_int ("focused_column",
- "Focused Column",
- NULL,
- 0, G_MAXINT, 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_UNSELECTED_COLUMN,
- g_param_spec_int ("unselected_column",
- "Unselected Column",
- NULL,
- 0, G_MAXINT, 0,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_SELECTED_COLUMN,
+ g_param_spec_int (
+ "selected_column",
+ "Selected Column",
+ NULL,
+ 0, G_MAXINT, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_FOCUSED_COLUMN,
+ g_param_spec_int (
+ "focused_column",
+ "Focused Column",
+ NULL,
+ 0, G_MAXINT, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_UNSELECTED_COLUMN,
+ g_param_spec_int (
+ "unselected_column",
+ "Unselected Column",
+ NULL,
+ 0, G_MAXINT, 0,
+ G_PARAM_READWRITE));
}
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index 65440b2465..0f549748fe 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -131,9 +131,9 @@ e_cell_popup_class_init (ECellPopupClass *class)
ecc->max_width = ecp_max_width;
ecc->get_bg_color = ecp_get_bg_color;
- gal_a11y_e_cell_registry_add_cell_type (NULL,
- E_TYPE_CELL_POPUP,
- gal_a11y_e_cell_popup_new);
+ gal_a11y_e_cell_registry_add_cell_type (
+ NULL, E_TYPE_CELL_POPUP,
+ gal_a11y_e_cell_popup_new);
}
static void
@@ -190,8 +190,9 @@ ecp_new_view (ECell *ecell,
ecp_view->cell_view.kill_view_cb = NULL;
ecp_view->cell_view.kill_view_cb_data = NULL;
- ecp_view->child_view = e_cell_new_view (ecp->child, table_model,
- e_table_item_view);
+ ecp_view->child_view = e_cell_new_view (
+ ecp->child, table_model,
+ e_table_item_view);
return (ECellView *) ecp_view;
}
@@ -277,9 +278,9 @@ ecp_draw (ECellView *ecv,
e_table_model_is_cell_editable (
ecv->e_table_model, model_col, row) &&
(flags & E_CELL_CURSOR ||
- (ecp->popup_shown && ecp->popup_view_col == view_col
- && ecp->popup_row == row
- && ecp->popup_model == ((ECellView *) ecp_view)->e_table_model));
+ (ecp->popup_shown && ecp->popup_view_col == view_col
+ && ecp->popup_row == row
+ && ecp->popup_model == ((ECellView *) ecp_view)->e_table_model));
if (flags & E_CELL_CURSOR)
ecp->popup_arrow_shown = show_popup_arrow;
@@ -287,9 +288,10 @@ ecp_draw (ECellView *ecv,
if (show_popup_arrow) {
GtkStyle *style;
- e_cell_draw (ecp_view->child_view, cr, model_col,
- view_col, row, flags,
- x1, y1, x2 - E_CELL_POPUP_ARROW_WIDTH, y2);
+ e_cell_draw (
+ ecp_view->child_view, cr, model_col,
+ view_col, row, flags,
+ x1, y1, x2 - E_CELL_POPUP_ARROW_WIDTH, y2);
rect.x = x2 - E_CELL_POPUP_ARROW_WIDTH;
rect.y = y1 + 1;
@@ -303,21 +305,24 @@ ecp_draw (ECellView *ecv,
style = gtk_widget_get_style (canvas);
- gtk_paint_box (style, cr,
- GTK_STATE_NORMAL, shadow,
- canvas, "ecellpopup",
- rect.x, rect.y, rect.width, rect.height);
- gtk_paint_arrow (style, cr,
- GTK_STATE_NORMAL, GTK_SHADOW_NONE,
- canvas, NULL,
- GTK_ARROW_DOWN, TRUE,
- rect.x + E_CELL_POPUP_ARROW_XPAD,
- rect.y + E_CELL_POPUP_ARROW_YPAD,
- rect.width - E_CELL_POPUP_ARROW_XPAD * 2,
- rect.height - E_CELL_POPUP_ARROW_YPAD * 2);
+ gtk_paint_box (
+ style, cr,
+ GTK_STATE_NORMAL, shadow,
+ canvas, "ecellpopup",
+ rect.x, rect.y, rect.width, rect.height);
+ gtk_paint_arrow (
+ style, cr,
+ GTK_STATE_NORMAL, GTK_SHADOW_NONE,
+ canvas, NULL,
+ GTK_ARROW_DOWN, TRUE,
+ rect.x + E_CELL_POPUP_ARROW_XPAD,
+ rect.y + E_CELL_POPUP_ARROW_YPAD,
+ rect.width - E_CELL_POPUP_ARROW_XPAD * 2,
+ rect.height - E_CELL_POPUP_ARROW_YPAD * 2);
} else {
- e_cell_draw (ecp_view->child_view, cr, model_col,
- view_col, row, flags, x1, y1, x2, y2);
+ e_cell_draw (
+ ecp_view->child_view, cr, model_col,
+ view_col, row, flags, x1, y1, x2, y2);
}
cairo_restore (cr);
@@ -345,8 +350,9 @@ ecp_event (ECellView *ecv,
if (e_table_model_is_cell_editable (ecv->e_table_model, model_col, row) &&
flags & E_CELL_CURSOR
&& ecp->popup_arrow_shown) {
- width = e_table_header_col_diff (eti->header, view_col,
- view_col + 1);
+ width = e_table_header_col_diff (
+ eti->header, view_col,
+ view_col + 1);
/* FIXME: The event coords seem to be relative to the
* text within the cell, so we have to add 4. */
@@ -366,8 +372,9 @@ ecp_event (ECellView *ecv,
break;
}
- return e_cell_event (ecp_view->child_view, event, model_col, view_col,
- row, flags, actions);
+ return e_cell_event (
+ ecp_view->child_view, event, model_col, view_col,
+ row, flags, actions);
}
/*
@@ -410,8 +417,9 @@ ecp_leave_edit (ECellView *ecv,
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
- e_cell_leave_edit (ecp_view->child_view, model_col, view_col, row,
- edit_context);
+ e_cell_leave_edit (
+ ecp_view->child_view, model_col, view_col, row,
+ edit_context);
}
static void
@@ -425,8 +433,9 @@ ecp_print (ECellView *ecv,
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
- e_cell_print (ecp_view->child_view, context, model_col, view_col, row,
- width, height);
+ e_cell_print (
+ ecp_view->child_view, context, model_col, view_col, row,
+ width, height);
}
static gdouble
@@ -439,8 +448,9 @@ ecp_print_height (ECellView *ecv,
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
- return e_cell_print_height (ecp_view->child_view, context, model_col,
- view_col, row, width);
+ return e_cell_print_height (
+ ecp_view->child_view, context, model_col,
+ view_col, row, width);
}
static gint
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 6e28c8b7b2..f1d852a951 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -305,8 +305,9 @@ ect_stop_editing (ECellTextView *text_view,
ECellText *ect = (ECellText *) ecell_view->ecell;
if (strcmp (old_text, text)) {
- e_cell_text_set_value (ect, ecell_view->e_table_model,
- model_col, row, text);
+ e_cell_text_set_value (
+ ect, ecell_view->e_table_model,
+ model_col, row, text);
}
}
g_free (text);
@@ -463,9 +464,10 @@ layout_with_preedit (ECellTextView *text_view,
gint text_length = strlen (text);
gint mlen = MIN (edit->selection_start,text_length);
- gtk_im_context_get_preedit_string (edit->im_context,
- &preedit_string,&preedit_attrs,
- NULL);
+ gtk_im_context_get_preedit_string (
+ edit->im_context,
+ &preedit_string,&preedit_attrs,
+ NULL);
preedit_length = edit->preedit_length = strlen (preedit_string);;
layout = edit->layout;
@@ -770,9 +772,8 @@ ect_draw (ECellView *ecell_view,
indices[0] = MIN (edit->selection_start, edit->selection_end);
indices[1] = MAX (edit->selection_start, edit->selection_end);
- clip_region = gdk_pango_layout_get_clip_region (layout,
- x_origin, y_origin,
- indices, 1);
+ clip_region = gdk_pango_layout_get_clip_region (
+ layout, x_origin, y_origin, indices, 1);
gdk_cairo_region (cr, clip_region);
cairo_clip (cr);
cairo_region_destroy (clip_region);
@@ -815,8 +816,9 @@ ect_get_bg_color (ECellView *ecell_view,
if (ect->bg_color_column == -1)
return NULL;
- color_spec = e_table_model_value_at (ecell_view->e_table_model,
- ect->bg_color_column, row);
+ color_spec = e_table_model_value_at (
+ ecell_view->e_table_model,
+ ect->bg_color_column, row);
return color_spec;
}
@@ -867,7 +869,7 @@ ect_event (ECellView *ecell_view,
if (!(flags & E_CELL_EDITING))
return 0;
- if ( edit && !edit->preedit_length && flags & E_CELL_PREEDIT)
+ if (edit && !edit->preedit_length && flags & E_CELL_PREEDIT)
return 1;
if (edit && edit->view_col == view_col && edit->row == row) {
@@ -970,8 +972,8 @@ ect_event (ECellView *ecell_view,
e_tep_event.button.position = get_position_from_xy (edit, event->button.x, event->button.y);
_get_tep (edit);
edit->actions = 0;
- return_val = e_text_event_processor_handle_event (edit->tep,
- &e_tep_event);
+ return_val = e_text_event_processor_handle_event (
+ edit->tep, &e_tep_event);
*actions = edit->actions;
if (event->button.button == 1) {
if (event->type == GDK_BUTTON_PRESS)
@@ -993,8 +995,8 @@ ect_event (ECellView *ecell_view,
e_tep_event.button.position = get_position_from_xy (edit, event->button.x, event->button.y);
_get_tep (edit);
edit->actions = 0;
- return_val = e_text_event_processor_handle_event (edit->tep,
- &e_tep_event);
+ return_val = e_text_event_processor_handle_event (
+ edit->tep, &e_tep_event);
*actions = edit->actions;
if (event->button.button == 1) {
if (event->type == GDK_BUTTON_PRESS)
@@ -1017,8 +1019,8 @@ ect_event (ECellView *ecell_view,
e_tep_event.motion.position = get_position_from_xy (edit, event->motion.x, event->motion.y);
_get_tep (edit);
edit->actions = 0;
- return_val = e_text_event_processor_handle_event (edit->tep,
- &e_tep_event);
+ return_val = e_text_event_processor_handle_event (
+ edit->tep, &e_tep_event);
*actions = edit->actions;
edit->lastx = motion.x;
edit->lasty = motion.y;
@@ -1421,7 +1423,7 @@ ect_print_height (ECellView *ecell_view,
/* Checking if the text width goes beyond the column width to increase the
* number of lines.
*/
- if ( text_width > width - 4)
+ if (text_width > width - 4)
lines = (text_width / (width - 4)) + 1;
return 16 *lines + 8;
}
@@ -1603,69 +1605,93 @@ e_cell_text_class_init (ECellTextClass *class)
object_class->get_property = ect_get_property;
object_class->set_property = ect_set_property;
- signals[TEXT_INSERTED] =
- g_signal_new ("text_inserted",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECellTextClass, text_inserted),
- NULL, NULL,
- e_marshal_VOID__POINTER_INT_INT_INT_INT,
- G_TYPE_NONE, 5,
- G_TYPE_POINTER, G_TYPE_INT, G_TYPE_INT,
- G_TYPE_INT, G_TYPE_INT);
-
- signals[TEXT_DELETED] =
- g_signal_new ("text_deleted",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (ECellTextClass, text_deleted),
- NULL, NULL,
- e_marshal_VOID__POINTER_INT_INT_INT_INT,
- G_TYPE_NONE, 5,
- G_TYPE_POINTER, G_TYPE_INT, G_TYPE_INT,
- G_TYPE_INT, G_TYPE_INT);
-
- g_object_class_install_property (object_class, PROP_STRIKEOUT_COLUMN,
- g_param_spec_int ("strikeout_column",
- "Strikeout Column",
- NULL,
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_UNDERLINE_COLUMN,
- g_param_spec_int ("underline_column",
- "Underline Column",
- NULL,
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_BOLD_COLUMN,
- g_param_spec_int ("bold_column",
- "Bold Column",
- NULL,
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_COLOR_COLUMN,
- g_param_spec_int ("color_column",
- "Color Column",
- NULL,
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- "Editable",
- NULL,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_BG_COLOR_COLUMN,
- g_param_spec_int ("bg_color_column",
- "BG Color Column",
- NULL,
- -1, G_MAXINT, -1,
- G_PARAM_READWRITE));
+ signals[TEXT_INSERTED] = g_signal_new (
+ "text_inserted",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECellTextClass, text_inserted),
+ NULL, NULL,
+ e_marshal_VOID__POINTER_INT_INT_INT_INT,
+ G_TYPE_NONE, 5,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ G_TYPE_INT);
+
+ signals[TEXT_DELETED] = g_signal_new (
+ "text_deleted",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ECellTextClass, text_deleted),
+ NULL, NULL,
+ e_marshal_VOID__POINTER_INT_INT_INT_INT,
+ G_TYPE_NONE, 5,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ G_TYPE_INT);
+
+ g_object_class_install_property (
+ object_class,
+ PROP_STRIKEOUT_COLUMN,
+ g_param_spec_int (
+ "strikeout_column",
+ "Strikeout Column",
+ NULL,
+ -1, G_MAXINT, -1,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_UNDERLINE_COLUMN,
+ g_param_spec_int (
+ "underline_column",
+ "Underline Column",
+ NULL,
+ -1, G_MAXINT, -1,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_BOLD_COLUMN,
+ g_param_spec_int (
+ "bold_column",
+ "Bold Column",
+ NULL,
+ -1, G_MAXINT, -1,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_COLOR_COLUMN,
+ g_param_spec_int (
+ "color_column",
+ "Color Column",
+ NULL,
+ -1, G_MAXINT, -1,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_EDITABLE,
+ g_param_spec_boolean (
+ "editable",
+ "Editable",
+ NULL,
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_BG_COLOR_COLUMN,
+ g_param_spec_int (
+ "bg_color_column",
+ "BG Color Column",
+ NULL,
+ -1, G_MAXINT, -1,
+ G_PARAM_READWRITE));
if (!clipboard_atom)
clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
@@ -1702,8 +1728,8 @@ e_cell_text_get_cursor_locations (ECellTextView *tv,
row = edit->row;
col = edit->view_col;
- e_table_item_get_cell_geometry (item, &row, &col,
- &x, &y, NULL, &area.height);
+ e_table_item_get_cell_geometry (
+ item, &row, &col, &x, &y, NULL, &area.height);
gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (parent_item), &x1, &y1, NULL, NULL);
@@ -1711,10 +1737,11 @@ e_cell_text_get_cursor_locations (ECellTextView *tv,
index = edit->selection_end + edit->preedit_pos;
- pango_layout_get_cursor_pos (edit->layout,
- index,
- strong_pos ? &pango_strong_pos : NULL,
- weak_pos ? &pango_weak_pos : NULL);
+ pango_layout_get_cursor_pos (
+ edit->layout,
+ index,
+ strong_pos ? &pango_strong_pos : NULL,
+ weak_pos ? &pango_weak_pos : NULL);
if (strong_pos) {
strong_pos->x = x + x1 - cx - edit->xofs_edit + pango_strong_pos.x / PANGO_SCALE;
@@ -1749,8 +1776,9 @@ e_cell_text_preedit_changed_cb (GtkIMContext *context,
gchar *preedit_string;
gint cursor_pos;
CellEdit *edit = tv->edit;
- gtk_im_context_get_preedit_string (edit->im_context, &preedit_string,
- NULL, &cursor_pos);
+ gtk_im_context_get_preedit_string (
+ edit->im_context, &preedit_string,
+ NULL, &cursor_pos);
edit->preedit_length = strlen (preedit_string);
cursor_pos = CLAMP (cursor_pos, 0, g_utf8_strlen (preedit_string, -1));
@@ -1784,11 +1812,11 @@ e_cell_text_retrieve_surrounding_cb (GtkIMContext *context,
{
CellEdit *edit = tv->edit;
- gtk_im_context_set_surrounding (context,
- edit->text,
- strlen (edit->text),
- MIN (edit->selection_start, edit->selection_end)
- );
+ gtk_im_context_set_surrounding (
+ context,
+ edit->text,
+ strlen (edit->text),
+ MIN (edit->selection_start, edit->selection_end));
return TRUE;
}
@@ -1804,8 +1832,9 @@ e_cell_text_delete_surrounding_cb (GtkIMContext *context,
CellEdit *edit = tv->edit;
text_len = g_utf8_strlen (edit->text, -1);
- begin_pos = g_utf8_pointer_to_offset (edit->text,
- edit->text + MIN (edit->selection_start, edit->selection_end));
+ begin_pos = g_utf8_pointer_to_offset (
+ edit->text,
+ edit->text + MIN (edit->selection_start, edit->selection_end));
begin_pos += offset;
end_pos = begin_pos + n_chars;
if (begin_pos < 0 || text_len < begin_pos)
@@ -2023,8 +2052,9 @@ _blink_scroll_timeout (gpointer data)
e_tep_event.motion.time = 0;
e_tep_event.motion.position = get_position_from_xy (edit, edit->lastx, edit->lasty);
_get_tep (edit);
- e_text_event_processor_handle_event (edit->tep,
- &e_tep_event);
+ e_text_event_processor_handle_event (
+ edit->tep,
+ &e_tep_event);
edit->scroll_start = current_time;
}
}
@@ -2168,13 +2198,14 @@ _get_position (ECellTextView *text_view,
return 0;
case E_TEP_FORWARD_LINE:
- pango_layout_move_cursor_visually (edit->layout,
- TRUE,
- edit->selection_end,
- 0,
- TRUE,
- &index,
- &trailing);
+ pango_layout_move_cursor_visually (
+ edit->layout,
+ TRUE,
+ edit->selection_end,
+ 0,
+ TRUE,
+ &index,
+ &trailing);
index = g_utf8_offset_to_pointer (edit->text + index, trailing) - edit->text;
if (index < 0)
return 0;
@@ -2183,13 +2214,14 @@ _get_position (ECellTextView *text_view,
return length;
return index;
case E_TEP_BACKWARD_LINE:
- pango_layout_move_cursor_visually (edit->layout,
- TRUE,
- edit->selection_end,
- 0,
- TRUE,
- &index,
- &trailing);
+ pango_layout_move_cursor_visually (
+ edit->layout,
+ TRUE,
+ edit->selection_end,
+ 0,
+ TRUE,
+ &index,
+ &trailing);
index = g_utf8_offset_to_pointer (edit->text + index, trailing) - edit->text;
if (index < 0)
@@ -2360,9 +2392,10 @@ e_cell_text_view_command (ETextEventProcessor *tep,
sel_start = MIN (edit->selection_start, edit->selection_end);
sel_end = MAX (edit->selection_start, edit->selection_end);
if (sel_start != sel_end) {
- e_cell_text_view_supply_selection (edit, command->time, GDK_SELECTION_PRIMARY,
- edit->text + sel_start,
- sel_end - sel_start);
+ e_cell_text_view_supply_selection (
+ edit, command->time, GDK_SELECTION_PRIMARY,
+ edit->text + sel_start,
+ sel_end - sel_start);
} else if (edit->timer) {
g_timer_reset (edit->timer);
}
@@ -2395,9 +2428,10 @@ e_cell_text_view_command (ETextEventProcessor *tep,
sel_start = MIN (edit->selection_start, edit->selection_end);
sel_end = MAX (edit->selection_start, edit->selection_end);
if (sel_start != sel_end) {
- e_cell_text_view_supply_selection (edit, command->time, clipboard_atom,
- edit->text + sel_start,
- sel_end - sel_start);
+ e_cell_text_view_supply_selection (
+ edit, command->time, clipboard_atom,
+ edit->text + sel_start,
+ sel_end - sel_start);
}
if (edit->timer) {
g_timer_reset (edit->timer);
@@ -2520,9 +2554,10 @@ e_cell_text_view_get_selection (CellEdit *edit,
guint32 time)
{
#if DO_SELECTION
- gtk_clipboard_request_text (gtk_widget_get_clipboard (GTK_WIDGET (edit->text_view->canvas),
- selection),
- paste_received, edit);
+ gtk_clipboard_request_text (
+ gtk_widget_get_clipboard (GTK_WIDGET (edit->text_view->canvas),
+ selection),
+ paste_received, edit);
#endif
}
@@ -2764,8 +2799,9 @@ e_cell_text_get_text_by_view (ECellView *cell_view,
if (edit && ectv->edit->row == row && ectv->edit->model_col == col) { /* being editted now */
ret = g_strdup (edit->text);
} else{
- model_text = e_cell_text_get_text (E_CELL_TEXT (cell_view->ecell),
- cell_view->e_table_model, col, row);
+ model_text = e_cell_text_get_text (
+ E_CELL_TEXT (cell_view->ecell),
+ cell_view->e_table_model, col, row);
ret = g_strdup (model_text);
e_cell_text_free_text (E_CELL_TEXT (cell_view->ecell), model_text);
}
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index cf5db5858a..f4de9d6922 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -186,7 +186,7 @@ cell_toggle_draw (ECellView *ecell_view,
gint x, y;
const gint value = GPOINTER_TO_INT (
- e_table_model_value_at (ecell_view->e_table_model, model_col, row));
+ e_table_model_value_at (ecell_view->e_table_model, model_col, row));
priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell);
@@ -307,9 +307,12 @@ cell_toggle_print (ECellView *ecell_view,
image = gdk_pixbuf_add_alpha (image, TRUE, 255, 255, 255);
image_width = (gdouble) gdk_pixbuf_get_width (image);
image_height = (gdouble) gdk_pixbuf_get_height (image);
- cairo_rectangle (cr, image_width / 7, image_height / 3,
- image_width - image_width / 4,
- image_width - image_height / 7);
+ cairo_rectangle (
+ cr,
+ image_width / 7,
+ image_height / 3,
+ image_width - image_width / 4,
+ image_width - image_height / 7);
cairo_clip (cr);
gdk_cairo_set_source_pixbuf (cr, image, 0, image_height / 4);
cairo_paint (cr);
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index e4bb093912..3a3bd7be99 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -280,9 +280,10 @@ ect_draw (ECellView *ecell_view,
}
if (node_image) {
- gdk_cairo_set_source_pixbuf (cr, node_image,
- x1 + subcell_offset,
- y1 + (y2 - y1) / 2 - node_image_height / 2);
+ gdk_cairo_set_source_pixbuf (
+ cr, node_image,
+ x1 + subcell_offset,
+ y1 + (y2 - y1) / 2 - node_image_height / 2);
cairo_paint (cr);
subcell_offset += node_image_width;
@@ -291,9 +292,10 @@ ect_draw (ECellView *ecell_view,
/* Now cause our subcell to draw its contents, shifted by
* subcell_offset pixels */
- e_cell_draw (tree_view->subcell_view, cr,
- model_col, view_col, row, flags,
- x1 + subcell_offset, y1, x2, y2);
+ e_cell_draw (
+ tree_view->subcell_view, cr,
+ model_col, view_col, row, flags,
+ x1 + subcell_offset, y1, x2, y2);
cairo_restore (cr);
}
@@ -426,8 +428,9 @@ ect_event (ECellView *ecell_view,
cairo_t *cr;
gint hgt;
- e_table_item_get_cell_geometry (tree_view->cell_view.e_table_item_view,
- &tmp_row, &view_col, &area.x, &area.y, NULL, &area.height);
+ e_table_item_get_cell_geometry (
+ tree_view->cell_view.e_table_item_view,
+ &tmp_row, &view_col, &area.x, &area.y, NULL, &area.height);
area.width = offset - 2;
hgt = e_cell_height (ecell_view, model_col, view_col, row);
@@ -466,8 +469,9 @@ ect_event (ECellView *ecell_view,
gint tmp_row = row;
cairo_t *cr;
- e_table_item_get_cell_geometry (tree_view->cell_view.e_table_item_view,
- &tmp_row, &view_col, &area.x, &area.y, NULL, &area.height);
+ e_table_item_get_cell_geometry (
+ tree_view->cell_view.e_table_item_view,
+ &tmp_row, &view_col, &area.x, &area.y, NULL, &area.height);
area.width = offset - 2;
cr = gdk_cairo_create (window);
@@ -492,8 +496,9 @@ ect_event (ECellView *ecell_view,
GdkRectangle area;
cairo_t *cr;
- e_table_item_get_cell_geometry (tree_view->cell_view.e_table_item_view,
- &tmp_row, &view_col, &area.x, &area.y, NULL, &area.height);
+ e_table_item_get_cell_geometry (
+ tree_view->cell_view.e_table_item_view,
+ &tmp_row, &view_col, &area.x, &area.y, NULL, &area.height);
area.width = offset - 2;
cr = gdk_cairo_create (window);
@@ -666,16 +671,19 @@ ect_print (ECellView *ecell_view,
if (!e_tree_model_node_is_root (tree_model, node)
|| e_tree_model_node_get_children (tree_model, node, NULL) > 0) {
- cairo_move_to (cr,
+ cairo_move_to (
+ cr,
offset - INDENT_AMOUNT / 2,
height / 2);
cairo_line_to (cr, offset, height / 2);
}
if (visible_depth_of_node (ecell_view->e_table_model, row) != 0) {
- cairo_move_to (cr,
+ cairo_move_to (
+ cr,
offset - INDENT_AMOUNT / 2, height);
- cairo_line_to (cr,
+ cairo_line_to (
+ cr,
offset - INDENT_AMOUNT / 2,
e_tree_table_adapter_node_get_next
(tree_table_adapter, node) ? 0 :
@@ -690,10 +698,12 @@ ect_print (ECellView *ecell_view,
offset -= INDENT_AMOUNT;
while (node && depth != 0) {
if (e_tree_table_adapter_node_get_next (tree_table_adapter, node)) {
- cairo_move_to (cr,
+ cairo_move_to (
+ cr,
offset - INDENT_AMOUNT / 2,
height);
- cairo_line_to (cr,
+ cairo_line_to (
+ cr,
offset - INDENT_AMOUNT / 2, 0);
}
node = e_tree_model_node_get_parent (tree_model, node);
diff --git a/widgets/table/e-cell.h b/widgets/table/e-cell.h
index 830184c06d..38fcc68c32 100644
--- a/widgets/table/e-cell.h
+++ b/widgets/table/e-cell.h
@@ -92,7 +92,7 @@ struct _ECellView {
gint focus_x1, focus_y1, focus_x2, focus_y2;
gint focus_col, focus_row;
- void (*kill_view_cb) (struct _ECellView *, gpointer );
+ void (*kill_view_cb) (struct _ECellView *, gpointer);
GList *kill_view_cb_data;
};
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index d14350fa55..b08d3fcf39 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -68,9 +68,10 @@ etcta_cursor_change (GObject *object,
gint col,
ETableClickToAdd *etcta)
{
- g_signal_emit (etcta,
- etcta_signals[CURSOR_CHANGE], 0,
- row, col);
+ g_signal_emit (
+ etcta,
+ etcta_signals[CURSOR_CHANGE], 0,
+ row, col);
}
static void
@@ -105,9 +106,10 @@ etcta_add_table_header (ETableClickToAdd *etcta,
if (etcta->eth)
g_object_ref (etcta->eth);
if (etcta->row)
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etcta->row),
- "ETableHeader", header,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etcta->row),
+ "ETableHeader", header,
+ NULL);
}
static void
@@ -128,12 +130,14 @@ etcta_add_one (ETableClickToAdd *etcta,
if (etcta->one)
g_object_ref (etcta->one);
if (etcta->row)
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etcta->row),
- "ETableModel", one,
- NULL);
- g_object_set (etcta->selection,
- "model", one,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etcta->row),
+ "ETableModel", one,
+ NULL);
+ g_object_set (
+ etcta->selection,
+ "model", one,
+ NULL);
}
static void
@@ -143,9 +147,10 @@ etcta_drop_one (ETableClickToAdd *etcta)
return;
g_object_unref (etcta->one);
etcta->one = NULL;
- g_object_set (etcta->selection,
- "model", NULL,
- NULL);
+ g_object_set (
+ etcta->selection,
+ "model", NULL,
+ NULL);
}
static void
@@ -225,17 +230,20 @@ etcta_set_property (GObject *object,
case PROP_WIDTH:
etcta->width = g_value_get_double (value);
if (etcta->row)
- gnome_canvas_item_set (etcta->row,
- "minimum_width", etcta->width,
- NULL);
+ gnome_canvas_item_set (
+ etcta->row,
+ "minimum_width", etcta->width,
+ NULL);
if (etcta->text)
- gnome_canvas_item_set (etcta->text,
- "width", (etcta->width < 4 ? 4 : etcta->width) - 4,
- NULL);
+ gnome_canvas_item_set (
+ etcta->text,
+ "width", (etcta->width < 4 ? 4 : etcta->width) - 4,
+ NULL);
if (etcta->rect)
- gnome_canvas_item_set (etcta->rect,
- "x2", etcta->width - 1,
- NULL);
+ gnome_canvas_item_set (
+ etcta->rect,
+ "x2", etcta->width - 1,
+ NULL);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -352,9 +360,10 @@ item_key_press (ETableItem *item,
static void
set_initial_selection (ETableClickToAdd *etcta)
{
- e_selection_model_do_something (E_SELECTION_MODEL (etcta->selection),
- 0, e_table_header_prioritized_column (etcta->eth),
- 0);
+ e_selection_model_do_something (
+ E_SELECTION_MODEL (etcta->selection),
+ 0, e_table_header_prioritized_column (etcta->eth),
+ 0);
}
static void
@@ -375,16 +384,17 @@ finish_editing (ETableClickToAdd *etcta)
e_selection_model_clear (E_SELECTION_MODEL (etcta->selection));
- etcta->row = gnome_canvas_item_new (GNOME_CANVAS_GROUP (etcta),
- e_table_item_get_type (),
- "ETableHeader", etcta->eth,
- "ETableModel", etcta->one,
- "minimum_width", etcta->width,
- "horizontal_draw_grid", TRUE,
- "vertical_draw_grid", TRUE,
- "selection_model", etcta->selection,
- "cursor_mode", E_CURSOR_SPREADSHEET,
- NULL);
+ etcta->row = gnome_canvas_item_new (
+ GNOME_CANVAS_GROUP (etcta),
+ e_table_item_get_type (),
+ "ETableHeader", etcta->eth,
+ "ETableModel", etcta->one,
+ "minimum_width", etcta->width,
+ "horizontal_draw_grid", TRUE,
+ "vertical_draw_grid", TRUE,
+ "selection_model", etcta->selection,
+ "cursor_mode", E_CURSOR_SPREADSHEET,
+ NULL);
g_signal_connect (
etcta->row, "key_press",
@@ -425,16 +435,17 @@ etcta_event (GnomeCanvasItem *item,
e_selection_model_clear (E_SELECTION_MODEL (etcta->selection));
- etcta->row = gnome_canvas_item_new (GNOME_CANVAS_GROUP (item),
- e_table_item_get_type (),
- "ETableHeader", etcta->eth,
- "ETableModel", etcta->one,
- "minimum_width", etcta->width,
- "horizontal_draw_grid", TRUE,
- "vertical_draw_grid", TRUE,
- "selection_model", etcta->selection,
- "cursor_mode", E_CURSOR_SPREADSHEET,
- NULL);
+ etcta->row = gnome_canvas_item_new (
+ GNOME_CANVAS_GROUP (item),
+ e_table_item_get_type (),
+ "ETableHeader", etcta->eth,
+ "ETableModel", etcta->one,
+ "minimum_width", etcta->width,
+ "horizontal_draw_grid", TRUE,
+ "vertical_draw_grid", TRUE,
+ "selection_model", etcta->selection,
+ "cursor_mode", E_CURSOR_SPREADSHEET,
+ NULL);
g_signal_connect (
etcta->row, "key_press",
@@ -483,21 +494,24 @@ etcta_reflow (GnomeCanvasItem *item,
gdouble old_height = etcta->height;
if (etcta->text) {
- g_object_get (etcta->text,
- "height", &etcta->height,
- NULL);
+ g_object_get (
+ etcta->text,
+ "height", &etcta->height,
+ NULL);
etcta->height += 6;
}
if (etcta->row) {
- g_object_get (etcta->row,
- "height", &etcta->height,
- NULL);
+ g_object_get (
+ etcta->row,
+ "height", &etcta->height,
+ NULL);
}
if (etcta->rect) {
- g_object_set (etcta->rect,
- "y2", etcta->height - 1,
- NULL);
+ g_object_set (
+ etcta->rect,
+ "y2", etcta->height - 1,
+ NULL);
}
if (old_height != etcta->height)
@@ -521,58 +535,78 @@ etcta_class_init (ETableClickToAddClass *class)
item_class->unrealize = etcta_unrealize;
item_class->event = etcta_event;
- g_object_class_install_property (object_class, PROP_HEADER,
- g_param_spec_object ("header",
- "Header",
- NULL,
- E_TYPE_TABLE_HEADER,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_MODEL,
- g_param_spec_object ("model",
- "Model",
- NULL,
- E_TYPE_TABLE_MODEL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_MESSAGE,
- g_param_spec_string ("message",
- "Message",
- NULL,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_WIDTH,
- g_param_spec_double ("width",
- "Width",
- NULL,
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE | G_PARAM_LAX_VALIDATION));
-
- g_object_class_install_property (object_class, PROP_HEIGHT,
- g_param_spec_double ("height",
- "Height",
- NULL,
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READABLE | G_PARAM_LAX_VALIDATION));
-
- etcta_signals[CURSOR_CHANGE] =
- g_signal_new ("cursor_change",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableClickToAddClass, cursor_change),
- NULL, NULL,
- e_marshal_VOID__INT_INT,
- G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
-
- etcta_signals[STYLE_SET] =
- g_signal_new ("style_set",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableClickToAddClass, style_set),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1, GTK_TYPE_STYLE);
+ g_object_class_install_property (
+ object_class,
+ PROP_HEADER,
+ g_param_spec_object (
+ "header",
+ "Header",
+ NULL,
+ E_TYPE_TABLE_HEADER,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MODEL,
+ g_param_spec_object (
+ "model",
+ "Model",
+ NULL,
+ E_TYPE_TABLE_MODEL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MESSAGE,
+ g_param_spec_string (
+ "message",
+ "Message",
+ NULL,
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_WIDTH,
+ g_param_spec_double (
+ "width",
+ "Width",
+ NULL,
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE |
+ G_PARAM_LAX_VALIDATION));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_HEIGHT,
+ g_param_spec_double (
+ "height",
+ "Height",
+ NULL,
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READABLE |
+ G_PARAM_LAX_VALIDATION));
+
+ etcta_signals[CURSOR_CHANGE] = g_signal_new (
+ "cursor_change",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableClickToAddClass, cursor_change),
+ NULL, NULL,
+ e_marshal_VOID__INT_INT,
+ G_TYPE_NONE, 2,
+ G_TYPE_INT,
+ G_TYPE_INT);
+
+ etcta_signals[STYLE_SET] = g_signal_new (
+ "style_set",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableClickToAddClass, style_set),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ GTK_TYPE_STYLE);
gal_a11y_e_table_click_to_add_init ();
}
diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c
index fc7da9c9f5..823aba415d 100644
--- a/widgets/table/e-table-col.c
+++ b/widgets/table/e-table-col.c
@@ -124,12 +124,15 @@ e_table_col_class_init (ETableColClass *class)
object_class->set_property = etc_set_property;
object_class->get_property = etc_get_property;
- g_object_class_install_property (object_class, PROP_COMPARE_COL,
- g_param_spec_int ("compare_col",
- "Width",
- "Width",
- 0, G_MAXINT, 0,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_COMPARE_COL,
+ g_param_spec_int (
+ "compare_col",
+ "Width",
+ "Width",
+ 0, G_MAXINT, 0,
+ G_PARAM_READWRITE));
}
static void
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 3547bb3169..3be7539ada 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -99,17 +99,19 @@ e_table_config_changed (ETableConfig *config,
{
g_return_if_fail (E_IS_TABLE_CONFIG (config));
- g_signal_emit (G_OBJECT (config), e_table_config_signals[CHANGED], 0, state);
+ g_signal_emit (config, e_table_config_signals[CHANGED], 0, state);
}
static void
config_dialog_changed (ETableConfig *config)
{
/* enable the apply/ok buttons */
- gtk_dialog_set_response_sensitive (GTK_DIALOG (config->dialog_toplevel),
- GTK_RESPONSE_APPLY, TRUE);
- gtk_dialog_set_response_sensitive (GTK_DIALOG (config->dialog_toplevel),
- GTK_RESPONSE_OK, TRUE);
+ gtk_dialog_set_response_sensitive (
+ GTK_DIALOG (config->dialog_toplevel),
+ GTK_RESPONSE_APPLY, TRUE);
+ gtk_dialog_set_response_sensitive (
+ GTK_DIALOG (config->dialog_toplevel),
+ GTK_RESPONSE_OK, TRUE);
}
static void
@@ -139,21 +141,24 @@ e_table_config_class_init (ETableConfigClass *class)
object_class->finalize = config_finalize;
object_class->get_property = config_get_property;
- e_table_config_signals[CHANGED] =
- g_signal_new ("changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableConfigClass, changed),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- g_object_class_install_property (object_class, PROP_STATE,
- g_param_spec_object ("state",
- "State",
- NULL,
- E_TYPE_TABLE_STATE,
- G_PARAM_READABLE));
+ e_table_config_signals[CHANGED] = g_signal_new (
+ "changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableConfigClass, changed),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ g_object_class_install_property (
+ object_class,
+ PROP_STATE,
+ g_param_spec_object (
+ "state",
+ "State",
+ NULL,
+ E_TYPE_TABLE_STATE,
+ G_PARAM_READABLE));
}
static void
@@ -1249,9 +1254,10 @@ configure_fields_dialog (ETableConfig *config,
scrolled = e_builder_get_widget (builder, "available-scrolled");
gtk_container_add (GTK_CONTAINER (scrolled), etable);
config->available = E_TABLE (etable);
- g_object_get (config->available,
- "model", &config->available_model,
- NULL);
+ g_object_get (
+ config->available,
+ "model", &config->available_model,
+ NULL);
gtk_widget_show_all (etable);
gtk_label_set_mnemonic_widget (
GTK_LABEL (e_builder_get_widget (
@@ -1263,9 +1269,10 @@ configure_fields_dialog (ETableConfig *config,
scrolled = e_builder_get_widget (builder, "shown-scrolled");
gtk_container_add (GTK_CONTAINER (scrolled), etable);
config->shown = E_TABLE (etable);
- g_object_get (config->shown,
- "model", &config->shown_model,
- NULL);
+ g_object_get (
+ config->shown,
+ "model", &config->shown_model,
+ NULL);
gtk_widget_show_all (etable);
gtk_label_set_mnemonic_widget (
GTK_LABEL (e_builder_get_widget (
@@ -1351,8 +1358,9 @@ setup_gui (ETableConfig *config)
configure_group_dialog (config, builder);
configure_fields_dialog (config, builder);
- g_object_weak_ref (G_OBJECT (config->dialog_toplevel),
- dialog_destroyed, config);
+ g_object_weak_ref (
+ G_OBJECT (config->dialog_toplevel),
+ dialog_destroyed, config);
g_signal_connect (
config->dialog_toplevel, "response",
@@ -1449,8 +1457,9 @@ e_table_config_new (const gchar *header,
widget = gtk_dialog_get_action_area (dialog);
gtk_container_set_border_width (GTK_CONTAINER (widget), 12);
- gtk_dialog_set_response_sensitive (GTK_DIALOG (config->dialog_toplevel),
- GTK_RESPONSE_APPLY, FALSE);
+ gtk_dialog_set_response_sensitive (
+ GTK_DIALOG (config->dialog_toplevel),
+ GTK_RESPONSE_APPLY, FALSE);
gtk_widget_show (config->dialog_toplevel);
return E_TABLE_CONFIG (config);
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index 6e69ccd6ad..fb005ed30f 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -56,9 +56,10 @@ e_table_field_chooser_dialog_set_property (GObject *object,
g_free (etfcd->dnd_code);
etfcd->dnd_code = g_strdup (g_value_get_string (value));
if (etfcd->etfc)
- g_object_set (etfcd->etfc,
- "dnd_code", etfcd->dnd_code,
- NULL);
+ g_object_set (
+ etfcd->etfc,
+ "dnd_code", etfcd->dnd_code,
+ NULL);
break;
case PROP_FULL_HEADER:
if (etfcd->full_header)
@@ -70,9 +71,10 @@ e_table_field_chooser_dialog_set_property (GObject *object,
if (etfcd->full_header)
g_object_ref (etfcd->full_header);
if (etfcd->etfc)
- g_object_set (etfcd->etfc,
- "full_header", etfcd->full_header,
- NULL);
+ g_object_set (
+ etfcd->etfc,
+ "full_header", etfcd->full_header,
+ NULL);
break;
case PROP_HEADER:
if (etfcd->header)
@@ -84,9 +86,10 @@ e_table_field_chooser_dialog_set_property (GObject *object,
if (etfcd->header)
g_object_ref (etfcd->header);
if (etfcd->etfc)
- g_object_set (etfcd->etfc,
- "header", etfcd->header,
- NULL);
+ g_object_set (
+ etfcd->etfc,
+ "header", etfcd->header,
+ NULL);
break;
default:
break;
@@ -210,11 +213,12 @@ e_table_field_chooser_dialog_init (ETableFieldChooserDialog *e_table_field_choos
widget = e_table_field_chooser_new ();
e_table_field_chooser_dialog->etfc = E_TABLE_FIELD_CHOOSER (widget);
- g_object_set (widget,
- "dnd_code", e_table_field_chooser_dialog->dnd_code,
- "full_header", e_table_field_chooser_dialog->full_header,
- "header", e_table_field_chooser_dialog->header,
- NULL);
+ g_object_set (
+ widget,
+ "dnd_code", e_table_field_chooser_dialog->dnd_code,
+ "full_header", e_table_field_chooser_dialog->full_header,
+ "header", e_table_field_chooser_dialog->header,
+ NULL);
content_area = gtk_dialog_get_content_area (dialog);
gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0);
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index 32d2904bb9..3c6c33cdcf 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -425,11 +425,12 @@ etfci_drag_data_get (GtkWidget *widget,
{
if (etfci->drag_col != -1) {
gchar *string = g_strdup_printf ("%d", etfci->drag_col);
- gtk_selection_data_set (selection_data,
- GDK_SELECTION_TYPE_STRING,
- sizeof (string[0]),
- (guchar *) string,
- strlen (string));
+ gtk_selection_data_set (
+ selection_data,
+ GDK_SELECTION_TYPE_STRING,
+ sizeof (string[0]),
+ (guchar *) string,
+ strlen (string));
g_free (string);
}
}
@@ -518,12 +519,13 @@ etfci_draw (GnomeCanvasItem *item,
cairo_save (cr);
- e_table_header_draw_button (cr, ecol,
- GTK_WIDGET (canvas),
- -x, y1 - y,
- width, height,
- etfci->width, y2 - y1,
- E_TABLE_COL_ARROW_NONE);
+ e_table_header_draw_button (
+ cr, ecol,
+ GTK_WIDGET (canvas),
+ -x, y1 - y,
+ width, height,
+ etfci->width, y2 - y1,
+ E_TABLE_COL_ARROW_NONE);
cairo_restore (cr);
}
@@ -596,8 +598,9 @@ etfci_start_drag (ETableFieldChooserItem *etfci,
g_free ((gpointer) etfci_drag_types[0].target);
button_height = e_table_header_compute_height (ecol, widget);
- cs = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
- etfci->width, button_height);
+ cs = cairo_image_surface_create (
+ CAIRO_FORMAT_ARGB32,
+ etfci->width, button_height);
cr = cairo_create (cs);
e_table_header_draw_button (
@@ -671,40 +674,55 @@ etfci_class_init (ETableFieldChooserItemClass *class)
item_class->point = etfci_point;
item_class->event = etfci_event;
- g_object_class_install_property (object_class, PROP_DND_CODE,
- g_param_spec_string ("dnd_code",
- "DnD code",
- NULL,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_FULL_HEADER,
- g_param_spec_object ("full_header",
- "Full Header",
- NULL,
- E_TYPE_TABLE_HEADER,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HEADER,
- g_param_spec_object ("header",
- "Header",
- NULL,
- E_TYPE_TABLE_HEADER,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_WIDTH,
- g_param_spec_double ("width",
- "Width",
- NULL,
- 0, G_MAXDOUBLE, 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HEIGHT,
- g_param_spec_double ("height",
- "Height",
- NULL,
- 0, G_MAXDOUBLE, 0,
- G_PARAM_READABLE));
+ g_object_class_install_property (
+ object_class,
+ PROP_DND_CODE,
+ g_param_spec_string (
+ "dnd_code",
+ "DnD code",
+ NULL,
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_FULL_HEADER,
+ g_param_spec_object (
+ "full_header",
+ "Full Header",
+ NULL,
+ E_TYPE_TABLE_HEADER,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_HEADER,
+ g_param_spec_object (
+ "header",
+ "Header",
+ NULL,
+ E_TYPE_TABLE_HEADER,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_WIDTH,
+ g_param_spec_double (
+ "width",
+ "Width",
+ NULL,
+ 0, G_MAXDOUBLE, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_HEIGHT,
+ g_param_spec_double (
+ "height",
+ "Height",
+ NULL,
+ 0, G_MAXDOUBLE, 0,
+ G_PARAM_READABLE));
}
static void
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index 19791fb229..50f8267109 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -60,26 +60,35 @@ e_table_field_chooser_class_init (ETableFieldChooserClass *class)
object_class->get_property = e_table_field_chooser_get_property;
object_class->dispose = e_table_field_chooser_dispose;
- g_object_class_install_property (object_class, PROP_DND_CODE,
- g_param_spec_string ("dnd_code",
- "DnD code",
- NULL,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_FULL_HEADER,
- g_param_spec_object ("full_header",
- "Full Header",
- NULL,
- E_TYPE_TABLE_HEADER,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HEADER,
- g_param_spec_object ("header",
- "Header",
- NULL,
- E_TYPE_TABLE_HEADER,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_DND_CODE,
+ g_param_spec_string (
+ "dnd_code",
+ "DnD code",
+ NULL,
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_FULL_HEADER,
+ g_param_spec_object (
+ "full_header",
+ "Full Header",
+ NULL,
+ E_TYPE_TABLE_HEADER,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_HEADER,
+ g_param_spec_object (
+ "header",
+ "Header",
+ NULL,
+ E_TYPE_TABLE_HEADER,
+ G_PARAM_READWRITE));
}
static void
@@ -104,35 +113,40 @@ static void allocate_callback (GtkWidget *canvas, GtkAllocation *allocation, ETa
{
gdouble height;
etfc->last_alloc = *allocation;
- gnome_canvas_item_set ( etfc->item,
- "width", (gdouble) allocation->width,
- NULL );
- g_object_get (etfc->item,
- "height", &height,
- NULL);
+ gnome_canvas_item_set (
+ etfc->item,
+ "width", (gdouble) allocation->width,
+ NULL);
+ g_object_get (
+ etfc->item,
+ "height", &height,
+ NULL);
height = MAX (height, allocation->height);
- gnome_canvas_set_scroll_region (GNOME_CANVAS ( etfc->canvas ), 0, 0, allocation->width - 1, height - 1);
- gnome_canvas_item_set ( etfc->rect,
- "x2", (gdouble) allocation->width,
- "y2", (gdouble) height,
- NULL );
+ gnome_canvas_set_scroll_region (GNOME_CANVAS (etfc->canvas), 0, 0, allocation->width - 1, height - 1);
+ gnome_canvas_item_set (
+ etfc->rect,
+ "x2", (gdouble) allocation->width,
+ "y2", (gdouble) height,
+ NULL);
ensure_nonzero_step_increments (etfc);
}
static void resize (GnomeCanvas *canvas, ETableFieldChooser *etfc)
{
gdouble height;
- g_object_get (etfc->item,
- "height", &height,
- NULL);
+ g_object_get (
+ etfc->item,
+ "height", &height,
+ NULL);
height = MAX (height, etfc->last_alloc.height);
gnome_canvas_set_scroll_region (GNOME_CANVAS (etfc->canvas), 0, 0, etfc->last_alloc.width - 1, height - 1);
- gnome_canvas_item_set ( etfc->rect,
- "x2", (gdouble) etfc->last_alloc.width,
- "y2", (gdouble) height,
- NULL );
+ gnome_canvas_item_set (
+ etfc->rect,
+ "x2", (gdouble) etfc->last_alloc.width,
+ "y2", (gdouble) height,
+ NULL);
ensure_nonzero_step_increments (etfc);
}
@@ -184,22 +198,24 @@ e_table_field_chooser_init (ETableFieldChooser *etfc)
gtk_widget_set_size_request (widget, -1, 250);
gtk_box_pack_start (GTK_BOX (etfc), widget, TRUE, TRUE, 0);
- etfc->rect = gnome_canvas_item_new (gnome_canvas_root ( GNOME_CANVAS ( etfc->canvas ) ),
- gnome_canvas_rect_get_type (),
- "x1", (gdouble) 0,
- "y1", (gdouble) 0,
- "x2", (gdouble) 100,
- "y2", (gdouble) 100,
- "fill_color", "white",
- NULL );
-
- etfc->item = gnome_canvas_item_new (gnome_canvas_root (etfc->canvas),
- e_table_field_chooser_item_get_type (),
- "width", (gdouble) 100,
- "full_header", etfc->full_header,
- "header", etfc->header,
- "dnd_code", etfc->dnd_code,
- NULL );
+ etfc->rect = gnome_canvas_item_new (
+ gnome_canvas_root (GNOME_CANVAS (etfc->canvas)),
+ gnome_canvas_rect_get_type (),
+ "x1", (gdouble) 0,
+ "y1", (gdouble) 0,
+ "x2", (gdouble) 100,
+ "y2", (gdouble) 100,
+ "fill_color", "white",
+ NULL);
+
+ etfc->item = gnome_canvas_item_new (
+ gnome_canvas_root (etfc->canvas),
+ e_table_field_chooser_item_get_type (),
+ "width", (gdouble) 100,
+ "full_header", etfc->full_header,
+ "header", etfc->header,
+ "dnd_code", etfc->dnd_code,
+ NULL);
g_signal_connect (
etfc->canvas, "reflow",
@@ -207,7 +223,7 @@ e_table_field_chooser_init (ETableFieldChooser *etfc)
gnome_canvas_set_scroll_region (
GNOME_CANVAS (etfc->canvas),
- 0, 0, 100, 100 );
+ 0, 0, 100, 100);
/* Connect the signals */
g_signal_connect (
@@ -256,9 +272,10 @@ e_table_field_chooser_set_property (GObject *object,
g_free (etfc->dnd_code);
etfc->dnd_code = g_strdup (g_value_get_string (value));
if (etfc->item)
- g_object_set (etfc->item,
- "dnd_code", etfc->dnd_code,
- NULL);
+ g_object_set (
+ etfc->item,
+ "dnd_code", etfc->dnd_code,
+ NULL);
break;
case PROP_FULL_HEADER:
if (etfc->full_header)
@@ -270,9 +287,10 @@ e_table_field_chooser_set_property (GObject *object,
if (etfc->full_header)
g_object_ref (etfc->full_header);
if (etfc->item)
- g_object_set (etfc->item,
- "full_header", etfc->full_header,
- NULL);
+ g_object_set (
+ etfc->item,
+ "full_header", etfc->full_header,
+ NULL);
break;
case PROP_HEADER:
if (etfc->header)
@@ -284,9 +302,10 @@ e_table_field_chooser_set_property (GObject *object,
if (etfc->header)
g_object_ref (etfc->header);
if (etfc->item)
- g_object_set (etfc->item,
- "header", etfc->header,
- NULL);
+ g_object_set (
+ etfc->item,
+ "header", etfc->header,
+ NULL);
break;
default:
break;
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 9841b99d99..602ef12e17 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -74,8 +74,9 @@ e_table_group_container_child_node_free (ETableGroupContainer *etgc,
ETableGroup *child = child_node->child;
g_object_run_dispose (G_OBJECT (child));
- e_table_model_free_value (etg->model, etgc->ecol->col_idx,
- child_node->key);
+ e_table_model_free_value (
+ etg->model, etgc->ecol->col_idx,
+ child_node->key);
g_free (child_node->string);
g_object_run_dispose (G_OBJECT (child_node->text));
g_object_run_dispose (G_OBJECT (child_node->rect));
@@ -201,8 +202,9 @@ e_table_group_container_new (GnomeCanvasGroup *parent,
etgc = g_object_new (E_TYPE_TABLE_GROUP_CONTAINER, NULL);
- e_table_group_container_construct (parent, etgc, full_header, header,
- model, sort_info, n);
+ e_table_group_container_construct (
+ parent, etgc, full_header, header,
+ model, sort_info, n);
return E_TABLE_GROUP (etgc);
}
@@ -357,11 +359,13 @@ compute_text (ETableGroupContainer *etgc,
* Finally the %d is replaced with count of items in this group.
* Example: "Family name: Smith (13 items)"
*/
- text = g_strdup_printf (ngettext ("%s: %s (%d item)",
- "%s: %s (%d items)",
- child_node->count),
- etgc->ecol->text, child_node->string,
- (gint) child_node->count);
+ text = g_strdup_printf (
+ ngettext (
+ "%s: %s (%d item)",
+ "%s: %s (%d items)",
+ child_node->count),
+ etgc->ecol->text, child_node->string,
+ (gint) child_node->count);
} else {
/* Translators: This text is used as a special row when an ETable
* has turned on grouping on a column, which doesn't have set a title.
@@ -369,15 +373,18 @@ compute_text (ETableGroupContainer *etgc,
* The %d is replaced with count of items in this group.
* Example: "Smith (13 items)"
*/
- text = g_strdup_printf (ngettext ("%s (%d item)",
- "%s (%d items)",
- child_node->count),
- child_node->string,
- (gint) child_node->count);
+ text = g_strdup_printf (
+ ngettext (
+ "%s (%d item)",
+ "%s (%d items)",
+ child_node->count),
+ child_node->string,
+ (gint) child_node->count);
}
- gnome_canvas_item_set (child_node->text,
- "text", text,
- NULL);
+ gnome_canvas_item_set (
+ child_node->text,
+ "text", text,
+ NULL);
g_free (text);
}
@@ -456,28 +463,32 @@ create_child_node (ETableGroupContainer *etgc,
ETableGroup *etg = E_TABLE_GROUP (etgc);
child_node = g_new (ETableGroupContainerChildNode, 1);
- child_node->rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP (etgc),
- gnome_canvas_rect_get_type (),
- "fill_color", "grey70",
- "outline_color", "grey50",
- NULL);
- child_node->text = gnome_canvas_item_new (GNOME_CANVAS_GROUP (etgc),
- e_text_get_type (),
- "fill_color", "black",
- NULL);
- child = e_table_group_new (GNOME_CANVAS_GROUP (etgc), etg->full_header,
- etg->header, etg->model, etgc->sort_info, etgc->n + 1);
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (child),
- "alternating_row_colors", etgc->alternating_row_colors,
- "horizontal_draw_grid", etgc->horizontal_draw_grid,
- "vertical_draw_grid", etgc->vertical_draw_grid,
- "drawfocus", etgc->draw_focus,
- "cursor_mode", etgc->cursor_mode,
- "selection_model", etgc->selection_model,
- "length_threshold", etgc->length_threshold,
- "uniform_row_height", etgc->uniform_row_height,
- "minimum_width", etgc->minimum_width - GROUP_INDENT,
- NULL);
+ child_node->rect = gnome_canvas_item_new (
+ GNOME_CANVAS_GROUP (etgc),
+ gnome_canvas_rect_get_type (),
+ "fill_color", "grey70",
+ "outline_color", "grey50",
+ NULL);
+ child_node->text = gnome_canvas_item_new (
+ GNOME_CANVAS_GROUP (etgc),
+ e_text_get_type (),
+ "fill_color", "black",
+ NULL);
+ child = e_table_group_new (
+ GNOME_CANVAS_GROUP (etgc), etg->full_header,
+ etg->header, etg->model, etgc->sort_info, etgc->n + 1);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (child),
+ "alternating_row_colors", etgc->alternating_row_colors,
+ "horizontal_draw_grid", etgc->horizontal_draw_grid,
+ "vertical_draw_grid", etgc->vertical_draw_grid,
+ "drawfocus", etgc->draw_focus,
+ "cursor_mode", etgc->cursor_mode,
+ "selection_model", etgc->selection_model,
+ "length_threshold", etgc->length_threshold,
+ "uniform_row_height", etgc->uniform_row_height,
+ "minimum_width", etgc->minimum_width - GROUP_INDENT,
+ NULL);
g_signal_connect (
child, "cursor_change",
@@ -673,8 +684,9 @@ etgc_increment (ETableGroup *etg,
GList *list;
for (list = etgc->children; list; list = g_list_next (list))
- e_table_group_increment (((ETableGroupContainerChildNode *) list->data)->child,
- position, amount);
+ e_table_group_increment (
+ ((ETableGroupContainerChildNode *) list->data)->child,
+ position, amount);
}
static void
@@ -686,8 +698,9 @@ etgc_decrement (ETableGroup *etg,
GList *list;
for (list = etgc->children; list; list = g_list_next (list))
- e_table_group_decrement (((ETableGroupContainerChildNode *) list->data)->child,
- position, amount);
+ e_table_group_decrement (
+ ((ETableGroupContainerChildNode *) list->data)->child,
+ position, amount);
}
static void
@@ -698,11 +711,13 @@ etgc_set_focus (ETableGroup *etg,
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg);
if (etgc->children) {
if (direction == E_FOCUS_END)
- e_table_group_set_focus (((ETableGroupContainerChildNode *) g_list_last (etgc->children)->data)->child,
- direction, view_col);
+ e_table_group_set_focus (
+ ((ETableGroupContainerChildNode *) g_list_last (etgc->children)->data)->child,
+ direction, view_col);
else
- e_table_group_set_focus (((ETableGroupContainerChildNode *) etgc->children->data)->child,
- direction, view_col);
+ e_table_group_set_focus (
+ ((ETableGroupContainerChildNode *) etgc->children->data)->child,
+ direction, view_col);
}
}
@@ -850,27 +865,30 @@ etgc_set_property (GObject *object,
for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
- g_object_set (child_node->child,
- "minimum_width", etgc->minimum_width - GROUP_INDENT,
- NULL);
+ g_object_set (
+ child_node->child,
+ "minimum_width", etgc->minimum_width - GROUP_INDENT,
+ NULL);
}
break;
case PROP_LENGTH_THRESHOLD:
etgc->length_threshold = g_value_get_int (value);
for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
- g_object_set (child_node->child,
- "length_threshold", etgc->length_threshold,
- NULL);
+ g_object_set (
+ child_node->child,
+ "length_threshold", etgc->length_threshold,
+ NULL);
}
break;
case PROP_UNIFORM_ROW_HEIGHT:
etgc->uniform_row_height = g_value_get_boolean (value);
for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
- g_object_set (child_node->child,
- "uniform_row_height", etgc->uniform_row_height,
- NULL);
+ g_object_set (
+ child_node->child,
+ "uniform_row_height", etgc->uniform_row_height,
+ NULL);
}
break;
@@ -882,9 +900,10 @@ etgc_set_property (GObject *object,
g_object_ref (etgc->selection_model);
for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
- g_object_set (child_node->child,
- "selection_model", etgc->selection_model,
- NULL);
+ g_object_set (
+ child_node->child,
+ "selection_model", etgc->selection_model,
+ NULL);
}
break;
@@ -892,9 +911,10 @@ etgc_set_property (GObject *object,
etgc->alternating_row_colors = g_value_get_boolean (value);
for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
- g_object_set (child_node->child,
- "alternating_row_colors", etgc->alternating_row_colors,
- NULL);
+ g_object_set (
+ child_node->child,
+ "alternating_row_colors", etgc->alternating_row_colors,
+ NULL);
}
break;
@@ -902,9 +922,10 @@ etgc_set_property (GObject *object,
etgc->horizontal_draw_grid = g_value_get_boolean (value);
for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
- g_object_set (child_node->child,
- "horizontal_draw_grid", etgc->horizontal_draw_grid,
- NULL);
+ g_object_set (
+ child_node->child,
+ "horizontal_draw_grid", etgc->horizontal_draw_grid,
+ NULL);
}
break;
@@ -912,9 +933,10 @@ etgc_set_property (GObject *object,
etgc->vertical_draw_grid = g_value_get_boolean (value);
for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
- g_object_set (child_node->child,
- "vertical_draw_grid", etgc->vertical_draw_grid,
- NULL);
+ g_object_set (
+ child_node->child,
+ "vertical_draw_grid", etgc->vertical_draw_grid,
+ NULL);
}
break;
@@ -922,9 +944,10 @@ etgc_set_property (GObject *object,
etgc->draw_focus = g_value_get_boolean (value);
for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
- g_object_set (child_node->child,
- "drawfocus", etgc->draw_focus,
- NULL);
+ g_object_set (
+ child_node->child,
+ "drawfocus", etgc->draw_focus,
+ NULL);
}
break;
@@ -932,9 +955,10 @@ etgc_set_property (GObject *object,
etgc->cursor_mode = g_value_get_int (value);
for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
- g_object_set (child_node->child,
- "cursor_mode", etgc->cursor_mode,
- NULL);
+ g_object_set (
+ child_node->child,
+ "cursor_mode", etgc->cursor_mode,
+ NULL);
}
break;
default:
@@ -1002,89 +1026,127 @@ etgc_class_init (ETableGroupContainerClass *class)
e_group_class->get_mouse_over = etgc_get_mouse_over;
e_group_class->get_cell_geometry = etgc_get_cell_geometry;
- g_object_class_install_property (object_class, PROP_TABLE_ALTERNATING_ROW_COLORS,
- g_param_spec_boolean ("alternating_row_colors",
- "Alternating Row Colors",
- "Alternating Row Colors",
- FALSE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_TABLE_HORIZONTAL_DRAW_GRID,
- g_param_spec_boolean ("horizontal_draw_grid",
- "Horizontal Draw Grid",
- "Horizontal Draw Grid",
- FALSE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_TABLE_VERTICAL_DRAW_GRID,
- g_param_spec_boolean ("vertical_draw_grid",
- "Vertical Draw Grid",
- "Vertical Draw Grid",
- FALSE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_TABLE_DRAW_FOCUS,
- g_param_spec_boolean ("drawfocus",
- "Draw focus",
- "Draw focus",
- FALSE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_CURSOR_MODE,
- g_param_spec_int ("cursor_mode",
- "Cursor mode",
- "Cursor mode",
- E_CURSOR_LINE, E_CURSOR_SPREADSHEET, E_CURSOR_LINE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_SELECTION_MODEL,
- g_param_spec_object ("selection_model",
- "Selection model",
- "Selection model",
- E_TYPE_SELECTION_MODEL,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_LENGTH_THRESHOLD,
- g_param_spec_int ("length_threshold",
- "Length Threshold",
- "Length Threshold",
- -1, G_MAXINT, 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_UNIFORM_ROW_HEIGHT,
- g_param_spec_boolean ("uniform_row_height",
- "Uniform row height",
- "Uniform row height",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_FROZEN,
- g_param_spec_boolean ("frozen",
- "Frozen",
- "Frozen",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HEIGHT,
- g_param_spec_double ("height",
- "Height",
- "Height",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_WIDTH,
- g_param_spec_double ("width",
- "Width",
- "Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_MINIMUM_WIDTH,
- g_param_spec_double ("minimum_width",
- "Minimum width",
- "Minimum Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_ALTERNATING_ROW_COLORS,
+ g_param_spec_boolean (
+ "alternating_row_colors",
+ "Alternating Row Colors",
+ "Alternating Row Colors",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_HORIZONTAL_DRAW_GRID,
+ g_param_spec_boolean (
+ "horizontal_draw_grid",
+ "Horizontal Draw Grid",
+ "Horizontal Draw Grid",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_VERTICAL_DRAW_GRID,
+ g_param_spec_boolean (
+ "vertical_draw_grid",
+ "Vertical Draw Grid",
+ "Vertical Draw Grid",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_DRAW_FOCUS,
+ g_param_spec_boolean (
+ "drawfocus",
+ "Draw focus",
+ "Draw focus",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_CURSOR_MODE,
+ g_param_spec_int (
+ "cursor_mode",
+ "Cursor mode",
+ "Cursor mode",
+ E_CURSOR_LINE,
+ E_CURSOR_SPREADSHEET,
+ E_CURSOR_LINE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_SELECTION_MODEL,
+ g_param_spec_object (
+ "selection_model",
+ "Selection model",
+ "Selection model",
+ E_TYPE_SELECTION_MODEL,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_LENGTH_THRESHOLD,
+ g_param_spec_int (
+ "length_threshold",
+ "Length Threshold",
+ "Length Threshold",
+ -1, G_MAXINT, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_UNIFORM_ROW_HEIGHT,
+ g_param_spec_boolean (
+ "uniform_row_height",
+ "Uniform row height",
+ "Uniform row height",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_FROZEN,
+ g_param_spec_boolean (
+ "frozen",
+ "Frozen",
+ "Frozen",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_HEIGHT,
+ g_param_spec_double (
+ "height",
+ "Height",
+ "Height",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_WIDTH,
+ g_param_spec_double (
+ "width",
+ "Width",
+ "Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MINIMUM_WIDTH,
+ g_param_spec_double (
+ "minimum_width",
+ "Minimum width",
+ "Minimum Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
}
static void
@@ -1094,9 +1156,10 @@ etgc_reflow (GnomeCanvasItem *item,
ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (item);
gboolean frozen;
- g_object_get (etgc,
- "frozen", &frozen,
- NULL);
+ g_object_get (
+ etgc,
+ "frozen", &frozen,
+ NULL);
if (frozen)
return;
@@ -1133,38 +1196,43 @@ etgc_reflow (GnomeCanvasItem *item,
running_height = extra_height;
- for ( list = etgc->children; list; list = g_list_next (list)) {
+ for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
ETableGroup *child = child_node->child;
- g_object_get (child,
- "width", &item_width,
- NULL);
+ g_object_get (
+ child,
+ "width", &item_width,
+ NULL);
if (item_width > running_width)
running_width = item_width;
}
- for ( list = etgc->children; list; list = g_list_next (list)) {
+ for (list = etgc->children; list; list = g_list_next (list)) {
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
ETableGroup *child = child_node->child;
- g_object_get (child,
- "height", &item_height,
- NULL);
-
- e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (child_node->text),
- GROUP_INDENT,
- running_height - GROUP_INDENT - BUTTON_PADDING);
-
- e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (child),
- GROUP_INDENT,
- running_height);
-
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (child_node->rect),
- "x1", (gdouble) 0,
- "x2", (gdouble) running_width + GROUP_INDENT,
- "y1", (gdouble) running_height - extra_height,
- "y2", (gdouble) running_height + item_height,
- NULL);
+ g_object_get (
+ child,
+ "height", &item_height,
+ NULL);
+
+ e_canvas_item_move_absolute (
+ GNOME_CANVAS_ITEM (child_node->text),
+ GROUP_INDENT,
+ running_height - GROUP_INDENT - BUTTON_PADDING);
+
+ e_canvas_item_move_absolute (
+ GNOME_CANVAS_ITEM (child),
+ GROUP_INDENT,
+ running_height);
+
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (child_node->rect),
+ "x1", (gdouble) 0,
+ "x2", (gdouble) running_width + GROUP_INDENT,
+ "y1", (gdouble) running_height - extra_height,
+ "y2", (gdouble) running_height + item_height,
+ NULL);
running_height += item_height + extra_height;
}
@@ -1217,8 +1285,9 @@ e_table_group_apply_to_leafs (ETableGroup *etg,
} else if (E_IS_TABLE_GROUP_LEAF (etg)) {
(*fn) (E_TABLE_GROUP_LEAF (etg)->item, closure);
} else {
- g_error ("Unknown ETableGroup found: %s",
- g_type_name (G_TYPE_FROM_INSTANCE (etg)));
+ g_error (
+ "Unknown ETableGroup found: %s",
+ g_type_name (G_TYPE_FROM_INSTANCE (etg)));
}
}
@@ -1328,16 +1397,18 @@ e_table_group_container_print_page (EPrintable *ep,
cairo_move_to (cr, 0, 0);
if (groupcontext->etgc->ecol->text)
- string = g_strdup_printf ("%s : %s (%d item%s)",
- groupcontext->etgc->ecol->text,
- child_node->string,
- (gint) child_node->count,
- child_node->count == 1 ? "" : "s");
+ string = g_strdup_printf (
+ "%s : %s (%d item%s)",
+ groupcontext->etgc->ecol->text,
+ child_node->string,
+ (gint) child_node->count,
+ child_node->count == 1 ? "" : "s");
else
- string = g_strdup_printf ("%s (%d item%s)",
- child_node->string,
- (gint) child_node->count,
- child_node->count == 1 ? "" : "s");
+ string = g_strdup_printf (
+ "%s (%d item%s)",
+ child_node->string,
+ (gint) child_node->count,
+ child_node->count == 1 ? "" : "s");
pango_layout_set_text (layout, string, -1);
pango_cairo_show_layout (cr, layout);
g_free (string);
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c
index fba38abfbb..2da75bf006 100644
--- a/widgets/table/e-table-group-leaf.c
+++ b/widgets/table/e-table-group-leaf.c
@@ -69,26 +69,33 @@ etgl_dispose (GObject *object)
if (etgl->item) {
if (etgl->etgl_cursor_change_id != 0)
- g_signal_handler_disconnect (etgl->item,
- etgl->etgl_cursor_change_id);
+ g_signal_handler_disconnect (
+ etgl->item,
+ etgl->etgl_cursor_change_id);
if (etgl->etgl_cursor_activated_id != 0)
- g_signal_handler_disconnect (etgl->item,
- etgl->etgl_cursor_activated_id);
+ g_signal_handler_disconnect (
+ etgl->item,
+ etgl->etgl_cursor_activated_id);
if (etgl->etgl_double_click_id != 0)
- g_signal_handler_disconnect (etgl->item,
- etgl->etgl_double_click_id);
+ g_signal_handler_disconnect (
+ etgl->item,
+ etgl->etgl_double_click_id);
if (etgl->etgl_right_click_id != 0)
- g_signal_handler_disconnect (etgl->item,
- etgl->etgl_right_click_id);
+ g_signal_handler_disconnect (
+ etgl->item,
+ etgl->etgl_right_click_id);
if (etgl->etgl_click_id != 0)
- g_signal_handler_disconnect (etgl->item,
- etgl->etgl_click_id);
+ g_signal_handler_disconnect (
+ etgl->item,
+ etgl->etgl_click_id);
if (etgl->etgl_key_press_id != 0)
- g_signal_handler_disconnect (etgl->item,
- etgl->etgl_key_press_id);
+ g_signal_handler_disconnect (
+ etgl->item,
+ etgl->etgl_key_press_id);
if (etgl->etgl_start_drag_id != 0)
- g_signal_handler_disconnect (etgl->item,
- etgl->etgl_start_drag_id);
+ g_signal_handler_disconnect (
+ etgl->item,
+ etgl->etgl_start_drag_id);
etgl->etgl_cursor_change_id = 0;
etgl->etgl_cursor_activated_id = 0;
@@ -502,17 +509,19 @@ etgl_set_property (GObject *object,
case PROP_WIDTH:
etgl->minimum_width = g_value_get_double (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
- "minimum_width", etgl->minimum_width,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etgl->item),
+ "minimum_width", etgl->minimum_width,
+ NULL);
}
break;
case PROP_LENGTH_THRESHOLD:
etgl->length_threshold = g_value_get_int (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
- "length_threshold", etgl->length_threshold,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etgl->item),
+ "length_threshold", etgl->length_threshold,
+ NULL);
}
break;
case PROP_SELECTION_MODEL:
@@ -523,63 +532,70 @@ etgl_set_property (GObject *object,
g_object_ref (etgl->selection_model);
}
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
- "selection_model", etgl->selection_model,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etgl->item),
+ "selection_model", etgl->selection_model,
+ NULL);
}
break;
case PROP_UNIFORM_ROW_HEIGHT:
etgl->uniform_row_height = g_value_get_boolean (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
- "uniform_row_height", etgl->uniform_row_height,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etgl->item),
+ "uniform_row_height", etgl->uniform_row_height,
+ NULL);
}
break;
case PROP_TABLE_ALTERNATING_ROW_COLORS:
etgl->alternating_row_colors = g_value_get_boolean (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
- "alternating_row_colors", etgl->alternating_row_colors,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etgl->item),
+ "alternating_row_colors", etgl->alternating_row_colors,
+ NULL);
}
break;
case PROP_TABLE_HORIZONTAL_DRAW_GRID:
etgl->horizontal_draw_grid = g_value_get_boolean (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
- "horizontal_draw_grid", etgl->horizontal_draw_grid,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etgl->item),
+ "horizontal_draw_grid", etgl->horizontal_draw_grid,
+ NULL);
}
break;
case PROP_TABLE_VERTICAL_DRAW_GRID:
etgl->vertical_draw_grid = g_value_get_boolean (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
- "vertical_draw_grid", etgl->vertical_draw_grid,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etgl->item),
+ "vertical_draw_grid", etgl->vertical_draw_grid,
+ NULL);
}
break;
case PROP_TABLE_DRAW_FOCUS:
etgl->draw_focus = g_value_get_boolean (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
- "drawfocus", etgl->draw_focus,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etgl->item),
+ "drawfocus", etgl->draw_focus,
+ NULL);
}
break;
case PROP_CURSOR_MODE:
etgl->cursor_mode = g_value_get_int (value);
if (etgl->item) {
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (etgl->item),
- "cursor_mode", etgl->cursor_mode,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (etgl->item),
+ "cursor_mode", etgl->cursor_mode,
+ NULL);
}
break;
default:
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index 8d820f861a..032ec7dd88 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -443,9 +443,10 @@ e_table_group_cursor_change (ETableGroup *e_table_group,
g_return_if_fail (e_table_group != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (e_table_group));
- g_signal_emit (e_table_group,
- etg_signals[CURSOR_CHANGE], 0,
- row);
+ g_signal_emit (
+ e_table_group,
+ etg_signals[CURSOR_CHANGE], 0,
+ row);
}
/**
@@ -462,9 +463,10 @@ e_table_group_cursor_activated (ETableGroup *e_table_group,
g_return_if_fail (e_table_group != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (e_table_group));
- g_signal_emit (e_table_group,
- etg_signals[CURSOR_ACTIVATED], 0,
- row);
+ g_signal_emit (
+ e_table_group,
+ etg_signals[CURSOR_ACTIVATED], 0,
+ row);
}
/**
@@ -485,9 +487,10 @@ e_table_group_double_click (ETableGroup *e_table_group,
g_return_if_fail (e_table_group != NULL);
g_return_if_fail (E_IS_TABLE_GROUP (e_table_group));
- g_signal_emit (e_table_group,
- etg_signals[DOUBLE_CLICK], 0,
- row, col, event);
+ g_signal_emit (
+ e_table_group,
+ etg_signals[DOUBLE_CLICK], 0,
+ row, col, event);
}
/**
@@ -510,9 +513,10 @@ e_table_group_right_click (ETableGroup *e_table_group,
g_return_val_if_fail (e_table_group != NULL, FALSE);
g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE);
- g_signal_emit (e_table_group,
- etg_signals[RIGHT_CLICK], 0,
- row, col, event, &return_val);
+ g_signal_emit (
+ e_table_group,
+ etg_signals[RIGHT_CLICK], 0,
+ row, col, event, &return_val);
return return_val;
}
@@ -537,9 +541,10 @@ e_table_group_click (ETableGroup *e_table_group,
g_return_val_if_fail (e_table_group != NULL, FALSE);
g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE);
- g_signal_emit (e_table_group,
- etg_signals[CLICK], 0,
- row, col, event, &return_val);
+ g_signal_emit (
+ e_table_group,
+ etg_signals[CLICK], 0,
+ row, col, event, &return_val);
return return_val;
}
@@ -564,9 +569,10 @@ e_table_group_key_press (ETableGroup *e_table_group,
g_return_val_if_fail (e_table_group != NULL, FALSE);
g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE);
- g_signal_emit (e_table_group,
- etg_signals[KEY_PRESS], 0,
- row, col, event, &return_val);
+ g_signal_emit (
+ e_table_group,
+ etg_signals[KEY_PRESS], 0,
+ row, col, event, &return_val);
return return_val;
}
@@ -591,9 +597,10 @@ e_table_group_start_drag (ETableGroup *e_table_group,
g_return_val_if_fail (e_table_group != NULL, FALSE);
g_return_val_if_fail (E_IS_TABLE_GROUP (e_table_group), FALSE);
- g_signal_emit (e_table_group,
- etg_signals[START_DRAG], 0,
- row, col, event, &return_val);
+ g_signal_emit (
+ e_table_group,
+ etg_signals[START_DRAG], 0,
+ row, col, event, &return_val);
return return_val;
}
@@ -678,83 +685,85 @@ etg_class_init (ETableGroupClass *class)
class->get_mouse_over = NULL;
class->get_cell_geometry = NULL;
- etg_signals[CURSOR_CHANGE] =
- g_signal_new ("cursor_change",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableGroupClass, cursor_change),
- NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- etg_signals[CURSOR_ACTIVATED] =
- g_signal_new ("cursor_activated",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableGroupClass, cursor_activated),
- NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- etg_signals[DOUBLE_CLICK] =
- g_signal_new ("double_click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableGroupClass, double_click),
- NULL, NULL,
- e_marshal_NONE__INT_INT_BOXED,
- G_TYPE_NONE, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- etg_signals[RIGHT_CLICK] =
- g_signal_new ("right_click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableGroupClass, right_click),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_INT_BOXED,
- G_TYPE_BOOLEAN, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- etg_signals[CLICK] =
- g_signal_new ("click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableGroupClass, click),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_INT_BOXED,
- G_TYPE_BOOLEAN, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- etg_signals[KEY_PRESS] =
- g_signal_new ("key_press",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableGroupClass, key_press),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_INT_BOXED,
- G_TYPE_BOOLEAN, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- etg_signals[START_DRAG] =
- g_signal_new ("start_drag",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableGroupClass, start_drag),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_INT_BOXED,
- G_TYPE_BOOLEAN, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+ etg_signals[CURSOR_CHANGE] = g_signal_new (
+ "cursor_change",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableGroupClass, cursor_change),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1,
+ G_TYPE_INT);
+
+ etg_signals[CURSOR_ACTIVATED] = g_signal_new (
+ "cursor_activated",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableGroupClass, cursor_activated),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1,
+ G_TYPE_INT);
+
+ etg_signals[DOUBLE_CLICK] = g_signal_new (
+ "double_click",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableGroupClass, double_click),
+ NULL, NULL,
+ e_marshal_NONE__INT_INT_BOXED,
+ G_TYPE_NONE, 3,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ etg_signals[RIGHT_CLICK] = g_signal_new (
+ "right_click",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableGroupClass, right_click),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_INT_BOXED,
+ G_TYPE_BOOLEAN, 3,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ etg_signals[CLICK] = g_signal_new (
+ "click",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableGroupClass, click),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_INT_BOXED,
+ G_TYPE_BOOLEAN, 3,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ etg_signals[KEY_PRESS] = g_signal_new (
+ "key_press",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableGroupClass, key_press),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_INT_BOXED,
+ G_TYPE_BOOLEAN, 3,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ etg_signals[START_DRAG] = g_signal_new (
+ "start_drag",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableGroupClass, start_drag),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_INT_BOXED,
+ G_TYPE_BOOLEAN, 3,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
}
static void
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index ef24716e33..d8e0665b8e 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -165,8 +165,8 @@ e_table_header_item_get_height (ETableHeaderItem *ethi)
ETableCol *ecol = e_table_header_get_column (eth, col);
gint height;
- height = e_table_header_compute_height (ecol,
- GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas));
+ height = e_table_header_compute_height (
+ ecol, GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas));
if (height > maxheight)
maxheight = height;
@@ -742,8 +742,8 @@ ethi_drag_motion (GtkWidget *widget,
targets = gdk_drag_context_list_targets (context);
droptype = gdk_atom_name (GDK_POINTER_TO_ATOM (targets->data));
- headertype = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE,
- ethi->dnd_code);
+ headertype = g_strdup_printf (
+ "%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code);
if (strcmp (droptype, headertype) != 0) {
g_free (headertype);
@@ -864,11 +864,12 @@ ethi_drag_data_get (GtkWidget *canvas,
ETableCol *ecol = e_table_header_get_column (ethi->eth, ethi->drag_col);
gchar *string = g_strdup_printf ("%d", ecol->col_idx);
- gtk_selection_data_set (selection_data,
- GDK_SELECTION_TYPE_STRING,
- sizeof (string[0]),
- (guchar *) string,
- strlen (string));
+ gtk_selection_data_set (
+ selection_data,
+ GDK_SELECTION_TYPE_STRING,
+ sizeof (string[0]),
+ (guchar *) string,
+ strlen (string));
g_free (string);
}
}
@@ -1268,9 +1269,10 @@ ethi_start_drag (ETableHeaderItem *ethi,
g_hash_table_insert (
arrows,
GINT_TO_POINTER ((gint) column.column),
- GINT_TO_POINTER (column.ascending ?
- E_TABLE_COL_ARROW_DOWN :
- E_TABLE_COL_ARROW_UP));
+ GINT_TO_POINTER (
+ column.ascending ?
+ E_TABLE_COL_ARROW_DOWN :
+ E_TABLE_COL_ARROW_UP));
}
length = e_table_sort_info_sorting_get_count (ethi->sort_info);
for (i = 0; i < length; i++) {
@@ -1281,9 +1283,10 @@ ethi_start_drag (ETableHeaderItem *ethi,
g_hash_table_insert (
arrows,
GINT_TO_POINTER ((gint) column.column),
- GINT_TO_POINTER (column.ascending ?
- E_TABLE_COL_ARROW_DOWN :
- E_TABLE_COL_ARROW_UP));
+ GINT_TO_POINTER (
+ column.ascending ?
+ E_TABLE_COL_ARROW_DOWN :
+ E_TABLE_COL_ARROW_UP));
}
}
@@ -1488,11 +1491,12 @@ ethi_popup_field_chooser (GtkWidget *widget,
g_object_add_weak_pointer (G_OBJECT (etfcd), &info->ethi->etfcd.pointer);
- g_object_set (info->ethi->etfcd.widget,
- "full_header", info->ethi->full_header,
- "header", info->ethi->eth,
- "dnd_code", info->ethi->dnd_code,
- NULL);
+ g_object_set (
+ info->ethi->etfcd.widget,
+ "full_header", info->ethi->full_header,
+ "header", info->ethi->eth,
+ "dnd_code", info->ethi->dnd_code,
+ NULL);
gtk_widget_show (etfcd);
}
@@ -1510,9 +1514,10 @@ ethi_popup_best_fit (GtkWidget *widget,
ETableHeaderItem *ethi = info->ethi;
gint width;
- g_signal_emit_by_name (ethi->eth,
- "request_width",
- info->col, &width);
+ g_signal_emit_by_name (
+ ethi->eth,
+ "request_width",
+ info->col, &width);
/* Add 10 to stop it from "..."ing */
e_table_header_set_size (ethi->eth, info->col, width + 10);
@@ -1546,8 +1551,9 @@ apply_changes (ETableConfig *config,
e_tree_set_state (ethi->tree, state);
g_free (state);
- gtk_dialog_set_response_sensitive (GTK_DIALOG (config->dialog_toplevel),
- GTK_RESPONSE_APPLY, FALSE);
+ gtk_dialog_set_response_sensitive (
+ GTK_DIALOG (config->dialog_toplevel),
+ GTK_RESPONSE_APPLY, FALSE);
}
static void
@@ -1573,8 +1579,9 @@ ethi_popup_customize_view (GtkWidget *widget,
ethi->config = e_table_config_new (
_("Customize Current View"),
spec, state, GTK_WINDOW (gtk_widget_get_toplevel (widget)));
- g_object_weak_ref (G_OBJECT (ethi->config),
- config_destroyed, ethi);
+ g_object_weak_ref (
+ G_OBJECT (ethi->config),
+ config_destroyed, ethi);
g_signal_connect (
ethi->config, "changed",
G_CALLBACK (apply_changes), ethi);
@@ -1675,7 +1682,7 @@ ethi_header_context_menu (ETableHeaderItem *ethi,
GtkWidget *menu_item, *sub_menu;
ETableSortColumn column;
gboolean ascending = TRUE;
- d ( g_print ("ethi_header_context_menu: \n") );
+ d (g_print ("ethi_header_context_menu: \n"));
info->ethi = ethi;
info->col = ethi_find_col_by_x (ethi, event->x);
@@ -1892,11 +1899,12 @@ ethi_event (GnomeCanvasItem *item,
/* Quick hack until I actually bind the views */
ethi->resize_guide = GINT_TO_POINTER (1);
- gnome_canvas_item_grab (item,
- GDK_POINTER_MOTION_MASK |
- GDK_BUTTON_RELEASE_MASK,
- ethi->resize_cursor,
- e->button.time);
+ gnome_canvas_item_grab (
+ item,
+ GDK_POINTER_MOTION_MASK |
+ GDK_BUTTON_RELEASE_MASK,
+ ethi->resize_cursor,
+ e->button.time);
}
new_width = x - ethi->resize_start_pos;
@@ -1963,9 +1971,10 @@ ethi_event (GnomeCanvasItem *item,
break;
else {
gint width = 0;
- g_signal_emit_by_name (ethi->eth,
- "request_width",
- (gint) ethi->resize_col, &width);
+ g_signal_emit_by_name (
+ ethi->eth,
+ "request_width",
+ (gint) ethi->resize_col, &width);
/* Add 10 to stop it from "..."ing */
e_table_header_set_size (ethi->eth, ethi->resize_col, width + 10);
@@ -2077,64 +2086,85 @@ ethi_class_init (ETableHeaderItemClass *class)
item_class->point = ethi_point;
item_class->event = ethi_event;
- g_object_class_install_property (object_class, PROP_DND_CODE,
- g_param_spec_string ("dnd_code",
- "DnD code",
- NULL,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_TABLE_FONT_DESC,
- g_param_spec_boxed ("font-desc",
- "Font Description",
- NULL,
- PANGO_TYPE_FONT_DESCRIPTION,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_FULL_HEADER,
- g_param_spec_object ("full_header",
- "Full Header",
- NULL,
- E_TYPE_TABLE_HEADER,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_TABLE_HEADER,
- g_param_spec_object ("ETableHeader",
- "Header",
- NULL,
- E_TYPE_TABLE_HEADER,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_SORT_INFO,
- g_param_spec_object ("sort_info",
- "Sort Info",
- NULL,
- E_TYPE_TABLE_SORT_INFO,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_TABLE,
- g_param_spec_object ("table",
- "Table",
- NULL,
- E_TYPE_TABLE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_TREE,
- g_param_spec_object ("tree",
- "Tree",
- NULL,
- E_TYPE_TREE,
- G_PARAM_WRITABLE));
-
- ethi_signals[BUTTON_PRESSED] =
- g_signal_new ("button_pressed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableHeaderItemClass, button_pressed),
- NULL, NULL,
- g_cclosure_marshal_VOID__BOXED,
- G_TYPE_NONE, 1,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+ g_object_class_install_property (
+ object_class,
+ PROP_DND_CODE,
+ g_param_spec_string (
+ "dnd_code",
+ "DnD code",
+ NULL,
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_FONT_DESC,
+ g_param_spec_boxed (
+ "font-desc",
+ "Font Description",
+ NULL,
+ PANGO_TYPE_FONT_DESCRIPTION,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_FULL_HEADER,
+ g_param_spec_object (
+ "full_header",
+ "Full Header",
+ NULL,
+ E_TYPE_TABLE_HEADER,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_HEADER,
+ g_param_spec_object (
+ "ETableHeader",
+ "Header",
+ NULL,
+ E_TYPE_TABLE_HEADER,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_SORT_INFO,
+ g_param_spec_object (
+ "sort_info",
+ "Sort Info",
+ NULL,
+ E_TYPE_TABLE_SORT_INFO,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE,
+ g_param_spec_object (
+ "table",
+ "Table",
+ NULL,
+ E_TYPE_TABLE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TREE,
+ g_param_spec_object (
+ "tree",
+ "Tree",
+ NULL,
+ E_TYPE_TREE,
+ G_PARAM_WRITABLE));
+
+ ethi_signals[BUTTON_PRESSED] = g_signal_new (
+ "button_pressed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableHeaderItemClass, button_pressed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOXED,
+ G_TYPE_NONE, 1,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
}
static void
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index 68516d5b4d..325390d559 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -151,8 +151,9 @@ eth_do_remove (ETableHeader *eth,
if (do_unref)
g_object_unref (eth->columns[idx]);
- memmove (&eth->columns[idx], &eth->columns[idx + 1],
- sizeof (ETableCol *) * (eth->col_count - idx - 1));
+ memmove (
+ &eth->columns[idx], &eth->columns[idx + 1],
+ sizeof (ETableCol *) * (eth->col_count - idx - 1));
eth->col_count--;
}
@@ -165,8 +166,9 @@ eth_finalize (GObject *object)
if (eth->sort_info) {
if (eth->sort_info_group_change_id)
- g_signal_handler_disconnect (G_OBJECT (eth->sort_info),
- eth->sort_info_group_change_id);
+ g_signal_handler_disconnect (
+ eth->sort_info,
+ eth->sort_info_group_change_id);
g_object_unref (eth->sort_info);
eth->sort_info = NULL;
}
@@ -224,7 +226,7 @@ eth_set_property (GObject *object,
if (eth->sort_info) {
if (eth->sort_info_group_change_id)
g_signal_handler_disconnect (
- G_OBJECT (eth->sort_info),
+ eth->sort_info,
eth->sort_info_group_change_id);
g_object_unref (eth->sort_info);
}
@@ -252,7 +254,7 @@ eth_get_property (GObject *object,
switch (property_id) {
case PROP_SORT_INFO:
- g_value_set_object (val, G_OBJECT (eth->sort_info));
+ g_value_set_object (val, eth->sort_info);
break;
case PROP_WIDTH:
g_value_set_double (val, eth->nominal_width);
@@ -276,55 +278,70 @@ e_table_header_class_init (ETableHeaderClass *class)
object_class->get_property = eth_get_property;
g_object_class_install_property (
- object_class, PROP_WIDTH,
- g_param_spec_double ("width", "Width", "Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
+ object_class,
+ PROP_WIDTH,
+ g_param_spec_double (
+ "width", "Width", "Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
g_object_class_install_property (
- object_class, PROP_WIDTH_EXTRAS,
- g_param_spec_double ("width_extras", "Width of Extras", "Width of Extras",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
+ object_class,
+ PROP_WIDTH_EXTRAS,
+ g_param_spec_double (
+ "width_extras",
+ "Width of Extras",
+ "Width of Extras",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
g_object_class_install_property (
- object_class, PROP_SORT_INFO,
- g_param_spec_object ("sort_info", "Sort Info", "Sort Info",
- E_TYPE_TABLE_SORT_INFO,
- G_PARAM_READWRITE));
-
- eth_signals[STRUCTURE_CHANGE] =
- g_signal_new ("structure_change",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableHeaderClass, structure_change),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- eth_signals[DIMENSION_CHANGE] =
- g_signal_new ("dimension_change",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableHeaderClass, dimension_change),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
- eth_signals[EXPANSION_CHANGE] =
- g_signal_new ("expansion_change",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableHeaderClass, expansion_change),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
- eth_signals[REQUEST_WIDTH] =
- g_signal_new ("request_width",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableHeaderClass, request_width),
- (GSignalAccumulator) NULL, NULL,
- e_marshal_INT__INT,
- G_TYPE_INT, 1, G_TYPE_INT);
+ object_class,
+ PROP_SORT_INFO,
+ g_param_spec_object (
+ "sort_info",
+ "Sort Info",
+ "Sort Info",
+ E_TYPE_TABLE_SORT_INFO,
+ G_PARAM_READWRITE));
+
+ eth_signals[STRUCTURE_CHANGE] = g_signal_new (
+ "structure_change",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableHeaderClass, structure_change),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ eth_signals[DIMENSION_CHANGE] = g_signal_new (
+ "dimension_change",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableHeaderClass, dimension_change),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1,
+ G_TYPE_INT);
+
+ eth_signals[EXPANSION_CHANGE] = g_signal_new (
+ "expansion_change",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableHeaderClass, expansion_change),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ eth_signals[REQUEST_WIDTH] = g_signal_new (
+ "request_width",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableHeaderClass, request_width),
+ (GSignalAccumulator) NULL, NULL,
+ e_marshal_INT__INT,
+ G_TYPE_INT, 1,
+ G_TYPE_INT);
class->structure_change = NULL;
class->dimension_change = NULL;
@@ -380,7 +397,8 @@ eth_do_insert (ETableHeader *eth,
gint pos,
ETableCol *val)
{
- memmove (&eth->columns[pos + 1], &eth->columns[pos],
+ memmove (
+ &eth->columns[pos + 1], &eth->columns[pos],
sizeof (ETableCol *) * (eth->col_count - pos));
eth->columns[pos] = val;
eth->col_count++;
@@ -424,7 +442,7 @@ e_table_header_add_column (ETableHeader *eth,
eth_do_insert (eth, pos, tc);
enqueue (eth, -1, eth->nominal_width);
- g_signal_emit (G_OBJECT (eth), eth_signals[STRUCTURE_CHANGE], 0);
+ g_signal_emit (eth, eth_signals[STRUCTURE_CHANGE], 0);
}
/**
@@ -673,8 +691,8 @@ e_table_header_move (ETableHeader *eth,
eth_do_insert (eth, target_index, old);
eth_update_offsets (eth);
- g_signal_emit (G_OBJECT (eth), eth_signals[DIMENSION_CHANGE], 0, eth->width);
- g_signal_emit (G_OBJECT (eth), eth_signals[STRUCTURE_CHANGE], 0);
+ g_signal_emit (eth, eth_signals[DIMENSION_CHANGE], 0, eth->width);
+ g_signal_emit (eth, eth_signals[STRUCTURE_CHANGE], 0);
}
/**
@@ -696,7 +714,7 @@ e_table_header_remove (ETableHeader *eth,
eth_do_remove (eth, idx, TRUE);
enqueue (eth, -1, eth->nominal_width);
- g_signal_emit (G_OBJECT (eth), eth_signals[STRUCTURE_CHANGE], 0);
+ g_signal_emit (eth, eth_signals[STRUCTURE_CHANGE], 0);
}
/*
@@ -771,7 +789,7 @@ eth_set_size (ETableHeader *eth,
eth->columns[i]->expansion = 0;
}
- g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
+ g_signal_emit (eth, eth_signals[EXPANSION_CHANGE], 0);
return;
}
@@ -781,7 +799,7 @@ eth_set_size (ETableHeader *eth,
for (i = idx; i < eth->col_count; i++) {
eth->columns[i]->expansion = 0;
}
- g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
+ g_signal_emit (eth, eth_signals[EXPANSION_CHANGE], 0);
return;
}
@@ -798,7 +816,7 @@ eth_set_size (ETableHeader *eth,
for (i = idx + 1; i < eth->col_count; i++) {
eth->columns[i]->expansion = 0;
}
- g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
+ g_signal_emit (eth, eth_signals[EXPANSION_CHANGE], 0);
return;
}
@@ -825,7 +843,7 @@ eth_set_size (ETableHeader *eth,
eth->columns[i]->expansion = expansion / expandable_count;
}
}
- g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
+ g_signal_emit (eth, eth_signals[EXPANSION_CHANGE], 0);
return;
}
@@ -835,7 +853,7 @@ eth_set_size (ETableHeader *eth,
eth->columns[i]->expansion *= expansion / old_expansion;
}
}
- g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
+ g_signal_emit (eth, eth_signals[EXPANSION_CHANGE], 0);
}
/**
@@ -922,7 +940,7 @@ eth_calc_widths (ETableHeader *eth)
}
g_free (widths);
if (changed)
- g_signal_emit (G_OBJECT (eth), eth_signals[DIMENSION_CHANGE], 0, eth->width);
+ g_signal_emit (eth, eth_signals[DIMENSION_CHANGE], 0, eth->width);
eth_update_offsets (eth);
}
@@ -937,14 +955,13 @@ e_table_header_update_horizontal (ETableHeader *eth)
for (i = 0; i < cols; i++) {
gint width = 0;
- g_signal_emit_by_name (G_OBJECT (eth),
- "request_width",
- i, &width);
+ g_signal_emit_by_name (
+ eth, "request_width", i, &width);
eth->columns[i]->min_width = width + 10;
eth->columns[i]->expansion = 1;
}
enqueue (eth, -1, eth->nominal_width);
- g_signal_emit (G_OBJECT (eth), eth_signals[EXPANSION_CHANGE], 0);
+ g_signal_emit (eth, eth_signals[EXPANSION_CHANGE], 0);
}
gint
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index b9e2cce10d..1cb81f00dc 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -381,8 +381,9 @@ eti_free_save_state (ETableItem *eti)
!eti->cell_views_realized)
return;
- e_cell_free_state (eti->cell_views[eti->save_col], view_to_model_col (eti, eti->save_col),
- eti->save_col, eti->save_row, eti->save_state);
+ e_cell_free_state (
+ eti->cell_views[eti->save_col], view_to_model_col (eti, eti->save_col),
+ eti->save_col, eti->save_row, eti->save_state);
eti->save_row = -1;
eti->save_col = -1;
eti->save_state = NULL;
@@ -564,8 +565,9 @@ eti_update (GnomeCanvasItem *item,
}
if (eti->needs_redraw) {
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1,
- item->x2, item->y2);
+ gnome_canvas_request_redraw (
+ item->canvas, item->x1, item->y1,
+ item->x2, item->y2);
eti->needs_redraw = 0;
}
}
@@ -581,20 +583,27 @@ eti_remove_table_model (ETableItem *eti)
if (!eti->table_model)
return;
- g_signal_handler_disconnect (G_OBJECT (eti->table_model),
- eti->table_model_pre_change_id);
- g_signal_handler_disconnect (G_OBJECT (eti->table_model),
- eti->table_model_no_change_id);
- g_signal_handler_disconnect (G_OBJECT (eti->table_model),
- eti->table_model_change_id);
- g_signal_handler_disconnect (G_OBJECT (eti->table_model),
- eti->table_model_row_change_id);
- g_signal_handler_disconnect (G_OBJECT (eti->table_model),
- eti->table_model_cell_change_id);
- g_signal_handler_disconnect (G_OBJECT (eti->table_model),
- eti->table_model_rows_inserted_id);
- g_signal_handler_disconnect (G_OBJECT (eti->table_model),
- eti->table_model_rows_deleted_id);
+ g_signal_handler_disconnect (
+ eti->table_model,
+ eti->table_model_pre_change_id);
+ g_signal_handler_disconnect (
+ eti->table_model,
+ eti->table_model_no_change_id);
+ g_signal_handler_disconnect (
+ eti->table_model,
+ eti->table_model_change_id);
+ g_signal_handler_disconnect (
+ eti->table_model,
+ eti->table_model_row_change_id);
+ g_signal_handler_disconnect (
+ eti->table_model,
+ eti->table_model_cell_change_id);
+ g_signal_handler_disconnect (
+ eti->table_model,
+ eti->table_model_rows_inserted_id);
+ g_signal_handler_disconnect (
+ eti->table_model,
+ eti->table_model_rows_deleted_id);
g_object_unref (eti->table_model);
if (eti->source_model)
g_object_unref (eti->source_model);
@@ -622,14 +631,18 @@ eti_remove_selection_model (ETableItem *eti)
if (!eti->selection)
return;
- g_signal_handler_disconnect (eti->selection,
- eti->selection_change_id);
- g_signal_handler_disconnect (eti->selection,
- eti->selection_row_change_id);
- g_signal_handler_disconnect (eti->selection,
- eti->cursor_change_id);
- g_signal_handler_disconnect (eti->selection,
- eti->cursor_activated_id);
+ g_signal_handler_disconnect (
+ eti->selection,
+ eti->selection_change_id);
+ g_signal_handler_disconnect (
+ eti->selection,
+ eti->selection_row_change_id);
+ g_signal_handler_disconnect (
+ eti->selection,
+ eti->cursor_change_id);
+ g_signal_handler_disconnect (
+ eti->selection,
+ eti->cursor_activated_id);
g_object_unref (eti->selection);
eti->selection_change_id = 0;
@@ -649,12 +662,15 @@ eti_remove_header_model (ETableItem *eti)
if (!eti->header)
return;
- g_signal_handler_disconnect (G_OBJECT (eti->header),
- eti->header_structure_change_id);
- g_signal_handler_disconnect (G_OBJECT (eti->header),
- eti->header_dim_change_id);
- g_signal_handler_disconnect (G_OBJECT (eti->header),
- eti->header_request_width_id);
+ g_signal_handler_disconnect (
+ eti->header,
+ eti->header_structure_change_id);
+ g_signal_handler_disconnect (
+ eti->header,
+ eti->header_dim_change_id);
+ g_signal_handler_disconnect (
+ eti->header,
+ eti->header_request_width_id);
if (eti->cell_views) {
eti_unrealize_cell_views (eti);
@@ -948,15 +964,18 @@ eti_request_region_redraw (ETableItem *eti,
if (eti->rows > 0) {
- eti_get_region (eti,
- start_col, start_row,
- end_col, end_row,
- &x1, &y1, &x2, &y2);
+ eti_get_region (
+ eti,
+ start_col, start_row,
+ end_col, end_row,
+ &x1, &y1, &x2, &y2);
- eti_item_region_redraw (eti, x1 - border,
- y1 - border,
- x2 + 1 + border,
- y2 + 1 + border);
+ eti_item_region_redraw (
+ eti,
+ x1 - border,
+ y1 - border,
+ x2 + 1 + border,
+ y2 + 1 + border);
}
}
@@ -976,15 +995,18 @@ eti_request_region_show (ETableItem *eti,
{
gint x1, y1, x2, y2;
- eti_get_region (eti,
- start_col, start_row,
- end_col, end_row,
- &x1, &y1, &x2, &y2);
+ eti_get_region (
+ eti,
+ start_col, start_row,
+ end_col, end_row,
+ &x1, &y1, &x2, &y2);
if (delay)
- e_canvas_item_show_area_delayed (GNOME_CANVAS_ITEM (eti), x1, y1, x2, y2, delay);
+ e_canvas_item_show_area_delayed (
+ GNOME_CANVAS_ITEM (eti), x1, y1, x2, y2, delay);
else
- e_canvas_item_show_area (GNOME_CANVAS_ITEM (eti), x1, y1, x2, y2);
+ e_canvas_item_show_area (
+ GNOME_CANVAS_ITEM (eti), x1, y1, x2, y2);
}
static void
@@ -1005,9 +1027,10 @@ eti_show_cursor (ETableItem *eti,
}
#if 0
- g_object_get (eti->selection,
- "cursor_row", &cursor_row,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &cursor_row,
+ NULL);
#else
cursor_row = e_selection_model_cursor_row (eti->selection);
#endif
@@ -1016,9 +1039,10 @@ eti_show_cursor (ETableItem *eti,
if (cursor_row != -1) {
cursor_row = model_to_view_row (eti, cursor_row);
- eti_request_region_show (eti,
- 0, cursor_row, eti->cols - 1, cursor_row,
- delay);
+ eti_request_region_show (
+ eti,
+ 0, cursor_row, eti->cols - 1, cursor_row,
+ delay);
}
}
@@ -1038,9 +1062,10 @@ eti_check_cursor_bounds (ETableItem *eti)
return;
}
- g_object_get (eti->selection,
- "cursor_row", &cursor_row,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &cursor_row,
+ NULL);
if (cursor_row == -1) {
eti->cursor_x1 = -1;
@@ -1057,9 +1082,10 @@ eti_check_cursor_bounds (ETableItem *eti)
d (g_print ("%s: cursor row: %d\n", __FUNCTION__, cursor_row));
- eti_get_region (eti,
- 0, cursor_row, eti->cols - 1, cursor_row,
- &x1, &y1, &x2, &y2);
+ eti_get_region (
+ eti,
+ 0, cursor_row, eti->cols - 1, cursor_row,
+ &x1, &y1, &x2, &y2);
eti->cursor_x1 = x1;
eti->cursor_y1 = y1;
eti->cursor_x2 = x2;
@@ -1325,10 +1351,11 @@ e_table_item_redraw_range (ETableItem *eti,
g_return_if_fail (eti != NULL);
g_return_if_fail (E_IS_TABLE_ITEM (eti));
- g_object_get (eti->selection,
- "cursor_col", &cursor_col,
- "cursor_row", &cursor_row,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_col", &cursor_col,
+ "cursor_row", &cursor_row,
+ NULL);
if ((start_col == cursor_col) ||
(end_col == cursor_col) ||
@@ -1359,31 +1386,31 @@ eti_add_table_model (ETableItem *eti,
g_object_ref (eti->table_model);
eti->table_model_pre_change_id = g_signal_connect (
- G_OBJECT (table_model), "model_pre_change",
+ table_model, "model_pre_change",
G_CALLBACK (eti_table_model_pre_change), eti);
eti->table_model_no_change_id = g_signal_connect (
- G_OBJECT (table_model), "model_no_change",
+ table_model, "model_no_change",
G_CALLBACK (eti_table_model_no_change), eti);
eti->table_model_change_id = g_signal_connect (
- G_OBJECT (table_model), "model_changed",
+ table_model, "model_changed",
G_CALLBACK (eti_table_model_changed), eti);
eti->table_model_row_change_id = g_signal_connect (
- G_OBJECT (table_model), "model_row_changed",
+ table_model, "model_row_changed",
G_CALLBACK (eti_table_model_row_changed), eti);
eti->table_model_cell_change_id = g_signal_connect (
- G_OBJECT (table_model), "model_cell_changed",
+ table_model, "model_cell_changed",
G_CALLBACK (eti_table_model_cell_changed), eti);
eti->table_model_rows_inserted_id = g_signal_connect (
- G_OBJECT (table_model), "model_rows_inserted",
+ table_model, "model_rows_inserted",
G_CALLBACK (eti_table_model_rows_inserted), eti);
eti->table_model_rows_deleted_id = g_signal_connect (
- G_OBJECT (table_model), "model_rows_deleted",
+ table_model, "model_rows_deleted",
G_CALLBACK (eti_table_model_rows_deleted), eti);
if (eti->header) {
@@ -1429,8 +1456,7 @@ eti_add_selection_model (ETableItem *eti,
G_CALLBACK (eti_cursor_activated), eti);
eti_selection_change (selection, eti);
- g_signal_emit_by_name (G_OBJECT (eti),
- "selection_model_added", eti->selection);
+ g_signal_emit_by_name (eti, "selection_model_added", eti->selection);
}
static void
@@ -1498,16 +1524,16 @@ eti_add_header_model (ETableItem *eti,
eti_header_structure_changed (header, eti);
eti->header_dim_change_id = g_signal_connect (
- G_OBJECT (header), "dimension_change",
+ header, "dimension_change",
G_CALLBACK (eti_header_dim_changed), eti);
eti->header_structure_change_id = g_signal_connect (
- G_OBJECT (header), "structure_change",
+ header, "structure_change",
G_CALLBACK (eti_header_structure_changed), eti);
- eti->header_request_width_id = g_signal_connect
- (G_OBJECT (header), "request_width",
- G_CALLBACK (eti_request_column_width), eti);
+ eti->header_request_width_id = g_signal_connect (
+ header, "request_width",
+ G_CALLBACK (eti_request_column_width), eti);
}
/*
@@ -1563,8 +1589,8 @@ eti_set_property (GObject *object,
break;
case PROP_SELECTION_MODEL:
- g_signal_emit_by_name (G_OBJECT (eti),
- "selection_model_removed", eti->selection);
+ g_signal_emit_by_name (
+ eti, "selection_model_removed", eti->selection);
eti_remove_selection_model (eti);
if (g_value_get_object (value))
eti_add_selection_model (eti, E_SELECTION_MODEL (g_value_get_object (value)));
@@ -1604,9 +1630,10 @@ eti_set_property (GObject *object,
eti->minimum_width = g_value_get_double (value);
break;
case PROP_CURSOR_ROW:
- g_object_get (eti->selection,
- "cursor_col", &cursor_col,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_col", &cursor_col,
+ NULL);
e_table_item_focus (eti, cursor_col != -1 ? cursor_col : 0, view_to_model_row (eti, g_value_get_int (value)), 0);
break;
@@ -1649,9 +1676,10 @@ eti_get_property (GObject *object,
g_value_set_double (value, eti->minimum_width);
break;
case PROP_CURSOR_ROW:
- g_object_get (eti->selection,
- "cursor_row", &row,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &row,
+ NULL);
g_value_set_int (value, model_to_view_row (eti, row));
break;
case PROP_UNIFORM_ROW_HEIGHT:
@@ -1972,10 +2000,11 @@ eti_draw (GnomeCanvasItem *item,
selected = e_selection_model_is_row_selected (E_SELECTION_MODEL (eti->selection), view_to_model_row (eti,row));
- g_object_get (eti->selection,
- "cursor_col", &cursor_col,
- "cursor_row", &cursor_row,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_col", &cursor_col,
+ "cursor_row", &cursor_row,
+ NULL);
for (col = first_col; col < last_col; col++) {
ETableCol *ecol = e_table_header_get_column (eti->header, col);
@@ -2010,17 +2039,20 @@ eti_draw (GnomeCanvasItem *item,
cairo_save (cr);
pat = cairo_pattern_create_linear (0, y1, 0, y2);
- cairo_pattern_add_color_stop_rgba (pat, 0.0, background->red / 65535.0 ,
- background->green / 65535.0,
- background->blue / 65535.0, selected ? 0.8: 1.0);
+ cairo_pattern_add_color_stop_rgba (
+ pat, 0.0, background->red / 65535.0 ,
+ background->green / 65535.0,
+ background->blue / 65535.0, selected ? 0.8: 1.0);
if (selected)
- cairo_pattern_add_color_stop_rgba (pat, 0.5, background->red / 65535.0 ,
- background->green / 65535.0,
- background->blue / 65535.0, 0.9);
-
- cairo_pattern_add_color_stop_rgba (pat, 1, background->red / 65535.0 ,
- background->green / 65535.0,
- background->blue / 65535.0, selected ? 0.8 : 1.0);
+ cairo_pattern_add_color_stop_rgba (
+ pat, 0.5, background->red / 65535.0 ,
+ background->green / 65535.0,
+ background->blue / 65535.0, 0.9);
+
+ cairo_pattern_add_color_stop_rgba (
+ pat, 1, background->red / 65535.0 ,
+ background->green / 65535.0,
+ background->blue / 65535.0, selected ? 0.8 : 1.0);
cairo_rectangle (cr, x1, y1, ecol->width, height - 1);
cairo_set_source (cr, pat);
cairo_fill_preserve (cr);
@@ -2031,17 +2063,19 @@ eti_draw (GnomeCanvasItem *item,
cairo_save (cr);
cairo_set_line_width (cr, 1.0);
- cairo_set_source_rgba (cr, background->red / 65535.0 ,
- background->green / 65535.0,
- background->blue / 65535.0, 1);
+ cairo_set_source_rgba (
+ cr, background->red / 65535.0 ,
+ background->green / 65535.0,
+ background->blue / 65535.0, 1);
cairo_move_to (cr, x1, y1);
cairo_line_to (cr, x2, y1);
cairo_stroke (cr);
cairo_set_line_width (cr, 1.0);
- cairo_set_source_rgba (cr, background->red / 65535.0 ,
- background->green / 65535.0,
- background->blue / 65535.0, 1);
+ cairo_set_source_rgba (
+ cr, background->red / 65535.0 ,
+ background->green / 65535.0,
+ background->blue / 65535.0, 1);
cairo_move_to (cr, x1, y2);
cairo_line_to (cr, x2, y2);
cairo_stroke (cr);
@@ -2069,8 +2103,9 @@ eti_draw (GnomeCanvasItem *item,
break;
}
- e_cell_draw (ecell_view, cr, ecol->col_idx, col, row, flags,
- xd, yd, xd + ecol->width, yd + height);
+ e_cell_draw (
+ ecell_view, cr, ecol->col_idx, col, row, flags,
+ xd, yd, xd + ecol->width, yd + height);
if (!f_found && !selected) {
switch (eti->cursor_mode) {
@@ -2128,9 +2163,10 @@ eti_draw (GnomeCanvasItem *item,
if (eti->draw_focus && f_found) {
static const double dash[] = { 1.0, 1.0 };
cairo_set_line_width (cr, 1.0);
- cairo_rectangle (cr,
- f_x1 + 0.5, f_x2 + 0.5,
- f_x2 - f_x1 - 1, f_y2 - f_y1);
+ cairo_rectangle (
+ cr,
+ f_x1 + 0.5, f_x2 + 0.5,
+ f_x2 - f_x1 - 1, f_y2 - f_y1);
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
cairo_stroke_preserve (cr);
@@ -2236,10 +2272,11 @@ static void
eti_cursor_move_left (ETableItem *eti)
{
gint cursor_col, cursor_row;
- g_object_get (eti->selection,
- "cursor_col", &cursor_col,
- "cursor_row", &cursor_row,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_col", &cursor_col,
+ "cursor_row", &cursor_row,
+ NULL);
eti_cursor_move (eti, model_to_view_row (eti, cursor_row), model_to_view_col (eti, cursor_col) - 1);
}
@@ -2248,10 +2285,11 @@ static void
eti_cursor_move_right (ETableItem *eti)
{
gint cursor_col, cursor_row;
- g_object_get (eti->selection,
- "cursor_col", &cursor_col,
- "cursor_row", &cursor_row,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_col", &cursor_col,
+ "cursor_row", &cursor_row,
+ NULL);
eti_cursor_move (eti, model_to_view_row (eti, cursor_row), model_to_view_col (eti, cursor_col) + 1);
}
@@ -2335,10 +2373,11 @@ eti_event (GnomeCanvasItem *item,
button.x = x1;
button.y = y1;
- g_object_get (eti->selection,
- "cursor_row", &cursor_row,
- "cursor_col", &cursor_col,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &cursor_row,
+ "cursor_col", &cursor_col,
+ NULL);
if (cursor_col == view_to_model_col (eti, col) && cursor_row == view_to_model_row (eti, row)) {
flags = E_CELL_CURSOR;
@@ -2350,25 +2389,28 @@ eti_event (GnomeCanvasItem *item,
if (return_val)
return TRUE;
- g_signal_emit (eti, eti_signals[CLICK], 0,
- row, view_to_model_col (eti, col), &button, &return_val);
+ g_signal_emit (
+ eti, eti_signals[CLICK], 0,
+ row, view_to_model_col (eti, col), &button, &return_val);
if (return_val) {
eti->click_count = 0;
return TRUE;
}
- g_object_get (eti->selection,
- "cursor_row", &cursor_row,
- "cursor_col", &cursor_col,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &cursor_row,
+ "cursor_col", &cursor_col,
+ NULL);
eti->maybe_did_something =
e_selection_model_maybe_do_something (E_SELECTION_MODEL (eti->selection), view_to_model_row (eti, row), view_to_model_col (eti, col), button.state);
- g_object_get (eti->selection,
- "cursor_row", &new_cursor_row,
- "cursor_col", &new_cursor_col,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &new_cursor_row,
+ "cursor_col", &new_cursor_col,
+ NULL);
if (cursor_row != new_cursor_row || cursor_col != new_cursor_col) {
eti->click_count = 1;
@@ -2385,8 +2427,9 @@ eti_event (GnomeCanvasItem *item,
*/
if (eti_editing (eti)) {
- return_val = eti_e_cell_event (eti, ecell_view, (GdkEvent *) &button, button.time,
- view_to_model_col (eti, col), col, row, E_CELL_EDITING | E_CELL_CURSOR);
+ return_val = eti_e_cell_event (
+ eti, ecell_view, (GdkEvent *) &button, button.time,
+ view_to_model_col (eti, col), col, row, E_CELL_EDITING | E_CELL_CURSOR);
if (return_val)
return TRUE;
}
@@ -2415,8 +2458,9 @@ eti_event (GnomeCanvasItem *item,
e_selection_model_right_click_down (E_SELECTION_MODEL (eti->selection), view_to_model_row (eti, row), view_to_model_col (eti, col), 0);
- g_signal_emit (eti, eti_signals[RIGHT_CLICK], 0,
- row, view_to_model_col (eti, col), e, &return_val);
+ g_signal_emit (
+ eti, eti_signals[RIGHT_CLICK], 0,
+ row, view_to_model_col (eti, col), e, &return_val);
if (!return_val)
e_selection_model_right_click_up (E_SELECTION_MODEL (eti->selection));
break;
@@ -2459,7 +2503,8 @@ eti_event (GnomeCanvasItem *item,
#if d(!)0
{
gboolean cell_found = find_cell (eti, e->button.x, e->button.y, &col, &row, &x1, &y1);
- g_print ("%s: find_cell(%f, %f) = %s(%d, %d, %f, %f)\n", __FUNCTION__, e->button.x, e->button.y,
+ g_print (
+ "%s: find_cell(%f, %f) = %s(%d, %d, %f, %f)\n", __FUNCTION__, e->button.x, e->button.y,
cell_found?"true":"false", col, row, x1, y1);
}
#endif
@@ -2467,14 +2512,11 @@ eti_event (GnomeCanvasItem *item,
if (!find_cell (eti, e->button.x, e->button.y, &col, &row, &x1, &y1))
return TRUE;
- g_object_get (eti->selection,
- "cursor_row", &cursor_row,
- "cursor_col", &cursor_col,
- NULL);
-
- d (g_print ("%s: GDK_BUTTON_RELEASE received, button %d, line: %d\n"
- "eti_editing: %s, row:%d:%d, col:%d:%d\n", __FUNCTION__, e->button.button, __LINE__,
- eti_editing (eti)?"true":"false", cursor_row, view_to_model_row (eti, row), cursor_col, view_to_model_col (eti, col)));
+ g_object_get (
+ eti->selection,
+ "cursor_row", &cursor_row,
+ "cursor_col", &cursor_col,
+ NULL);
if (eti_editing (eti) && cursor_row == view_to_model_row (eti, row) && cursor_col == view_to_model_col (eti, col)) {
@@ -2489,8 +2531,9 @@ eti_event (GnomeCanvasItem *item,
e->button.x = x1;
e->button.y = y1;
- return_val = eti_e_cell_event (eti, ecell_view, e, e->button.time,
- view_to_model_col (eti, col), col, row, E_CELL_EDITING | E_CELL_CURSOR);
+ return_val = eti_e_cell_event (
+ eti, ecell_view, e, e->button.time,
+ view_to_model_col (eti, col), col, row, E_CELL_EDITING | E_CELL_CURSOR);
}
break;
case 3:
@@ -2527,10 +2570,11 @@ eti_event (GnomeCanvasItem *item,
return TRUE;
#endif
- g_object_get (eti->selection,
- "cursor_row", &model_row,
- "cursor_col", &model_col,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &model_row,
+ "cursor_col", &model_col,
+ NULL);
e->button.x -= e_table_header_col_diff (eti->header, 0, model_to_view_col (eti, model_col));
e->button.y -= e_table_item_row_diff (eti, 0, model_to_view_row (eti, model_row));
@@ -2555,8 +2599,9 @@ eti_event (GnomeCanvasItem *item,
}
if (model_row != -1 && model_col != -1) {
- g_signal_emit (eti, eti_signals[DOUBLE_CLICK], 0,
- model_row, model_col, e);
+ g_signal_emit (
+ eti, eti_signals[DOUBLE_CLICK], 0,
+ model_row, model_col, e);
}
}
break;
@@ -2574,8 +2619,9 @@ eti_event (GnomeCanvasItem *item,
gboolean drag_handled;
eti->maybe_in_drag = 0;
- g_signal_emit (eti, eti_signals[START_DRAG], 0,
- eti->drag_row, eti->drag_col, e, &drag_handled);
+ g_signal_emit (
+ eti, eti_signals[START_DRAG], 0,
+ eti->drag_row, eti->drag_col, e, &drag_handled);
if (drag_handled)
eti->in_drag = 1;
else
@@ -2590,19 +2636,21 @@ eti_event (GnomeCanvasItem *item,
(row != eti->motion_row || col != eti->motion_col)) {
GdkEvent *cross = gdk_event_new (GDK_LEAVE_NOTIFY);
cross->crossing.time = e->motion.time;
- return_val = eti_e_cell_event (eti, eti->cell_views[eti->motion_col],
- cross, cross->crossing.time,
- view_to_model_col (eti, eti->motion_col),
- eti->motion_col, eti->motion_row, 0);
+ return_val = eti_e_cell_event (
+ eti, eti->cell_views[eti->motion_col],
+ cross, cross->crossing.time,
+ view_to_model_col (eti, eti->motion_col),
+ eti->motion_col, eti->motion_row, 0);
}
eti->motion_row = row;
eti->motion_col = col;
- g_object_get (eti->selection,
- "cursor_row", &cursor_row,
- "cursor_col", &cursor_col,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &cursor_row,
+ "cursor_col", &cursor_col,
+ NULL);
flags = 0;
if (cursor_row == view_to_model_row (eti, row) && cursor_col == view_to_model_col (eti, col)) {
@@ -2617,8 +2665,9 @@ eti_event (GnomeCanvasItem *item,
e->motion.x = x1;
e->motion.y = y1;
- return_val = eti_e_cell_event (eti, ecell_view, e, e->motion.time,
- view_to_model_col (eti, col), col, row, flags);
+ return_val = eti_e_cell_event (
+ eti, ecell_view, e, e->motion.time,
+ view_to_model_col (eti, col), col, row, flags);
break;
}
@@ -2628,10 +2677,11 @@ eti_event (GnomeCanvasItem *item,
d (g_print ("%s: GDK_KEY_PRESS received, keyval: %d\n", __FUNCTION__, (gint) e->key.keyval));
- g_object_get (eti->selection,
- "cursor_row", &cursor_row,
- "cursor_col", &cursor_col,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &cursor_row,
+ "cursor_col", &cursor_col,
+ NULL);
if (cursor_row == -1 && cursor_col == -1)
return FALSE;
@@ -2646,8 +2696,9 @@ eti_event (GnomeCanvasItem *item,
break;
}
- g_signal_emit (eti, eti_signals[KEY_PRESS], 0,
- model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
+ g_signal_emit (
+ eti, eti_signals[KEY_PRESS], 0,
+ model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
if ((!return_val) &&
(atk_get_root () || eti->cursor_mode != E_CURSOR_LINE) &&
cursor_col != view_to_model_col (eti, 0))
@@ -2662,8 +2713,9 @@ eti_event (GnomeCanvasItem *item,
break;
}
- g_signal_emit (eti, eti_signals[KEY_PRESS], 0,
- model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
+ g_signal_emit (
+ eti, eti_signals[KEY_PRESS], 0,
+ model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
if ((!return_val) &&
(atk_get_root () || eti->cursor_mode != E_CURSOR_LINE) &&
cursor_col != view_to_model_col (eti, eti->cols - 1))
@@ -2676,7 +2728,7 @@ eti_event (GnomeCanvasItem *item,
case GDK_KEY_Down:
case GDK_KEY_KP_Down:
if ((e->key.state & GDK_MOD1_MASK)
- && ((e->key.keyval == GDK_KEY_Down ) || (e->key.keyval == GDK_KEY_KP_Down))) {
+ && ((e->key.keyval == GDK_KEY_Down) || (e->key.keyval == GDK_KEY_KP_Down))) {
gint view_col = model_to_view_col (eti, cursor_col);
if ((view_col >= 0) && (view_col < eti->cols))
@@ -2735,10 +2787,11 @@ eti_event (GnomeCanvasItem *item,
else
return_val = FALSE;
}
- g_object_get (eti->selection,
- "cursor_row", &cursor_row,
- "cursor_col", &cursor_col,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &cursor_row,
+ "cursor_col", &cursor_col,
+ NULL);
if (cursor_col >= 0 && cursor_row >= 0 && return_val &&
(!eti_editing (eti)) && e_table_model_is_cell_editable (eti->table_model, cursor_col, model_to_view_row (eti, cursor_row))) {
@@ -2757,14 +2810,16 @@ eti_event (GnomeCanvasItem *item,
case GDK_KEY_3270_Enter:
if (eti_editing (eti)) {
ecell_view = eti->cell_views[eti->editing_col];
- return_val = eti_e_cell_event (eti, ecell_view, e, e->key.time,
- view_to_model_col (eti, eti->editing_col),
- eti->editing_col, eti->editing_row, E_CELL_EDITING | E_CELL_CURSOR | E_CELL_PREEDIT);
+ return_val = eti_e_cell_event (
+ eti, ecell_view, e, e->key.time,
+ view_to_model_col (eti, eti->editing_col),
+ eti->editing_col, eti->editing_row, E_CELL_EDITING | E_CELL_CURSOR | E_CELL_PREEDIT);
if (!return_val)
break;
}
- g_signal_emit (eti, eti_signals[KEY_PRESS], 0,
- model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
+ g_signal_emit (
+ eti, eti_signals[KEY_PRESS], 0,
+ model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
if (!return_val)
return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
@@ -2805,15 +2860,17 @@ eti_event (GnomeCanvasItem *item,
}
}
if (!eti_editing (eti)) {
- g_signal_emit (eti, eti_signals[KEY_PRESS], 0,
- model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
+ g_signal_emit (
+ eti, eti_signals[KEY_PRESS], 0,
+ model_to_view_row (eti, cursor_row), cursor_col, e, &return_val);
if (!return_val)
e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
} else {
ecell_view = eti->cell_views[eti->editing_col];
- return_val = eti_e_cell_event (eti, ecell_view, e, e->key.time,
- view_to_model_col (eti, eti->editing_col),
- eti->editing_col, eti->editing_row, E_CELL_EDITING | E_CELL_CURSOR);
+ return_val = eti_e_cell_event (
+ eti, ecell_view, e, e->key.time,
+ view_to_model_col (eti, eti->editing_col),
+ eti->editing_col, eti->editing_row, E_CELL_EDITING | E_CELL_CURSOR);
if (!return_val)
e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
}
@@ -2829,19 +2886,21 @@ eti_event (GnomeCanvasItem *item,
d (g_print ("%s: GDK_KEY_RELEASE received, keyval: %d\n", __FUNCTION__, (gint) e->key.keyval));
- g_object_get (eti->selection,
- "cursor_row", &cursor_row,
- "cursor_col", &cursor_col,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_row", &cursor_row,
+ "cursor_col", &cursor_col,
+ NULL);
if (cursor_col == -1)
return FALSE;
if (eti_editing (eti)) {
ecell_view = eti->cell_views[eti->editing_col];
- return_val = eti_e_cell_event (eti, ecell_view, e, e->key.time,
- view_to_model_col (eti, eti->editing_col),
- eti->editing_col, eti->editing_row, E_CELL_EDITING | E_CELL_CURSOR);
+ return_val = eti_e_cell_event (
+ eti, ecell_view, e, e->key.time,
+ view_to_model_col (eti, eti->editing_col),
+ eti->editing_col, eti->editing_row, E_CELL_EDITING | E_CELL_CURSOR);
}
break;
}
@@ -2851,10 +2910,11 @@ eti_event (GnomeCanvasItem *item,
case GDK_ENTER_NOTIFY:
d (g_print ("%s: %s received\n", __FUNCTION__, leave ? "GDK_LEAVE_NOTIFY" : "GDK_ENTER_NOTIFY"));
if (eti->motion_row != -1 && eti->motion_col != -1)
- return_val = eti_e_cell_event (eti, eti->cell_views[eti->motion_col],
- e, e->crossing.time,
- view_to_model_col (eti, eti->motion_col),
- eti->motion_col, eti->motion_row, 0);
+ return_val = eti_e_cell_event (
+ eti, eti->cell_views[eti->motion_col],
+ e, e->crossing.time,
+ view_to_model_col (eti, eti->motion_col),
+ eti->motion_col, eti->motion_row, 0);
eti->motion_row = -1;
eti->motion_col = -1;
@@ -2868,8 +2928,9 @@ eti_event (GnomeCanvasItem *item,
!eti_editing (eti) &&
e_table_model_is_cell_editable (eti->table_model, view_to_model_col (eti, eti->save_col), eti->save_row)) {
e_table_item_enter_edit (eti, eti->save_col, eti->save_row);
- e_cell_load_state (eti->cell_views[eti->editing_col], view_to_model_col (eti, eti->save_col),
- eti->save_col, eti->save_row, eti->edit_ctx, eti->save_state);
+ e_cell_load_state (
+ eti->cell_views[eti->editing_col], view_to_model_col (eti, eti->save_col),
+ eti->save_col, eti->save_row, eti->edit_ctx, eti->save_state);
eti_free_save_state (eti);
}
} else {
@@ -2878,8 +2939,9 @@ eti_event (GnomeCanvasItem *item,
eti->save_row = eti->editing_row;
eti->save_col = eti->editing_col;
- eti->save_state = e_cell_save_state (eti->cell_views[eti->editing_col], view_to_model_col (eti, eti->editing_col),
- eti->editing_col, eti->editing_row, eti->edit_ctx);
+ eti->save_state = e_cell_save_state (
+ eti->cell_views[eti->editing_col], view_to_model_col (eti, eti->editing_col),
+ eti->editing_col, eti->editing_row, eti->edit_ctx);
e_table_item_leave_edit_(eti);
}
}
@@ -2948,209 +3010,257 @@ eti_class_init (ETableItemClass *class)
class->selection_model_removed = NULL;
class->selection_model_added = NULL;
- g_object_class_install_property (object_class, PROP_TABLE_HEADER,
- g_param_spec_object ("ETableHeader",
- "Table header",
- "Table header",
- E_TYPE_TABLE_HEADER,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_TABLE_MODEL,
- g_param_spec_object ("ETableModel",
- "Table model",
- "Table model",
- E_TYPE_TABLE_MODEL,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_SELECTION_MODEL,
- g_param_spec_object ("selection_model",
- "Selection model",
- "Selection model",
- E_TYPE_SELECTION_MODEL,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_TABLE_ALTERNATING_ROW_COLORS,
- g_param_spec_boolean ("alternating_row_colors",
- "Alternating Row Colors",
- "Alternating Row Colors",
- FALSE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_TABLE_HORIZONTAL_DRAW_GRID,
- g_param_spec_boolean ("horizontal_draw_grid",
- "Horizontal Draw Grid",
- "Horizontal Draw Grid",
- FALSE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_TABLE_VERTICAL_DRAW_GRID,
- g_param_spec_boolean ("vertical_draw_grid",
- "Vertical Draw Grid",
- "Vertical Draw Grid",
- FALSE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_TABLE_DRAW_FOCUS,
- g_param_spec_boolean ("drawfocus",
- "Draw focus",
- "Draw focus",
- FALSE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_CURSOR_MODE,
- g_param_spec_int ("cursor_mode",
- "Cursor mode",
- "Cursor mode",
- E_CURSOR_LINE, E_CURSOR_SPREADSHEET, E_CURSOR_LINE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_LENGTH_THRESHOLD,
- g_param_spec_int ("length_threshold",
- "Length Threshold",
- "Length Threshold",
- -1, G_MAXINT, 0,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_MINIMUM_WIDTH,
- g_param_spec_double ("minimum_width",
- "Minimum width",
- "Minimum Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_WIDTH,
- g_param_spec_double ("width",
- "Width",
- "Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_HEIGHT,
- g_param_spec_double ("height",
- "Height",
- "Height",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READABLE));
-
- g_object_class_install_property (object_class, PROP_CURSOR_ROW,
- g_param_spec_int ("cursor_row",
- "Cursor row",
- "Cursor row",
- 0, G_MAXINT, 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_UNIFORM_ROW_HEIGHT,
- g_param_spec_boolean ("uniform_row_height",
- "Uniform row height",
- "Uniform row height",
- FALSE,
- G_PARAM_READWRITE));
-
- eti_signals[CURSOR_CHANGE] =
- g_signal_new ("cursor_change",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableItemClass, cursor_change),
- NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- eti_signals[CURSOR_ACTIVATED] =
- g_signal_new ("cursor_activated",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableItemClass, cursor_activated),
- NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1, G_TYPE_INT);
-
- eti_signals[DOUBLE_CLICK] =
- g_signal_new ("double_click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableItemClass, double_click),
- NULL, NULL,
- e_marshal_NONE__INT_INT_BOXED,
- G_TYPE_NONE, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- eti_signals[START_DRAG] =
- g_signal_new ("start_drag",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableItemClass, start_drag),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_INT_BOXED,
- G_TYPE_BOOLEAN, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- eti_signals[RIGHT_CLICK] =
- g_signal_new ("right_click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableItemClass, right_click),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_INT_BOXED,
- G_TYPE_BOOLEAN, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- eti_signals[CLICK] =
- g_signal_new ("click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableItemClass, click),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_INT_BOXED,
- G_TYPE_BOOLEAN, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- eti_signals[KEY_PRESS] =
- g_signal_new ("key_press",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableItemClass, key_press),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_INT_BOXED,
- G_TYPE_BOOLEAN, 3,
- G_TYPE_INT,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- eti_signals[STYLE_SET] =
- g_signal_new ("style_set",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableItemClass, style_set),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 1, GTK_TYPE_STYLE);
-
- eti_signals[SELECTION_MODEL_REMOVED] =
- g_signal_new ("selection_model_removed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ETableItemClass, selection_model_removed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1,
- G_TYPE_POINTER);
-
- eti_signals[SELECTION_MODEL_ADDED] =
- g_signal_new ("selection_model_added",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (ETableItemClass, selection_model_added),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1,
- G_TYPE_POINTER);
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_HEADER,
+ g_param_spec_object (
+ "ETableHeader",
+ "Table header",
+ "Table header",
+ E_TYPE_TABLE_HEADER,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_MODEL,
+ g_param_spec_object (
+ "ETableModel",
+ "Table model",
+ "Table model",
+ E_TYPE_TABLE_MODEL,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_SELECTION_MODEL,
+ g_param_spec_object (
+ "selection_model",
+ "Selection model",
+ "Selection model",
+ E_TYPE_SELECTION_MODEL,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_ALTERNATING_ROW_COLORS,
+ g_param_spec_boolean (
+ "alternating_row_colors",
+ "Alternating Row Colors",
+ "Alternating Row Colors",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_HORIZONTAL_DRAW_GRID,
+ g_param_spec_boolean (
+ "horizontal_draw_grid",
+ "Horizontal Draw Grid",
+ "Horizontal Draw Grid",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_VERTICAL_DRAW_GRID,
+ g_param_spec_boolean (
+ "vertical_draw_grid",
+ "Vertical Draw Grid",
+ "Vertical Draw Grid",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_TABLE_DRAW_FOCUS,
+ g_param_spec_boolean (
+ "drawfocus",
+ "Draw focus",
+ "Draw focus",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_CURSOR_MODE,
+ g_param_spec_int (
+ "cursor_mode",
+ "Cursor mode",
+ "Cursor mode",
+ E_CURSOR_LINE,
+ E_CURSOR_SPREADSHEET,
+ E_CURSOR_LINE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_LENGTH_THRESHOLD,
+ g_param_spec_int (
+ "length_threshold",
+ "Length Threshold",
+ "Length Threshold",
+ -1, G_MAXINT, 0,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MINIMUM_WIDTH,
+ g_param_spec_double (
+ "minimum_width",
+ "Minimum width",
+ "Minimum Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_WIDTH,
+ g_param_spec_double (
+ "width",
+ "Width",
+ "Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_HEIGHT,
+ g_param_spec_double (
+ "height",
+ "Height",
+ "Height",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_CURSOR_ROW,
+ g_param_spec_int (
+ "cursor_row",
+ "Cursor row",
+ "Cursor row",
+ 0, G_MAXINT, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_UNIFORM_ROW_HEIGHT,
+ g_param_spec_boolean (
+ "uniform_row_height",
+ "Uniform row height",
+ "Uniform row height",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ eti_signals[CURSOR_CHANGE] = g_signal_new (
+ "cursor_change",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableItemClass, cursor_change),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1,
+ G_TYPE_INT);
+
+ eti_signals[CURSOR_ACTIVATED] = g_signal_new (
+ "cursor_activated",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableItemClass, cursor_activated),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1,
+ G_TYPE_INT);
+
+ eti_signals[DOUBLE_CLICK] = g_signal_new (
+ "double_click",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableItemClass, double_click),
+ NULL, NULL,
+ e_marshal_NONE__INT_INT_BOXED,
+ G_TYPE_NONE, 3,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ eti_signals[START_DRAG] = g_signal_new (
+ "start_drag",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableItemClass, start_drag),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_INT_BOXED,
+ G_TYPE_BOOLEAN, 3,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ eti_signals[RIGHT_CLICK] = g_signal_new (
+ "right_click",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableItemClass, right_click),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_INT_BOXED,
+ G_TYPE_BOOLEAN, 3,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ eti_signals[CLICK] = g_signal_new (
+ "click",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableItemClass, click),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_INT_BOXED,
+ G_TYPE_BOOLEAN, 3,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ eti_signals[KEY_PRESS] = g_signal_new (
+ "key_press",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableItemClass, key_press),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_INT_BOXED,
+ G_TYPE_BOOLEAN, 3,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ eti_signals[STYLE_SET] = g_signal_new (
+ "style_set",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableItemClass, style_set),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ GTK_TYPE_STYLE);
+
+ eti_signals[SELECTION_MODEL_REMOVED] = g_signal_new (
+ "selection_model_removed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (ETableItemClass, selection_model_removed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
+
+ eti_signals[SELECTION_MODEL_ADDED] = g_signal_new (
+ "selection_model_added",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (ETableItemClass, selection_model_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
/* A11y Init */
gal_a11y_e_table_item_init ();
@@ -3190,9 +3300,9 @@ e_table_item_focus (ETableItem *eti,
}
if (row != -1) {
- e_selection_model_do_something (E_SELECTION_MODEL (eti->selection),
- row, col,
- state);
+ e_selection_model_do_something (
+ E_SELECTION_MODEL (eti->selection),
+ row, col, state);
}
}
@@ -3212,9 +3322,10 @@ e_table_item_get_focused_column (ETableItem *eti)
g_return_val_if_fail (eti != NULL, -1);
g_return_val_if_fail (E_IS_TABLE_ITEM (eti), -1);
- g_object_get (eti->selection,
- "cursor_col", &cursor_col,
- NULL);
+ g_object_get (
+ eti->selection,
+ "cursor_col", &cursor_col,
+ NULL);
return cursor_col;
}
@@ -3253,8 +3364,8 @@ eti_cursor_change (ESelectionModel *selection,
e_canvas_item_grab_focus (GNOME_CANVAS_ITEM (eti), FALSE);
if (eti_editing (eti))
e_table_item_leave_edit_(eti);
- g_signal_emit (eti, eti_signals[CURSOR_CHANGE], 0,
- view_row);
+
+ g_signal_emit (eti, eti_signals[CURSOR_CHANGE], 0, view_row);
e_table_item_redraw_row (eti, view_row);
@@ -3292,8 +3403,8 @@ eti_cursor_activated (ESelectionModel *selection,
e_table_item_leave_edit_(eti);
if (view_row != -1)
- g_signal_emit (eti, eti_signals[CURSOR_ACTIVATED], 0,
- view_row);
+ g_signal_emit (
+ eti, eti_signals[CURSOR_ACTIVATED], 0, view_row);
}
static void
@@ -3380,9 +3491,10 @@ e_table_item_leave_edit (ETableItem *eti)
eti->editing_row = -1;
eti->edit_ctx = NULL;
- e_cell_leave_edit (eti->cell_views[col],
- view_to_model_col (eti, col),
- col, row, edit_ctx);
+ e_cell_leave_edit (
+ eti->cell_views[col],
+ view_to_model_col (eti, col),
+ col, row, edit_ctx);
}
/**
@@ -3517,8 +3629,9 @@ eti_printed_row_height (ETableItem *eti,
gdouble height = 0;
for (col = 0; col < cols; col++) {
ECellView *ecell_view = eti->cell_views[col];
- gdouble this_height = e_cell_print_height (ecell_view, context, view_to_model_col (eti, col), col, row,
- widths[col] - 1);
+ gdouble this_height = e_cell_print_height (
+ ecell_view, context, view_to_model_col (eti, col), col, row,
+ widths[col] - 1);
if (this_height > height)
height = this_height;
}
@@ -3599,12 +3712,13 @@ e_table_item_print_page (EPrintable *ep,
cairo_rectangle (cr, 0, 0, widths[col] - 1, row_height);
cairo_clip (cr);
- e_cell_print (ecell_view, context,
- view_to_model_col (eti, col),
- col,
- row,
- widths[col] - 1,
- row_height + 2 );
+ e_cell_print (
+ ecell_view, context,
+ view_to_model_col (eti, col),
+ col,
+ row,
+ widths[col] - 1,
+ row_height + 2);
cairo_restore (cr);
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c
index 56c1dee33b..950b58e31e 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -377,9 +377,10 @@ e_table_memory_store_insert_array (ETableMemoryStore *etms,
if (row == -1)
row = row_count - 1;
etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (gpointer));
- memmove (etms->priv->store + etms->priv->col_count * (row + 1),
- etms->priv->store + etms->priv->col_count * row,
- etms->priv->col_count * (row_count - row - 1) * sizeof (gpointer));
+ memmove (
+ etms->priv->store + etms->priv->col_count * (row + 1),
+ etms->priv->store + etms->priv->col_count * row,
+ etms->priv->col_count * (row_count - row - 1) * sizeof (gpointer));
for (i = 0; i < etms->priv->col_count; i++) {
STORE_LOCATOR (etms, i, row) = duplicate_value (etms, i, store[i]);
@@ -402,7 +403,7 @@ e_table_memory_store_insert (ETableMemoryStore *etms,
va_start (args, data);
for (i = 0; i < etms->priv->col_count; i++) {
- store[i] = va_arg (args, gpointer );
+ store[i] = va_arg (args, gpointer);
}
va_end (args);
@@ -424,9 +425,10 @@ e_table_memory_store_insert_adopt_array (ETableMemoryStore *etms,
if (row == -1)
row = row_count - 1;
etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (gpointer));
- memmove (etms->priv->store + etms->priv->col_count * (row + 1),
- etms->priv->store + etms->priv->col_count * row,
- etms->priv->col_count * (row_count - row - 1) * sizeof (gpointer));
+ memmove (
+ etms->priv->store + etms->priv->col_count * (row + 1),
+ etms->priv->store + etms->priv->col_count * row,
+ etms->priv->col_count * (row_count - row - 1) * sizeof (gpointer));
for (i = 0; i < etms->priv->col_count; i++) {
STORE_LOCATOR (etms, i, row) = store[i];
@@ -449,7 +451,7 @@ e_table_memory_store_insert_adopt (ETableMemoryStore *etms,
va_start (args, data);
for (i = 0; i < etms->priv->col_count; i++) {
- store[i] = va_arg (args, gpointer );
+ store[i] = va_arg (args, gpointer);
}
va_end (args);
@@ -515,7 +517,7 @@ e_table_memory_store_change (ETableMemoryStore *etms,
va_start (args, data);
for (i = 0; i < etms->priv->col_count; i++) {
- store[i] = va_arg (args, gpointer );
+ store[i] = va_arg (args, gpointer);
}
va_end (args);
@@ -580,7 +582,7 @@ e_table_memory_store_change_adopt (ETableMemoryStore *etms,
va_start (args, data);
for (i = 0; i < etms->priv->col_count; i++) {
- store[i] = va_arg (args, gpointer );
+ store[i] = va_arg (args, gpointer);
}
va_end (args);
@@ -604,9 +606,10 @@ e_table_memory_store_remove (ETableMemoryStore *etms,
e_table_model_free_value (model, i, e_table_model_value_at (model, i, row));
row_count = e_table_model_row_count (E_TABLE_MODEL (etms)) - 1;
- memmove (etms->priv->store + etms->priv->col_count * row,
- etms->priv->store + etms->priv->col_count * (row + 1),
- etms->priv->col_count * (row_count - row) * sizeof (gpointer));
+ memmove (
+ etms->priv->store + etms->priv->col_count * row,
+ etms->priv->store + etms->priv->col_count * (row + 1),
+ etms->priv->col_count * (row_count - row) * sizeof (gpointer));
etms->priv->store = g_realloc (etms->priv->store, etms->priv->col_count * row_count * sizeof (gpointer));
e_table_memory_remove (E_TABLE_MEMORY (etms), row);
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c
index 7c12496af9..99479f94ee 100644
--- a/widgets/table/e-table-model.c
+++ b/widgets/table/e-table-model.c
@@ -457,8 +457,7 @@ e_table_model_pre_change (ETableModel *e_table_model)
d (print_tabs ());
d (depth++);
- g_signal_emit (G_OBJECT (e_table_model),
- signals[MODEL_PRE_CHANGE], 0);
+ g_signal_emit (e_table_model, signals[MODEL_PRE_CHANGE], 0);
d (depth--);
}
@@ -485,8 +484,7 @@ e_table_model_no_change (ETableModel *e_table_model)
d (print_tabs ());
d (depth++);
- g_signal_emit (G_OBJECT (e_table_model),
- signals[MODEL_NO_CHANGE], 0);
+ g_signal_emit (e_table_model, signals[MODEL_NO_CHANGE], 0);
d (depth--);
}
@@ -513,8 +511,7 @@ e_table_model_changed (ETableModel *e_table_model)
d (print_tabs ());
d (depth++);
- g_signal_emit (G_OBJECT (e_table_model),
- signals[MODEL_CHANGED], 0);
+ g_signal_emit (e_table_model, signals[MODEL_CHANGED], 0);
d (depth--);
}
@@ -539,8 +536,7 @@ e_table_model_row_changed (ETableModel *e_table_model,
d (print_tabs ());
d (depth++);
- g_signal_emit (G_OBJECT (e_table_model),
- signals[MODEL_ROW_CHANGED], 0, row);
+ g_signal_emit (e_table_model, signals[MODEL_ROW_CHANGED], 0, row);
d (depth--);
}
@@ -567,8 +563,8 @@ e_table_model_cell_changed (ETableModel *e_table_model,
d (print_tabs ());
d (depth++);
- g_signal_emit (G_OBJECT (e_table_model),
- signals[MODEL_CELL_CHANGED], 0, col, row);
+ g_signal_emit (
+ e_table_model, signals[MODEL_CELL_CHANGED], 0, col, row);
d (depth--);
}
@@ -595,8 +591,8 @@ e_table_model_rows_inserted (ETableModel *e_table_model,
d (print_tabs ());
d (depth++);
- g_signal_emit (G_OBJECT (e_table_model),
- signals[MODEL_ROWS_INSERTED], 0, row, count);
+ g_signal_emit (
+ e_table_model, signals[MODEL_ROWS_INSERTED], 0, row, count);
d (depth--);
}
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index 99a0d7b9ab..e084bc9602 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -63,9 +63,10 @@ e_table_search_search (ETableSearch *e_table_search,
gboolean ret_val;
g_return_val_if_fail (E_IS_TABLE_SEARCH (e_table_search), FALSE);
- g_signal_emit (G_OBJECT (e_table_search),
- e_table_search_signals[SEARCH_SEARCH],
- 0, string, flags, &ret_val);
+ g_signal_emit (
+ e_table_search,
+ e_table_search_signals[SEARCH_SEARCH], 0,
+ string, flags, &ret_val);
return ret_val;
}
@@ -75,8 +76,9 @@ e_table_search_accept (ETableSearch *e_table_search)
{
g_return_if_fail (E_IS_TABLE_SEARCH (e_table_search));
- g_signal_emit (G_OBJECT (e_table_search),
- e_table_search_signals[SEARCH_ACCEPT], 0);
+ g_signal_emit (
+ e_table_search,
+ e_table_search_signals[SEARCH_ACCEPT], 0);
}
static gboolean
@@ -134,23 +136,25 @@ e_table_search_class_init (ETableSearchClass *class)
object_class = G_OBJECT_CLASS (class);
object_class->finalize = e_table_search_finalize;
- e_table_search_signals[SEARCH_SEARCH] =
- g_signal_new ("search",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableSearchClass, search),
- (GSignalAccumulator) NULL, NULL,
- e_marshal_BOOLEAN__STRING_INT,
- G_TYPE_BOOLEAN, 2, G_TYPE_STRING, G_TYPE_INT);
-
- e_table_search_signals[SEARCH_ACCEPT] =
- g_signal_new ("accept",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableSearchClass, accept),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ e_table_search_signals[SEARCH_SEARCH] = g_signal_new (
+ "search",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableSearchClass, search),
+ (GSignalAccumulator) NULL, NULL,
+ e_marshal_BOOLEAN__STRING_INT,
+ G_TYPE_BOOLEAN, 2,
+ G_TYPE_STRING,
+ G_TYPE_INT);
+
+ e_table_search_signals[SEARCH_ACCEPT] = g_signal_new (
+ "accept",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableSearchClass, accept),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
class->search = NULL;
class->accept = NULL;
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index 0320663e8e..2ee44a7ffe 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -80,9 +80,10 @@ model_pre_change (ETableModel *etm,
(GDestroyNotify) NULL);
e_selection_model_foreach (E_SELECTION_MODEL (etsm), save_to_hash, etsm);
- g_object_get (etsm,
- "cursor_row", &cursor_row,
- NULL);
+ g_object_get (
+ etsm,
+ "cursor_row", &cursor_row,
+ NULL);
g_free (etsm->cursor_id);
if (cursor_row != -1)
etsm->cursor_id = e_table_model_get_save_id (etm, cursor_row);
@@ -234,18 +235,24 @@ inline static void
drop_model (ETableSelectionModel *etsm)
{
if (etsm->model) {
- g_signal_handler_disconnect (G_OBJECT (etsm->model),
- etsm->model_pre_change_id);
- g_signal_handler_disconnect (G_OBJECT (etsm->model),
- etsm->model_changed_id);
- g_signal_handler_disconnect (G_OBJECT (etsm->model),
- etsm->model_row_changed_id);
- g_signal_handler_disconnect (G_OBJECT (etsm->model),
- etsm->model_cell_changed_id);
- g_signal_handler_disconnect (G_OBJECT (etsm->model),
- etsm->model_rows_inserted_id);
- g_signal_handler_disconnect (G_OBJECT (etsm->model),
- etsm->model_rows_deleted_id);
+ g_signal_handler_disconnect (
+ etsm->model,
+ etsm->model_pre_change_id);
+ g_signal_handler_disconnect (
+ etsm->model,
+ etsm->model_changed_id);
+ g_signal_handler_disconnect (
+ etsm->model,
+ etsm->model_row_changed_id);
+ g_signal_handler_disconnect (
+ etsm->model,
+ etsm->model_cell_changed_id);
+ g_signal_handler_disconnect (
+ etsm->model,
+ etsm->model_rows_inserted_id);
+ g_signal_handler_disconnect (
+ etsm->model,
+ etsm->model_rows_deleted_id);
g_object_unref (etsm->model);
}
@@ -332,19 +339,25 @@ e_table_selection_model_class_init (ETableSelectionModelClass *class)
esma_class->get_row_count = etsm_get_row_count;
- g_object_class_install_property (object_class, PROP_MODEL,
- g_param_spec_object ("model",
- "Model",
- NULL,
- E_TYPE_TABLE_MODEL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HEADER,
- g_param_spec_object ("header",
- "Header",
- NULL,
- E_TYPE_TABLE_HEADER,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_MODEL,
+ g_param_spec_object (
+ "model",
+ "Model",
+ NULL,
+ E_TYPE_TABLE_MODEL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_HEADER,
+ g_param_spec_object (
+ "header",
+ "Header",
+ NULL,
+ E_TYPE_TABLE_HEADER,
+ G_PARAM_READWRITE));
}
/**
diff --git a/widgets/table/e-table-sort-info.c b/widgets/table/e-table-sort-info.c
index 4740c0fb50..7ce56d7c75 100644
--- a/widgets/table/e-table-sort-info.c
+++ b/widgets/table/e-table-sort-info.c
@@ -79,23 +79,23 @@ e_table_sort_info_class_init (ETableSortInfoClass *class)
object_class->finalize = etsi_finalize;
- e_table_sort_info_signals[SORT_INFO_CHANGED] =
- g_signal_new ("sort_info_changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableSortInfoClass, sort_info_changed),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- e_table_sort_info_signals[GROUP_INFO_CHANGED] =
- g_signal_new ("group_info_changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETableSortInfoClass, group_info_changed),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ e_table_sort_info_signals[SORT_INFO_CHANGED] = g_signal_new (
+ "sort_info_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableSortInfoClass, sort_info_changed),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ e_table_sort_info_signals[GROUP_INFO_CHANGED] = g_signal_new (
+ "group_info_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETableSortInfoClass, group_info_changed),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
class->sort_info_changed = NULL;
class->group_info_changed = NULL;
@@ -110,7 +110,7 @@ e_table_sort_info_sort_info_changed (ETableSortInfo *info)
if (info->frozen) {
info->sort_info_changed = 1;
} else {
- g_signal_emit (G_OBJECT (info), e_table_sort_info_signals[SORT_INFO_CHANGED], 0);
+ g_signal_emit (info, e_table_sort_info_signals[SORT_INFO_CHANGED], 0);
}
}
@@ -123,7 +123,7 @@ e_table_sort_info_group_info_changed (ETableSortInfo *info)
if (info->frozen) {
info->group_info_changed = 1;
} else {
- g_signal_emit (G_OBJECT (info), e_table_sort_info_signals[GROUP_INFO_CHANGED], 0);
+ g_signal_emit (info, e_table_sort_info_signals[GROUP_INFO_CHANGED], 0);
}
}
@@ -405,7 +405,7 @@ e_table_sort_info_load_from_node (ETableSortInfo *info,
}
}
}
- g_signal_emit (G_OBJECT (info), e_table_sort_info_signals[SORT_INFO_CHANGED], 0);
+ g_signal_emit (info, e_table_sort_info_signals[SORT_INFO_CHANGED], 0);
}
/**
diff --git a/widgets/table/e-table-sorted-variable.c b/widgets/table/e-table-sorted-variable.c
index 7792795477..73a92c35ef 100644
--- a/widgets/table/e-table-sorted-variable.c
+++ b/widgets/table/e-table-sorted-variable.c
@@ -54,8 +54,9 @@ etsv_dispose (GObject *object)
ETableSortedVariable *etsv = E_TABLE_SORTED_VARIABLE (object);
if (etsv->sort_info_changed_id)
- g_signal_handler_disconnect (G_OBJECT (etsv->sort_info),
- etsv->sort_info_changed_id);
+ g_signal_handler_disconnect (
+ etsv->sort_info,
+ etsv->sort_info_changed_id);
etsv->sort_info_changed_id = 0;
if (etsv->sort_idle_id) {
diff --git a/widgets/table/e-table-sorted.c b/widgets/table/e-table-sorted.c
index 022e4e9582..31f0fa60b4 100644
--- a/widgets/table/e-table-sorted.c
+++ b/widgets/table/e-table-sorted.c
@@ -65,8 +65,9 @@ ets_dispose (GObject *object)
ets->insert_idle_id = 0;
if (ets->sort_info) {
- g_signal_handler_disconnect (G_OBJECT (ets->sort_info),
- ets->sort_info_changed_id);
+ g_signal_handler_disconnect (
+ ets->sort_info,
+ ets->sort_info_changed_id);
g_object_unref (ets->sort_info);
ets->sort_info = NULL;
}
diff --git a/widgets/table/e-table-sorter.c b/widgets/table/e-table-sorter.c
index 022c27a3a1..2815d13b1b 100644
--- a/widgets/table/e-table-sorter.c
+++ b/widgets/table/e-table-sorter.c
@@ -69,26 +69,33 @@ ets_dispose (GObject *object)
if (ets->sort_info) {
if (ets->table_model_changed_id)
- g_signal_handler_disconnect (ets->source,
- ets->table_model_changed_id);
+ g_signal_handler_disconnect (
+ ets->source,
+ ets->table_model_changed_id);
if (ets->table_model_row_changed_id)
- g_signal_handler_disconnect (ets->source,
- ets->table_model_row_changed_id);
+ g_signal_handler_disconnect (
+ ets->source,
+ ets->table_model_row_changed_id);
if (ets->table_model_cell_changed_id)
- g_signal_handler_disconnect (ets->source,
- ets->table_model_cell_changed_id);
+ g_signal_handler_disconnect (
+ ets->source,
+ ets->table_model_cell_changed_id);
if (ets->table_model_rows_inserted_id)
- g_signal_handler_disconnect (ets->source,
- ets->table_model_rows_inserted_id);
+ g_signal_handler_disconnect (
+ ets->source,
+ ets->table_model_rows_inserted_id);
if (ets->table_model_rows_deleted_id)
- g_signal_handler_disconnect (ets->source,
- ets->table_model_rows_deleted_id);
+ g_signal_handler_disconnect (
+ ets->source,
+ ets->table_model_rows_deleted_id);
if (ets->sort_info_changed_id)
- g_signal_handler_disconnect (ets->sort_info,
- ets->sort_info_changed_id);
+ g_signal_handler_disconnect (
+ ets->sort_info,
+ ets->sort_info_changed_id);
if (ets->group_info_changed_id)
- g_signal_handler_disconnect (ets->sort_info,
- ets->group_info_changed_id);
+ g_signal_handler_disconnect (
+ ets->sort_info,
+ ets->group_info_changed_id);
ets->table_model_changed_id = 0;
ets->table_model_row_changed_id = 0;
@@ -177,12 +184,15 @@ ets_class_init (ETableSorterClass *class)
sorter_class->get_sorted_to_model_array = ets_get_sorted_to_model_array;
sorter_class->needs_sorting = ets_needs_sorting;
- g_object_class_install_property (object_class, PROP_SORT_INFO,
- g_param_spec_object ("sort_info",
- "Sort Info",
- NULL,
- E_TYPE_TABLE_SORT_INFO,
- G_PARAM_READWRITE));
+ g_object_class_install_property (
+ object_class,
+ PROP_SORT_INFO,
+ g_param_spec_object (
+ "sort_info",
+ "Sort Info",
+ NULL,
+ E_TYPE_TABLE_SORT_INFO,
+ G_PARAM_READWRITE));
}
static void
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index e5f5b17757..9f301f6852 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -159,7 +159,7 @@ e_table_specification_load_from_string (ETableSpecification *specification,
const gchar *xml)
{
xmlDoc *doc;
- doc = xmlParseMemory ( (gchar *) xml, strlen (xml));
+ doc = xmlParseMemory ((gchar *) xml, strlen (xml));
if (doc) {
xmlNode *node = xmlDocGetRootElement (doc);
e_table_specification_load_from_node (specification, node);
diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c
index ae4e891ac9..411102eac1 100644
--- a/widgets/table/e-table-subset.c
+++ b/widgets/table/e-table-subset.c
@@ -114,20 +114,27 @@ etss_dispose (GObject *object)
ETableSubset *etss = E_TABLE_SUBSET (object);
if (etss->source) {
- g_signal_handler_disconnect (G_OBJECT (etss->source),
- etss->table_model_pre_change_id);
- g_signal_handler_disconnect (G_OBJECT (etss->source),
- etss->table_model_no_change_id);
- g_signal_handler_disconnect (G_OBJECT (etss->source),
- etss->table_model_changed_id);
- g_signal_handler_disconnect (G_OBJECT (etss->source),
- etss->table_model_row_changed_id);
- g_signal_handler_disconnect (G_OBJECT (etss->source),
- etss->table_model_cell_changed_id);
- g_signal_handler_disconnect (G_OBJECT (etss->source),
- etss->table_model_rows_inserted_id);
- g_signal_handler_disconnect (G_OBJECT (etss->source),
- etss->table_model_rows_deleted_id);
+ g_signal_handler_disconnect (
+ etss->source,
+ etss->table_model_pre_change_id);
+ g_signal_handler_disconnect (
+ etss->source,
+ etss->table_model_no_change_id);
+ g_signal_handler_disconnect (
+ etss->source,
+ etss->table_model_changed_id);
+ g_signal_handler_disconnect (
+ etss->source,
+ etss->table_model_row_changed_id);
+ g_signal_handler_disconnect (
+ etss->source,
+ etss->table_model_cell_changed_id);
+ g_signal_handler_disconnect (
+ etss->source,
+ etss->table_model_rows_inserted_id);
+ g_signal_handler_disconnect (
+ etss->source,
+ etss->table_model_rows_deleted_id);
g_object_unref (etss->source);
etss->source = NULL;
diff --git a/widgets/table/e-table-utils.c b/widgets/table/e-table-utils.c
index 8b10837b3f..d233a4d16f 100644
--- a/widgets/table/e-table-utils.c
+++ b/widgets/table/e-table-utils.c
@@ -135,9 +135,10 @@ et_col_spec_to_col (ETableColumnSpecification *col_spec,
g_free (title);
}
if (col && col_spec->compare_col != col_spec->model_col)
- g_object_set (col,
- "compare_col", col_spec->compare_col,
- NULL);
+ g_object_set (
+ col,
+ "compare_col", col_spec->compare_col,
+ NULL);
return col;
}
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index a555353193..b73ae55ba6 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -224,10 +224,11 @@ current_search_col (ETable *et)
{
if (!et->search_col_set) {
et->current_search_col =
- e_table_util_calculate_current_search_col (et->header,
- et->full_header,
- et->sort_info,
- et->always_search);
+ e_table_util_calculate_current_search_col (
+ et->header,
+ et->full_header,
+ et->sort_info,
+ et->always_search);
et->search_col_set = TRUE;
}
@@ -471,9 +472,10 @@ et_search_search (ETableSearch *search,
rows = e_table_model_row_count (et->model);
- g_object_get (et->selection,
- "cursor_row", &cursor,
- NULL);
+ g_object_get (
+ et->selection,
+ "cursor_row", &cursor,
+ NULL);
if ((flags & E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST) &&
cursor < rows && cursor >= 0 &&
@@ -650,17 +652,19 @@ set_header_canvas_width (ETable *e_table)
if (!(e_table->header_item && e_table->header_canvas && e_table->table_canvas))
return;
- gnome_canvas_get_scroll_region (GNOME_CANVAS (e_table->table_canvas),
- NULL, NULL, &width, NULL);
- gnome_canvas_get_scroll_region (GNOME_CANVAS (e_table->header_canvas),
- NULL, NULL, &oldwidth, &oldheight);
+ gnome_canvas_get_scroll_region (
+ GNOME_CANVAS (e_table->table_canvas),
+ NULL, NULL, &width, NULL);
+ gnome_canvas_get_scroll_region (
+ GNOME_CANVAS (e_table->header_canvas),
+ NULL, NULL, &oldwidth, &oldheight);
if (oldwidth != width ||
oldheight != E_TABLE_HEADER_ITEM (e_table->header_item)->height - 1)
gnome_canvas_set_scroll_region (
- GNOME_CANVAS (e_table->header_canvas),
- 0, 0, width, /* COLUMN_HEADER_HEIGHT - 1 */
- E_TABLE_HEADER_ITEM (e_table->header_item)->height - 1);
+ GNOME_CANVAS (e_table->header_canvas),
+ 0, 0, width, /* COLUMN_HEADER_HEIGHT - 1 */
+ E_TABLE_HEADER_ITEM (e_table->header_item)->height - 1);
}
@@ -759,13 +763,15 @@ table_canvas_reflow_idle (ETable *e_table)
height = MAX ((gint) height, allocation.height);
width = MAX ((gint) width, allocation.width);
/* I have no idea why this needs to be -1, but it works. */
- gnome_canvas_get_scroll_region (GNOME_CANVAS (e_table->table_canvas),
- NULL, NULL, &oldwidth, &oldheight);
+ gnome_canvas_get_scroll_region (
+ GNOME_CANVAS (e_table->table_canvas),
+ NULL, NULL, &oldwidth, &oldheight);
if (oldwidth != width - 1 ||
oldheight != height - 1) {
- gnome_canvas_set_scroll_region (GNOME_CANVAS (e_table->table_canvas),
- 0, 0, width - 1, height - 1);
+ gnome_canvas_set_scroll_region (
+ GNOME_CANVAS (e_table->table_canvas),
+ 0, 0, width - 1, height - 1);
set_header_canvas_width (e_table);
}
e_table->reflow_idle_id = 0;
@@ -784,14 +790,16 @@ table_canvas_size_allocate (GtkWidget *widget,
width = alloc->width;
g_value_set_double (val, width);
- g_object_get (e_table->canvas_vbox,
- "height", &height,
- NULL);
+ g_object_get (
+ e_table->canvas_vbox,
+ "height", &height,
+ NULL);
height = MAX ((gint) height, alloc->height);
- g_object_set (e_table->canvas_vbox,
- "width", width,
- NULL);
+ g_object_set (
+ e_table->canvas_vbox,
+ "width", width,
+ NULL);
g_object_set_property (G_OBJECT (e_table->header), "width", val);
g_free (val);
if (e_table->reflow_idle_id)
@@ -1065,12 +1073,13 @@ et_build_groups (ETable *et)
et->is_grouped = e_table_sort_info_grouping_get_count (et->sort_info) > 0;
- et->group = e_table_group_new (GNOME_CANVAS_GROUP (et->canvas_vbox),
- et->full_header,
- et->header,
- et->model,
- et->sort_info,
- 0);
+ et->group = e_table_group_new (
+ GNOME_CANVAS_GROUP (et->canvas_vbox),
+ et->full_header,
+ et->header,
+ et->model,
+ et->sort_info,
+ 0);
if (et->use_click_to_add_end)
e_canvas_vbox_add_item_start (
@@ -1549,18 +1558,21 @@ e_table_set_state_object (ETable *e_table,
e_table->sort_info = NULL;
if (e_table->sorter)
- g_object_set (e_table->sorter,
- "sort_info", e_table->sort_info,
- NULL);
+ g_object_set (
+ e_table->sorter,
+ "sort_info", e_table->sort_info,
+ NULL);
if (e_table->header_item)
- g_object_set (e_table->header_item,
- "ETableHeader", e_table->header,
- "sort_info", e_table->sort_info,
- NULL);
+ g_object_set (
+ e_table->header_item,
+ "ETableHeader", e_table->header,
+ "sort_info", e_table->sort_info,
+ NULL);
if (e_table->click_to_add)
- g_object_set (e_table->click_to_add,
- "header", e_table->header,
- NULL);
+ g_object_set (
+ e_table->click_to_add,
+ "header", e_table->header,
+ NULL);
e_table->need_rebuild = TRUE;
if (!e_table->rebuild_idle_id)
@@ -1746,7 +1758,8 @@ et_real_construct (ETable *e_table,
e_table->use_click_to_add = specification->click_to_add;
e_table->use_click_to_add_end = specification->click_to_add_end;
e_table->click_to_add_message = specification->click_to_add_message ?
- g_strdup (dgettext (e_table->domain,
+ g_strdup (
+ dgettext (e_table->domain,
specification->click_to_add_message)) : NULL;
e_table->alternating_row_colors = specification->alternating_row_colors;
e_table->horizontal_draw_grid = specification->horizontal_draw_grid;
@@ -1826,17 +1839,19 @@ et_real_construct (ETable *e_table,
if (!specification->no_headers) {
/* The header */
- gtk_table_attach (GTK_TABLE (e_table), GTK_WIDGET (e_table->header_canvas),
- 0, 1, 0 + row, 1 + row,
- GTK_FILL | GTK_EXPAND,
- GTK_FILL, 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (e_table), GTK_WIDGET (e_table->header_canvas),
+ 0, 1, 0 + row, 1 + row,
+ GTK_FILL | GTK_EXPAND,
+ GTK_FILL, 0, 0);
row++;
}
- gtk_table_attach (GTK_TABLE (e_table), GTK_WIDGET (e_table->table_canvas),
- 0, 1, 0 + row, 1 + row,
- GTK_FILL | GTK_EXPAND,
- GTK_FILL | GTK_EXPAND,
- 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (e_table), GTK_WIDGET (e_table->table_canvas),
+ 0, 1, 0 + row, 1 + row,
+ GTK_FILL | GTK_EXPAND,
+ GTK_FILL | GTK_EXPAND,
+ 0, 0);
g_object_unref (ete);
@@ -2057,9 +2072,10 @@ e_table_set_cursor_row (ETable *e_table,
g_return_if_fail (E_IS_TABLE (e_table));
g_return_if_fail (row >= 0);
- g_object_set (e_table->selection,
- "cursor_row", row,
- NULL);
+ g_object_set (
+ e_table->selection,
+ "cursor_row", row,
+ NULL);
}
/**
@@ -2077,9 +2093,10 @@ e_table_get_cursor_row (ETable *e_table)
gint row;
g_return_val_if_fail (E_IS_TABLE (e_table), -1);
- g_object_get (e_table->selection,
- "cursor_row", &row,
- NULL);
+ g_object_get (
+ e_table->selection,
+ "cursor_row", &row,
+ NULL);
return row;
}
@@ -2686,10 +2703,11 @@ e_table_drag_get_data (ETable *table,
{
g_return_if_fail (E_IS_TABLE (table));
- gtk_drag_get_data (GTK_WIDGET (table),
- context,
- target,
- time);
+ gtk_drag_get_data (
+ GTK_WIDGET (table),
+ context,
+ target,
+ time);
}
/**
@@ -2740,12 +2758,13 @@ e_table_drag_highlight (ETable *table,
"outline_color_gdk", &style->fg[GTK_STATE_NORMAL],
NULL);
}
- gnome_canvas_item_set (table->drop_highlight,
- "x1", (gdouble) x,
- "x2", (gdouble) x + width - 1,
- "y1", (gdouble) y,
- "y2", (gdouble) y + height - 1,
- NULL);
+ gnome_canvas_item_set (
+ table->drop_highlight,
+ "x1", (gdouble) x,
+ "x2", (gdouble) x + width - 1,
+ "y1", (gdouble) y,
+ "y2", (gdouble) y + height - 1,
+ NULL);
} else {
if (table->drop_highlight) {
g_object_run_dispose (G_OBJECT (table->drop_highlight));
@@ -2825,19 +2844,21 @@ et_real_start_drag (ETable *table,
site = table->site;
site->state = 0;
- context = e_table_drag_begin (table, row, col,
- site->target_list,
- site->actions,
- 1, event);
+ context = e_table_drag_begin (
+ table, row, col,
+ site->target_list,
+ site->actions,
+ 1, event);
if (context) {
info = g_dataset_get_data (context, "gtk-info");
if (info && !info->icon_window) {
if (site->pixbuf)
- gtk_drag_set_icon_pixbuf (context,
- site->pixbuf,
- -2, -2);
+ gtk_drag_set_icon_pixbuf (
+ context,
+ site->pixbuf,
+ -2, -2);
else
gtk_drag_set_icon_default (context);
}
@@ -2872,10 +2893,11 @@ e_table_drag_source_set (ETable *table,
canvas = GTK_WIDGET (table->table_canvas);
site = table->site;
- gtk_widget_add_events (canvas,
- gtk_widget_get_events (canvas) |
- GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
- GDK_BUTTON_MOTION_MASK | GDK_STRUCTURE_MASK);
+ gtk_widget_add_events (
+ canvas,
+ gtk_widget_get_events (canvas) |
+ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
+ GDK_BUTTON_MOTION_MASK | GDK_STRUCTURE_MASK);
table->do_drag = TRUE;
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index ec7092433a..f779405d0e 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -89,7 +89,7 @@ check_children (ETreeMemory *memory,
{
ETreeMemoryPath *path = node;
if (!path->children_computed) {
- g_signal_emit (G_OBJECT (memory), signals[FILL_IN_CHILDREN], 0, node);
+ g_signal_emit (memory, signals[FILL_IN_CHILDREN], 0, node);
path->children_computed = TRUE;
}
}
@@ -101,7 +101,7 @@ e_tree_memory_path_depth (ETreeMemoryPath *path)
g_return_val_if_fail (path != NULL, -1);
- for ( path = path->parent; path; path = path->parent)
+ for (path = path->parent; path; path = path->parent)
depth++;
return depth;
}
@@ -392,14 +392,15 @@ e_tree_memory_class_init (ETreeMemoryClass *class)
class->fill_in_children = NULL;
- signals[FILL_IN_CHILDREN] =
- g_signal_new ("fill_in_children",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeMemoryClass, fill_in_children),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
+ signals[FILL_IN_CHILDREN] = g_signal_new (
+ "fill_in_children",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeMemoryClass, fill_in_children),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
}
static void
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 9280f3c302..944572dfb4 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -66,95 +66,106 @@ e_tree_model_class_init (ETreeModelClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
- signals[PRE_CHANGE] =
- g_signal_new ("pre_change",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeModelClass, pre_change),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- signals[NO_CHANGE] =
- g_signal_new ("no_change",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeModelClass, no_change),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- signals[REBUILT] =
- g_signal_new ("rebuilt",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeModelClass, rebuilt),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- signals[NODE_CHANGED] =
- g_signal_new ("node_changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeModelClass, node_changed),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- signals[NODE_DATA_CHANGED] =
- g_signal_new ("node_data_changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeModelClass, node_data_changed),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- signals[NODE_COL_CHANGED] =
- g_signal_new ("node_col_changed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeModelClass, node_col_changed),
- (GSignalAccumulator) NULL, NULL,
- e_marshal_VOID__POINTER_INT,
- G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_INT);
-
- signals[NODE_INSERTED] =
- g_signal_new ("node_inserted",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeModelClass, node_inserted),
- (GSignalAccumulator) NULL, NULL,
- e_marshal_VOID__POINTER_POINTER,
- G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
-
- signals[NODE_REMOVED] =
- g_signal_new ("node_removed",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeModelClass, node_removed),
- (GSignalAccumulator) NULL, NULL,
- e_marshal_VOID__POINTER_POINTER_INT,
- G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_INT);
-
- signals[NODE_DELETED] =
- g_signal_new ("node_deleted",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeModelClass, node_deleted),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- signals[NODE_REQUEST_COLLAPSE] =
- g_signal_new ("node_request_collapse",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeModelClass, node_request_collapse),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
+ signals[PRE_CHANGE] = g_signal_new (
+ "pre_change",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, pre_change),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ signals[NO_CHANGE] = g_signal_new (
+ "no_change",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, no_change),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ signals[REBUILT] = g_signal_new (
+ "rebuilt",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, rebuilt),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ signals[NODE_CHANGED] = g_signal_new (
+ "node_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, node_changed),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
+
+ signals[NODE_DATA_CHANGED] = g_signal_new (
+ "node_data_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, node_data_changed),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
+
+ signals[NODE_COL_CHANGED] = g_signal_new (
+ "node_col_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, node_col_changed),
+ (GSignalAccumulator) NULL, NULL,
+ e_marshal_VOID__POINTER_INT,
+ G_TYPE_NONE, 2,
+ G_TYPE_POINTER,
+ G_TYPE_INT);
+
+ signals[NODE_INSERTED] = g_signal_new (
+ "node_inserted",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, node_inserted),
+ (GSignalAccumulator) NULL, NULL,
+ e_marshal_VOID__POINTER_POINTER,
+ G_TYPE_NONE, 2,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER);
+
+ signals[NODE_REMOVED] = g_signal_new (
+ "node_removed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, node_removed),
+ (GSignalAccumulator) NULL, NULL,
+ e_marshal_VOID__POINTER_POINTER_INT,
+ G_TYPE_NONE, 3,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER,
+ G_TYPE_INT);
+
+ signals[NODE_DELETED] = g_signal_new (
+ "node_deleted",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, node_deleted),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
+
+ signals[NODE_REQUEST_COLLAPSE] = g_signal_new (
+ "node_request_collapse",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeModelClass, node_request_collapse),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
class->get_root = NULL;
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index e88deb469b..0b8f1c4447 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -512,11 +512,12 @@ resort_node (ETreeSorted *ets,
if (needs_regen)
regenerate_children (ets, path);
d (g_print ("Regened sort of node %p\n", path));
- e_table_sorting_utils_tree_sort (E_TREE_MODEL (ets),
- ets->priv->sort_info,
- ets->priv->full_header,
- (ETreePath *) path->children,
- path->num_children);
+ e_table_sorting_utils_tree_sort (
+ E_TREE_MODEL (ets),
+ ets->priv->sort_info,
+ ets->priv->full_header,
+ (ETreePath *) path->children,
+ path->num_children);
d (g_print ("Renumbering sort of node %p\n", path));
for (i = 0; i < path->num_children; i++) {
path->children[i]->position = i;
@@ -1258,14 +1259,15 @@ e_tree_sorted_class_init (ETreeSortedClass *class)
tree_model_class->value_is_empty = ets_value_is_empty;
tree_model_class->value_to_string = ets_value_to_string;
- signals[NODE_RESORTED] =
- g_signal_new ("node_resorted",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeSortedClass, node_resorted),
- (GSignalAccumulator) NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
+ signals[NODE_RESORTED] = g_signal_new (
+ "node_resorted",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeSortedClass, node_resorted),
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
}
static void
@@ -1393,7 +1395,7 @@ e_tree_sorted_node_resorted (ETreeSorted *sorted,
g_return_if_fail (sorted != NULL);
g_return_if_fail (E_IS_TREE_SORTED (sorted));
- g_signal_emit (G_OBJECT (sorted), signals[NODE_RESORTED], 0, node);
+ g_signal_emit (sorted, signals[NODE_RESORTED], 0, node);
}
void
@@ -1405,8 +1407,9 @@ e_tree_sorted_set_sort_info (ETreeSorted *ets,
if (ets->priv->sort_info) {
if (ets->priv->sort_info_changed_id != 0)
- g_signal_handler_disconnect (G_OBJECT (ets->priv->sort_info),
- ets->priv->sort_info_changed_id);
+ g_signal_handler_disconnect (
+ ets->priv->sort_info,
+ ets->priv->sort_info_changed_id);
ets->priv->sort_info_changed_id = 0;
g_object_unref (ets->priv->sort_info);
}
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 4a668d1ba3..c610039c83 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -779,14 +779,15 @@ etta_class_init (ETreeTableAdapterClass *class)
class->sorting_changed = NULL;
- signals[SORTING_CHANGED] =
- g_signal_new ("sorting_changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeTableAdapterClass, sorting_changed),
- NULL, NULL,
- e_marshal_BOOLEAN__NONE,
- G_TYPE_BOOLEAN, 0, G_TYPE_NONE);
+ signals[SORTING_CHANGED] = g_signal_new (
+ "sorting_changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeTableAdapterClass, sorting_changed),
+ NULL, NULL,
+ e_marshal_BOOLEAN__NONE,
+ G_TYPE_BOOLEAN, 0,
+ G_TYPE_NONE);
}
static void
@@ -1360,8 +1361,9 @@ e_tree_table_adapter_set_sort_info (ETreeTableAdapter *etta,
ETableSortInfo *sort_info)
{
if (etta->priv->sort_info) {
- g_signal_handler_disconnect (G_OBJECT (etta->priv->sort_info),
- etta->priv->sort_info_changed_id);
+ g_signal_handler_disconnect (
+ etta->priv->sort_info,
+ etta->priv->sort_info_changed_id);
g_object_unref (etta->priv->sort_info);
}
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index a25ef8cac4..3f3351d840 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -266,17 +266,21 @@ static void
et_disconnect_from_etta (ETree *et)
{
if (et->priv->table_model_change_id != 0)
- g_signal_handler_disconnect (G_OBJECT (et->priv->etta),
- et->priv->table_model_change_id);
+ g_signal_handler_disconnect (
+ et->priv->etta,
+ et->priv->table_model_change_id);
if (et->priv->table_row_change_id != 0)
- g_signal_handler_disconnect (G_OBJECT (et->priv->etta),
- et->priv->table_row_change_id);
+ g_signal_handler_disconnect (
+ et->priv->etta,
+ et->priv->table_row_change_id);
if (et->priv->table_cell_change_id != 0)
- g_signal_handler_disconnect (G_OBJECT (et->priv->etta),
- et->priv->table_cell_change_id);
+ g_signal_handler_disconnect (
+ et->priv->etta,
+ et->priv->table_cell_change_id);
if (et->priv->table_rows_delete_id != 0)
- g_signal_handler_disconnect (G_OBJECT (et->priv->etta),
- et->priv->table_rows_delete_id);
+ g_signal_handler_disconnect (
+ et->priv->etta,
+ et->priv->table_rows_delete_id);
et->priv->table_model_change_id = 0;
et->priv->table_row_change_id = 0;
@@ -295,10 +299,11 @@ current_search_col (ETree *et)
{
if (!et->priv->search_col_set) {
et->priv->current_search_col =
- e_table_util_calculate_current_search_col (et->priv->header,
- et->priv->full_header,
- et->priv->sort_info,
- et->priv->always_search);
+ e_table_util_calculate_current_search_col (
+ et->priv->header,
+ et->priv->full_header,
+ et->priv->sort_info,
+ et->priv->always_search);
et->priv->search_col_set = TRUE;
}
@@ -311,7 +316,7 @@ e_tree_state_change (ETree *et)
if (et->priv->state_change_freeze)
et->priv->state_changed = TRUE;
else
- g_signal_emit (G_OBJECT (et), et_signals[STATE_CHANGE], 0);
+ g_signal_emit (et, et_signals[STATE_CHANGE], 0);
}
static void
@@ -336,18 +341,22 @@ disconnect_header (ETree *e_tree)
return;
if (e_tree->priv->structure_change_id)
- g_signal_handler_disconnect (G_OBJECT (e_tree->priv->header),
- e_tree->priv->structure_change_id);
+ g_signal_handler_disconnect (
+ e_tree->priv->header,
+ e_tree->priv->structure_change_id);
if (e_tree->priv->expansion_change_id)
- g_signal_handler_disconnect (G_OBJECT (e_tree->priv->header),
- e_tree->priv->expansion_change_id);
+ g_signal_handler_disconnect (
+ e_tree->priv->header,
+ e_tree->priv->expansion_change_id);
if (e_tree->priv->sort_info) {
if (e_tree->priv->sort_info_change_id)
- g_signal_handler_disconnect (G_OBJECT (e_tree->priv->sort_info),
- e_tree->priv->sort_info_change_id);
+ g_signal_handler_disconnect (
+ e_tree->priv->sort_info,
+ e_tree->priv->sort_info_change_id);
if (e_tree->priv->group_info_change_id)
- g_signal_handler_disconnect (G_OBJECT (e_tree->priv->sort_info),
- e_tree->priv->group_info_change_id);
+ g_signal_handler_disconnect (
+ e_tree->priv->sort_info,
+ e_tree->priv->group_info_change_id);
g_object_unref (e_tree->priv->sort_info);
}
@@ -847,14 +856,16 @@ tree_canvas_size_allocate (GtkWidget *widget,
width = alloc->width;
g_value_set_double (val, width);
- g_object_get (e_tree->priv->item,
- "height", &height,
- NULL);
+ g_object_get (
+ e_tree->priv->item,
+ "height", &height,
+ NULL);
height = MAX ((gint) height, alloc->height);
- g_object_set (e_tree->priv->item,
- "width", width,
- NULL);
+ g_object_set (
+ e_tree->priv->item,
+ "width", width,
+ NULL);
g_object_set_property (G_OBJECT (e_tree->priv->header), "width", val);
g_free (val);
@@ -1051,9 +1062,10 @@ item_key_press (ETableItem *eti,
e_table_search_input_character (et->priv->search, key->keyval);
}
path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
- g_signal_emit (et,
- et_signals[KEY_PRESS], 0,
- row, path, col, event, &return_val);
+ g_signal_emit (
+ et,
+ et_signals[KEY_PRESS], 0,
+ row, path, col, event, &return_val);
break;
}
return return_val;
@@ -1155,9 +1167,10 @@ white_item_event (GnomeCanvasItem *white_item,
ETree *e_tree)
{
gboolean return_val = 0;
- g_signal_emit (e_tree,
- et_signals[WHITE_SPACE_EVENT], 0,
- event, &return_val);
+ g_signal_emit (
+ e_tree,
+ et_signals[WHITE_SPACE_EVENT], 0,
+ event, &return_val);
return return_val;
}
@@ -1327,15 +1340,17 @@ e_tree_set_state_object (ETree *e_tree,
g_free (val);
if (e_tree->priv->header_item)
- g_object_set (e_tree->priv->header_item,
- "ETableHeader", e_tree->priv->header,
- "sort_info", e_tree->priv->sort_info,
- NULL);
+ g_object_set (
+ e_tree->priv->header_item,
+ "ETableHeader", e_tree->priv->header,
+ "sort_info", e_tree->priv->sort_info,
+ NULL);
if (e_tree->priv->item)
- g_object_set (e_tree->priv->item,
- "ETableHeader", e_tree->priv->header,
- NULL);
+ g_object_set (
+ e_tree->priv->item,
+ "ETableHeader", e_tree->priv->header,
+ NULL);
if (e_tree->priv->etta)
e_tree_table_adapter_set_sort_info (
@@ -1607,17 +1622,18 @@ et_real_construct (ETree *e_tree,
e_tree->priv->sorter = e_sorter_new ();
- g_object_set (e_tree->priv->selection,
- "sorter", e_tree->priv->sorter,
+ 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,
+ "model", e_tree->priv->model,
+ "etta", e_tree->priv->etta,
#else
- "model", e_tree->priv->etta,
+ "model", e_tree->priv->etta,
#endif
- "selection_mode", specification->selection_mode,
- "cursor_mode", specification->cursor_mode,
- NULL);
+ "selection_mode", specification->selection_mode,
+ "cursor_mode", specification->cursor_mode,
+ NULL);
g_signal_connect (
e_tree->priv->selection, "selection_changed",
@@ -1913,9 +1929,10 @@ e_tree_set_cursor (ETree *e_tree,
if (row == -1)
return;
- g_object_set (e_tree->priv->selection,
- "cursor_row", row,
- NULL);
+ g_object_set (
+ e_tree->priv->selection,
+ "cursor_row", row,
+ NULL);
#endif
}
@@ -1930,9 +1947,10 @@ e_tree_get_cursor (ETree *e_tree)
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);
+ g_object_get (
+ e_tree->priv->selection,
+ "cursor_row", &row,
+ NULL);
if (row == -1)
return NULL;
@@ -2622,10 +2640,11 @@ e_tree_drag_get_data (ETree *tree,
g_return_if_fail (tree != NULL);
g_return_if_fail (E_IS_TREE (tree));
- gtk_drag_get_data (GTK_WIDGET (tree),
- context,
- target,
- time);
+ gtk_drag_get_data (
+ GTK_WIDGET (tree),
+ context,
+ target,
+ time);
}
@@ -2712,11 +2731,12 @@ void e_tree_drag_dest_set (ETree *tree,
g_return_if_fail (tree != NULL);
g_return_if_fail (E_IS_TREE (tree));
- gtk_drag_dest_set (GTK_WIDGET (tree),
- flags,
- targets,
- n_targets,
- actions);
+ gtk_drag_dest_set (
+ GTK_WIDGET (tree),
+ flags,
+ targets,
+ n_targets,
+ actions);
}
void e_tree_drag_dest_set_proxy (ETree *tree,
@@ -2727,10 +2747,11 @@ void e_tree_drag_dest_set_proxy (ETree *tree,
g_return_if_fail (tree != NULL);
g_return_if_fail (E_IS_TREE (tree));
- gtk_drag_dest_set_proxy (GTK_WIDGET (tree),
- proxy_window,
- protocol,
- use_coordinates);
+ gtk_drag_dest_set_proxy (
+ GTK_WIDGET (tree),
+ proxy_window,
+ protocol,
+ use_coordinates);
}
/*
@@ -2764,19 +2785,21 @@ et_real_start_drag (ETree *tree,
site = tree->priv->site;
site->state = 0;
- context = e_tree_drag_begin (tree, row, col,
- site->target_list,
- site->actions,
- 1, event);
+ context = e_tree_drag_begin (
+ tree, row, col,
+ site->target_list,
+ site->actions,
+ 1, event);
if (context) {
info = g_dataset_get_data (context, "gtk-info");
if (info && !info->icon_window) {
if (site->pixbuf)
- gtk_drag_set_icon_pixbuf (context,
- site->pixbuf,
- -2, -2);
+ gtk_drag_set_icon_pixbuf (
+ context,
+ site->pixbuf,
+ -2, -2);
else
gtk_drag_set_icon_default (context);
}
@@ -2804,10 +2827,11 @@ e_tree_drag_source_set (ETree *tree,
tree->priv->do_drag = TRUE;
- gtk_widget_add_events (canvas,
- gtk_widget_get_events (canvas) |
- GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
- GDK_BUTTON_MOTION_MASK | GDK_STRUCTURE_MASK);
+ gtk_widget_add_events (
+ canvas,
+ gtk_widget_get_events (canvas) |
+ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
+ GDK_BUTTON_MOTION_MASK | GDK_STRUCTURE_MASK);
if (site) {
if (site->target_list)
@@ -2868,11 +2892,12 @@ e_tree_drag_begin (ETree *tree,
tree->priv->drag_path = path;
tree->priv->drag_col = col;
- return gtk_drag_begin (GTK_WIDGET (tree->priv->table_canvas),
- targets,
- actions,
- button,
- event);
+ return gtk_drag_begin (
+ GTK_WIDGET (tree->priv->table_canvas),
+ targets,
+ actions,
+ button,
+ event);
}
/**
@@ -2994,12 +3019,13 @@ et_drag_begin (GtkWidget *widget,
{
et->priv->is_dragging = TRUE;
- g_signal_emit (et,
- et_signals[TREE_DRAG_BEGIN], 0,
- et->priv->drag_row,
- et->priv->drag_path,
- et->priv->drag_col,
- context);
+ g_signal_emit (
+ et,
+ et_signals[TREE_DRAG_BEGIN], 0,
+ et->priv->drag_row,
+ et->priv->drag_path,
+ et->priv->drag_col,
+ context);
}
static void
@@ -3009,12 +3035,13 @@ et_drag_end (GtkWidget *widget,
{
et->priv->is_dragging = FALSE;
- g_signal_emit (et,
- et_signals[TREE_DRAG_END], 0,
- et->priv->drag_row,
- et->priv->drag_path,
- et->priv->drag_col,
- context);
+ g_signal_emit (
+ et,
+ et_signals[TREE_DRAG_END], 0,
+ et->priv->drag_row,
+ et->priv->drag_path,
+ et->priv->drag_col,
+ context);
}
static void
@@ -3025,15 +3052,16 @@ et_drag_data_get (GtkWidget *widget,
guint time,
ETree *et)
{
- g_signal_emit (et,
- et_signals[TREE_DRAG_DATA_GET], 0,
- et->priv->drag_row,
- et->priv->drag_path,
- et->priv->drag_col,
- context,
- selection_data,
- info,
- time);
+ g_signal_emit (
+ et,
+ et_signals[TREE_DRAG_DATA_GET], 0,
+ et->priv->drag_row,
+ et->priv->drag_path,
+ et->priv->drag_col,
+ context,
+ selection_data,
+ info,
+ time);
}
static void
@@ -3041,12 +3069,13 @@ et_drag_data_delete (GtkWidget *widget,
GdkDragContext *context,
ETree *et)
{
- g_signal_emit (et,
- et_signals[TREE_DRAG_DATA_DELETE], 0,
- et->priv->drag_row,
- et->priv->drag_path,
- et->priv->drag_col,
- context);
+ g_signal_emit (
+ et,
+ et_signals[TREE_DRAG_DATA_DELETE], 0,
+ et->priv->drag_row,
+ et->priv->drag_path,
+ et->priv->drag_col,
+ context);
}
static gboolean
@@ -3060,19 +3089,16 @@ do_drag_motion (ETree *et,
gint row, col;
ETreePath path;
- e_tree_get_cell_at (et,
- x,
- y,
- &row,
- &col);
+ e_tree_get_cell_at (et, x, y, &row, &col);
+
if (row != et->priv->drop_row && col != et->priv->drop_col) {
- g_signal_emit (et,
- et_signals[TREE_DRAG_LEAVE], 0,
- et->priv->drop_row,
- et->priv->drop_path,
- et->priv->drop_col,
- context,
- time);
+ g_signal_emit (
+ et, et_signals[TREE_DRAG_LEAVE], 0,
+ et->priv->drop_row,
+ et->priv->drop_path,
+ et->priv->drop_col,
+ context,
+ time);
}
path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
@@ -3080,16 +3106,15 @@ do_drag_motion (ETree *et,
et->priv->drop_row = row;
et->priv->drop_path = path;
et->priv->drop_col = col;
- g_signal_emit (et,
- et_signals[TREE_DRAG_MOTION], 0,
- et->priv->drop_row,
- et->priv->drop_path,
- et->priv->drop_col,
- context,
- x,
- y,
- time,
- &ret_val);
+ g_signal_emit (
+ et, et_signals[TREE_DRAG_MOTION], 0,
+ et->priv->drop_row,
+ et->priv->drop_path,
+ et->priv->drop_col,
+ context,
+ x, y,
+ time,
+ &ret_val);
return ret_val;
}
@@ -3185,11 +3210,7 @@ hover_timeout (gpointer data)
gint row, col;
ETreePath path;
- e_tree_get_cell_at (et,
- x,
- y,
- &row,
- &col);
+ e_tree_get_cell_at (et, x, y, &row, &col);
path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
if (path && e_tree_model_node_is_expandable (et->priv->model, path)) {
@@ -3310,13 +3331,14 @@ et_drag_leave (GtkWidget *widget,
guint time,
ETree *et)
{
- g_signal_emit (et,
- et_signals[TREE_DRAG_LEAVE], 0,
- et->priv->drop_row,
- et->priv->drop_path,
- et->priv->drop_col,
- context,
- time);
+ g_signal_emit (
+ et,
+ et_signals[TREE_DRAG_LEAVE], 0,
+ et->priv->drop_row,
+ et->priv->drop_path,
+ et->priv->drop_col,
+ context,
+ time);
et->priv->drop_row = -1;
et->priv->drop_col = -1;
@@ -3383,46 +3405,44 @@ et_drag_drop (GtkWidget *widget,
gboolean ret_val = FALSE;
gint row, col;
ETreePath path;
- e_tree_get_cell_at (et,
- x,
- y,
- &row,
- &col);
+
+ e_tree_get_cell_at (et, x, y, &row, &col);
+
path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
if (row != et->priv->drop_row && col != et->priv->drop_row) {
- g_signal_emit (et,
- et_signals[TREE_DRAG_LEAVE], 0,
- et->priv->drop_row,
- et->priv->drop_path,
- et->priv->drop_col,
- context,
- time);
- g_signal_emit (et,
- et_signals[TREE_DRAG_MOTION], 0,
- row,
- path,
- col,
- context,
- x,
- y,
- time,
- &ret_val);
+ g_signal_emit (
+ et, et_signals[TREE_DRAG_LEAVE], 0,
+ et->priv->drop_row,
+ et->priv->drop_path,
+ et->priv->drop_col,
+ context,
+ time);
+ g_signal_emit (
+ et, et_signals[TREE_DRAG_MOTION], 0,
+ row,
+ path,
+ col,
+ context,
+ x,
+ y,
+ time,
+ &ret_val);
}
et->priv->drop_row = row;
et->priv->drop_path = path;
et->priv->drop_col = col;
- g_signal_emit (et,
- et_signals[TREE_DRAG_DROP], 0,
- et->priv->drop_row,
- et->priv->drop_path,
- et->priv->drop_col,
- context,
- x,
- y,
- time,
- &ret_val);
+ g_signal_emit (
+ et, et_signals[TREE_DRAG_DROP], 0,
+ et->priv->drop_row,
+ et->priv->drop_path,
+ et->priv->drop_col,
+ context,
+ x,
+ y,
+ time,
+ &ret_val);
et->priv->drop_row = -1;
et->priv->drop_path = NULL;
@@ -3446,23 +3466,21 @@ et_drag_data_received (GtkWidget *widget,
{
gint row, col;
ETreePath path;
- e_tree_get_cell_at (et,
- x,
- y,
- &row,
- &col);
+
+ e_tree_get_cell_at (et, x, y, &row, &col);
+
path = e_tree_table_adapter_node_at_row (et->priv->etta, row);
- g_signal_emit (et,
- et_signals[TREE_DRAG_DATA_RECEIVED], 0,
- row,
- path,
- col,
- context,
- x,
- y,
- selection_data,
- info,
- time);
+ g_signal_emit (
+ et, et_signals[TREE_DRAG_DATA_RECEIVED], 0,
+ row,
+ path,
+ col,
+ context,
+ x,
+ y,
+ selection_data,
+ info,
+ time);
}
static void
@@ -3486,284 +3504,318 @@ e_tree_class_init (ETreeClass *class)
class->start_drag = et_real_start_drag;
- et_signals[CURSOR_CHANGE] =
- g_signal_new ("cursor_change",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, cursor_change),
- NULL, NULL,
- e_marshal_NONE__INT_POINTER,
- G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_POINTER);
-
- et_signals[CURSOR_ACTIVATED] =
- g_signal_new ("cursor_activated",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, cursor_activated),
- NULL, NULL,
- e_marshal_NONE__INT_POINTER,
- G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_POINTER);
-
- et_signals[SELECTION_CHANGE] =
- g_signal_new ("selection_change",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, selection_change),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- et_signals[DOUBLE_CLICK] =
- g_signal_new ("double_click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, double_click),
- NULL, NULL,
- e_marshal_NONE__INT_POINTER_INT_BOXED,
- G_TYPE_NONE, 4,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- et_signals[RIGHT_CLICK] =
- g_signal_new ("right_click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, right_click),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_POINTER_INT_BOXED,
- G_TYPE_BOOLEAN, 4,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- et_signals[CLICK] =
- g_signal_new ("click",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, click),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_POINTER_INT_BOXED,
- G_TYPE_BOOLEAN, 4,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- et_signals[KEY_PRESS] =
- g_signal_new ("key_press",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, key_press),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__INT_POINTER_INT_BOXED,
- G_TYPE_BOOLEAN, 4,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- et_signals[START_DRAG] =
- g_signal_new ("start_drag",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, start_drag),
- NULL, NULL,
- e_marshal_NONE__INT_POINTER_INT_BOXED,
- G_TYPE_NONE, 4,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- et_signals[STATE_CHANGE] =
- g_signal_new ("state_change",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, state_change),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- et_signals[WHITE_SPACE_EVENT] =
- g_signal_new ("white_space_event",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, white_space_event),
- g_signal_accumulator_true_handled, NULL,
- e_marshal_BOOLEAN__POINTER,
- G_TYPE_BOOLEAN, 1,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- et_signals[TREE_DRAG_BEGIN] =
- g_signal_new ("tree_drag_begin",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, tree_drag_begin),
- NULL, NULL,
- e_marshal_NONE__INT_POINTER_INT_BOXED,
- G_TYPE_NONE, 4,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_DRAG_CONTEXT);
- et_signals[TREE_DRAG_END] =
- g_signal_new ("tree_drag_end",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, tree_drag_end),
- NULL, NULL,
- e_marshal_NONE__INT_POINTER_INT_BOXED,
- G_TYPE_NONE, 4,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_DRAG_CONTEXT);
- et_signals[TREE_DRAG_DATA_GET] =
- g_signal_new ("tree_drag_data_get",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, tree_drag_data_get),
- NULL, NULL,
- e_marshal_NONE__INT_POINTER_INT_OBJECT_BOXED_UINT_UINT,
- G_TYPE_NONE, 7,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_DRAG_CONTEXT,
- GTK_TYPE_SELECTION_DATA | G_SIGNAL_TYPE_STATIC_SCOPE,
- G_TYPE_UINT,
- G_TYPE_UINT);
- et_signals[TREE_DRAG_DATA_DELETE] =
- g_signal_new ("tree_drag_data_delete",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, tree_drag_data_delete),
- NULL, NULL,
- e_marshal_NONE__INT_POINTER_INT_OBJECT,
- G_TYPE_NONE, 4,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_DRAG_CONTEXT);
-
- et_signals[TREE_DRAG_LEAVE] =
- g_signal_new ("tree_drag_leave",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, tree_drag_leave),
- NULL, NULL,
- e_marshal_NONE__INT_POINTER_INT_OBJECT_UINT,
- G_TYPE_NONE, 5,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_DRAG_CONTEXT,
- G_TYPE_UINT);
- et_signals[TREE_DRAG_MOTION] =
- g_signal_new ("tree_drag_motion",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, tree_drag_motion),
- NULL, NULL,
- e_marshal_BOOLEAN__INT_POINTER_INT_OBJECT_INT_INT_UINT,
- G_TYPE_BOOLEAN, 7,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_DRAG_CONTEXT,
- G_TYPE_INT,
- G_TYPE_INT,
- G_TYPE_UINT);
- et_signals[TREE_DRAG_DROP] =
- g_signal_new ("tree_drag_drop",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, tree_drag_drop),
- NULL, NULL,
- e_marshal_BOOLEAN__INT_POINTER_INT_OBJECT_INT_INT_UINT,
- G_TYPE_BOOLEAN, 7,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_DRAG_CONTEXT,
- G_TYPE_INT,
- G_TYPE_INT,
- G_TYPE_UINT);
- et_signals[TREE_DRAG_DATA_RECEIVED] =
- g_signal_new ("tree_drag_data_received",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETreeClass, tree_drag_data_received),
- NULL, NULL,
- e_marshal_NONE__INT_POINTER_INT_OBJECT_INT_INT_BOXED_UINT_UINT,
- G_TYPE_NONE, 9,
- G_TYPE_INT,
- G_TYPE_POINTER,
- G_TYPE_INT,
- GDK_TYPE_DRAG_CONTEXT,
- G_TYPE_INT,
- G_TYPE_INT,
- GTK_TYPE_SELECTION_DATA,
- G_TYPE_UINT,
- G_TYPE_UINT);
-
- g_object_class_install_property (object_class, PROP_LENGTH_THRESHOLD,
- g_param_spec_int ("length_threshold",
- "Length Threshold",
- "Length Threshold",
- 0, G_MAXINT, 0,
- G_PARAM_WRITABLE));
- g_object_class_install_property (object_class, PROP_HORIZONTAL_DRAW_GRID,
- g_param_spec_boolean ("horizontal_draw_grid",
- "Horizontal Draw Grid",
- "Horizontal Draw Grid",
- FALSE,
- G_PARAM_WRITABLE));
- g_object_class_install_property (object_class, PROP_VERTICAL_DRAW_GRID,
- g_param_spec_boolean ("vertical_draw_grid",
- "Vertical Draw Grid",
- "Vertical Draw Grid",
- FALSE,
- G_PARAM_WRITABLE));
- g_object_class_install_property (object_class, PROP_DRAW_FOCUS,
- g_param_spec_boolean ("drawfocus",
- "Draw focus",
- "Draw focus",
- FALSE,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class, PROP_ETTA,
- g_param_spec_object ("ETreeTableAdapter",
- "ETree table adapter",
- "ETree table adapter",
- E_TYPE_TREE_TABLE_ADAPTER,
- G_PARAM_READABLE));
-
- g_object_class_install_property (object_class, PROP_UNIFORM_ROW_HEIGHT,
- g_param_spec_boolean ("uniform_row_height",
- "Uniform row height",
- "Uniform row height",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_ALWAYS_SEARCH,
- g_param_spec_boolean ("always_search",
- "Always search",
- "Always search",
- FALSE,
- G_PARAM_READWRITE));
-
- gtk_widget_class_install_style_property (widget_class,
- g_param_spec_int ("expander_size",
- "Expander Size",
- "Size of the expander arrow",
- 0,
- G_MAXINT,
- 10,
- G_PARAM_READABLE));
+ et_signals[CURSOR_CHANGE] = g_signal_new (
+ "cursor_change",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, cursor_change),
+ NULL, NULL,
+ e_marshal_NONE__INT_POINTER,
+ G_TYPE_NONE, 2,
+ G_TYPE_INT,
+ G_TYPE_POINTER);
+
+ et_signals[CURSOR_ACTIVATED] = g_signal_new (
+ "cursor_activated",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, cursor_activated),
+ NULL, NULL,
+ e_marshal_NONE__INT_POINTER,
+ G_TYPE_NONE, 2,
+ G_TYPE_INT,
+ G_TYPE_POINTER);
+
+ et_signals[SELECTION_CHANGE] = g_signal_new (
+ "selection_change",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, selection_change),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ et_signals[DOUBLE_CLICK] = g_signal_new (
+ "double_click",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, double_click),
+ NULL, NULL,
+ e_marshal_NONE__INT_POINTER_INT_BOXED,
+ G_TYPE_NONE, 4,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ et_signals[RIGHT_CLICK] = g_signal_new (
+ "right_click",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, right_click),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_POINTER_INT_BOXED,
+ G_TYPE_BOOLEAN, 4,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ et_signals[CLICK] = g_signal_new (
+ "click",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, click),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_POINTER_INT_BOXED,
+ G_TYPE_BOOLEAN, 4,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ et_signals[KEY_PRESS] = g_signal_new (
+ "key_press",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, key_press),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__INT_POINTER_INT_BOXED,
+ G_TYPE_BOOLEAN, 4,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ et_signals[START_DRAG] = g_signal_new (
+ "start_drag",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, start_drag),
+ NULL, NULL,
+ e_marshal_NONE__INT_POINTER_INT_BOXED,
+ G_TYPE_NONE, 4,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ et_signals[STATE_CHANGE] = g_signal_new (
+ "state_change",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, state_change),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ et_signals[WHITE_SPACE_EVENT] = g_signal_new (
+ "white_space_event",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, white_space_event),
+ g_signal_accumulator_true_handled, NULL,
+ e_marshal_BOOLEAN__POINTER,
+ G_TYPE_BOOLEAN, 1,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ et_signals[TREE_DRAG_BEGIN] = g_signal_new (
+ "tree_drag_begin",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, tree_drag_begin),
+ NULL, NULL,
+ e_marshal_NONE__INT_POINTER_INT_BOXED,
+ G_TYPE_NONE, 4,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_DRAG_CONTEXT);
+
+ et_signals[TREE_DRAG_END] = g_signal_new (
+ "tree_drag_end",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, tree_drag_end),
+ NULL, NULL,
+ e_marshal_NONE__INT_POINTER_INT_BOXED,
+ G_TYPE_NONE, 4,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_DRAG_CONTEXT);
+
+ et_signals[TREE_DRAG_DATA_GET] = g_signal_new (
+ "tree_drag_data_get",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, tree_drag_data_get),
+ NULL, NULL,
+ e_marshal_NONE__INT_POINTER_INT_OBJECT_BOXED_UINT_UINT,
+ G_TYPE_NONE, 7,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_DRAG_CONTEXT,
+ GTK_TYPE_SELECTION_DATA | G_SIGNAL_TYPE_STATIC_SCOPE,
+ G_TYPE_UINT,
+ G_TYPE_UINT);
+
+ et_signals[TREE_DRAG_DATA_DELETE] = g_signal_new (
+ "tree_drag_data_delete",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, tree_drag_data_delete),
+ NULL, NULL,
+ e_marshal_NONE__INT_POINTER_INT_OBJECT,
+ G_TYPE_NONE, 4,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_DRAG_CONTEXT);
+
+ et_signals[TREE_DRAG_LEAVE] = g_signal_new (
+ "tree_drag_leave",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, tree_drag_leave),
+ NULL, NULL,
+ e_marshal_NONE__INT_POINTER_INT_OBJECT_UINT,
+ G_TYPE_NONE, 5,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_DRAG_CONTEXT,
+ G_TYPE_UINT);
+
+ et_signals[TREE_DRAG_MOTION] = g_signal_new (
+ "tree_drag_motion",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, tree_drag_motion),
+ NULL, NULL,
+ e_marshal_BOOLEAN__INT_POINTER_INT_OBJECT_INT_INT_UINT,
+ G_TYPE_BOOLEAN, 7,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_DRAG_CONTEXT,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ G_TYPE_UINT);
+
+ et_signals[TREE_DRAG_DROP] = g_signal_new (
+ "tree_drag_drop",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, tree_drag_drop),
+ NULL, NULL,
+ e_marshal_BOOLEAN__INT_POINTER_INT_OBJECT_INT_INT_UINT,
+ G_TYPE_BOOLEAN, 7,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_DRAG_CONTEXT,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ G_TYPE_UINT);
+
+ et_signals[TREE_DRAG_DATA_RECEIVED] = g_signal_new (
+ "tree_drag_data_received",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETreeClass, tree_drag_data_received),
+ NULL, NULL,
+ e_marshal_NONE__INT_POINTER_INT_OBJECT_INT_INT_BOXED_UINT_UINT,
+ G_TYPE_NONE, 9,
+ G_TYPE_INT,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GDK_TYPE_DRAG_CONTEXT,
+ G_TYPE_INT,
+ G_TYPE_INT,
+ GTK_TYPE_SELECTION_DATA,
+ G_TYPE_UINT,
+ G_TYPE_UINT);
+
+ g_object_class_install_property (
+ object_class,
+ PROP_LENGTH_THRESHOLD,
+ g_param_spec_int (
+ "length_threshold",
+ "Length Threshold",
+ "Length Threshold",
+ 0, G_MAXINT, 0,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_HORIZONTAL_DRAW_GRID,
+ g_param_spec_boolean (
+ "horizontal_draw_grid",
+ "Horizontal Draw Grid",
+ "Horizontal Draw Grid",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_VERTICAL_DRAW_GRID,
+ g_param_spec_boolean (
+ "vertical_draw_grid",
+ "Vertical Draw Grid",
+ "Vertical Draw Grid",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_DRAW_FOCUS,
+ g_param_spec_boolean (
+ "drawfocus",
+ "Draw focus",
+ "Draw focus",
+ FALSE,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_ETTA,
+ g_param_spec_object (
+ "ETreeTableAdapter",
+ "ETree table adapter",
+ "ETree table adapter",
+ E_TYPE_TREE_TABLE_ADAPTER,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_UNIFORM_ROW_HEIGHT,
+ g_param_spec_boolean (
+ "uniform_row_height",
+ "Uniform row height",
+ "Uniform row height",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_ALWAYS_SEARCH,
+ g_param_spec_boolean (
+ "always_search",
+ "Always search",
+ "Always search",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ gtk_widget_class_install_style_property (
+ widget_class,
+ g_param_spec_int (
+ "expander_size",
+ "Expander Size",
+ "Size of the expander arrow",
+ 0, G_MAXINT, 10,
+ G_PARAM_READABLE));
gtk_widget_class_install_style_property (
widget_class,
diff --git a/widgets/table/gal-a11y-e-cell-popup.c b/widgets/table/gal-a11y-e-cell-popup.c
index b1232a6b84..1c97ee3198 100644
--- a/widgets/table/gal-a11y-e-cell-popup.c
+++ b/widgets/table/gal-a11y-e-cell-popup.c
@@ -100,31 +100,34 @@ gal_a11y_e_cell_popup_new (ETableItem *item,
child_view = popupcell->popup_cell_view->child_view;
if (child_view && child_view->ecell) {
- a11y = gal_a11y_e_cell_registry_get_object (NULL,
- item,
- child_view,
- parent,
- model_col,
- view_col,
- row);
+ a11y = gal_a11y_e_cell_registry_get_object (
+ NULL,
+ item,
+ child_view,
+ parent,
+ model_col,
+ view_col,
+ row);
} else {
a11y = g_object_new (GAL_A11Y_TYPE_E_CELL_POPUP, NULL);
- gal_a11y_e_cell_construct (a11y,
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
+ gal_a11y_e_cell_construct (
+ a11y,
+ item,
+ cell_view,
+ parent,
+ model_col,
+ view_col,
+ row);
}
g_return_val_if_fail (a11y != NULL, NULL);
cell = GAL_A11Y_E_CELL (a11y);
- gal_a11y_e_cell_add_action (cell,
- "popup",
- /* Translators: description of a "popup" action */
- _("popup a child"),
- "<Alt>Down", /* action keybinding */
- popup_cell_action);
+ gal_a11y_e_cell_add_action (
+ cell,
+ "popup",
+ /* Translators: description of a "popup" action */
+ _("popup a child"),
+ "<Alt>Down", /* action keybinding */
+ popup_cell_action);
a11y->role = ATK_ROLE_TABLE_CELL;
return a11y;
diff --git a/widgets/table/gal-a11y-e-cell-toggle.c b/widgets/table/gal-a11y-e-cell-toggle.c
index 046f3f52d1..33d9e4fd32 100644
--- a/widgets/table/gal-a11y-e-cell-toggle.c
+++ b/widgets/table/gal-a11y-e-cell-toggle.c
@@ -164,28 +164,31 @@ gal_a11y_e_cell_toggle_new (ETableItem *item,
toggle_cell = GAL_A11Y_E_CELL_TOGGLE (a11y);
a11y->role = ATK_ROLE_TABLE_CELL;
- gal_a11y_e_cell_construct (a11y,
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
-
- gal_a11y_e_cell_add_action (cell,
- "toggle",
- /* Translators: description of a "toggle" action */
- _("toggle the cell"),
- NULL, /* action keybinding */
- toggle_cell_action);
+ gal_a11y_e_cell_construct (
+ a11y,
+ item,
+ cell_view,
+ parent,
+ model_col,
+ view_col,
+ row);
+
+ gal_a11y_e_cell_add_action (
+ cell,
+ "toggle",
+ /* Translators: description of a "toggle" action */
+ _("toggle the cell"),
+ NULL, /* action keybinding */
+ toggle_cell_action);
toggle_cell->model_id = g_signal_connect (
item->table_model, "model_cell_changed",
(GCallback) model_change_cb, a11y);
value = GPOINTER_TO_INT (
- e_table_model_value_at (cell->cell_view->e_table_model,
- cell->model_col, cell->row));
+ e_table_model_value_at (
+ cell->cell_view->e_table_model,
+ cell->model_col, cell->row));
if (value)
gal_a11y_e_cell_add_state (cell, ATK_STATE_CHECKED, FALSE);
else
diff --git a/widgets/table/gal-a11y-e-cell-tree.c b/widgets/table/gal-a11y-e-cell-tree.c
index 32085fbfba..599b660ca5 100644
--- a/widgets/table/gal-a11y-e-cell-tree.c
+++ b/widgets/table/gal-a11y-e-cell-tree.c
@@ -94,8 +94,9 @@ ectr_subcell_weak_ref (GalA11yECellTree *a11y,
if (subcell_a11y && subcell_view && subcell_view->kill_view_cb_data)
subcell_view->kill_view_cb_data = g_list_remove (subcell_view->kill_view_cb_data, subcell_a11y);
- g_signal_handler_disconnect (GAL_A11Y_E_CELL (a11y)->item->table_model,
- a11y->model_row_changed_id);
+ g_signal_handler_disconnect (
+ GAL_A11Y_E_CELL (a11y)->item->table_model,
+ a11y->model_row_changed_id);
g_object_unref (a11y);
}
@@ -115,9 +116,8 @@ ectr_do_action_expand (AtkAction *action)
tree_table_adapter = e_table_model_value_at (table_model, -3, a11y->row);
if (e_tree_model_node_is_expandable (tree_model, node)) {
- e_tree_table_adapter_node_set_expanded (tree_table_adapter,
- node,
- TRUE);
+ e_tree_table_adapter_node_set_expanded (
+ tree_table_adapter, node, TRUE);
gal_a11y_e_cell_add_state (a11y, ATK_STATE_EXPANDED, TRUE);
}
}
@@ -138,9 +138,8 @@ ectr_do_action_collapse (AtkAction *action)
tree_table_adapter = e_table_model_value_at (table_model, -3, a11y->row);
if (e_tree_model_node_is_expandable (tree_model, node)) {
- e_tree_table_adapter_node_set_expanded (tree_table_adapter,
- node,
- FALSE);
+ e_tree_table_adapter_node_set_expanded (
+ tree_table_adapter, node, FALSE);
gal_a11y_e_cell_remove_state (a11y, ATK_STATE_EXPANDED, TRUE);
}
}
@@ -201,26 +200,29 @@ gal_a11y_e_cell_tree_new (ETableItem *item,
subcell_view = e_cell_tree_view_get_subcell_view (cell_view);
if (subcell_view->ecell) {
- subcell_a11y = gal_a11y_e_cell_registry_get_object (NULL,
- item,
- subcell_view,
- parent,
- model_col,
- view_col,
- row);
- gal_a11y_e_cell_add_action (GAL_A11Y_E_CELL (subcell_a11y),
- "expand",
- /* Translators: description of an "expand" action */
- _("expands the row in the ETree containing this cell"),
- NULL,
- (ACTION_FUNC) ectr_do_action_expand);
-
- gal_a11y_e_cell_add_action (GAL_A11Y_E_CELL (subcell_a11y),
- "collapse",
- /* Translators: description of a "collapse" action */
- _("collapses the row in the ETree containing this cell"),
- NULL,
- (ACTION_FUNC) ectr_do_action_collapse);
+ subcell_a11y = gal_a11y_e_cell_registry_get_object (
+ NULL,
+ item,
+ subcell_view,
+ parent,
+ model_col,
+ view_col,
+ row);
+ gal_a11y_e_cell_add_action (
+ GAL_A11Y_E_CELL (subcell_a11y),
+ "expand",
+ /* Translators: description of an "expand" action */
+ _("expands the row in the ETree containing this cell"),
+ NULL,
+ (ACTION_FUNC) ectr_do_action_expand);
+
+ gal_a11y_e_cell_add_action (
+ GAL_A11Y_E_CELL (subcell_a11y),
+ "collapse",
+ /* Translators: description of a "collapse" action */
+ _("collapses the row in the ETree containing this cell"),
+ NULL,
+ (ACTION_FUNC) ectr_do_action_collapse);
/* init AtkStates for the cell's a11y object */
node = e_table_model_value_at (item->table_model, -1, row);
@@ -239,13 +241,14 @@ gal_a11y_e_cell_tree_new (ETableItem *item,
* and it connects to some signals to determine whether a tree cell is
* expanded or collapsed */
a11y = g_object_new (gal_a11y_e_cell_tree_get_type (), NULL);
- gal_a11y_e_cell_construct (ATK_OBJECT (a11y),
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
+ gal_a11y_e_cell_construct (
+ ATK_OBJECT (a11y),
+ item,
+ cell_view,
+ parent,
+ model_col,
+ view_col,
+ row);
a11y->model_row_changed_id = g_signal_connect (
item->table_model, "model_row_changed",
G_CALLBACK (ectr_model_row_changed_cb), subcell_a11y);
diff --git a/widgets/table/gal-a11y-e-cell-vbox.c b/widgets/table/gal-a11y-e-cell-vbox.c
index d0b9d26036..d00547c877 100644
--- a/widgets/table/gal-a11y-e-cell-vbox.c
+++ b/widgets/table/gal-a11y-e-cell-vbox.c
@@ -80,7 +80,8 @@ ecv_ref_child (AtkObject *a11y,
subcell_view = ecvv->subcell_views[i];
/* FIXME Should the view column use a fake
* one or the same as its parent? */
- ret = gal_a11y_e_cell_registry_get_object (NULL,
+ ret = gal_a11y_e_cell_registry_get_object (
+ NULL,
gaec->item,
subcell_view,
a11y,
@@ -89,9 +90,10 @@ ecv_ref_child (AtkObject *a11y,
row);
gaev->a11y_subcells[i] = ret;
g_object_ref (ret);
- g_object_weak_ref (G_OBJECT (ret),
- (GWeakNotify) subcell_destroyed,
- ret);
+ g_object_weak_ref (
+ G_OBJECT (ret),
+ (GWeakNotify) subcell_destroyed,
+ ret);
} else {
ret = (AtkObject *) gaev->a11y_subcells[i];
if (ATK_IS_OBJECT (ret))
@@ -140,7 +142,7 @@ ecv_ref_accessible_at_point (AtkComponent *component,
subcell_height = e_cell_height (
ecvv->subcell_views[i], ecvv->model_cols[i],
gaec->view_col, gaec->row);
- if ( 0 <= y && y <= subcell_height) {
+ if (0 <= y && y <= subcell_height) {
return ecv_ref_child ((AtkObject *) component, i);
} else
y -= subcell_height;
diff --git a/widgets/table/gal-a11y-e-cell.c b/widgets/table/gal-a11y-e-cell.c
index 4a75c97ce4..d42aa6425f 100644
--- a/widgets/table/gal-a11y-e-cell.c
+++ b/widgets/table/gal-a11y-e-cell.c
@@ -87,9 +87,9 @@ gal_a11y_e_cell_dispose (GObject *object)
#if 0
if (a11y->item)
- g_object_unref (G_OBJECT (a11y->item)); /*, unref_item, a11y); */
+ g_object_unref (a11y->item); /*, unref_item, a11y); */
if (a11y->cell_view)
- g_object_unref (G_OBJECT (a11y->cell_view)); /*, unref_cell, a11y); */
+ g_object_unref (a11y->cell_view); /*, unref_cell, a11y); */
if (a11y->parent)
g_object_unref (a11y->parent);
#endif
@@ -174,17 +174,20 @@ gal_a11y_e_cell_get_extents (AtkComponent *component,
tableOrTree = gtk_widget_get_parent (GTK_WIDGET (a11y->item->parent.canvas));
if (E_IS_TREE (tableOrTree)) {
- e_tree_get_cell_geometry (E_TREE (tableOrTree),
- row, col, &xval, &yval,
- width, height);
+ e_tree_get_cell_geometry (
+ E_TREE (tableOrTree),
+ row, col, &xval, &yval,
+ width, height);
} else {
- e_table_get_cell_geometry (E_TABLE (tableOrTree),
- row, col, &xval, &yval,
- width, height);
+ e_table_get_cell_geometry (
+ E_TABLE (tableOrTree),
+ row, col, &xval, &yval,
+ width, height);
}
- atk_component_get_position (ATK_COMPONENT (a11y->parent),
- x, y, coord_type);
+ atk_component_get_position (
+ ATK_COMPONENT (a11y->parent),
+ x, y, coord_type);
if (x && *x != G_MININT)
*x += xval;
if (y && *y != G_MININT)
@@ -490,8 +493,9 @@ gal_a11y_e_cell_type_add_action_interface (GType type)
NULL
};
- g_type_add_interface_static (type, ATK_TYPE_ACTION,
- &atk_action_info);
+ g_type_add_interface_static (
+ type, ATK_TYPE_ACTION,
+ &atk_action_info);
}
gboolean
@@ -604,13 +608,14 @@ gal_a11y_e_cell_new (ETableItem *item,
a11y = g_object_new (gal_a11y_e_cell_get_type (), NULL);
- gal_a11y_e_cell_construct (a11y,
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
+ gal_a11y_e_cell_construct (
+ a11y,
+ item,
+ cell_view,
+ parent,
+ model_col,
+ view_col,
+ row);
return a11y;
}
@@ -633,14 +638,14 @@ gal_a11y_e_cell_construct (AtkObject *object,
ATK_OBJECT (a11y) ->role = ATK_ROLE_TABLE_CELL;
if (item)
- g_object_ref (G_OBJECT (item));
+ g_object_ref (item);
#if 0
if (parent)
g_object_ref (parent);
if (cell_view)
- g_object_ref (G_OBJECT (cell_view));
+ g_object_ref (cell_view);
#endif
}
diff --git a/widgets/table/gal-a11y-e-table-click-to-add.c b/widgets/table/gal-a11y-e-table-click-to-add.c
index 1f116ee6b3..52466cd7cb 100644
--- a/widgets/table/gal-a11y-e-table-click-to-add.c
+++ b/widgets/table/gal-a11y-e-table-click-to-add.c
@@ -82,7 +82,7 @@ idle_do_action (gpointer data)
ETableClickToAdd * etcta;
gint finished;
- g_return_val_if_fail ( data!= NULL, FALSE);
+ g_return_val_if_fail (data!= NULL, FALSE);
etcta = E_TABLE_CLICK_TO_ADD (
atk_gobject_accessible_get_object (
@@ -242,9 +242,9 @@ gal_a11y_e_table_click_to_add_get_type (void)
GNOME_TYPE_CANVAS_ITEM);
parent_type = atk_object_factory_get_accessible_type (factory);
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE,
- "GalA11yETableClickToAdd", &info, 0,
- sizeof (GalA11yETableClickToAddPrivate), &priv_offset);
+ type = gal_a11y_type_register_static_with_private (
+ PARENT_TYPE, "GalA11yETableClickToAdd", &info, 0,
+ sizeof (GalA11yETableClickToAddPrivate), &priv_offset);
g_type_add_interface_static (type, ATK_TYPE_ACTION, &atk_action_info);
diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c
index 1806011875..d5a0edefdc 100644
--- a/widgets/table/gal-a11y-e-table-item.c
+++ b/widgets/table/gal-a11y-e-table-item.c
@@ -304,9 +304,11 @@ eti_get_extents (AtkComponent *component,
parent = ATK_OBJECT (component)->accessible_parent;
if (parent && ATK_IS_COMPONENT (parent))
- atk_component_get_extents (ATK_COMPONENT (parent), x, y,
- width, height,
- coord_type);
+ atk_component_get_extents (
+ ATK_COMPONENT (parent),
+ x, y,
+ width, height,
+ coord_type);
if (parent && GAL_A11Y_IS_E_TABLE_CLICK_TO_ADD (parent)) {
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (
@@ -335,10 +337,11 @@ eti_ref_accessible_at_point (AtkComponent *component,
if (!item)
return NULL;
- atk_component_get_position (component,
- &x_origin,
- &y_origin,
- coord_type);
+ atk_component_get_position (
+ component,
+ &x_origin,
+ &y_origin,
+ coord_type);
x -= x_origin;
y -= y_origin;
@@ -397,17 +400,19 @@ eti_ref_at (AtkTable *table,
item->cell_views_realized) {
ECellView *cell_view = item->cell_views[column];
ETableCol *ecol = e_table_header_get_column (item->header, column);
- ret = gal_a11y_e_cell_registry_get_object (NULL,
- item,
- cell_view,
- ATK_OBJECT (table),
- ecol->col_idx,
- column,
- row);
+ ret = gal_a11y_e_cell_registry_get_object (
+ NULL,
+ item,
+ cell_view,
+ ATK_OBJECT (table),
+ ecol->col_idx,
+ column,
+ row);
if (ATK_IS_OBJECT (ret)) {
- g_object_weak_ref (G_OBJECT (ret),
- (GWeakNotify) cell_destroyed,
- ret);
+ g_object_weak_ref (
+ G_OBJECT (ret),
+ (GWeakNotify) cell_destroyed,
+ ret);
/* if current cell is focused, add FOCUSED state */
if (e_selection_model_cursor_row (item->selection) ==
GAL_A11Y_E_CELL (ret)->row &&
@@ -501,13 +506,14 @@ eti_get_column_extent_at (AtkTable *table,
if (!item)
return -1;
- e_table_item_get_cell_geometry (item,
- &row,
- &column,
- NULL,
- NULL,
- &width,
- NULL);
+ e_table_item_get_cell_geometry (
+ item,
+ &row,
+ &column,
+ NULL,
+ NULL,
+ &width,
+ NULL);
return width;
}
@@ -524,13 +530,14 @@ eti_get_row_extent_at (AtkTable *table,
if (!item)
return -1;
- e_table_item_get_cell_geometry (item,
- &row,
- &column,
- NULL,
- NULL,
- NULL,
- &height);
+ e_table_item_get_cell_geometry (
+ item,
+ &row,
+ &column,
+ NULL,
+ NULL,
+ NULL,
+ &height);
return height;
}
@@ -672,8 +679,9 @@ table_add_row_selection (AtkTable *table,
if (table_is_row_selected (table, row))
return TRUE;
- e_selection_model_toggle_single_row (item->selection,
- view_to_model_row (item, row));
+ e_selection_model_toggle_single_row (
+ item->selection,
+ view_to_model_row (item, row));
return TRUE;
}
@@ -758,14 +766,16 @@ eti_rows_inserted (ETableModel *model,
GET_PRIVATE (table_item)->rows = n_rows;
- g_signal_emit_by_name (table_item, "row-inserted", row,
- count, NULL);
+ g_signal_emit_by_name (
+ table_item, "row-inserted", row,
+ count, NULL);
for (i = row; i < (row + count); i++) {
for (j = 0; j < n_cols; j++) {
- g_signal_emit_by_name (table_item,
- "children_changed::add",
- ( ((i + 1) * n_cols) + j), NULL, NULL);
+ g_signal_emit_by_name (
+ table_item,
+ "children_changed::add",
+ (((i + 1) * n_cols) + j), NULL, NULL);
}
}
@@ -788,18 +798,20 @@ eti_rows_deleted (ETableModel *model,
old_nrows = GET_PRIVATE (table_item)->rows;
- g_return_if_fail ( row + count <= old_nrows);
+ g_return_if_fail (row + count <= old_nrows);
g_return_if_fail (old_nrows == n_rows + count);
GET_PRIVATE (table_item)->rows = n_rows;
- g_signal_emit_by_name (table_item, "row-deleted", row,
- count, NULL);
+ g_signal_emit_by_name (
+ table_item, "row-deleted", row,
+ count, NULL);
for (i = row; i < (row + count); i++) {
for (j = 0; j < n_cols; j++) {
- g_signal_emit_by_name (table_item,
- "children_changed::remove",
- ( ((i + 1) * n_cols) + j), NULL, NULL);
+ g_signal_emit_by_name (
+ table_item,
+ "children_changed::remove",
+ (((i + 1) * n_cols) + j), NULL, NULL);
}
}
g_signal_emit_by_name (table_item, "visible-data-changed");
@@ -909,17 +921,16 @@ eti_header_structure_changed (ETableHeader *eth,
/* Emit signals */
if (reorder_found)
- g_signal_emit_by_name (G_OBJECT (a11y_item), "column_reordered");
+ g_signal_emit_by_name (a11y_item, "column_reordered");
if (removed_found) {
- for (i = 0; i < prev_n_cols; i ++ ) {
+ for (i = 0; i < prev_n_cols; i++) {
if (prev_state[i] == ETI_HEADER_REMOVED) {
g_signal_emit_by_name (
- G_OBJECT (a11y_item),
- "column-deleted", i, 1);
+ a11y_item, "column-deleted", i, 1);
for (j = 0; j < n_rows; j++)
g_signal_emit_by_name (
- G_OBJECT (a11y_item),
+ a11y_item,
"children_changed::remove",
((j + 1) * prev_n_cols + i),
NULL, NULL);
@@ -931,11 +942,10 @@ eti_header_structure_changed (ETableHeader *eth,
for (i = 0; i < n_cols; i++) {
if (state[i] == ETI_HEADER_NEW_ADDED) {
g_signal_emit_by_name (
- G_OBJECT (a11y_item),
- "column-inserted", i, 1);
+ a11y_item, "column-inserted", i, 1);
for (j = 0; j < n_rows; j++)
g_signal_emit_by_name (
- G_OBJECT (a11y_item),
+ a11y_item,
"children_changed::add",
((j + 1) * n_cols + i),
NULL, NULL);
@@ -1127,7 +1137,7 @@ gal_a11y_e_table_item_new (ETableItem *item)
GET_PRIVATE (a11y)->rows = item->rows;
GET_PRIVATE (a11y)->columns = e_table_header_get_columns (item->header);
- if ( GET_PRIVATE (a11y)->columns == NULL)
+ if (GET_PRIVATE (a11y)->columns == NULL)
return NULL;
if (item) {
@@ -1138,8 +1148,9 @@ gal_a11y_e_table_item_new (ETableItem *item)
item, "selection_model_added",
G_CALLBACK (eti_a11y_selection_model_added_cb), NULL);
if (item->selection)
- gal_a11y_e_table_item_ref_selection (a11y,
- item->selection);
+ gal_a11y_e_table_item_ref_selection (
+ a11y,
+ item->selection);
/* find the TableItem's parent: table or tree */
GET_PRIVATE (a11y)->widget = gtk_widget_get_parent (
@@ -1184,11 +1195,11 @@ gal_a11y_e_table_item_ref_selection (GalA11yETableItem *a11y,
priv = GET_PRIVATE (a11y);
priv->selection_change_id = g_signal_connect (
- G_OBJECT (selection), "selection_changed",
- G_CALLBACK (eti_a11y_selection_changed_cb), a11y);
+ selection, "selection_changed",
+ G_CALLBACK (eti_a11y_selection_changed_cb), a11y);
priv->cursor_change_id = g_signal_connect (
- G_OBJECT (selection), "cursor_changed",
- G_CALLBACK (eti_a11y_cursor_changed_cb), a11y);
+ selection, "cursor_changed",
+ G_CALLBACK (eti_a11y_cursor_changed_cb), a11y);
priv->selection = selection;
g_object_ref (selection);
@@ -1208,10 +1219,12 @@ gal_a11y_e_table_item_unref_selection (GalA11yETableItem *a11y)
g_return_val_if_fail (priv->selection_change_id != 0, FALSE);
g_return_val_if_fail (priv->cursor_change_id != 0, FALSE);
- g_signal_handler_disconnect (priv->selection,
- priv->selection_change_id);
- g_signal_handler_disconnect (priv->selection,
- priv->cursor_change_id);
+ g_signal_handler_disconnect (
+ priv->selection,
+ priv->selection_change_id);
+ g_signal_handler_disconnect (
+ priv->selection,
+ priv->cursor_change_id);
priv->cursor_change_id = 0;
priv->selection_change_id = 0;
@@ -1345,15 +1358,18 @@ selection_add_selection (AtkSelection *selection,
atk_table_add_row_selection (table, row);
}
- e_selection_model_change_cursor (item->selection,
- model_row,
- model_col);
- e_selection_model_cursor_changed (item->selection,
- model_row,
- model_col);
- e_selection_model_cursor_activated (item->selection,
- model_row,
- model_col);
+ e_selection_model_change_cursor (
+ item->selection,
+ model_row,
+ model_col);
+ e_selection_model_cursor_changed (
+ item->selection,
+ model_row,
+ model_col);
+ e_selection_model_cursor_activated (
+ item->selection,
+ model_row,
+ model_col);
return TRUE;
}
@@ -1413,8 +1429,9 @@ void
gal_a11y_e_table_item_init (void)
{
if (atk_get_root ())
- atk_registry_set_factory_type (atk_get_default_registry (),
- E_TYPE_TABLE_ITEM,
- gal_a11y_e_table_item_factory_get_type ());
+ atk_registry_set_factory_type (
+ atk_get_default_registry (),
+ E_TYPE_TABLE_ITEM,
+ gal_a11y_e_table_item_factory_get_type ());
}
diff --git a/widgets/table/gal-a11y-e-table.c b/widgets/table/gal-a11y-e-table.c
index 6ba51303ed..ec0025c6b8 100644
--- a/widgets/table/gal-a11y-e-table.c
+++ b/widgets/table/gal-a11y-e-table.c
@@ -268,8 +268,9 @@ gal_a11y_e_table_get_type (void)
factory = atk_registry_get_factory (atk_get_default_registry (), GTK_TYPE_WIDGET);
parent_type = atk_object_factory_get_accessible_type (factory);
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yETable", &info, 0,
- sizeof (GalA11yETablePrivate), &priv_offset);
+ type = gal_a11y_type_register_static_with_private (
+ PARENT_TYPE, "GalA11yETable", &info, 0,
+ sizeof (GalA11yETablePrivate), &priv_offset);
g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
}
@@ -305,7 +306,8 @@ void
gal_a11y_e_table_init (void)
{
if (atk_get_root ())
- atk_registry_set_factory_type (atk_get_default_registry (),
+ atk_registry_set_factory_type (
+ atk_get_default_registry (),
E_TYPE_TABLE,
gal_a11y_e_table_factory_get_type ());
diff --git a/widgets/table/gal-a11y-e-tree.c b/widgets/table/gal-a11y-e-tree.c
index 12697f4535..26d2f24e7b 100644
--- a/widgets/table/gal-a11y-e-tree.c
+++ b/widgets/table/gal-a11y-e-tree.c
@@ -163,8 +163,9 @@ gal_a11y_e_tree_get_type (void)
factory = atk_registry_get_factory (atk_get_default_registry (), GTK_TYPE_WIDGET);
parent_type = atk_object_factory_get_accessible_type (factory);
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yETree", &info, 0,
- sizeof (GalA11yETreePrivate), &priv_offset);
+ type = gal_a11y_type_register_static_with_private (
+ PARENT_TYPE, "GalA11yETree", &info, 0,
+ sizeof (GalA11yETreePrivate), &priv_offset);
g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
}
@@ -187,9 +188,9 @@ void
gal_a11y_e_tree_init (void)
{
if (atk_get_root ())
- atk_registry_set_factory_type (atk_get_default_registry (),
- E_TYPE_TREE,
- gal_a11y_e_tree_factory_get_type ());
-
+ atk_registry_set_factory_type (
+ atk_get_default_registry (),
+ E_TYPE_TREE,
+ gal_a11y_e_tree_factory_get_type ());
}
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c
index edfaadc157..1c3b0da4fe 100644
--- a/widgets/text/e-reflow.c
+++ b/widgets/text/e-reflow.c
@@ -126,9 +126,10 @@ e_reflow_resize_children (GnomeCanvasItem *item)
count = reflow->count;
for (i = 0; i < count; i++) {
if (reflow->items[i])
- gnome_canvas_item_set (reflow->items[i],
- "width", (gdouble) reflow->column_width,
- NULL);
+ gnome_canvas_item_set (
+ reflow->items[i],
+ "width", (gdouble) reflow->column_width,
+ NULL);
}
}
@@ -137,15 +138,17 @@ e_reflow_update_selection_row (EReflow *reflow,
gint row)
{
if (reflow->items[row]) {
- g_object_set (reflow->items[row],
- "selected", e_selection_model_is_row_selected (E_SELECTION_MODEL (reflow->selection), row),
- NULL);
+ g_object_set (
+ reflow->items[row],
+ "selected", e_selection_model_is_row_selected (E_SELECTION_MODEL (reflow->selection), row),
+ NULL);
} else if (e_selection_model_is_row_selected (E_SELECTION_MODEL (reflow->selection), row)) {
reflow->items[row] = e_reflow_model_incarnate (reflow->model, row, GNOME_CANVAS_GROUP (reflow));
- g_object_set (reflow->items[row],
- "selected", e_selection_model_is_row_selected (E_SELECTION_MODEL (reflow->selection), row),
- "width", (gdouble) reflow->column_width,
- NULL);
+ g_object_set (
+ reflow->items[row],
+ "selected", e_selection_model_is_row_selected (E_SELECTION_MODEL (reflow->selection), row),
+ "width", (gdouble) reflow->column_width,
+ NULL);
}
}
@@ -226,9 +229,10 @@ cursor_changed (ESelectionModel *selection,
if (old_cursor < count && old_cursor >= 0) {
if (reflow->items[old_cursor]) {
- g_object_set (reflow->items[old_cursor],
- "has_cursor", FALSE,
- NULL);
+ g_object_set (
+ reflow->items[old_cursor],
+ "has_cursor", FALSE,
+ NULL);
}
}
@@ -236,15 +240,17 @@ cursor_changed (ESelectionModel *selection,
if (row < count && row >= 0) {
if (reflow->items[row]) {
- g_object_set (reflow->items[row],
- "has_cursor", TRUE,
- NULL);
+ g_object_set (
+ reflow->items[row],
+ "has_cursor", TRUE,
+ NULL);
} else {
reflow->items[row] = e_reflow_model_incarnate (reflow->model, row, GNOME_CANVAS_GROUP (reflow));
- g_object_set (reflow->items[row],
- "has_cursor", TRUE,
- "width", (gdouble) reflow->column_width,
- NULL);
+ g_object_set (
+ reflow->items[row],
+ "has_cursor", TRUE,
+ "width", (gdouble) reflow->column_width,
+ NULL);
}
}
@@ -297,10 +303,11 @@ incarnate (EReflow *reflow)
if (reflow->items[unsorted] == NULL) {
if (reflow->model) {
reflow->items[unsorted] = e_reflow_model_incarnate (reflow->model, unsorted, GNOME_CANVAS_GROUP (reflow));
- g_object_set (reflow->items[unsorted],
- "selected", e_selection_model_is_row_selected (E_SELECTION_MODEL (reflow->selection), unsorted),
- "width", (gdouble) reflow->column_width,
- NULL);
+ g_object_set (
+ reflow->items[unsorted],
+ "selected", e_selection_model_is_row_selected (E_SELECTION_MODEL (reflow->selection), unsorted),
+ "width", (gdouble) reflow->column_width,
+ NULL);
}
}
}
@@ -552,31 +559,34 @@ set_empty (EReflow *reflow)
if (reflow->count == 0) {
if (reflow->empty_text) {
if (reflow->empty_message) {
- gnome_canvas_item_set (reflow->empty_text,
- "width", reflow->minimum_width,
- "text", reflow->empty_message,
- NULL);
- e_canvas_item_move_absolute (reflow->empty_text,
- reflow->minimum_width / 2,
- 0);
+ gnome_canvas_item_set (
+ reflow->empty_text,
+ "width", reflow->minimum_width,
+ "text", reflow->empty_message,
+ NULL);
+ e_canvas_item_move_absolute (
+ reflow->empty_text,
+ reflow->minimum_width / 2,
+ 0);
} else {
g_object_run_dispose (G_OBJECT (reflow->empty_text));
reflow->empty_text = NULL;
}
} else {
if (reflow->empty_message) {
- reflow->empty_text =
- gnome_canvas_item_new (GNOME_CANVAS_GROUP (reflow),
- e_text_get_type (),
- "width", reflow->minimum_width,
- "clip", TRUE,
- "use_ellipsis", TRUE,
- "justification", GTK_JUSTIFY_CENTER,
- "text", reflow->empty_message,
- NULL);
- e_canvas_item_move_absolute (reflow->empty_text,
- reflow->minimum_width / 2,
- 0);
+ reflow->empty_text = gnome_canvas_item_new (
+ GNOME_CANVAS_GROUP (reflow),
+ e_text_get_type (),
+ "width", reflow->minimum_width,
+ "clip", TRUE,
+ "use_ellipsis", TRUE,
+ "justification", GTK_JUSTIFY_CENTER,
+ "text", reflow->empty_message,
+ NULL);
+ e_canvas_item_move_absolute (
+ reflow->empty_text,
+ reflow->minimum_width / 2,
+ 0);
}
}
} else {
@@ -593,16 +603,21 @@ disconnect_model (EReflow *reflow)
if (reflow->model == NULL)
return;
- g_signal_handler_disconnect (reflow->model,
- reflow->model_changed_id);
- g_signal_handler_disconnect (reflow->model,
- reflow->comparison_changed_id);
- g_signal_handler_disconnect (reflow->model,
- reflow->model_items_inserted_id);
- g_signal_handler_disconnect (reflow->model,
- reflow->model_item_removed_id);
- g_signal_handler_disconnect (reflow->model,
- reflow->model_item_changed_id);
+ g_signal_handler_disconnect (
+ reflow->model,
+ reflow->model_changed_id);
+ g_signal_handler_disconnect (
+ reflow->model,
+ reflow->comparison_changed_id);
+ g_signal_handler_disconnect (
+ reflow->model,
+ reflow->model_items_inserted_id);
+ g_signal_handler_disconnect (
+ reflow->model,
+ reflow->model_item_removed_id);
+ g_signal_handler_disconnect (
+ reflow->model,
+ reflow->model_item_changed_id);
g_object_unref (reflow->model);
reflow->model_changed_id = 0;
@@ -619,12 +634,15 @@ disconnect_selection (EReflow *reflow)
if (reflow->selection == NULL)
return;
- g_signal_handler_disconnect (reflow->selection,
- reflow->selection_changed_id);
- g_signal_handler_disconnect (reflow->selection,
- reflow->selection_row_changed_id);
- g_signal_handler_disconnect (reflow->selection,
- reflow->cursor_changed_id);
+ g_signal_handler_disconnect (
+ reflow->selection,
+ reflow->selection_changed_id);
+ g_signal_handler_disconnect (
+ reflow->selection,
+ reflow->selection_row_changed_id);
+ g_signal_handler_disconnect (
+ reflow->selection,
+ reflow->cursor_changed_id);
g_object_unref (reflow->selection);
reflow->selection_changed_id = 0;
@@ -681,10 +699,12 @@ disconnect_adjustment (EReflow *reflow)
if (reflow->adjustment == NULL)
return;
- g_signal_handler_disconnect (reflow->adjustment,
- reflow->adjustment_changed_id);
- g_signal_handler_disconnect (reflow->adjustment,
- reflow->adjustment_value_changed_id);
+ g_signal_handler_disconnect (
+ reflow->adjustment,
+ reflow->adjustment_changed_id);
+ g_signal_handler_disconnect (
+ reflow->adjustment,
+ reflow->adjustment_value_changed_id);
g_object_unref (reflow->adjustment);
@@ -737,8 +757,9 @@ static void
disconnect_set_adjustment (EReflow *reflow)
{
if (reflow->set_scroll_adjustments_id != 0) {
- g_signal_handler_disconnect (GNOME_CANVAS_ITEM (reflow)->canvas,
- reflow->set_scroll_adjustments_id);
+ g_signal_handler_disconnect (
+ GNOME_CANVAS_ITEM (reflow)->canvas,
+ reflow->set_scroll_adjustments_id);
reflow->set_scroll_adjustments_id = 0;
}
}
@@ -909,9 +930,10 @@ e_reflow_realize (GnomeCanvasItem *item)
count = reflow->count;
for (i = 0; i < count; i++) {
if (reflow->items[i])
- gnome_canvas_item_set (reflow->items[i],
- "width", reflow->column_width,
- NULL);
+ gnome_canvas_item_set (
+ reflow->items[i],
+ "width", reflow->column_width,
+ NULL);
}
set_empty (reflow);
@@ -981,9 +1003,10 @@ e_reflow_event (GnomeCanvasItem *item,
GnomeCanvasItem *item = reflow->items[unsorted];
EFocus has_focus;
if (item) {
- g_object_get (item,
- "has_focus", &has_focus,
- NULL);
+ g_object_get (
+ item,
+ "has_focus", &has_focus,
+ NULL);
if (has_focus) {
if (event->key.state & GDK_SHIFT_MASK) {
if (i == 0)
@@ -1001,9 +1024,10 @@ e_reflow_event (GnomeCanvasItem *item,
}
item = reflow->items[unsorted];
- gnome_canvas_item_set (item,
- "has_focus", (event->key.state & GDK_SHIFT_MASK) ? E_FOCUS_END : E_FOCUS_START,
- NULL);
+ gnome_canvas_item_set (
+ item,
+ "has_focus", (event->key.state & GDK_SHIFT_MASK) ? E_FOCUS_END : E_FOCUS_START,
+ NULL);
return TRUE;
}
}
@@ -1030,10 +1054,11 @@ e_reflow_event (GnomeCanvasItem *item,
reflow->temp_column_width = reflow->column_width;
reflow->column_drag = TRUE;
- gnome_canvas_item_grab (item,
- GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK,
- reflow->arrow_cursor,
- button->time);
+ gnome_canvas_item_grab (
+ item,
+ GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK,
+ reflow->arrow_cursor,
+ button->time);
reflow->previous_temp_column_width = -1;
reflow->need_column_resize = TRUE;
@@ -1193,7 +1218,7 @@ e_reflow_event (GnomeCanvasItem *item,
window = gtk_widget_get_window (GTK_WIDGET (item->canvas));
- if (!( crossing->y >= E_REFLOW_BORDER_WIDTH && crossing->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER )) {
+ if (!(crossing->y >= E_REFLOW_BORDER_WIDTH && crossing->y <= reflow->height - E_REFLOW_BORDER_WIDTH && n_x < E_REFLOW_FULL_GUTTER)) {
if (!reflow->default_cursor_shown) {
gdk_window_set_cursor (window, reflow->default_cursor);
reflow->default_cursor_shown = TRUE;
@@ -1206,8 +1231,8 @@ e_reflow_event (GnomeCanvasItem *item,
}
if (return_val)
return return_val;
- else if (GNOME_CANVAS_ITEM_CLASS ( e_reflow_parent_class )->event)
- return (* GNOME_CANVAS_ITEM_CLASS ( e_reflow_parent_class )->event) (item, event);
+ else if (GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->event)
+ return (* GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->event) (item, event);
else
return FALSE;
}
@@ -1246,16 +1271,17 @@ e_reflow_draw (GnomeCanvasItem *item,
if (running_width > x + width)
break;
x_rect = running_width;
- gtk_paint_flat_box (style,
- cr,
- GTK_STATE_ACTIVE,
- GTK_SHADOW_NONE,
- GTK_WIDGET (item->canvas),
- "reflow",
- x_rect - x,
- y_rect - y,
- width_rect,
- height_rect);
+ gtk_paint_flat_box (
+ style,
+ cr,
+ GTK_STATE_ACTIVE,
+ GTK_SHADOW_NONE,
+ GTK_WIDGET (item->canvas),
+ "reflow",
+ x_rect - x,
+ y_rect - y,
+ width_rect,
+ height_rect);
running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH;
}
if (reflow->column_drag) {
@@ -1290,11 +1316,12 @@ e_reflow_draw (GnomeCanvasItem *item,
if (running_width > x + width)
break;
x_rect = running_width;
- cairo_rectangle (cr,
- x_rect - x,
- y_rect - y,
- width_rect - 1,
- height_rect - 1);
+ cairo_rectangle (
+ cr,
+ x_rect - x,
+ y_rect - y,
+ width_rect - 1,
+ height_rect - 1);
cairo_fill (cr);
running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH;
}
@@ -1366,7 +1393,7 @@ e_reflow_update (GnomeCanvasItem *item,
width_rect = E_REFLOW_DIVIDER_WIDTH;
height_rect = reflow->height - (E_REFLOW_BORDER_WIDTH * 2);
- for ( i = 0; i < reflow->column_count; i++) {
+ for (i = 0; i < reflow->column_count; i++) {
x_rect = running_width;
gnome_canvas_request_redraw (item->canvas, x_rect, y_rect, x_rect + width_rect, y_rect + height_rect);
running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH;
@@ -1382,7 +1409,7 @@ e_reflow_update (GnomeCanvasItem *item,
width_rect = E_REFLOW_DIVIDER_WIDTH;
height_rect = reflow->height - (E_REFLOW_BORDER_WIDTH * 2);
- for ( i = 0; i < reflow->column_count; i++) {
+ for (i = 0; i < reflow->column_count; i++) {
x_rect = running_width;
gnome_canvas_request_redraw (item->canvas, x_rect, y_rect, x_rect + width_rect, y_rect + height_rect);
running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH;
@@ -1456,9 +1483,10 @@ e_reflow_reflow (GnomeCanvasItem *item,
}
if (unsorted >= 0 && reflow->items[unsorted]) {
- e_canvas_item_move_absolute (GNOME_CANVAS_ITEM (reflow->items[unsorted]),
- (gdouble) running_width,
- (gdouble) running_height);
+ e_canvas_item_move_absolute (
+ GNOME_CANVAS_ITEM (reflow->items[unsorted]),
+ (gdouble) running_width,
+ (gdouble) running_height);
running_height += reflow->heights[unsorted] + E_REFLOW_BORDER_WIDTH;
}
}
@@ -1545,67 +1573,86 @@ e_reflow_class_init (EReflowClass *class)
class->selection_event = e_reflow_selection_event_real;
class->column_width_changed = NULL;
- g_object_class_install_property (object_class, PROP_MINIMUM_WIDTH,
- g_param_spec_double ("minimum_width",
- "Minimum width",
- "Minimum Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_WIDTH,
- g_param_spec_double ("width",
- "Width",
- "Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READABLE));
-
- g_object_class_install_property (object_class, PROP_HEIGHT,
- g_param_spec_double ("height",
- "Height",
- "Height",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EMPTY_MESSAGE,
- g_param_spec_string ("empty_message",
- "Empty message",
- "Empty message",
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_MODEL,
- g_param_spec_object ("model",
- "Reflow model",
- "Reflow model",
- E_TYPE_REFLOW_MODEL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_COLUMN_WIDTH,
- g_param_spec_double ("column_width",
- "Column width",
- "Column width",
- 0.0, G_MAXDOUBLE, 150.0,
- G_PARAM_READWRITE));
-
- signals[SELECTION_EVENT] =
- g_signal_new ("selection_event",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EReflowClass, selection_event),
- NULL, NULL,
- e_marshal_INT__OBJECT_BOXED,
- G_TYPE_INT, 2,
- G_TYPE_OBJECT,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- signals[COLUMN_WIDTH_CHANGED] =
- g_signal_new ("column_width_changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EReflowClass, column_width_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__DOUBLE,
- G_TYPE_NONE, 1, G_TYPE_DOUBLE);
+ g_object_class_install_property (
+ object_class,
+ PROP_MINIMUM_WIDTH,
+ g_param_spec_double (
+ "minimum_width",
+ "Minimum width",
+ "Minimum Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_WIDTH,
+ g_param_spec_double (
+ "width",
+ "Width",
+ "Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_HEIGHT,
+ g_param_spec_double (
+ "height",
+ "Height",
+ "Height",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_EMPTY_MESSAGE,
+ g_param_spec_string (
+ "empty_message",
+ "Empty message",
+ "Empty message",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_MODEL,
+ g_param_spec_object (
+ "model",
+ "Reflow model",
+ "Reflow model",
+ E_TYPE_REFLOW_MODEL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ object_class,
+ PROP_COLUMN_WIDTH,
+ g_param_spec_double (
+ "column_width",
+ "Column width",
+ "Column width",
+ 0.0, G_MAXDOUBLE, 150.0,
+ G_PARAM_READWRITE));
+
+ signals[SELECTION_EVENT] = g_signal_new (
+ "selection_event",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EReflowClass, selection_event),
+ NULL, NULL,
+ e_marshal_INT__OBJECT_BOXED,
+ G_TYPE_INT, 2,
+ G_TYPE_OBJECT,
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ signals[COLUMN_WIDTH_CHANGED] = g_signal_new (
+ "column_width_changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EReflowClass, column_width_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__DOUBLE,
+ G_TYPE_NONE, 1,
+ G_TYPE_DOUBLE);
}
static void
@@ -1650,9 +1697,10 @@ e_reflow_init (EReflow *reflow)
reflow->selection = E_SELECTION_MODEL (e_selection_model_simple_new ());
reflow->sorter = e_sorter_array_new (er_create_cmp_cache, er_compare, reflow);
- g_object_set (reflow->selection,
- "sorter", reflow->sorter,
- NULL);
+ g_object_set (
+ reflow->selection,
+ "sorter", reflow->sorter,
+ NULL);
reflow->selection_changed_id = g_signal_connect (
reflow->selection, "selection_changed",
diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c
index b9b2a09154..e1a7ee8526 100644
--- a/widgets/text/e-text-model.c
+++ b/widgets/text/e-text-model.c
@@ -98,43 +98,44 @@ e_text_model_class_init (ETextModelClass *class)
object_class = G_OBJECT_CLASS (class);
object_class->finalize = e_text_model_finalize;
- signals[E_TEXT_MODEL_CHANGED] =
- g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETextModelClass, changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- signals[E_TEXT_MODEL_REPOSITION] =
- g_signal_new ("reposition",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETextModelClass, reposition),
- NULL, NULL,
- e_marshal_NONE__POINTER_POINTER,
- G_TYPE_NONE, 2,
- G_TYPE_POINTER, G_TYPE_POINTER);
-
- signals[E_TEXT_MODEL_OBJECT_ACTIVATED] =
- g_signal_new ("object_activated",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETextModelClass, object_activated),
- NULL, NULL,
- g_cclosure_marshal_VOID__INT,
- G_TYPE_NONE, 1,
- G_TYPE_INT);
-
- signals[E_TEXT_MODEL_CANCEL_COMPLETION] =
- g_signal_new ("cancel_completion",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETextModelClass, cancel_completion),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ signals[E_TEXT_MODEL_CHANGED] = g_signal_new (
+ "changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETextModelClass, changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ signals[E_TEXT_MODEL_REPOSITION] = g_signal_new (
+ "reposition",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETextModelClass, reposition),
+ NULL, NULL,
+ e_marshal_NONE__POINTER_POINTER,
+ G_TYPE_NONE, 2,
+ G_TYPE_POINTER,
+ G_TYPE_POINTER);
+
+ signals[E_TEXT_MODEL_OBJECT_ACTIVATED] = g_signal_new (
+ "object_activated",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETextModelClass, object_activated),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1,
+ G_TYPE_INT);
+
+ signals[E_TEXT_MODEL_CANCEL_COMPLETION] = g_signal_new (
+ "cancel_completion",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETextModelClass, cancel_completion),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
/* No default signal handlers. */
class->changed = NULL;
@@ -251,9 +252,10 @@ e_text_model_real_insert_length (ETextModel *model,
byte_length = p - text;
- g_string_insert_len (model->priv->text,
- offs - model->priv->text->str,
- text, byte_length);
+ g_string_insert_len (
+ model->priv->text,
+ offs - model->priv->text->str,
+ text, byte_length);
e_text_model_changed (model);
@@ -283,8 +285,9 @@ e_text_model_real_delete (ETextModel *model,
byte_length = p - offs;
- g_string_erase (model->priv->text,
- byte_position, byte_length);
+ g_string_erase (
+ model->priv->text,
+ byte_position, byte_length);
e_text_model_changed (model);
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index c46de3adfc..1a56f9af40 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -167,13 +167,15 @@ e_text_dispose (GObject *object)
text = E_TEXT (object);
if (text->model_changed_signal_id)
- g_signal_handler_disconnect (text->model,
- text->model_changed_signal_id);
+ g_signal_handler_disconnect (
+ text->model,
+ text->model_changed_signal_id);
text->model_changed_signal_id = 0;
if (text->model_repos_signal_id)
- g_signal_handler_disconnect (text->model,
- text->model_repos_signal_id);
+ g_signal_handler_disconnect (
+ text->model,
+ text->model_repos_signal_id);
text->model_repos_signal_id = 0;
if (text->model)
@@ -181,8 +183,9 @@ e_text_dispose (GObject *object)
text->model = NULL;
if (text->tep_command_id)
- g_signal_handler_disconnect (text->tep,
- text->tep_command_id);
+ g_signal_handler_disconnect (
+ text->tep,
+ text->tep_command_id);
text->tep_command_id = 0;
if (text->tep)
@@ -388,12 +391,15 @@ reset_layout (EText *text)
}
text->font_desc = pango_font_description_new ();
if (!pango_font_description_get_size_is_absolute (style->font_desc))
- pango_font_description_set_size (text->font_desc,
+ pango_font_description_set_size (
+ text->font_desc,
pango_font_description_get_size (style->font_desc));
else
- pango_font_description_set_absolute_size (text->font_desc,
+ pango_font_description_set_absolute_size (
+ text->font_desc,
pango_font_description_get_size (style->font_desc));
- pango_font_description_set_family (text->font_desc,
+ pango_font_description_set_family (
+ text->font_desc,
pango_font_description_get_family (style->font_desc));
pango_layout_set_font_description (text->layout, text->font_desc);
@@ -584,12 +590,14 @@ e_text_set_property (GObject *object,
case PROP_MODEL:
if (text->model_changed_signal_id)
- g_signal_handler_disconnect (text->model,
- text->model_changed_signal_id);
+ g_signal_handler_disconnect (
+ text->model,
+ text->model_changed_signal_id);
if (text->model_repos_signal_id)
- g_signal_handler_disconnect (text->model,
- text->model_repos_signal_id);
+ g_signal_handler_disconnect (
+ text->model,
+ text->model_repos_signal_id);
g_object_unref (text->model);
text->model = E_TEXT_MODEL (g_value_get_object (value));
@@ -612,8 +620,9 @@ e_text_set_property (GObject *object,
case PROP_EVENT_PROCESSOR:
if (text->tep && text->tep_command_id)
- g_signal_handler_disconnect (text->tep,
- text->tep_command_id);
+ g_signal_handler_disconnect (
+ text->tep,
+ text->tep_command_id);
if (text->tep) {
g_object_unref (text->tep);
}
@@ -625,9 +634,10 @@ e_text_set_property (GObject *object,
G_CALLBACK (e_text_command), text);
if (!text->allow_newlines)
- g_object_set (text->tep,
- "allow_newlines", FALSE,
- NULL);
+ g_object_set (
+ text->tep,
+ "allow_newlines", FALSE,
+ NULL);
break;
case PROP_TEXT:
@@ -791,7 +801,7 @@ e_text_set_property (GObject *object,
text->break_characters = NULL;
}
if (g_value_get_string (value))
- text->break_characters = g_strdup ( g_value_get_string (value) );
+ text->break_characters = g_strdup (g_value_get_string (value));
text->needs_split_into_lines = 1;
needs_reflow = 1;
break;
@@ -822,9 +832,10 @@ e_text_set_property (GObject *object,
case PROP_ALLOW_NEWLINES:
text->allow_newlines = g_value_get_boolean (value);
_get_tep (text);
- g_object_set (text->tep,
- "allow_newlines", g_value_get_boolean (value),
- NULL);
+ g_object_set (
+ text->tep,
+ "allow_newlines", g_value_get_boolean (value),
+ NULL);
break;
case PROP_CURSOR_POS: {
@@ -1040,13 +1051,13 @@ e_text_update (GnomeCanvasItem *item,
GNOME_CANVAS_ITEM_CLASS (e_text_parent_class)->update (
item, i2c, flags);
- if ( text->needs_recalc_bounds
+ if (text->needs_recalc_bounds
|| (flags & GNOME_CANVAS_UPDATE_AFFINE)) {
get_bounds (text, &x1, &y1, &x2, &y2);
- if ( item->x1 != x1 ||
- item->x2 != x2 ||
- item->y1 != y1 ||
- item->y2 != y2 ) {
+ if (item->x1 != x1 ||
+ item->x2 != x2 ||
+ item->y1 != y1 ||
+ item->y2 != y2) {
gnome_canvas_request_redraw (
item->canvas, item->x1, item->y1,
item->x2, item->y2);
@@ -1214,11 +1225,12 @@ e_text_draw (GnomeCanvasItem *item,
if (!text->rgba_set) {
gdk_cairo_set_source_color (cr, &style->fg[state]);
} else {
- cairo_set_source_rgba (cr,
- ((text->rgba >> 24) & 0xff) / 255.0,
- ((text->rgba >> 16) & 0xff) / 255.0,
- ((text->rgba >> 8) & 0xff) / 255.0,
- ( text->rgba & 0xff) / 255.0);
+ cairo_set_source_rgba (
+ cr,
+ ((text->rgba >> 24) & 0xff) / 255.0,
+ ((text->rgba >> 16) & 0xff) / 255.0,
+ ((text->rgba >> 8) & 0xff) / 255.0,
+ ( text->rgba & 0xff) / 255.0);
}
/* Insert preedit text only when im_context signals are connected &
@@ -1485,8 +1497,9 @@ _blink_scroll_timeout (gpointer data)
get_position_from_xy (
text, text->lastx, text->lasty);
_get_tep (text);
- e_text_event_processor_handle_event (text->tep,
- &e_tep_event);
+ e_text_event_processor_handle_event (
+ text->tep,
+ &e_tep_event);
text->scroll_start = current_time;
redraw = TRUE;
}
@@ -1660,7 +1673,7 @@ e_text_event (GnomeCanvasItem *item,
if (event->key.keyval == GDK_KEY_F10
&& (event->key.state & GDK_SHIFT_MASK)
- && text->handle_popup ) {
+ && text->handle_popup) {
/* Simulate a GdkEventButton here, so that we can
* call e_text_do_popup directly */
@@ -1711,8 +1724,9 @@ e_text_event (GnomeCanvasItem *item,
ret = e_text_event_processor_handle_event (text->tep, &e_tep_event);
if (event->type == GDK_KEY_PRESS)
- g_signal_emit (text, e_text_signals[E_TEXT_KEYPRESS], 0,
- e_tep_event.key.keyval, e_tep_event.key.state);
+ g_signal_emit (
+ text, e_text_signals[E_TEXT_KEYPRESS], 0,
+ e_tep_event.key.keyval, e_tep_event.key.state);
if (e_tep_event.key.string)
g_free ((gpointer) e_tep_event.key.string);
@@ -1915,9 +1929,10 @@ primary_get_cb (GtkClipboard *clipboard,
sel_end = g_utf8_offset_to_pointer (text->text, sel_end) - text->text;
if (sel_start != sel_end) {
- gtk_selection_data_set_text (selection_data,
- text->text + sel_start,
- sel_end - sel_start);
+ gtk_selection_data_set_text (
+ selection_data,
+ text->text + sel_start,
+ sel_end - sel_start);
}
}
@@ -2036,9 +2051,10 @@ popup_targets_received (GtkClipboard *clipboard,
g_free (closure);
- gtk_menu_attach_to_widget (GTK_MENU (popup_menu),
- GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas),
- popup_menu_detach);
+ gtk_menu_attach_to_widget (
+ GTK_MENU (popup_menu),
+ GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas),
+ popup_menu_detach);
/* cut menu item */
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_CUT, NULL);
@@ -2091,8 +2107,9 @@ popup_targets_received (GtkClipboard *clipboard,
gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), menuitem);
- gtk_im_multicontext_append_menuitems (GTK_IM_MULTICONTEXT (text->im_context),
- GTK_MENU_SHELL (submenu));
+ gtk_im_multicontext_append_menuitems (
+ GTK_IM_MULTICONTEXT (text->im_context),
+ GTK_MENU_SHELL (submenu));
}
g_signal_emit (text,
@@ -2738,19 +2755,21 @@ e_text_command (ETextEventProcessor *tep,
text->select_by_word = command->value;
break;
case E_TEP_GRAB:
- e_canvas_item_grab (E_CANVAS (GNOME_CANVAS_ITEM (text)->canvas),
- GNOME_CANVAS_ITEM (text),
- GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK,
- text->i_cursor,
- command->time,
- NULL,
- NULL);
+ e_canvas_item_grab (
+ E_CANVAS (GNOME_CANVAS_ITEM (text)->canvas),
+ GNOME_CANVAS_ITEM (text),
+ GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK,
+ text->i_cursor,
+ command->time,
+ NULL,
+ NULL);
scroll = FALSE;
break;
case E_TEP_UNGRAB:
- e_canvas_item_ungrab (E_CANVAS (GNOME_CANVAS_ITEM (text)->canvas),
- GNOME_CANVAS_ITEM (text),
- command->time);
+ e_canvas_item_ungrab (
+ E_CANVAS (GNOME_CANVAS_ITEM (text)->canvas),
+ GNOME_CANVAS_ITEM (text),
+ command->time);
scroll = FALSE;
break;
case E_TEP_CAPS:
@@ -2895,244 +2914,336 @@ e_text_class_init (ETextClass *class)
class->changed = NULL;
class->activate = NULL;
- e_text_signals[E_TEXT_CHANGED] =
- g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETextClass, changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- e_text_signals[E_TEXT_ACTIVATE] =
- g_signal_new ("activate",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETextClass, activate),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- e_text_signals[E_TEXT_KEYPRESS] =
- g_signal_new ("keypress",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETextClass, keypress),
- NULL, NULL,
- e_marshal_NONE__INT_INT,
- G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
-
- e_text_signals[E_TEXT_POPULATE_POPUP] =
- g_signal_new ("populate_popup",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (ETextClass, populate_popup),
- NULL, NULL,
- e_marshal_NONE__POINTER_INT_OBJECT,
- G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_INT, GTK_TYPE_MENU);
-
- g_object_class_install_property (gobject_class, PROP_MODEL,
- g_param_spec_object ("model",
- "Model",
- "Model",
- E_TYPE_TEXT_MODEL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_EVENT_PROCESSOR,
- g_param_spec_object ("event_processor",
- "Event Processor",
- "Event Processor",
- E_TEXT_EVENT_PROCESSOR_TYPE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_TEXT,
- g_param_spec_string ("text",
- "Text",
- "Text",
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_BOLD,
- g_param_spec_boolean ("bold",
- "Bold",
- "Bold",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_STRIKEOUT,
- g_param_spec_boolean ("strikeout",
- "Strikeout",
- "Strikeout",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_JUSTIFICATION,
- g_param_spec_enum ("justification",
- "Justification",
- "Justification",
- GTK_TYPE_JUSTIFICATION, GTK_JUSTIFY_LEFT,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_CLIP_WIDTH,
- g_param_spec_double ("clip_width",
- "Clip Width",
- "Clip Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_CLIP_HEIGHT,
- g_param_spec_double ("clip_height",
- "Clip Height",
- "Clip Height",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_CLIP,
- g_param_spec_boolean ("clip",
- "Clip",
- "Clip",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_FILL_CLIP_RECTANGLE,
- g_param_spec_boolean ("fill_clip_rectangle",
- "Fill clip rectangle",
- "Fill clip rectangle",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_X_OFFSET,
- g_param_spec_double ("x_offset",
- "X Offset",
- "X Offset",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_Y_OFFSET,
- g_param_spec_double ("y_offset",
- "Y Offset",
- "Y Offset",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_FILL_COLOR,
- g_param_spec_string ("fill_color",
- "Fill color",
- "Fill color",
- NULL,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (gobject_class, PROP_FILL_COLOR_GDK,
- g_param_spec_boxed ("fill_color_gdk",
- "GDK fill color",
- "GDK fill color",
- GDK_TYPE_COLOR,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property (gobject_class, PROP_FILL_COLOR_RGBA,
- g_param_spec_uint ("fill_color_rgba",
- "GDK fill color",
- "GDK fill color",
- 0, G_MAXUINT, 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_TEXT_WIDTH,
- g_param_spec_double ("text_width",
- "Text width",
- "Text width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READABLE));
-
- g_object_class_install_property (gobject_class, PROP_TEXT_HEIGHT,
- g_param_spec_double ("text_height",
- "Text height",
- "Text height",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READABLE));
-
- g_object_class_install_property (gobject_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- "Editable",
- "Editable",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_USE_ELLIPSIS,
- g_param_spec_boolean ("use_ellipsis",
- "Use ellipsis",
- "Use ellipsis",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_ELLIPSIS,
- g_param_spec_string ("ellipsis",
- "Ellipsis",
- "Ellipsis",
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_LINE_WRAP,
- g_param_spec_boolean ("line_wrap",
- "Line wrap",
- "Line wrap",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_BREAK_CHARACTERS,
- g_param_spec_string ("break_characters",
- "Break characters",
- "Break characters",
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_MAX_LINES,
- g_param_spec_int ("max_lines",
- "Max lines",
- "Max lines",
- 0, G_MAXINT, 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_WIDTH,
- g_param_spec_double ("width",
- "Width",
- "Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_HEIGHT,
- g_param_spec_double ("height",
- "Height",
- "Height",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_ALLOW_NEWLINES,
- g_param_spec_boolean ("allow_newlines",
- "Allow newlines",
- "Allow newlines",
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_CURSOR_POS,
- g_param_spec_int ("cursor_pos",
- "Cursor position",
- "Cursor position",
- 0, G_MAXINT, 0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_IM_CONTEXT,
- g_param_spec_object ("im_context",
- "IM Context",
- "IM Context",
- GTK_TYPE_IM_CONTEXT,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (gobject_class, PROP_HANDLE_POPUP,
- g_param_spec_boolean ("handle_popup",
- "Handle Popup",
- "Handle Popup",
- FALSE,
- G_PARAM_READWRITE));
+ e_text_signals[E_TEXT_CHANGED] = g_signal_new (
+ "changed",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETextClass, changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ e_text_signals[E_TEXT_ACTIVATE] = g_signal_new (
+ "activate",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETextClass, activate),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ e_text_signals[E_TEXT_KEYPRESS] = g_signal_new (
+ "keypress",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETextClass, keypress),
+ NULL, NULL,
+ e_marshal_NONE__INT_INT,
+ G_TYPE_NONE, 2,
+ G_TYPE_UINT,
+ G_TYPE_UINT);
+
+ e_text_signals[E_TEXT_POPULATE_POPUP] = g_signal_new (
+ "populate_popup",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ETextClass, populate_popup),
+ NULL, NULL,
+ e_marshal_NONE__POINTER_INT_OBJECT,
+ G_TYPE_NONE, 3,
+ G_TYPE_POINTER,
+ G_TYPE_INT,
+ GTK_TYPE_MENU);
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_MODEL,
+ g_param_spec_object (
+ "model",
+ "Model",
+ "Model",
+ E_TYPE_TEXT_MODEL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_EVENT_PROCESSOR,
+ g_param_spec_object (
+ "event_processor",
+ "Event Processor",
+ "Event Processor",
+ E_TEXT_EVENT_PROCESSOR_TYPE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_TEXT,
+ g_param_spec_string (
+ "text",
+ "Text",
+ "Text",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_BOLD,
+ g_param_spec_boolean (
+ "bold",
+ "Bold",
+ "Bold",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_STRIKEOUT,
+ g_param_spec_boolean (
+ "strikeout",
+ "Strikeout",
+ "Strikeout",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_JUSTIFICATION,
+ g_param_spec_enum (
+ "justification",
+ "Justification",
+ "Justification",
+ GTK_TYPE_JUSTIFICATION,
+ GTK_JUSTIFY_LEFT,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_CLIP_WIDTH,
+ g_param_spec_double (
+ "clip_width",
+ "Clip Width",
+ "Clip Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_CLIP_HEIGHT,
+ g_param_spec_double (
+ "clip_height",
+ "Clip Height",
+ "Clip Height",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_CLIP,
+ g_param_spec_boolean (
+ "clip",
+ "Clip",
+ "Clip",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_FILL_CLIP_RECTANGLE,
+ g_param_spec_boolean (
+ "fill_clip_rectangle",
+ "Fill clip rectangle",
+ "Fill clip rectangle",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_X_OFFSET,
+ g_param_spec_double (
+ "x_offset",
+ "X Offset",
+ "X Offset",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_Y_OFFSET,
+ g_param_spec_double (
+ "y_offset",
+ "Y Offset",
+ "Y Offset",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_FILL_COLOR,
+ g_param_spec_string (
+ "fill_color",
+ "Fill color",
+ "Fill color",
+ NULL,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_FILL_COLOR_GDK,
+ g_param_spec_boxed (
+ "fill_color_gdk",
+ "GDK fill color",
+ "GDK fill color",
+ GDK_TYPE_COLOR,
+ G_PARAM_WRITABLE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_FILL_COLOR_RGBA,
+ g_param_spec_uint (
+ "fill_color_rgba",
+ "GDK fill color",
+ "GDK fill color",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_TEXT_WIDTH,
+ g_param_spec_double (
+ "text_width",
+ "Text width",
+ "Text width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_TEXT_HEIGHT,
+ g_param_spec_double (
+ "text_height",
+ "Text height",
+ "Text height",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READABLE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_EDITABLE,
+ g_param_spec_boolean (
+ "editable",
+ "Editable",
+ "Editable",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_USE_ELLIPSIS,
+ g_param_spec_boolean (
+ "use_ellipsis",
+ "Use ellipsis",
+ "Use ellipsis",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_ELLIPSIS,
+ g_param_spec_string (
+ "ellipsis",
+ "Ellipsis",
+ "Ellipsis",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_LINE_WRAP,
+ g_param_spec_boolean (
+ "line_wrap",
+ "Line wrap",
+ "Line wrap",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_BREAK_CHARACTERS,
+ g_param_spec_string (
+ "break_characters",
+ "Break characters",
+ "Break characters",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class, PROP_MAX_LINES,
+ g_param_spec_int (
+ "max_lines",
+ "Max lines",
+ "Max lines",
+ 0, G_MAXINT, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_WIDTH,
+ g_param_spec_double (
+ "width",
+ "Width",
+ "Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_HEIGHT,
+ g_param_spec_double (
+ "height",
+ "Height",
+ "Height",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_ALLOW_NEWLINES,
+ g_param_spec_boolean (
+ "allow_newlines",
+ "Allow newlines",
+ "Allow newlines",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_CURSOR_POS,
+ g_param_spec_int (
+ "cursor_pos",
+ "Cursor position",
+ "Cursor position",
+ 0, G_MAXINT, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_IM_CONTEXT,
+ g_param_spec_object (
+ "im_context",
+ "IM Context",
+ "IM Context",
+ GTK_TYPE_IM_CONTEXT,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_HANDLE_POPUP,
+ g_param_spec_boolean (
+ "handle_popup",
+ "Handle Popup",
+ "Handle Popup",
+ FALSE,
+ G_PARAM_READWRITE));
if (!clipboard_atom)
clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
@@ -3241,8 +3352,9 @@ e_text_preedit_changed_cb (GtkIMContext *context,
gchar *preedit_string = NULL;
gint cursor_pos;
- gtk_im_context_get_preedit_string (context, &preedit_string,
- NULL, &cursor_pos);
+ gtk_im_context_get_preedit_string (
+ context, &preedit_string,
+ NULL, &cursor_pos);
cursor_pos = CLAMP (cursor_pos, 0, g_utf8_strlen (preedit_string, -1));
etext->preedit_len = strlen (preedit_string);
@@ -3271,9 +3383,10 @@ e_text_delete_surrounding_cb (GtkIMContext *context,
gint n_chars,
EText *text)
{
- e_text_model_delete (text->model,
- MIN (text->selection_start, text->selection_end) + offset,
- n_chars);
+ e_text_model_delete (
+ text->model,
+ MIN (text->selection_start, text->selection_end) + offset,
+ n_chars);
return TRUE;
}
diff --git a/widgets/text/gal-a11y-e-text.c b/widgets/text/gal-a11y-e-text.c
index 6f62ae74c6..44b069d3a7 100644
--- a/widgets/text/gal-a11y-e-text.c
+++ b/widgets/text/gal-a11y-e-text.c
@@ -79,10 +79,11 @@ et_get_extents (AtkComponent *component,
&fake_height,
coord_type);
- g_object_get (item,
- "text_width", &real_width,
- "text_height", &real_height,
- NULL);
+ g_object_get (
+ item,
+ "text_width", &real_width,
+ "text_height", &real_height,
+ NULL);
if (width)
*width = real_width;
@@ -646,11 +647,12 @@ et_get_offset_at_point (AtkText *text,
x -= etext->cx;
y -= etext->cy;
- pango_layout_xy_to_index (etext->layout,
- x * PANGO_SCALE - PANGO_SCALE / 2,
- y * PANGO_SCALE - PANGO_SCALE / 2,
- &index,
- &trailing);
+ pango_layout_xy_to_index (
+ etext->layout,
+ x * PANGO_SCALE - PANGO_SCALE / 2,
+ y * PANGO_SCALE - PANGO_SCALE / 2,
+ &index,
+ &trailing);
return g_utf8_pointer_to_offset (etext->text, etext->text + index + trailing);
}
@@ -1130,9 +1132,10 @@ void
gal_a11y_e_text_init (void)
{
if (atk_get_root ())
- atk_registry_set_factory_type (atk_get_default_registry (),
- E_TYPE_TEXT,
- gal_a11y_e_text_factory_get_type ());
+ atk_registry_set_factory_type (
+ atk_get_default_registry (),
+ E_TYPE_TEXT,
+ gal_a11y_e_text_factory_get_type ());
}