diff options
Diffstat (limited to 'addressbook/gui/widgets')
24 files changed, 240 insertions, 240 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index dae9c68745..ae553ad4e6 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -342,7 +342,7 @@ eab_model_class_init (GObjectClass *object_class) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - + eab_model_signals [SEARCH_RESULT] = g_signal_new ("search_result", G_OBJECT_CLASS_TYPE (object_class), @@ -351,7 +351,7 @@ eab_model_class_init (GObjectClass *object_class) NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); - + eab_model_signals [FOLDER_BAR_MESSAGE] = g_signal_new ("folder_bar_message", G_OBJECT_CLASS_TYPE (object_class), @@ -554,7 +554,7 @@ eab_model_set_property (GObject *object, guint prop_id, const GValue *value, GPa gboolean need_get_book_view = FALSE; model = EAB_MODEL (object); - + switch (prop_id){ case PROP_BOOK: if (model->book) { @@ -673,7 +673,7 @@ eab_model_new (void) EABModel *et; et = g_object_new (EAB_TYPE_MODEL, NULL); - + return et; } diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c index 29a9ed35af..06caebedee 100644 --- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c @@ -232,7 +232,7 @@ addressbook_incarnate (EReflowModel *erm, int i, GnomeCanvasGroup *parent) g_signal_connect (item, "drag_begin", G_CALLBACK(adapter_drag_begin), adapter); - + return item; } @@ -264,12 +264,12 @@ remove_contacts (EABModel *model, { GArray *indices = (GArray *) data; int count = indices->len; - + if (count == 1) e_reflow_model_item_removed (E_REFLOW_MODEL (adapter), g_array_index (indices, gint, 0)); - else + else e_reflow_model_changed (E_REFLOW_MODEL (adapter)); - + } static void @@ -378,7 +378,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class) object_class->get_property = addressbook_get_property; object_class->dispose = addressbook_dispose; - g_object_class_install_property (object_class, PROP_BOOK, + g_object_class_install_property (object_class, PROP_BOOK, g_param_spec_object ("book", _("Book"), /*_( */"XXX blurb" /*)*/, diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 65a82d03c9..b208952245 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -152,7 +152,7 @@ addressbook_is_cell_editable (ETableModel *etc, int col, int row) else if (contact && e_contact_get ((EContact *) contact, E_CONTACT_IS_LIST)) /* we only allow editing of the name and file as for lists */ - return col == E_CONTACT_FULL_NAME || col == E_CONTACT_FILE_AS; + return col == E_CONTACT_FULL_NAME || col == E_CONTACT_FILE_AS; else return col < E_CONTACT_LAST_SIMPLE_STRING; #endif @@ -265,10 +265,10 @@ remove_contacts (EABModel *model, { GArray *indices = (GArray *) data; int count = indices->len; - - + + e_table_model_pre_change (E_TABLE_MODEL (adapter)); - if (count == 1) + if (count == 1) e_table_model_rows_deleted (E_TABLE_MODEL (adapter), g_array_index (indices, gint, 0), 1); else e_table_model_changed (E_TABLE_MODEL (adapter)); diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 483b3b4162..b591389d7c 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-addressbook-view.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -212,32 +212,32 @@ eab_view_class_init (EABViewClass *klass) object_class->get_property = eab_view_get_property; object_class->dispose = eab_view_dispose; - g_object_class_install_property (object_class, PROP_BOOK, + g_object_class_install_property (object_class, PROP_BOOK, g_param_spec_object ("book", _("Book"), /*_( */"XXX blurb" /*)*/, E_TYPE_BOOK, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_SOURCE, + g_object_class_install_property (object_class, PROP_SOURCE, g_param_spec_object ("source", _("Source"), /*_( */"XXX blurb" /*)*/, E_TYPE_SOURCE, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_QUERY, + g_object_class_install_property (object_class, PROP_QUERY, g_param_spec_string ("query", _("Query"), /*_( */"XXX blurb" /*)*/, NULL, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_TYPE, + g_object_class_install_property (object_class, PROP_TYPE, g_param_spec_int ("type", _("Type"), /*_( */"XXX blurb" /*)*/, - EAB_VIEW_NONE, + EAB_VIEW_NONE, EAB_VIEW_TABLE, EAB_VIEW_NONE, G_PARAM_READWRITE)); @@ -361,7 +361,7 @@ eab_view_dispose (GObject *object) gtk_widget_destroy (eav->invisible); eav->invisible = NULL; } - + /* if (eav->search_context) { g_object_unref (eav->search_context); @@ -450,13 +450,13 @@ eab_view_new (void) rule_context_add_part, rule_context_next_part); rule_context_add_rule_set (eav->search_context, "ruleset", filter_rule_get_type (), rule_context_add_rule, rule_context_next_rule); - + userfile = g_build_filename ( g_get_home_dir (), ".evolution/addressbook/searches.xml", NULL); xmlfile = g_build_filename (SEARCH_RULE_DIR, "addresstypes.xml", NULL); - + g_object_set_data_full (G_OBJECT (eav->search_context), "user", userfile, g_free); g_object_set_data_full (G_OBJECT (eav->search_context), "system", xmlfile, g_free); - + rule_context_load (eav->search_context, xmlfile, userfile); eav->search_rule = filter_rule_new (); @@ -468,7 +468,7 @@ eab_view_new (void) filter_rule_add_part (eav->search_rule, filter_part_clone (part)); eav->search = e_filter_bar_new (eav->search_context, xmlfile, userfile, NULL, eav); - + g_free (xmlfile); g_free (userfile); @@ -508,9 +508,9 @@ eab_view_new (void) clipboard_atom, GDK_SELECTION_TYPE_STRING, 0); - + g_signal_connect (eav->invisible, "selection_get", - G_CALLBACK (selection_get), + G_CALLBACK (selection_get), eav); g_signal_connect (eav->invisible, "selection_clear_event", G_CALLBACK (selection_clear_event), @@ -604,7 +604,7 @@ set_view_preview (EABView *view) state ? "1" : "0", NULL); eab_view_show_contact_preview (view, state); - + g_object_unref (gconf_client); } @@ -1005,7 +1005,7 @@ do_popup_menu(EABView *view, GdkEvent *event) contact_and_book->closure = cards; e_selection_model_foreach(selection_model, get_card_1, contact_and_book); } - + /** @HookPoint-EABPopup:Addressbook view Context Menu * @Id: org.gnome.evolution.addressbook.view.popup * @Class: org.gnome.evolution.addresbook.popup:1.0 @@ -1055,7 +1055,7 @@ selection_changed (GObject *o, EABView *view) eab_contact_display_render (EAB_CONTACT_DISPLAY (view->contact_display), NULL, EAB_CONTACT_DISPLAY_RENDER_NORMAL); } - + } static void @@ -1069,7 +1069,7 @@ table_double_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, E g_object_get(model, "book", &book, NULL); - + g_return_if_fail (E_IS_BOOK (book)); if (e_contact_get (contact, E_CONTACT_IS_LIST)) @@ -1228,10 +1228,10 @@ contacts_removed (EABModel *model, gpointer data, EABView *eav) gint i; for (i = 0; i < count; i ++) { - - + + if (eav->displayed_contact == g_array_index (indices, gint, i)) { - + /* if the contact that's presently displayed is changed, clear the display */ eab_contact_display_render (EAB_CONTACT_DISPLAY (eav->contact_display), NULL, EAB_CONTACT_DISPLAY_RENDER_NORMAL); @@ -1288,7 +1288,7 @@ create_table_view (EABView *view) ETableModel *adapter; GtkWidget *table; char *etspecfile; - + adapter = eab_table_adapter_new(view->model); /* Here we create the table. We give it the three pieces of @@ -1315,7 +1315,7 @@ create_table_view (EABView *view) /* drag & drop signals */ e_table_drag_source_set (E_TABLE(E_TABLE_SCROLLED(table)->table), GDK_BUTTON1_MASK, drag_types, num_drag_types, GDK_ACTION_MOVE | GDK_ACTION_COPY); - + g_signal_connect (E_TABLE_SCROLLED(table)->table, "table_drag_data_get", G_CALLBACK (table_drag_data_get), @@ -1396,14 +1396,14 @@ search_activated (ESearchBar *esb, EABView *v) } g_string_free (s, TRUE); - } else + } else search_query = g_strdup ("(contains \"x-evolution-any-field\" \"\")"); /* Merge view and sexp */ subid = e_search_bar_get_viewitem_id (esb); if (subid) { - master_list = get_master_list (); + master_list = get_master_list (); category_name = g_list_nth_data (master_list, subid-1); view_sexp = g_strdup_printf ("(is \"category_list\" \"%s\")", category_name); search_query = g_strconcat ("(and ", view_sexp, search_query, ")", NULL); @@ -1460,7 +1460,7 @@ compare_subitems (const void *a, const void *b) g_free (collate_a); g_free (collate_b); - + return ret; } @@ -1502,7 +1502,7 @@ make_suboptions (EABView *view) GList *master_list; gint i, N; GtkWidget *menu; - + master_list = get_master_list (); N = g_list_length (master_list); subitems = g_new (EABSearchBarItem, N+2); @@ -1521,7 +1521,7 @@ make_suboptions (EABView *view) subitems[N+1].search.id = -1; subitems[N+1].search.text = NULL; subitems[N+1].image = NULL; - + qsort (subitems + 1, N, sizeof (subitems[0]), compare_subitems); menu = generate_viewoption_menu (subitems); e_search_bar_set_viewoption_menu ((ESearchBar *)view->search, menu); @@ -1620,7 +1620,7 @@ eab_view_setup_menus (EABView *view, /** * eab_view_discard_menus: * @view: An addressbook view. - * + * * Makes an addressbook view discard its GAL view menus and its views instance * objects. This should be called when the corresponding Bonobo component is * deactivated. @@ -1688,8 +1688,8 @@ eab_view_print (EABView *view, GtkPrintOperationAction action) } } -/* callback function to handle removal of contacts for - * which a user doesnt have write permission +/* callback function to handle removal of contacts for + * which a user doesnt have write permission */ static void delete_contacts_cb (EBook *book, EBookStatus status, gpointer closure) { @@ -1715,10 +1715,10 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) EContact *contact; ETable *etable = NULL; EMinicardView *card_view; - ESelectionModel *selection_model = NULL; + ESelectionModel *selection_model = NULL; char *name = NULL; gint row = 0, select; - + list = get_selected_contacts (view); contact = list->data; @@ -1738,11 +1738,11 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) else if (view->view_type == EAB_VIEW_TABLE) { etable = e_table_scrolled_get_table(E_TABLE_SCROLLED(view->widget)); - row = e_table_get_cursor_row (E_TABLE (etable)); + row = e_table_get_cursor_row (E_TABLE (etable)); } /* confirm delete */ - if (is_delete && + if (is_delete && !eab_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(view->widget)), plural, is_list, name)) { g_free (name); @@ -1765,7 +1765,7 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) ids, delete_contacts_cb, NULL); - + g_list_free (ids); } else { @@ -1778,14 +1778,14 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) NULL); } } - + /* Sets the cursor, at the row after the deleted row */ - if (view->view_type == EAB_VIEW_MINICARD && row!=0) { + if (view->view_type == EAB_VIEW_MINICARD && row!=0) { select = e_sorter_model_to_sorted (selection_model->sorter, row); /* Sets the cursor, before the deleted row if its the last row */ if (select == e_selection_model_row_count (selection_model) - 1) - select = select - 1; + select = select - 1; else select = select + 1; @@ -1795,12 +1795,12 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) /* Sets the cursor, at the row after the deleted row */ else if (view->view_type == EAB_VIEW_TABLE && row!=0) { - select = e_table_model_to_view_row (E_TABLE (etable), row); - + select = e_table_model_to_view_row (E_TABLE (etable), row); + /* Sets the cursor, before the deleted row if its the last row */ if (select == e_table_model_row_count (E_TABLE(etable)->model) - 1) select = select - 1; - else + else select = select + 1; row = e_table_view_to_model_row (E_TABLE (etable), select); @@ -1864,7 +1864,7 @@ selection_received (GtkWidget *invisible, contact_list = eab_contact_list_from_string (str); } else contact_list = eab_contact_list_from_string ((char *)selection_data->data); - + for (l = contact_list; l; l = l->next) { EContact *contact = l->data; @@ -1907,15 +1907,15 @@ eab_view_save_as (EABView *view, gboolean all) { GList *list = NULL; EBook *book ; - - g_object_get(view->model, + + g_object_get(view->model, "book", &book, NULL); if (all) { EBookQuery *query = e_book_query_any_field_contains(""); e_book_get_contacts(book, query, &list, NULL); - e_book_query_unref(query); + e_book_query_unref(query); } else { list = get_selected_contacts(view); @@ -1987,7 +1987,7 @@ eab_view_copy (EABView *view) { gtk_html_copy (GTK_HTML (view->contact_display)); } - else + else { view->clipboard_contacts = get_selected_contacts (view); @@ -2035,14 +2035,14 @@ view_transfer_contacts (EABView *view, gboolean delete_from_source, gboolean all GList *contacts = NULL; GtkWindow *parent_window; - g_object_get(view->model, + g_object_get(view->model, "book", &book, NULL); if (all) { EBookQuery *query = e_book_query_any_field_contains(""); e_book_get_contacts(book, query, &contacts, NULL); - e_book_query_unref(query); + e_book_query_unref(query); } else { contacts = get_selected_contacts (view); @@ -2102,13 +2102,13 @@ eab_view_can_view (EABView *view) return view ? eab_view_selection_nonempty (view) : FALSE; } -gboolean +gboolean eab_view_can_send (EABView *view) { return view ? eab_view_selection_nonempty (view) : FALSE; } -gboolean +gboolean eab_view_can_send_to (EABView *view) { return view ? eab_view_selection_nonempty (view) : FALSE; diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h index 14f16c82f4..3ba45d6302 100644 --- a/addressbook/gui/widgets/e-addressbook-view.h +++ b/addressbook/gui/widgets/e-addressbook-view.h @@ -62,7 +62,7 @@ typedef struct _EABViewClass EABViewClass; struct _EABView { GtkVBox parent; - + /* item specific fields */ EABViewType view_type; diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c index 1d4bf307c9..ab6e5471de 100644 --- a/addressbook/gui/widgets/e-minicard-label.c +++ b/addressbook/gui/widgets/e-minicard-label.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-minicard-label.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -203,7 +203,7 @@ e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *va GnomeCanvasItem *item; e_minicard_label = E_MINICARD_LABEL (object); - item = GNOME_CANVAS_ITEM (object); + item = GNOME_CANVAS_ITEM (object); switch (prop_id){ case PROP_WIDTH: @@ -344,7 +344,7 @@ static gboolean e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event) { EMinicardLabel *e_minicard_label; - + e_minicard_label = E_MINICARD_LABEL (item); switch( event->type ) { @@ -371,7 +371,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event) break; } case GDK_BUTTON_PRESS: - case GDK_BUTTON_RELEASE: + case GDK_BUTTON_RELEASE: case GDK_MOTION_NOTIFY: case GDK_ENTER_NOTIFY: case GDK_LEAVE_NOTIFY: { @@ -382,7 +382,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event) default: break; } - + if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event) return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event); else @@ -413,7 +413,7 @@ set_colors (EMinicardLabel *label) GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (label)->canvas); GtkStyle *style = gtk_widget_get_style (canvas); if (label->has_focus) { - gnome_canvas_item_set (label->rect, + gnome_canvas_item_set (label->rect, "outline_color_gdk", &style->mid[GTK_STATE_SELECTED], "fill_color_gdk", &style->bg[GTK_STATE_NORMAL], NULL); @@ -453,21 +453,21 @@ static void e_minicard_label_reflow(GnomeCanvasItem *item, int flags) { EMinicardLabel *e_minicard_label = E_MINICARD_LABEL(item); - + gint old_height; gdouble text_height; gdouble left_width; old_height = e_minicard_label->height; - g_object_get(e_minicard_label->fieldname, + g_object_get(e_minicard_label->fieldname, "text_height", &text_height, NULL); e_minicard_label->height = text_height; - g_object_get(e_minicard_label->field, + g_object_get(e_minicard_label->field, "text_height", &text_height, NULL); diff --git a/addressbook/gui/widgets/e-minicard-label.h b/addressbook/gui/widgets/e-minicard-label.h index 30e1a274e7..1b64d6874b 100644 --- a/addressbook/gui/widgets/e-minicard-label.h +++ b/addressbook/gui/widgets/e-minicard-label.h @@ -53,7 +53,7 @@ typedef struct _EMinicardLabelClass EMinicardLabelClass; struct _EMinicardLabel { GnomeCanvasGroup parent; - + /* item specific fields */ double width; double height; diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c index 7f4c84d0fd..5c1693dea2 100644 --- a/addressbook/gui/widgets/e-minicard-view-widget.c +++ b/addressbook/gui/widgets/e-minicard-view-widget.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-minicard-view-widget.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -102,28 +102,28 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *klass) object_class->get_property = e_minicard_view_widget_get_property; object_class->dispose = e_minicard_view_widget_dispose; - g_object_class_install_property (object_class, PROP_BOOK, + g_object_class_install_property (object_class, PROP_BOOK, g_param_spec_object ("book", _("Book"), /*_( */"XXX blurb" /*)*/, E_TYPE_BOOK, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_QUERY, + g_object_class_install_property (object_class, PROP_QUERY, g_param_spec_string ("query", _("Query"), /*_( */"XXX blurb" /*)*/, NULL, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_EDITABLE, + g_object_class_install_property (object_class, PROP_EDITABLE, g_param_spec_boolean ("editable", _("Editable"), /*_( */"XXX blurb" /*)*/, FALSE, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_COLUMN_WIDTH, + g_object_class_install_property (object_class, PROP_COLUMN_WIDTH, g_param_spec_double ("column_width", _("Column Width"), /*_( */"XXX blurb" /*)*/, @@ -390,7 +390,7 @@ e_minicard_view_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocatio { if (GTK_WIDGET_CLASS(parent_class)->size_allocate) GTK_WIDGET_CLASS(parent_class)->size_allocate (widget, allocation); - + if (GTK_WIDGET_REALIZED(widget)) { double width; EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget); @@ -443,7 +443,7 @@ e_minicard_view_widget_get_view (EMinicardViewWidget *view) return NULL; } -static gboolean +static gboolean e_minicard_view_widget_real_focus_in_event(GtkWidget *widget, GdkEventFocus *event) { GnomeCanvas *canvas; diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index 2b271629b1..772798432f 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-minicard-view.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -88,7 +88,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget, switch (info) { case DND_TARGET_TYPE_VCARD_LIST: { char *value; - + value = eab_contact_list_to_string (view->drag_list); gtk_selection_data_set (selection_data, @@ -101,7 +101,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget, case DND_TARGET_TYPE_SOURCE_VCARD_LIST: { EBook *book; char *value; - + g_object_get (view->adapter, "book", &book, NULL); value = eab_book_and_contact_list_to_string (book, view->drag_list); @@ -131,7 +131,7 @@ e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter, GdkEvent *event, GdkDragAction actions = GDK_ACTION_MOVE | GDK_ACTION_COPY; clear_drag_data (view); - + view->drag_list = e_minicard_view_get_card_list (view); g_print ("dragging %d card(s)\n", g_list_length (view->drag_list)); @@ -213,7 +213,7 @@ e_minicard_view_set_property (GObject *object, EMinicardView *view; view = E_MINICARD_VIEW (object); - + switch (prop_id){ case PROP_ADAPTER: if (view->adapter) { @@ -246,7 +246,7 @@ e_minicard_view_set_property (GObject *object, g_signal_connect (model, "writable_status", G_CALLBACK (writable_status_change), view); } - + } break; case PROP_BOOK: @@ -350,7 +350,7 @@ static gboolean e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event) { EMinicardView *view; - + view = E_MINICARD_VIEW (item); switch( event->type ) { @@ -359,11 +359,11 @@ e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event) gboolean editable; g_object_get(view->adapter, "editable", &editable, NULL); - + if (editable) { EBook *book; g_object_get(view, "book", &book, NULL); - + if (book && E_IS_BOOK (book)) eab_show_contact_editor (book, e_contact_new(), TRUE, editable); } @@ -485,39 +485,39 @@ e_minicard_view_class_init (EMinicardViewClass *klass) GObjectClass *object_class; GnomeCanvasItemClass *item_class; EReflowClass *reflow_class; - + object_class = G_OBJECT_CLASS (klass); item_class = (GnomeCanvasItemClass *) klass; reflow_class = (EReflowClass *) klass; - + parent_class = g_type_class_peek_parent (klass); - + object_class->set_property = e_minicard_view_set_property; object_class->get_property = e_minicard_view_get_property; object_class->dispose = e_minicard_view_dispose; - g_object_class_install_property (object_class, PROP_ADAPTER, + g_object_class_install_property (object_class, PROP_ADAPTER, g_param_spec_object ("adapter", _("Adapter"), /*_( */"XXX blurb" /*)*/, E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_BOOK, + g_object_class_install_property (object_class, PROP_BOOK, g_param_spec_object ("book", _("Book"), /*_( */"XXX blurb" /*)*/, E_TYPE_BOOK, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_QUERY, + g_object_class_install_property (object_class, PROP_QUERY, g_param_spec_string ("query", _("Query"), /*_( */"XXX blurb" /*)*/, NULL, G_PARAM_READWRITE)); - g_object_class_install_property (object_class, PROP_EDITABLE, + g_object_class_install_property (object_class, PROP_EDITABLE, g_param_spec_boolean ("editable", _("Editable"), /*_( */"XXX blurb" /*)*/, diff --git a/addressbook/gui/widgets/e-minicard-view.h b/addressbook/gui/widgets/e-minicard-view.h index 6950204286..ca706fed70 100644 --- a/addressbook/gui/widgets/e-minicard-view.h +++ b/addressbook/gui/widgets/e-minicard-view.h @@ -63,7 +63,7 @@ struct _EMinicardView EReflow parent; EAddressbookReflowAdapter *adapter; - + /* item specific fields */ GList *drag_list; diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 7132389379..c0fd0b5994 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-minicard.c * Copyright (C) 2000 Ximian, Inc. * Author: Chris Lahey <clahey@ximian.com> @@ -188,14 +188,14 @@ e_minicard_class_init (EMinicardClass *klass) /*_( */"XXX blurb" /*)*/, FALSE, G_PARAM_READWRITE)); - + g_object_class_install_property (object_class, PROP_CONTACT, g_param_spec_object ("contact", _("Contact"), /*_( */"XXX blurb" /*)*/, E_TYPE_CONTACT, G_PARAM_READWRITE)); - + e_minicard_signals [SELECTED] = g_signal_new ("selected", G_OBJECT_CLASS_TYPE (object_class), @@ -264,23 +264,23 @@ set_selected (EMinicard *minicard, gboolean selected) { GtkWidget *canvas = GTK_WIDGET(GNOME_CANVAS_ITEM(minicard)->canvas); if (selected) { - gnome_canvas_item_set (minicard->rect, + gnome_canvas_item_set (minicard->rect, "outline_color_gdk", &canvas->style->bg[GTK_STATE_ACTIVE], NULL); - gnome_canvas_item_set (minicard->header_rect, + gnome_canvas_item_set (minicard->header_rect, "fill_color_gdk", &canvas->style->bg[GTK_STATE_SELECTED], NULL); - gnome_canvas_item_set (minicard->header_text, + gnome_canvas_item_set (minicard->header_text, "fill_color_gdk", &canvas->style->text[GTK_STATE_SELECTED], NULL); } else { - gnome_canvas_item_set (minicard->rect, - "outline_color", NULL, + gnome_canvas_item_set (minicard->rect, + "outline_color", NULL, NULL); - gnome_canvas_item_set (minicard->header_rect, + gnome_canvas_item_set (minicard->header_rect, "fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL], NULL); - gnome_canvas_item_set (minicard->header_text, + gnome_canvas_item_set (minicard->header_text, "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL], NULL); } @@ -306,7 +306,7 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G item = GNOME_CANVAS_ITEM (object); e_minicard = E_MINICARD (object); - + switch (prop_id){ case PROP_WIDTH: if (e_minicard->width != g_value_get_double (value)) { @@ -415,7 +415,7 @@ e_minicard_dispose (GObject *object) g_return_if_fail (E_IS_MINICARD (object)); e_minicard = E_MINICARD (object); - + if (e_minicard->fields) { g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL); g_list_free(e_minicard->fields); @@ -442,12 +442,12 @@ e_minicard_finalize (GObject *object) g_return_if_fail (E_IS_MINICARD (object)); e_minicard = E_MINICARD (object); - + if (e_minicard->contact) { g_object_unref (e_minicard->contact); e_minicard->contact = NULL; } - + if (e_minicard->list_icon_pixbuf) { g_object_unref (e_minicard->list_icon_pixbuf); e_minicard->list_icon_pixbuf = NULL; @@ -477,7 +477,7 @@ e_minicard_realize (GnomeCanvasItem *item) if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item); - + e_minicard->rect = gnome_canvas_item_new( group, gnome_canvas_rect_get_type(), @@ -512,7 +512,7 @@ e_minicard_realize (GnomeCanvasItem *item) e_canvas_item_move_absolute(e_minicard->header_text, 6, 6); - e_minicard->list_icon = + e_minicard->list_icon = gnome_canvas_item_new ( group, gnome_canvas_pixbuf_get_type(), "pixbuf", e_minicard->list_icon_pixbuf, @@ -544,7 +544,7 @@ gboolean e_minicard_activate_editor(EMinicard *minicard) { GnomeCanvasItem *item = (GnomeCanvasItem *)minicard; - + if (minicard->editor) { eab_editor_raise (minicard->editor); } @@ -581,7 +581,7 @@ static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) { EMinicard *e_minicard; - + e_minicard = E_MINICARD (item); switch( event->type ) { @@ -608,7 +608,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK); - + e_canvas_item_grab_focus(item, TRUE); if (gnome_canvas_item_grab (GNOME_CANVAS_ITEM (e_minicard), @@ -734,7 +734,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) default: break; } - + if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event) return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event); else @@ -749,7 +749,7 @@ e_minicard_resize_children( EMinicard *e_minicard ) if (e_minicard->header_text) { gnome_canvas_item_set( e_minicard->header_text, - "width", ((double) e_minicard->width - 12 + "width", ((double) e_minicard->width - 12 - (is_list ? e_minicard->list_icon_size : 0.0)), NULL ); } @@ -773,14 +773,14 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width) EMinicardField *minicard_field; char *name; char *string; - + group = GNOME_CANVAS_GROUP( e_minicard ); - + name = g_strdup_printf("%s:", e_contact_pretty_name (field)); string = e_contact_get (e_minicard->contact, field); new_item = e_minicard_label_new(group); - + if (e_minicard->contact && e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST)) gnome_canvas_item_set( new_item, "width", e_minicard->width - 4.0, @@ -847,7 +847,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, i for (l=email_list, le=emails; l!=NULL && count < limit && le!=NULL; l = l->next, le=le->next) { const gchar *tmp; - + tmp = get_email_location ((EVCardAttribute *) l->data); if (tmp) name = g_strdup_printf ("%s:", tmp); @@ -856,7 +856,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, i string = e_text_to_html (le->data, 0); new_item = e_minicard_label_new(group); - + gnome_canvas_item_set( new_item, "width", e_minicard->width - 4.0, "fieldname", name, @@ -954,7 +954,7 @@ remodel( EMinicard *e_minicard ) for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) && count < 5; field++) { EMinicardField *minicard_field = NULL; gboolean is_email=FALSE; - + if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME) continue; @@ -1028,19 +1028,19 @@ e_minicard_reflow(GnomeCanvasItem *item, int flags) GList *list; gdouble text_height; gint old_height; - + old_height = e_minicard->height; g_object_get(e_minicard->header_text, "text_height", &text_height, NULL); - + e_minicard->height = text_height + 10.0; - + gnome_canvas_item_set(e_minicard->header_rect, "y2", text_height + 9.0, NULL); - + for(list = e_minicard->fields; list; list = g_list_next(list)) { EMinicardField *field = E_MINICARD_FIELD(list->data); /* Why not use the item that is passed in? */ @@ -1052,7 +1052,7 @@ e_minicard_reflow(GnomeCanvasItem *item, int flags) e_minicard->height += text_height; } e_minicard->height += 2; - + gnome_canvas_item_set(e_minicard->rect, "x2", (double) e_minicard->width - 1.0, "y2", (double) e_minicard->height - 1.0, @@ -1083,7 +1083,7 @@ int e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2) { int cmp = 0; - + g_return_val_if_fail(minicard1 != NULL, 0); g_return_val_if_fail(E_IS_MINICARD(minicard1), 0); g_return_val_if_fail(minicard2 != NULL, 0); @@ -1098,13 +1098,13 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2) "file_as", &file_as2, NULL); - if (file_as1 && file_as2) + if (file_as1 && file_as2) cmp = g_utf8_collate(file_as1, file_as2); else if (file_as1) cmp = -1; else if (file_as2) cmp = 1; - else + else cmp = strcmp(e_minicard_get_card_id(minicard1), e_minicard_get_card_id(minicard2)); g_free (file_as1); diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h index 4a5d1c6e77..a1d084869c 100644 --- a/addressbook/gui/widgets/e-minicard.h +++ b/addressbook/gui/widgets/e-minicard.h @@ -60,10 +60,10 @@ enum _EMinicardFocusType { struct _EMinicard { GnomeCanvasGroup parent; - + /* item specific fields */ EContact *contact; - + GnomeCanvasItem *rect; GnomeCanvasItem *header_rect; GnomeCanvasItem *header_text; @@ -107,7 +107,7 @@ struct _EMinicardClass }; typedef struct _EMinicardField EMinicardField; - + struct _EMinicardField { EContactField field; GnomeCanvasItem *label; diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 41e436c07e..639ccf6d04 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -81,7 +81,7 @@ eab_uri_popup_link_open(EPopup *ep, EPopupItem *item, void *data) { EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target; GError *err = NULL; - + gnome_url_show(t->uri, &err); if (err) { g_warning("gnome_url_show: %s", err->message); @@ -96,11 +96,11 @@ eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, void *data) struct _EABContactDisplayPrivate *p = display->priv; EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target; const char *url = t->uri; - char *html=NULL; - int i=0; + char *html=NULL; + int i=0; GList *email_list, *l; int email_num = atoi (url + strlen ("internal-mailto:")); - + email_list = e_contact_get (p->contact, E_CONTACT_EMAIL); for (l = email_list; l; l=l->next) { if(i==email_num) @@ -109,9 +109,9 @@ eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, void *data) } g_free(p->selection_uri); - p->selection_uri = g_strdup(html); + p->selection_uri = g_strdup(html); g_free (html); - + gtk_selection_owner_set(p->invisible, GDK_SELECTION_PRIMARY, gtk_get_current_event_time()); gtk_selection_owner_set(p->invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time()); } @@ -136,12 +136,12 @@ eab_uri_popup_address_send(EPopup *ep, EPopupItem *item, void *data) const char *url = t->uri; EABContactDisplay *display = data; struct _EABContactDisplayPrivate *p = display->priv; - + int mail_num = atoi (url + strlen ("internal-mailto:")); - + if (mail_num == -1) - return; - + return; + eab_send_contact (p->contact, mail_num, EAB_DISPOSITION_AS_TO); } @@ -160,7 +160,7 @@ eab_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint t static void eab_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EABContactDisplay *display) { -#if 0 +#if 0 struct _EABContactDisplayPrivate *p = display->priv; g_free(p->selection_uri); @@ -171,7 +171,7 @@ eab_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EABContac static EPopupItem eab_uri_popups[] = { { E_POPUP_ITEM, "05.open", N_("_Open Link in Browser"), eab_uri_popup_link_open, NULL, NULL, EAB_POPUP_URI_NOT_MAILTO }, { E_POPUP_ITEM, "10.copy", N_("_Copy Link Location"), eab_uri_popup_link_copy, NULL, "edit-copy", EAB_POPUP_URI_NOT_MAILTO }, - { E_POPUP_ITEM, "15.send", N_("_Send New Message To..."), eab_uri_popup_address_send, NULL, "mail-message-new", EAB_POPUP_URI_MAILTO}, + { E_POPUP_ITEM, "15.send", N_("_Send New Message To..."), eab_uri_popup_address_send, NULL, "mail-message-new", EAB_POPUP_URI_MAILTO}, { E_POPUP_ITEM, "20.copy", N_("Copy _Email Address"), eab_uri_popup_email_address_copy, NULL, "edit-copy", EAB_POPUP_URI_MAILTO}, }; @@ -199,7 +199,7 @@ eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const char *uri GtkMenu *menu; GSList *menus = NULL; int i; - + emp = eab_popup_new("org.gnome.evolution.addressbook.contactdisplay.popup"); t = eab_popup_target_new_uri(emp, uri); @@ -212,7 +212,7 @@ eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const char *uri e_popup_add_items((EPopup *)emp, menus, NULL, eab_uri_popup_free, display); menu = e_popup_create_menu_once((EPopup *)emp,(EPopupTarget*)t, 0); - + if (event == NULL) { gtk_menu_popup(menu, NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time()); } else { @@ -267,7 +267,7 @@ on_link_clicked (GtkHTML *html, const char *url, EABContactDisplay *display) if (mail_num == -1) return; - + eab_send_contact (display->priv->contact, mail_num, EAB_DISPOSITION_AS_TO); return; @@ -275,7 +275,7 @@ on_link_clicked (GtkHTML *html, const char *url, EABContactDisplay *display) #endif gnome_url_show (url, &err); - + if (err) { g_warning ("gnome_url_show: %s", err->message); g_error_free (err); @@ -417,7 +417,7 @@ accum_time_attribute (GString *gstr, EContact *contact, const char *html_label, EContactDate *date; GDate *gdate = NULL; char sdate[100]; - + date = e_contact_get (contact, field); if (date) { gdate = g_date_new_dmy ( date->day, @@ -508,7 +508,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact) email_list = e_contact_get (contact, E_CONTACT_EMAIL); email_attr_list = e_contact_get_attributes (contact, E_CONTACT_EMAIL); - + for (l = email_list, al=email_attr_list; l && al; l = l->next, al = al->next) { #ifdef HANDLE_MAILTO_INTERNALLY char *html = e_text_to_html (l->data, 0); @@ -517,7 +517,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact) email_num ++; g_free (html); nl = "<br>"; - + #else g_string_append_printf (accum, "%s%s <font color=" HEADER_COLOR ">(%s)</font>", nl, (char*)l->data, get_email_location ((EVCardAttribute *) al->data)); nl = "\n"; @@ -546,7 +546,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact) if (accum->len > 0) gtk_html_stream_printf (html_stream, "%s", accum->str); } - + g_string_assign (accum, ""); accum_multival_attribute (accum, contact, _("AIM"), E_CONTACT_IM_AIM, AIM_ICON, 0); accum_multival_attribute (accum, contact, _("GroupWise"), E_CONTACT_IM_GROUPWISE, GROUPWISE_ICON, 0); @@ -571,7 +571,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact) accum_attribute (accum, contact, _("Assistant"), E_CONTACT_ASSISTANT, NULL, 0); accum_attribute (accum, contact, _("Video Chat"), E_CONTACT_VIDEO_URL, VIDEOCONF_ICON, E_TEXT_TO_HTML_CONVERT_URLS); accum_attribute (accum, contact, _("Calendar"), E_CONTACT_CALENDAR_URI, NULL, E_TEXT_TO_HTML_CONVERT_URLS); - accum_attribute (accum, contact, _("Free/Busy"), E_CONTACT_FREEBUSY_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS); + accum_attribute (accum, contact, _("Free/Busy"), E_CONTACT_FREEBUSY_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS); accum_attribute (accum, contact, _("Phone"), E_CONTACT_PHONE_BUSINESS, NULL, 0); accum_attribute (accum, contact, _("Fax"), E_CONTACT_PHONE_BUSINESS_FAX, NULL, 0); accum_address (accum, contact, _("Address"), E_CONTACT_ADDRESS_WORK, E_CONTACT_ADDRESS_LABEL_WORK); @@ -637,7 +637,7 @@ eab_contact_display_render_normal (EABContactDisplay *display, EContact *contact gtk_html_stream_printf (html_stream, "<img border=\"1\" src=\"internal-contact-photo:\">"); e_contact_photo_free (photo); } - + gtk_html_stream_printf (html_stream, "</td><td valign=\"top\">\n"); str = e_contact_get_const (contact, E_CONTACT_FILE_AS); @@ -735,7 +735,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac calced_width, calced_height); e_contact_photo_free (photo); } - + gtk_html_stream_printf (html_stream, "</td><td valign=\"top\">\n"); str = e_contact_get_const (contact, E_CONTACT_FILE_AS); @@ -754,7 +754,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac } gtk_html_stream_write (html_stream, "<hr>", 4); - + if (e_contact_get (contact, E_CONTACT_IS_LIST)) { GList *email_list; GList *l; @@ -804,7 +804,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac g_free (html); } gtk_html_stream_write (html_stream, "<br>", 4); - + str = e_contact_get_const (contact, E_CONTACT_HOMEPAGE_URL); if (str) { html = e_text_to_html (str, E_TEXT_TO_HTML_CONVERT_URLS); @@ -847,11 +847,11 @@ eab_html_press_event (GtkWidget *widget, GdkEvent *event,EABContactDisplay *disp { char *uri; gboolean res = FALSE; - + if (event->button.button!= 3 ) return FALSE; - + uri = gtk_html_get_url_at (GTK_HTML (widget), event->button.x, event->button.y); if (uri){ eab_uri_popup_event(display,event,uri); @@ -873,7 +873,7 @@ eab_contact_display_new (void) p=display->priv = g_new0 (EABContactDisplayPrivate, 1); gtk_html_set_default_content_type (GTK_HTML (display), "text/html; charset=utf-8"); - + gtk_html_set_editable (GTK_HTML (display), FALSE); g_signal_connect (display, "url_requested", @@ -882,7 +882,7 @@ eab_contact_display_new (void) g_signal_connect (display, "link_clicked", G_CALLBACK (on_link_clicked), display); - g_signal_connect(display, "button_press_event", + g_signal_connect(display, "button_press_event", G_CALLBACK(eab_html_press_event), display); p->invisible = gtk_invisible_new(); @@ -890,7 +890,7 @@ eab_contact_display_new (void) g_signal_connect(p->invisible, "selection_clear_event", G_CALLBACK(eab_selection_clear_event), display); gtk_selection_add_target(p->invisible, GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 0); gtk_selection_add_target(p->invisible, GDK_SELECTION_CLIPBOARD, GDK_SELECTION_TYPE_STRING, 1); - + #if 0 g_signal_connect (display, "object_requested", G_CALLBACK (on_object_requested), diff --git a/addressbook/gui/widgets/eab-contact-display.h b/addressbook/gui/widgets/eab-contact-display.h index cc10b0eeac..e1b84346e7 100644 --- a/addressbook/gui/widgets/eab-contact-display.h +++ b/addressbook/gui/widgets/eab-contact-display.h @@ -43,7 +43,7 @@ typedef enum { struct _EABContactDisplay { GtkHTML parent; - + EABContactDisplayPrivate *priv; }; diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index f7ed275698..731d141a84 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-table-field-chooser.c * Copyright (C) 2001 Ximian, Inc. * Author: Chris Toshok <toshok@ximian.com> @@ -76,7 +76,7 @@ void eab_error_dialog (const char *msg, EBookStatus status) { const char *status_str = status_to_string [status]; - + if (status_str) e_error_run (NULL, "addressbook:generic-error", msg, _(status_str), NULL); } @@ -86,7 +86,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) { char *label_string, *label = NULL, *uri; GtkWidget *dialog; - + g_return_if_fail (source != NULL); uri = e_source_get_uri (source); @@ -97,7 +97,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) "for offline usage. Please load the addressbook once in online mode " "to download its contents"); } - + else if (!strncmp (uri, "file:", 5)) { char *path = g_filename_from_uri (uri, NULL, NULL); label = g_strdup_printf ( @@ -109,7 +109,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) else if (!strncmp (uri, "ldap:", 5)) { /* special case for ldap: contact folders so we can tell the user about openldap */ #ifdef HAVE_LDAP - label_string = + label_string = _("We were unable to open this addressbook. This either " "means you have entered an incorrect URI, or the LDAP server " "is unreachable."); @@ -126,12 +126,12 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) "means you have entered an incorrect URI, or the server " "is unreachable."); } - + dialog = e_error_new ((GtkWindow *) parent, "addressbook:load-error", label_string, NULL); g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); - + gtk_widget_show (dialog); - g_free (label); + g_free (label); g_free (uri); } @@ -168,7 +168,7 @@ eab_search_result_dialog (GtkWidget *parent, default: g_return_if_reached (); } - + e_error_run ((GtkWindow *) parent, "addressbook:search-error", str, NULL); } @@ -340,7 +340,7 @@ file_exists(GtkWindow *window, const char *filename) typedef struct { GtkWidget *filesel; char *vcard; - gboolean has_multiple_contacts; + gboolean has_multiple_contacts; } SaveAsInfo; static void @@ -350,11 +350,11 @@ save_it(GtkWidget *widget, SaveAsInfo *info) char *uri; gint error = 0; gint response = 0; - + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (info->filesel)); - uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (info->filesel)); - + uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (info->filesel)); + if (filename && g_file_test (filename, G_FILE_TEST_EXISTS)) { response = file_exists(GTK_WINDOW (info->filesel), filename); switch (response) { @@ -365,12 +365,12 @@ save_it(GtkWidget *widget, SaveAsInfo *info) } } - error = e_write_file_uri (uri, info->vcard); + error = e_write_file_uri (uri, info->vcard); if (error != 0) { char *err_str_ext; if (info->has_multiple_contacts) { /* more than one, finding the total number of contacts might - * hit performance while saving large number of contacts + * hit performance while saving large number of contacts */ err_str_ext = ngettext ("contact", "contacts", 2); } @@ -378,16 +378,16 @@ save_it(GtkWidget *widget, SaveAsInfo *info) err_str_ext = ngettext ("contact", "contacts", 1); } - /* translators: Arguments, err_str_ext (item to be saved: "contact"/"contacts"), - * destination file name, and error code will fill the placeholders - * {0}, {1} and {2}, respectively in the error message formed + /* translators: Arguments, err_str_ext (item to be saved: "contact"/"contacts"), + * destination file name, and error code will fill the placeholders + * {0}, {1} and {2}, respectively in the error message formed */ - e_error_run (GTK_WINDOW (info->filesel), "addressbook:save-error", + e_error_run (GTK_WINDOW (info->filesel), "addressbook:save-error", err_str_ext, filename, g_strerror (errno)); gtk_widget_destroy(GTK_WIDGET(info->filesel)); return; } - + gtk_widget_destroy(GTK_WIDGET(info->filesel)); } @@ -430,7 +430,7 @@ make_safe_filename (char *name) safe = g_strdup (name); e_filename_make_safe (safe); - + return safe; } @@ -523,7 +523,7 @@ eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window) gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filesel), g_get_home_dir ()); gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filesel), file); gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (filesel), FALSE); - + info->filesel = filesel; info->vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30); @@ -624,7 +624,7 @@ do_delete (gpointer data, gpointer user_data) EBook *book = user_data; EContact *contact = data; const char *id; - + id = e_contact_get_const (contact, E_CONTACT_UID); e_book_remove_contact(book, id, NULL); } @@ -664,7 +664,7 @@ contact_added_cb (EBook* book, EBookStatus status, const char *id, gpointer user if (status != E_BOOK_ERROR_OK && status != E_BOOK_ERROR_CANCELLED) { process->book_status = FALSE; eab_error_dialog (_("Error adding contact"), status); - } + } else if (status == E_BOOK_ERROR_CANCELLED) { process->book_status = FALSE; } @@ -786,7 +786,7 @@ eab_send_to_contact_and_email_num_list (GList *c) return; CORBA_exception_init (&ev); - + composer_server = bonobo_activation_activate_from_id (COMPOSER_OAFID, 0, NULL, &ev); /* Figure out how many addresses of each kind we have. */ @@ -819,7 +819,7 @@ eab_send_to_contact_and_email_num_list (GList *c) cc_list = GNOME_Evolution_Composer_RecipientList__alloc (); cc_list->_maximum = cc_list->_length = 0; - + bcc_list = GNOME_Evolution_Composer_RecipientList__alloc (); bcc_list->_maximum = bcc_length; bcc_list->_length = bcc_length; @@ -845,7 +845,7 @@ eab_send_to_contact_and_email_num_list (GList *c) if (is_list) { for (iterator = emails; iterator; iterator = iterator->next) { - + if (is_hidden) { recipient = &(bcc_list->_buffer[bcc_i]); ++bcc_i; @@ -853,7 +853,7 @@ eab_send_to_contact_and_email_num_list (GList *c) recipient = &(to_list->_buffer[to_i]); ++to_i; } - + name = NULL; addr = NULL; if (iterator && iterator->data) { @@ -863,7 +863,7 @@ eab_send_to_contact_and_email_num_list (GList *c) recipient->name = CORBA_string_dup (name ? name : ""); recipient->address = CORBA_string_dup (addr ? addr : ""); - + g_free (name); g_free (addr); } @@ -882,7 +882,7 @@ eab_send_to_contact_and_email_num_list (GList *c) if (nth >= length) nth = 0; - + if (contact_name) { name = e_contact_name_to_string (contact_name); e_contact_name_free (contact_name); @@ -891,7 +891,7 @@ eab_send_to_contact_and_email_num_list (GList *c) name = NULL; addr = g_strdup (g_list_nth_data (emails, nth)); - + recipient->name = CORBA_string_dup (name ? name : ""); recipient->address = CORBA_string_dup (addr ? addr : ""); @@ -948,11 +948,11 @@ eab_send_contact_list_as_attachment (GList *contacts) return; CORBA_exception_init (&ev); - + composer_server = bonobo_activation_activate_from_id (COMPOSER_OAFID, 0, NULL, &ev); - + content_type = CORBA_string_dup ("text/x-vcard"); filename = CORBA_string_dup (""); @@ -975,17 +975,17 @@ eab_send_contact_list_as_attachment (GList *contacts) memcpy (attach_data->_buffer, tempstr, attach_data->_length); g_free (tempstr); - GNOME_Evolution_Composer_attachData (composer_server, + GNOME_Evolution_Composer_attachData (composer_server, content_type, filename, description, show_inline, attach_data, &ev); - + if (ev._major != CORBA_NO_EXCEPTION) { g_printerr ("gui/e-meeting-edit.c: I couldn't attach data to the composer via CORBA! Aagh.\n"); CORBA_exception_free (&ev); return; } - + CORBA_free (content_type); CORBA_free (filename); CORBA_free (description); @@ -993,7 +993,7 @@ eab_send_contact_list_as_attachment (GList *contacts) to_list = GNOME_Evolution_Composer_RecipientList__alloc (); to_list->_maximum = to_list->_length = 0; - + cc_list = GNOME_Evolution_Composer_RecipientList__alloc (); cc_list->_maximum = cc_list->_length = 0; @@ -1025,7 +1025,7 @@ eab_send_contact_list_as_attachment (GList *contacts) subject = CORBA_string_dup (tempstr); g_free (tempstr); } - + GNOME_Evolution_Composer_setHeaders (composer_server, "", to_list, cc_list, bcc_list, subject, &ev); CORBA_free (to_list); diff --git a/addressbook/gui/widgets/eab-menu.c b/addressbook/gui/widgets/eab-menu.c index c35cd6ba61..d1c8b4e243 100644 --- a/addressbook/gui/widgets/eab-menu.c +++ b/addressbook/gui/widgets/eab-menu.c @@ -115,8 +115,8 @@ EABMenu *eab_menu_new(const char *menuid) * @cards: Cards selected. This will be freed on completion and the array indices unreferenced. * * Create a new selection menu target. - * - * Return value: + * + * Return value: **/ EABMenuTargetSelect * eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPtrArray *cards) @@ -139,7 +139,7 @@ eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPt email = e_contact_get(E_CONTACT(contact), E_CONTACT_EMAIL); if (email) { has_email = TRUE; - + g_list_foreach(email, (GFunc)g_free, NULL); g_list_free(email); } @@ -243,7 +243,7 @@ GType eab_menu_hook_get_type(void) { static GType type = 0; - + if (!type) { static const GTypeInfo info = { sizeof(EABMenuHookClass), NULL, NULL, (GClassInitFunc) eabmph_class_init, NULL, NULL, @@ -253,6 +253,6 @@ eab_menu_hook_get_type(void) eabmph_parent_class = g_type_class_ref(e_menu_hook_get_type()); type = g_type_register_static(e_menu_hook_get_type(), "EABMenuHook", &info, 0); } - + return type; } diff --git a/addressbook/gui/widgets/eab-menu.h b/addressbook/gui/widgets/eab-menu.h index 9f521cca85..d095ce9e74 100644 --- a/addressbook/gui/widgets/eab-menu.h +++ b/addressbook/gui/widgets/eab-menu.h @@ -44,7 +44,7 @@ enum _eab_menu_target_t { /** * enum _eab_menu_target_select_t - EABMenuTargetSelect qualifiers. - * + * * @EAB_MENU_SELECT_ONE: Only one item is selected. * @EAB_MENU_SELECT_MANY: More than one item selected. * @EAB_MENU_SELECT_ANY: One or more items selected. diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c index 81baba6752..94e46e0524 100644 --- a/addressbook/gui/widgets/eab-popup-control.c +++ b/addressbook/gui/widgets/eab-popup-control.c @@ -13,12 +13,12 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 @@ -213,7 +213,7 @@ eab_popup_control_set_free_form (EABPopupControl *pop, const gchar *txt) return TRUE; } - + return FALSE; } @@ -326,7 +326,7 @@ emit_event (EABPopupControl *pop, const char *event) event, arg, NULL); bonobo_arg_release (arg); - } + } } static void diff --git a/addressbook/gui/widgets/eab-popup-control.h b/addressbook/gui/widgets/eab-popup-control.h index 7112c90606..1d7ee36f0a 100644 --- a/addressbook/gui/widgets/eab-popup-control.h +++ b/addressbook/gui/widgets/eab-popup-control.h @@ -13,12 +13,12 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 @@ -54,7 +54,7 @@ struct _EABPopupControl { GtkWidget *name_widget; GtkWidget *email_widget; GtkWidget *query_msg; - + GtkWidget *main_vbox; GtkWidget *generic_view; GtkWidget *contact_display; diff --git a/addressbook/gui/widgets/eab-popup.c b/addressbook/gui/widgets/eab-popup.c index d37c1b7b73..ad43bde11e 100644 --- a/addressbook/gui/widgets/eab-popup.c +++ b/addressbook/gui/widgets/eab-popup.c @@ -131,8 +131,8 @@ EABPopup *eab_popup_new(const char *menuid) * @cards: Cards selected. This will be freed on completion. * * Create a new selection popup target. - * - * Return value: + * + * Return value: **/ @@ -180,7 +180,7 @@ eab_popup_target_new_select(EABPopup *eabp, struct _EBook *book, int readonly, G email = e_contact_get(E_CONTACT(contact), E_CONTACT_EMAIL); if (email) { has_email = TRUE; - + g_list_foreach(email, (GFunc)g_free, NULL); g_list_free(email); } @@ -352,7 +352,7 @@ GType eab_popup_hook_get_type(void) { static GType type = 0; - + if (!type) { static const GTypeInfo info = { sizeof(EABPopupHookClass), NULL, NULL, (GClassInitFunc) eabph_class_init, NULL, NULL, @@ -362,6 +362,6 @@ eab_popup_hook_get_type(void) eabph_parent_class = g_type_class_ref(e_popup_hook_get_type()); type = g_type_register_static(e_popup_hook_get_type(), "EABPopupHook", &info, 0); } - + return type; } diff --git a/addressbook/gui/widgets/eab-popup.h b/addressbook/gui/widgets/eab-popup.h index 3a1fbafd95..2f7b50a30f 100644 --- a/addressbook/gui/widgets/eab-popup.h +++ b/addressbook/gui/widgets/eab-popup.h @@ -38,7 +38,7 @@ typedef struct _EABPopupClass EABPopupClass; /** * enum _eab_popup_target_t - A list of mail popup target types. - * + * * @EAB_POPUP_TARGET_SELECT: A selection of cards * @EAB_POPUP_TARGET_SOURCE: A source selection. * @@ -53,7 +53,7 @@ enum _eab_popup_target_t { /** * enum _eab_popup_target_select_t - EABPopupTargetSelect qualifiers. - * + * * @EAB_POPUP_SELECT_ONE: Only one item is selected. * @EAB_POPUP_SELECT_MANY: Two or more items are selected. * @EAB_POPUP_SELECT_ANY: One or more items are selected. @@ -77,10 +77,10 @@ enum _eab_popup_target_uri_t { }; /** * enum _eab_popup_target_source_t - EABPopupTargetSource qualifiers. - * + * * @EAB_POPUP_SOURCE_PRIMARY: Has a primary selection. * @EAB_POPUP_SOURCE_SYSTEM: Is a 'system' folder. - * + * **/ enum _eab_popup_target_source_t { EAB_POPUP_SOURCE_PRIMARY = 1<<0, @@ -94,7 +94,7 @@ typedef struct _EABPopupTargetSelectNames EABPopupTargetSelectNames; typedef struct _EABPopupTargetURI EABPopupTargetURI; /** * struct _EABPopupTargetSelect - A list of address cards. - * + * * @target: Superclass. * @book: Book the cards belong to. * @cards: All selected cards. @@ -117,7 +117,7 @@ struct _EABPopupTargetURI { /** * struct _EABPopupTargetSource - A source target. - * + * * @target: Superclass. * @selector: Selector holding the source selection. * @@ -133,7 +133,7 @@ struct _EABPopupTargetSource { /** * struct _EABPopupTargetSelectNames - A select names target. - * + * * @target: Superclass. * @model: Select names model. * @row: Row of item selected. diff --git a/addressbook/gui/widgets/eab-vcard-control.c b/addressbook/gui/widgets/eab-vcard-control.c index 678a841be9..8922c396c5 100644 --- a/addressbook/gui/widgets/eab-vcard-control.c +++ b/addressbook/gui/widgets/eab-vcard-control.c @@ -112,8 +112,8 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, char *vcard; EABVCardControl *vcard_control = data; - if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 && - g_ascii_strcasecmp (type, "text/x-vCard") != 0) { + if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 && + g_ascii_strcasecmp (type, "text/x-vCard") != 0) { CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Bonobo_Persist_WrongDataType, NULL); return; @@ -140,8 +140,8 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, if (list && list->next) { char *message; int length = g_list_length (list) - 1; - message = g_strdup_printf (ngettext("There is one other contact.", - "There are %d other contacts.", length), + message = g_strdup_printf (ngettext("There is one other contact.", + "There are %d other contacts.", length), length); gtk_label_set_text (GTK_LABEL (vcard_control->label), message); g_free (message); @@ -163,8 +163,8 @@ pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream, char *vcard; int length; - if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 && - g_ascii_strcasecmp (type, "text/x-vCard") != 0) { + if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 && + g_ascii_strcasecmp (type, "text/x-vCard") != 0) { CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_Bonobo_Persist_WrongDataType, NULL); return; diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c index dc32f74fc5..cf0833d1fe 100644 --- a/addressbook/gui/widgets/gal-view-minicard.c +++ b/addressbook/gui/widgets/gal-view-minicard.c @@ -22,7 +22,7 @@ static GalViewClass *gal_view_minicard_parent_class; -static void +static void gal_view_minicard_load (GalView *view, const char *filename) { diff --git a/addressbook/gui/widgets/test-reflow.c b/addressbook/gui/widgets/test-reflow.c index 25b9c525a5..a71a052525 100644 --- a/addressbook/gui/widgets/test-reflow.c +++ b/addressbook/gui/widgets/test-reflow.c @@ -102,7 +102,7 @@ static void resize(GnomeCanvas *canvas, gpointer data) gnome_canvas_item_set( rect, "x2", (double) width, "y2", (double) last_alloc.height, - NULL ); + NULL ); } int main( int argc, char *argv[] ) @@ -157,7 +157,7 @@ int main( int argc, char *argv[] ) e_scroll_frame_set_policy (E_SCROLL_FRAME (scrollframe), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); - + gtk_container_add (GTK_CONTAINER (scrollframe), canvas); gnome_app_set_contents( GNOME_APP( app ), scrollframe ); @@ -172,7 +172,7 @@ int main( int argc, char *argv[] ) gtk_widget_show_all( app ); gdk_window_set_back_pixmap( GTK_LAYOUT(canvas)->bin_window, NULL, FALSE); - gtk_main(); + gtk_main(); /* Not reached. */ return 0; |