diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-21 22:02:58 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:17 +0800 |
commit | 5146ff4c535f443fe25290eb96631e91ad44c8ef (patch) | |
tree | b8cc31419c1f297092e13eedd9a5877f4c106eda /addressbook/gui/widgets | |
parent | ea8a59a443f861af88ddb21d5dcbde1c95006203 (diff) | |
download | gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar.gz gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar.bz2 gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar.lz gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar.xz gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar.zst gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-model.c | 3 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-reflow-adapter.c | 3 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-table-adapter.c | 6 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard-view-widget.c | 68 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard-view.c | 7 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.h | 60 |
6 files changed, 85 insertions, 62 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index 8e62e40d28..3be37f26f0 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -757,7 +757,8 @@ e_addressbook_model_stop (EAddressbookModel *model) g_signal_emit (model, signals[STATUS_MESSAGE], 0, message); if (!model->priv->remove_status_id) - model->priv->remove_status_id = g_timeout_add_seconds (3, remove_status_cb, model); + model->priv->remove_status_id = + g_timeout_add_seconds (3, remove_status_cb, model); } gboolean diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c index 017b14ac19..48daaaaf6b 100644 --- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c @@ -557,7 +557,8 @@ e_addressbook_reflow_adapter_get_type (void) (GInstanceInitFunc) e_addressbook_reflow_adapter_init, }; - type = g_type_register_static (PARENT_TYPE, "EAddressbookReflowAdapter", &info, 0); + type = g_type_register_static ( + PARENT_TYPE, "EAddressbookReflowAdapter", &info, 0); } return type; diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 83f90a0573..e60ae924e7 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -185,7 +185,8 @@ addressbook_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer va g_object_unref (contact); - /* XXX do we need this? shouldn't the commit_contact generate a changed signal? */ + /* XXX Do we need this? Shouldn't the commit_contact + * generate a changed signal? */ e_table_model_cell_changed (etc, col, row); } } @@ -377,7 +378,8 @@ eab_table_adapter_get_type (void) (GInstanceInitFunc) eab_table_adapter_init, }; - type = g_type_register_static (PARENT_TYPE, "EAddressbookTableAdapter", &info, 0); + type = g_type_register_static ( + PARENT_TYPE, "EAddressbookTableAdapter", &info, 0); } return type; diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c index 945639f70b..3f8dd1ff28 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.c +++ b/addressbook/gui/widgets/e-minicard-view-widget.c @@ -30,16 +30,31 @@ #include "e-util/e-util.h" #include "e-minicard-view-widget.h" -static void e_minicard_view_widget_init (EMinicardViewWidget *widget); -static void e_minicard_view_widget_class_init (EMinicardViewWidgetClass *class); -static void e_minicard_view_widget_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); -static void e_minicard_view_widget_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -static void e_minicard_view_widget_dispose (GObject *object); -static void e_minicard_view_widget_reflow (ECanvas *canvas); -static void e_minicard_view_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation); -static void e_minicard_view_widget_style_set (GtkWidget *widget, GtkStyle *previous_style); -static void e_minicard_view_widget_realize (GtkWidget *widget); -static gboolean e_minicard_view_widget_real_focus_in_event (GtkWidget *widget, GdkEventFocus *event); +static void e_minicard_view_widget_init (EMinicardViewWidget *widget); +static void e_minicard_view_widget_class_init + (EMinicardViewWidgetClass *class); +static void e_minicard_view_widget_set_property + (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void e_minicard_view_widget_get_property + (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void e_minicard_view_widget_dispose (GObject *object); +static void e_minicard_view_widget_reflow (ECanvas *canvas); +static void e_minicard_view_widget_size_allocate + (GtkWidget *widget, + GtkAllocation *allocation); +static void e_minicard_view_widget_style_set + (GtkWidget *widget, + GtkStyle *previous_style); +static void e_minicard_view_widget_realize (GtkWidget *widget); +static gboolean e_minicard_view_widget_real_focus_in_event + (GtkWidget *widget, + GdkEventFocus *event); static gpointer parent_class; @@ -81,7 +96,8 @@ e_minicard_view_widget_get_type (void) (GInstanceInitFunc) e_minicard_view_widget_init, }; - type = g_type_register_static (e_canvas_get_type (), "EMinicardViewWidget", &info, 0); + type = g_type_register_static ( + E_TYPE_CANVAS, "EMinicardViewWidget", &info, 0); } return type; @@ -202,10 +218,11 @@ e_minicard_view_widget_init (EMinicardViewWidget *view) GtkWidget * e_minicard_view_widget_new (EAddressbookReflowAdapter *adapter) { - EMinicardViewWidget *widget = E_MINICARD_VIEW_WIDGET (g_object_new (e_minicard_view_widget_get_type (), NULL)); + EMinicardViewWidget *widget; - widget->adapter = adapter; - g_object_ref (widget->adapter); + widget = g_object_new (E_TYPE_MINICARD_VIEW_WIDGET, NULL); + + widget->adapter = g_object_ref (adapter); return GTK_WIDGET (widget); } @@ -418,7 +435,8 @@ e_minicard_view_widget_realize (GtkWidget *widget) } static void -e_minicard_view_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation) +e_minicard_view_widget_size_allocate (GtkWidget *widget, + GtkAllocation *allocation) { if (GTK_WIDGET_CLASS (parent_class)->size_allocate) GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation); @@ -427,17 +445,17 @@ e_minicard_view_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocati gdouble width; EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET (widget); - gnome_canvas_item_set ( view->emv, - "height", (double) allocation->height, - NULL ); - gnome_canvas_item_set ( view->emv, - "minimum_width", (double) allocation->width, - NULL ); - g_object_get (view->emv, - "width", &width, - NULL); + gnome_canvas_item_set ( + view->emv, "height", + (gdouble) allocation->height, NULL); + gnome_canvas_item_set ( + view->emv, "minimum_width", + (gdouble) allocation->width, NULL); + g_object_get (view->emv, "width", &width, NULL); width = MAX (width, allocation->width); - gnome_canvas_set_scroll_region (GNOME_CANVAS (view), 0, 0, width - 1, allocation->height - 1); + gnome_canvas_set_scroll_region ( + GNOME_CANVAS (view), 0, 0, + width - 1, allocation->height - 1); } } diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index 9be446d818..880bf92dcb 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -147,10 +147,9 @@ e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter, target_list, actions, 1/*XXX*/, event); if (!view->canvas_drag_data_get_id) - view->canvas_drag_data_get_id = g_signal_connect (GNOME_CANVAS_ITEM (view)->canvas, - "drag_data_get", - G_CALLBACK (e_minicard_view_drag_data_get), - view); + view->canvas_drag_data_get_id = g_signal_connect ( + GNOME_CANVAS_ITEM (view)->canvas, "drag_data_get", + G_CALLBACK (e_minicard_view_drag_data_get), view); gtk_drag_set_icon_default (context); diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h index 0fffe444ea..7fa5519cbb 100644 --- a/addressbook/gui/widgets/e-minicard.h +++ b/addressbook/gui/widgets/e-minicard.h @@ -20,34 +20,37 @@ * */ -#ifndef __E_MINICARD_H__ -#define __E_MINICARD_H__ +#ifndef E_MINICARD_H +#define E_MINICARD_H #include <gtk/gtk.h> #include <libgnomecanvas/libgnomecanvas.h> #include <libebook/e-contact.h> -G_BEGIN_DECLS +/* Standard GObject macros */ +#define E_TYPE_MINICARD \ + (e_minicard_get_type ()) +#define E_MINICARD(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST \ + ((obj), E_TYPE_MINICARD, EMinicard)) +#define E_MINICARD_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_CAST \ + ((cls), E_TYPE_MINICARD, EMinicardClass)) +#define E_IS_MINICARD(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE \ + ((obj), E_TYPE_MINICARD)) +#define E_IS_MINICARD_CLASS(cls) \ + (G_TYPE_CHECK_CLASS_TYPE \ + ((obj), E_TYPE_MINICARD)) +#define E_MINICARD_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS \ + ((obj), E_TYPE_MINICARD, EMinicardClass)) -/* EMinicard - A small card displaying information about a contact. - * - * The following arguments are available: - * - * name type read/write description - * -------------------------------------------------------------------------------- - * width double RW width of the card - * height double R height of the card - * card ECard* RW Pointer to the ECard - */ +G_BEGIN_DECLS -#define E_TYPE_MINICARD (e_minicard_get_type ()) -#define E_MINICARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_MINICARD, EMinicard)) -#define E_MINICARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_MINICARD, EMinicardClass)) -#define E_IS_MINICARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_MINICARD)) -#define E_IS_MINICARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_MINICARD)) +typedef struct _EMinicard EMinicard; +typedef struct _EMinicardClass EMinicardClass; -typedef struct _EMinicard EMinicard; -typedef struct _EMinicardClass EMinicardClass; typedef enum _EMinicardFocusType EMinicardFocusType; enum _EMinicardFocusType { @@ -112,15 +115,14 @@ struct _EMinicardField { #define E_MINICARD_FIELD(field) ((EMinicardField *)(field)) -GType e_minicard_get_type (void); -const gchar *e_minicard_get_card_id (EMinicard *minicard); -gint e_minicard_compare (EMinicard *minicard1, - EMinicard *minicard2); - -gint e_minicard_selected (EMinicard *minicard, - GdkEvent *event); -void e_minicard_activate_editor (EMinicard *minicard); +GType e_minicard_get_type (void); +const gchar * e_minicard_get_card_id (EMinicard *minicard); +gint e_minicard_compare (EMinicard *minicard1, + EMinicard *minicard2); +gint e_minicard_selected (EMinicard *minicard, + GdkEvent *event); +void e_minicard_activate_editor (EMinicard *minicard); G_END_DECLS -#endif /* __E_MINICARD_H__ */ +#endif /* E_MINICARD_H */ |