Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ángel
evolution
Commits
54da4fc0
Commit
54da4fc0
authored
May 08, 2011
by
Matthew Barnes
Committed by
Rodrigo Moya
Jun 29, 2011
Browse files
Coding style cleanups.
parent
fe20f707
Changes
209
Hide whitespace changes
Inline
Side-by-side
addressbook/gui/contact-editor/e-contact-editor.c
View file @
54da4fc0
...
...
@@ -2393,7 +2393,7 @@ fill_in_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
EContactPhoto
*
photo
=
e_contact_get
(
contact
,
field_id
);
if
(
photo
&&
photo
->
type
==
E_CONTACT_PHOTO_TYPE_INLINED
)
{
e_image_chooser_set_image_data
(
E_IMAGE_CHOOSER
(
widget
),
(
gchar
*
)
photo
->
data
.
inlined
.
data
,
(
gchar
*
)
photo
->
data
.
inlined
.
data
,
photo
->
data
.
inlined
.
length
);
editor
->
image_set
=
TRUE
;
}
...
...
@@ -2494,7 +2494,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
GdkPixbuf
*
pixbuf
,
*
new
;
GdkPixbufLoader
*
loader
=
gdk_pixbuf_loader_new
();
photo
.
data
.
inlined
.
data
=
(
guchar
*
)
img_buff
;
photo
.
data
.
inlined
.
data
=
(
guchar
*
)
img_buff
;
img_buff
=
NULL
;
gdk_pixbuf_loader_write
(
loader
,
photo
.
data
.
inlined
.
data
,
photo
.
data
.
inlined
.
length
,
NULL
);
gdk_pixbuf_loader_close
(
loader
,
NULL
);
...
...
@@ -2532,7 +2532,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
gdk_pixbuf_save_to_buffer
(
new
,
&
img_buff
,
&
photo
.
data
.
inlined
.
length
,
format_name
,
NULL
,
NULL
);
photo
.
data
.
inlined
.
data
=
(
guchar
*
)
img_buff
;
photo
.
data
.
inlined
.
data
=
(
guchar
*
)
img_buff
;
img_buff
=
NULL
;
g_free
(
format_name
);
g_object_unref
(
new
);
...
...
@@ -2563,7 +2563,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
else
if
(
GTK_IS_TOGGLE_BUTTON
(
widget
))
{
gboolean
val
=
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
));
e_contact_set
(
contact
,
field_id
,
val
?
(
gpointer
)
1
:
NULL
);
e_contact_set
(
contact
,
field_id
,
val
?
(
gpointer
)
1
:
NULL
);
}
else
{
g_warning
(
G_STRLOC
": Unhandled widget class in mappings!"
);
...
...
@@ -2927,7 +2927,7 @@ categories_response (GtkDialog *dialog, gint response, EContactEditor *editor)
if
(
entry
&&
GTK_IS_ENTRY
(
entry
))
gtk_entry_set_text
(
GTK_ENTRY
(
entry
),
categories
);
else
e_contact_set
(
editor
->
contact
,
E_CONTACT_CATEGORIES
,
(
gchar
*
)
categories
);
e_contact_set
(
editor
->
contact
,
E_CONTACT_CATEGORIES
,
(
gchar
*
)
categories
);
}
gtk_widget_destroy
(
GTK_WIDGET
(
dialog
));
editor
->
categories_dialog
=
NULL
;
...
...
@@ -3087,7 +3087,7 @@ image_clicked (GtkWidget *button, EContactEditor *editor)
no_image
,
GTK_RESPONSE_NO
,
NULL
);
preview
=
GTK_IMAGE
(
gtk_image_new
());
gtk_file_chooser_set_preview_widget
((
GtkFileChooser
*
)
editor
->
file_selector
,
GTK_WIDGET
(
preview
));
gtk_file_chooser_set_preview_widget
((
GtkFileChooser
*
)
editor
->
file_selector
,
GTK_WIDGET
(
preview
));
g_signal_connect
(
editor
->
file_selector
,
"update-preview"
,
G_CALLBACK
(
update_preview_cb
),
preview
);
...
...
@@ -3798,7 +3798,7 @@ e_contact_editor_new (EShell *shell,
if
(
book
)
e_book_get_supported_fields_async
(
book
,
(
EBookEListAsyncCallback
)
supported_fields_cb
,
editor
);
book
,
(
EBookEListAsyncCallback
)
supported_fields_cb
,
editor
);
return
editor
;
}
...
...
addressbook/gui/contact-editor/e-contact-quick-add.c
View file @
54da4fc0
...
...
@@ -441,7 +441,7 @@ build_quick_add_dialog (QuickAdd *qa)
gtk_table_set_col_spacings
(
table
,
12
);
label
=
gtk_label_new_with_mnemonic
(
_
(
"_Full name"
));
gtk_label_set_mnemonic_widget
((
GtkLabel
*
)
label
,
qa
->
name_entry
);
gtk_label_set_mnemonic_widget
((
GtkLabel
*
)
label
,
qa
->
name_entry
);
gtk_misc_set_alignment
(
GTK_MISC
(
label
),
0
.
0
,
0
.
5
);
gtk_table_attach
(
table
,
label
,
...
...
@@ -452,7 +452,7 @@ build_quick_add_dialog (QuickAdd *qa)
GTK_EXPAND
|
GTK_FILL
,
0
,
xpad
,
ypad
);
label
=
gtk_label_new_with_mnemonic
(
_
(
"E_mail"
));
gtk_label_set_mnemonic_widget
((
GtkLabel
*
)
label
,
qa
->
email_entry
);
gtk_label_set_mnemonic_widget
((
GtkLabel
*
)
label
,
qa
->
email_entry
);
gtk_misc_set_alignment
(
GTK_MISC
(
label
),
0
.
0
,
0
.
5
);
gtk_table_attach
(
table
,
label
,
...
...
@@ -463,7 +463,7 @@ build_quick_add_dialog (QuickAdd *qa)
GTK_EXPAND
|
GTK_FILL
,
0
,
xpad
,
ypad
);
label
=
gtk_label_new_with_mnemonic
(
_
(
"_Select Address Book"
));
gtk_label_set_mnemonic_widget
((
GtkLabel
*
)
label
,
qa
->
combo_box
);
gtk_label_set_mnemonic_widget
((
GtkLabel
*
)
label
,
qa
->
combo_box
);
gtk_misc_set_alignment
(
GTK_MISC
(
label
),
0
.
0
,
0
.
5
);
gtk_table_attach
(
table
,
label
,
...
...
@@ -673,7 +673,7 @@ e_contact_quick_add_vcard (const gchar *vcard,
if
(
emails
)
{
quick_add_set_email
(
qa
,
emails
->
data
);
g_list_foreach
(
emails
,
(
GFunc
)
g_free
,
NULL
);
g_list_foreach
(
emails
,
(
GFunc
)
g_free
,
NULL
);
g_list_free
(
emails
);
}
}
else
{
...
...
addressbook/gui/merging/eab-contact-compare.c
View file @
54da4fc0
...
...
@@ -458,10 +458,10 @@ eab_contact_compare_email (EContact *contact1, EContact *contact2)
contact2_email
=
e_contact_get
(
contact2
,
E_CONTACT_EMAIL
);
if
(
contact1_email
==
NULL
||
contact2_email
==
NULL
)
{
g_list_foreach
(
contact1_email
,
(
GFunc
)
g_free
,
NULL
);
g_list_foreach
(
contact1_email
,
(
GFunc
)
g_free
,
NULL
);
g_list_free
(
contact1_email
);
g_list_foreach
(
contact2_email
,
(
GFunc
)
g_free
,
NULL
);
g_list_foreach
(
contact2_email
,
(
GFunc
)
g_free
,
NULL
);
g_list_free
(
contact2_email
);
return
EAB_CONTACT_MATCH_NOT_APPLICABLE
;
}
...
...
@@ -486,10 +486,10 @@ eab_contact_compare_email (EContact *contact1, EContact *contact2)
i1
=
i1
->
next
;
}
g_list_foreach
(
contact1_email
,
(
GFunc
)
g_free
,
NULL
);
g_list_foreach
(
contact1_email
,
(
GFunc
)
g_free
,
NULL
);
g_list_free
(
contact1_email
);
g_list_foreach
(
contact2_email
,
(
GFunc
)
g_free
,
NULL
);
g_list_foreach
(
contact2_email
,
(
GFunc
)
g_free
,
NULL
);
g_list_free
(
contact2_email
);
return
match
;
...
...
@@ -616,7 +616,7 @@ query_cb (EBook *book, const GError *error, GList *contacts, gpointer closure)
for
(
i
=
remaining_contacts
;
i
!=
NULL
;
i
=
g_list_next
(
i
))
{
EContact
*
this_contact
=
E_CONTACT
(
i
->
data
);
EABContactMatchType
this_match
=
eab_contact_compare
(
info
->
contact
,
this_contact
);
if
((
gint
)
this_match
>
(
gint
)
best_match
)
{
if
((
gint
)
this_match
>
(
gint
)
best_match
)
{
best_match
=
this_match
;
best_contact
=
this_contact
;
}
...
...
@@ -688,7 +688,7 @@ use_common_book (EBook *book,
}
}
}
g_list_foreach
(
contact_email
,
(
GFunc
)
g_free
,
NULL
);
g_list_foreach
(
contact_email
,
(
GFunc
)
g_free
,
NULL
);
g_list_free
(
contact_email
);
}
...
...
addressbook/gui/merging/eab-contact-merging.c
View file @
54da4fc0
...
...
@@ -247,8 +247,8 @@ mergeit (EContactMergingLookup *lookup)
/*we match all the string fields of the already existing contact and the new contact.*/
for
(
field
=
E_CONTACT_FULL_NAME
;
field
!=
(
E_CONTACT_LAST_SIMPLE_STRING
-
1
);
field
++
)
{
dropdown_data
*
data
=
NULL
;
string
=
(
gchar
*
)
e_contact_get_const
(
lookup
->
contact
,
field
);
string1
=
(
gchar
*
)
e_contact_get_const
(
lookup
->
match
,
field
);
string
=
(
gchar
*
)
e_contact_get_const
(
lookup
->
contact
,
field
);
string1
=
(
gchar
*
)
e_contact_get_const
(
lookup
->
match
,
field
);
/*the field must exist in the new as well as the duplicate contact*/
if
(
string
&&
*
string
)
{
...
...
@@ -258,7 +258,7 @@ mergeit (EContactMergingLookup *lookup)
||
field
==
E_CONTACT_EMAIL_3
||
field
==
E_CONTACT_EMAIL_4
)
&&
(
num_of_email
<
4
))
{
EContactField
use_field
=
field
;
row
++
;
str
=
(
gchar
*
)
e_contact_get_const
(
lookup
->
contact
,
use_field
);
str
=
(
gchar
*
)
e_contact_get_const
(
lookup
->
contact
,
use_field
);
switch
(
num_of_email
)
{
case
0
:
...
...
@@ -294,8 +294,8 @@ mergeit (EContactMergingLookup *lookup)
}
label
=
gtk_label_new
(
_
(
"Email"
));
hbox
=
gtk_hbox_new
(
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
label
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
0
,
1
,
row
,
row
+
1
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
label
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
0
,
1
,
row
,
row
+
1
);
dropdown
=
gtk_combo_box_text_new
();
gtk_combo_box_text_append_text
(
GTK_COMBO_BOX_TEXT
(
dropdown
),
string
);
...
...
@@ -311,22 +311,22 @@ mergeit (EContactMergingLookup *lookup)
g_signal_connect
(
dropdown
,
"changed"
,
G_CALLBACK
(
dropdown_changed
),
data
);
hbox
=
gtk_hbox_new
(
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
dropdown
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
1
,
2
,
row
,
row
+
1
);
gtk_widget_show
((
GtkWidget
*
)
dropdown
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
dropdown
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
1
,
2
,
row
,
row
+
1
);
gtk_widget_show
((
GtkWidget
*
)
dropdown
);
continue
;
}
if
(((
field
==
E_CONTACT_FULL_NAME
)
&&
(
!
g_ascii_strcasecmp
(
string
,
string1
))))
{
row
++
;
label
=
gtk_label_new
(
e_contact_pretty_name
(
field
));
hbox
=
gtk_hbox_new
(
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
label
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
0
,
1
,
row
,
row
+
1
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
label
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
0
,
1
,
row
,
row
+
1
);
label
=
gtk_label_new
(
string
);
hbox
=
gtk_hbox_new
(
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
label
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
1
,
2
,
row
,
row
+
1
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
label
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
1
,
2
,
row
,
row
+
1
);
continue
;
}
...
...
@@ -335,8 +335,8 @@ mergeit (EContactMergingLookup *lookup)
row
++
;
label
=
gtk_label_new
(
e_contact_pretty_name
(
field
));
hbox
=
gtk_hbox_new
(
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
label
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
0
,
1
,
row
,
row
+
1
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
label
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
0
,
1
,
row
,
row
+
1
);
data
=
g_new0
(
dropdown_data
,
1
);
dropdown
=
gtk_combo_box_text_new
();
gtk_combo_box_text_append_text
(
GTK_COMBO_BOX_TEXT
(
dropdown
),
string
);
...
...
@@ -352,13 +352,13 @@ mergeit (EContactMergingLookup *lookup)
data
->
match
=
lookup
->
match
;
if
(
field
==
E_CONTACT_NICKNAME
||
field
==
E_CONTACT_GIVEN_NAME
)
gtk_widget_set_sensitive
((
GtkWidget
*
)
dropdown
,
FALSE
);
gtk_widget_set_sensitive
((
GtkWidget
*
)
dropdown
,
FALSE
);
g_signal_connect
(
dropdown
,
"changed"
,
G_CALLBACK
(
dropdown_changed
),
data
);
hbox
=
gtk_hbox_new
(
FALSE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
dropdown
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
1
,
2
,
row
,
row
+
1
);
gtk_widget_show_all
((
GtkWidget
*
)
dropdown
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
(
GtkWidget
*
)
dropdown
,
FALSE
,
FALSE
,
0
);
gtk_table_attach_defaults
(
table
,
(
GtkWidget
*
)
hbox
,
1
,
2
,
row
,
row
+
1
);
gtk_widget_show_all
((
GtkWidget
*
)
dropdown
);
}
}
}
...
...
@@ -368,7 +368,7 @@ mergeit (EContactMergingLookup *lookup)
gtk_box_pack_start
(
GTK_BOX
(
content_area
),
GTK_WIDGET
(
scrolled_window
),
TRUE
,
TRUE
,
0
);
gtk_widget_show
(
scrolled_window
);
g_signal_connect
(
dialog
,
"map-event"
,
G_CALLBACK
(
dialog_map
),
table
);
gtk_widget_show_all
((
GtkWidget
*
)
table
);
gtk_widget_show_all
((
GtkWidget
*
)
table
);
result
=
gtk_dialog_run
(
dialog
);
switch
(
result
)
...
...
@@ -403,7 +403,7 @@ check_if_same (EContact *contact, EContact *match)
if
((
field
==
E_CONTACT_EMAIL_1
||
field
==
E_CONTACT_EMAIL_2
||
field
==
E_CONTACT_EMAIL_3
||
field
==
E_CONTACT_EMAIL_4
)
&&
(
num_of_email
<
4
))
{
str
=
(
gchar
*
)
e_contact_get_const
(
contact
,
field
);
str
=
(
gchar
*
)
e_contact_get_const
(
contact
,
field
);
switch
(
num_of_email
)
{
case
0
:
...
...
@@ -423,8 +423,8 @@ check_if_same (EContact *contact, EContact *match)
}
}
else
{
string
=
(
gchar
*
)
e_contact_get_const
(
contact
,
field
);
string1
=
(
gchar
*
)
e_contact_get_const
(
match
,
field
);
string
=
(
gchar
*
)
e_contact_get_const
(
contact
,
field
);
string1
=
(
gchar
*
)
e_contact_get_const
(
match
,
field
);
if
((
string
&&
*
string
)
&&
(
string1
&&
*
string1
)
&&
(
g_ascii_strcasecmp
(
string1
,
string
)))
return
FALSE
;
/*if the field entry exist in either of the contacts,we'll have to give the choice and thus merge button should be sensitive*/
...
...
addressbook/gui/widgets/e-addressbook-reflow-adapter.c
View file @
54da4fc0
...
...
@@ -139,7 +139,7 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
EContactField
field
;
gint
count
=
0
;
gchar
*
string
;
EContact
*
contact
=
(
EContact
*
)
e_addressbook_model_contact_at
(
priv
->
model
,
i
);
EContact
*
contact
=
(
EContact
*
)
e_addressbook_model_contact_at
(
priv
->
model
,
i
);
PangoLayout
*
layout
;
gint
height
;
...
...
@@ -227,8 +227,8 @@ addressbook_compare (EReflowModel *erm, gint n1, gint n2, GHashTable *cmp_cache)
return
n1
-
n2
;
}
else
{
contact1
=
(
EContact
*
)
e_addressbook_model_contact_at
(
priv
->
model
,
n1
);
contact2
=
(
EContact
*
)
e_addressbook_model_contact_at
(
priv
->
model
,
n2
);
contact1
=
(
EContact
*
)
e_addressbook_model_contact_at
(
priv
->
model
,
n1
);
contact2
=
(
EContact
*
)
e_addressbook_model_contact_at
(
priv
->
model
,
n2
);
if
(
contact1
&&
contact2
)
{
const
gchar
*
file_as1
,
*
file_as2
;
...
...
addressbook/gui/widgets/e-addressbook-table-adapter.c
View file @
54da4fc0
...
...
@@ -262,7 +262,7 @@ addressbook_initialize_value (ETableModel *etc, gint col)
static
gboolean
addressbook_value_is_empty
(
ETableModel
*
etc
,
gint
col
,
gconstpointer
value
)
{
return
!
(
value
&&
*
(
gchar
*
)
value
);
return
!
(
value
&&
*
(
gchar
*
)
value
);
}
static
gchar
*
...
...
addressbook/gui/widgets/e-addressbook-view.c
View file @
54da4fc0
...
...
@@ -258,7 +258,7 @@ table_drag_data_get (ETable *table,
gtk_selection_data_set
(
selection_data
,
target
,
8
,
(
guchar
*
)
value
,
strlen
(
value
));
(
guchar
*
)
value
,
strlen
(
value
));
g_free
(
value
);
break
;
...
...
@@ -269,7 +269,7 @@ table_drag_data_get (ETable *table,
gtk_selection_data_set
(
selection_data
,
target
,
8
,
(
guchar
*
)
value
,
strlen
(
value
));
(
guchar
*
)
value
,
strlen
(
value
));
g_free
(
value
);
break
;
...
...
addressbook/gui/widgets/e-minicard-view.c
View file @
54da4fc0
...
...
@@ -121,7 +121,7 @@ e_minicard_view_drag_data_get (GtkWidget *widget,
static
void
clear_drag_data
(
EMinicardView
*
view
)
{
g_list_foreach
(
view
->
drag_list
,
(
GFunc
)
g_object_unref
,
NULL
);
g_list_foreach
(
view
->
drag_list
,
(
GFunc
)
g_object_unref
,
NULL
);
g_list_free
(
view
->
drag_list
);
view
->
drag_list
=
NULL
;
}
...
...
@@ -386,7 +386,7 @@ e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event)
switch
(
event
->
type
)
{
case
GDK_2BUTTON_PRESS
:
if
(((
GdkEventButton
*
)
event
)
->
button
==
1
)
{
if
(((
GdkEventButton
*
)
event
)
->
button
==
1
)
{
gboolean
editable
;
g_object_get
(
view
->
adapter
,
"editable"
,
&
editable
,
NULL
);
...
...
addressbook/gui/widgets/eab-config.c
View file @
54da4fc0
...
...
@@ -47,7 +47,7 @@ ecp_target_free (EConfig *ec, EConfigTarget *t)
if
(
ec
->
target
==
t
)
{
switch
(
t
->
type
)
{
case
EAB_CONFIG_TARGET_SOURCE
:
{
EABConfigTargetSource
*
s
=
(
EABConfigTargetSource
*
)
t
;
EABConfigTargetSource
*
s
=
(
EABConfigTargetSource
*
)
t
;
if
(
p
->
source_changed_id
)
{
g_signal_handler_disconnect
(
s
->
source
,
p
->
source_changed_id
);
...
...
@@ -59,7 +59,7 @@ ecp_target_free (EConfig *ec, EConfigTarget *t)
switch
(
t
->
type
)
{
case
EAB_CONFIG_TARGET_SOURCE
:
{
EABConfigTargetSource
*
s
=
(
EABConfigTargetSource
*
)
t
;
EABConfigTargetSource
*
s
=
(
EABConfigTargetSource
*
)
t
;
if
(
s
->
source
)
g_object_unref
(
s
->
source
);
...
...
@@ -80,12 +80,12 @@ ecp_set_target (EConfig *ec, EConfigTarget *t)
{
struct
_EABConfigPrivate
*
p
=
EAB_CONFIG
(
ec
)
->
priv
;
((
EConfigClass
*
)
ecp_parent_class
)
->
set_target
(
ec
,
t
);
((
EConfigClass
*
)
ecp_parent_class
)
->
set_target
(
ec
,
t
);
if
(
t
)
{
switch
(
t
->
type
)
{
case
EAB_CONFIG_TARGET_SOURCE
:
{
EABConfigTargetSource
*
s
=
(
EABConfigTargetSource
*
)
t
;
EABConfigTargetSource
*
s
=
(
EABConfigTargetSource
*
)
t
;
p
->
source_changed_id
=
g_signal_connect
(
s
->
source
,
"changed"
,
...
...
@@ -98,8 +98,8 @@ ecp_set_target (EConfig *ec, EConfigTarget *t)
static
void
ecp_class_init
(
GObjectClass
*
klass
)
{
((
EConfigClass
*
)
klass
)
->
set_target
=
ecp_set_target
;
((
EConfigClass
*
)
klass
)
->
target_free
=
ecp_target_free
;
((
EConfigClass
*
)
klass
)
->
set_target
=
ecp_set_target
;
((
EConfigClass
*
)
klass
)
->
target_free
=
ecp_target_free
;
g_type_class_add_private
(
klass
,
sizeof
(
struct
_EABConfigPrivate
));
}
...
...
addressbook/gui/widgets/eab-contact-display.c
View file @
54da4fc0
...
...
@@ -460,7 +460,7 @@ render_contact_block (GString *buffer, EContact *contact)
for
(
l
=
email_list
,
al
=
email_attr_list
;
l
&&
al
;
l
=
l
->
next
,
al
=
al
->
next
)
{
gchar
*
name
=
NULL
,
*
mail
=
NULL
;
gchar
*
attr_str
=
(
gchar
*
)
get_email_location
((
EVCardAttribute
*
)
al
->
data
);
gchar
*
attr_str
=
(
gchar
*
)
get_email_location
((
EVCardAttribute
*
)
al
->
data
);
if
(
!
eab_parse_qp_email
(
l
->
data
,
&
name
,
&
mail
))
mail
=
e_text_to_html
(
l
->
data
,
0
);
...
...
@@ -479,7 +479,7 @@ render_contact_block (GString *buffer, EContact *contact)
g_free
(
name
);
g_free
(
mail
);
}
g_list_foreach
(
email_list
,
(
GFunc
)
g_free
,
NULL
);
g_list_foreach
(
email_list
,
(
GFunc
)
g_free
,
NULL
);
g_list_free
(
email_list
);
if
(
accum
->
len
)
{
...
...
@@ -771,8 +771,8 @@ eab_contact_display_render_compact (EABContactDisplay *display,
max_dimension
=
calced_height
;
if
(
max_dimension
>
MAX_COMPACT_IMAGE_DIMENSION
)
{
calced_width
*=
((
gfloat
)
MAX_COMPACT_IMAGE_DIMENSION
/
max_dimension
);
calced_height
*=
((
gfloat
)
MAX_COMPACT_IMAGE_DIMENSION
/
max_dimension
);
calced_width
*=
((
gfloat
)
MAX_COMPACT_IMAGE_DIMENSION
/
max_dimension
);
calced_height
*=
((
gfloat
)
MAX_COMPACT_IMAGE_DIMENSION
/
max_dimension
);
}
}
...
...
addressbook/importers/evolution-csv-importer.c
View file @
54da4fc0
...
...
@@ -787,7 +787,7 @@ csv_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
if
(
target
->
type
!=
E_IMPORT_TARGET_URI
)
return
FALSE
;
s
=
(
EImportTargetURI
*
)
target
;
s
=
(
EImportTargetURI
*
)
target
;
if
(
s
->
uri_src
==
NULL
)
return
TRUE
;
...
...
@@ -924,7 +924,7 @@ csv_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
GtkWidget
*
preview
;
GList
*
contacts
=
NULL
;
EContact
*
contact
;
EImportTargetURI
*
s
=
(
EImportTargetURI
*
)
target
;
EImportTargetURI
*
s
=
(
EImportTargetURI
*
)
target
;
gchar
*
filename
;
FILE
*
file
;
CSVImporter
*
gci
;
...
...
addressbook/importers/evolution-ldif-importer.c
View file @
54da4fc0
...
...
@@ -255,7 +255,7 @@ parseLine (GHashTable *dn_contact_hash, EContact *contact,
return
FALSE
;
}
colon
=
(
gchar
*
)
strchr
(
ptr
,
':'
);
colon
=
(
gchar
*
)
strchr
(
ptr
,
':'
);
if
(
colon
)
{
gint
i
;
...
...
@@ -588,7 +588,7 @@ ldif_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
if
(
target
->
type
!=
E_IMPORT_TARGET_URI
)
return
FALSE
;
s
=
(
EImportTargetURI
*
)
target
;
s
=
(
EImportTargetURI
*
)
target
;
if
(
s
->
uri_src
==
NULL
)
return
TRUE
;
...
...
@@ -648,7 +648,7 @@ ldif_import (EImport *ei, EImportTarget *target, EImportImporter *im)
LDIFImporter
*
gci
;
ESource
*
source
;
FILE
*
file
=
NULL
;
EImportTargetURI
*
s
=
(
EImportTargetURI
*
)
target
;
EImportTargetURI
*
s
=
(
EImportTargetURI
*
)
target
;
gchar
*
filename
;
filename
=
g_filename_from_uri
(
s
->
uri_src
,
NULL
,
NULL
);
...
...
@@ -697,7 +697,7 @@ ldif_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
GtkWidget
*
preview
;
GList
*
contacts
=
NULL
;
EContact
*
contact
;
EImportTargetURI
*
s
=
(
EImportTargetURI
*
)
target
;
EImportTargetURI
*
s
=
(
EImportTargetURI
*
)
target
;
gchar
*
filename
;
GHashTable
*
dn_contact_hash
;
FILE
*
file
;
...
...
addressbook/importers/evolution-vcard-importer.c
View file @
54da4fc0
...
...
@@ -132,7 +132,7 @@ vcard_import_contact (VCardImporter *gci, EContact *contact)
if
(
v
&&
v
->
data
)
{
if
(
!
strncmp
((
gchar
*
)
v
->
data
,
"<?xml"
,
5
))
{
EDestination
*
dest
=
e_destination_import
((
gchar
*
)
v
->
data
);
EDestination
*
dest
=
e_destination_import
((
gchar
*
)
v
->
data
);
e_destination_export_to_vcard_attribute
(
dest
,
a
);
...
...
@@ -357,8 +357,8 @@ guess_vcard_encoding (const gchar *filename)
}
fclose
(
handle
);
if
(
has_bom
((
gunichar2
*
)
line
))
{
gunichar2
*
utf16
=
(
gunichar2
*
)
line
;
if
(
has_bom
((
gunichar2
*
)
line
))
{
gunichar2
*
utf16
=
(
gunichar2
*
)
line
;
/* Check for a BOM to try to detect UTF-16 encoded vcards
* (MacOSX address book creates such vcards for example)
*/
...
...
@@ -442,7 +442,7 @@ vcard_supported (EImport *ei, EImportTarget *target, EImportImporter *im)
if
(
target
->
type
!=
E_IMPORT_TARGET_URI
)
return
FALSE
;
s
=
(
EImportTargetURI
*
)
target
;
s
=
(
EImportTargetURI
*
)
target
;
if
(
s
->
uri_src
==
NULL
)
return
TRUE
;
...
...
@@ -517,7 +517,7 @@ vcard_import (EImport *ei, EImportTarget *target, EImportImporter *im)
{
VCardImporter
*
gci
;
ESource
*
source
;
EImportTargetURI
*
s
=
(
EImportTargetURI
*
)
target
;
EImportTargetURI
*
s
=
(
EImportTargetURI
*
)
target
;
gchar
*
filename
;
gchar
*
contents
;
VCardEncoding
encoding
;
...
...
@@ -575,7 +575,7 @@ vcard_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im)
GList
*
contacts
;
gchar
*
contents
;
VCardEncoding
encoding
;
EImportTargetURI
*
s
=
(
EImportTargetURI
*
)
target
;
EImportTargetURI
*
s
=
(
EImportTargetURI
*
)
target
;
gchar
*
filename
;
filename
=
g_filename_from_uri
(
s
->
uri_src
,
NULL
,
NULL
);
...
...
addressbook/printing/e-contact-print.c
View file @
54da4fc0
...
...
@@ -507,7 +507,7 @@ e_contact_build_style (EContactPrintStyle *style)
xmlNodePtr
stylenode
=
xmlDocGetRootElement
(
styledoc
);
xmlNodePtr
node
;
for
(
node
=
stylenode
->
children
;
node
;
node
=
node
->
next
)
{
gchar
*
data
=
(
gchar
*
)
xmlNodeGetContent
(
node
);
gchar
*
data
=
(
gchar
*
)
xmlNodeGetContent
(
node
);
if
(
!
strcmp
(
(
gchar
*
)
node
->
name
,
"title"
))
{
get_string
(
data
,
&
(
style
->
title
));
}
else
if
(
!
strcmp
(
(
gchar
*
)
node
->
name
,
"type"
))
{
...
...
addressbook/tools/evolution-addressbook-export-list-cards.c
View file @
54da4fc0
...
...
@@ -783,7 +783,7 @@ action_list_cards_init (ActionContext * p_actctx)
action_list_cards
(
contacts
,
p_actctx
);
g_list_foreach
(
contacts
,
(
GFunc
)
g_object_unref
,
NULL
);
g_list_foreach
(
contacts
,
(
GFunc
)
g_object_unref
,
NULL
);
g_list_free
(
contacts
);
return
SUCCESS
;
...
...
addressbook/tools/evolution-addressbook-export-list-folders.c
View file @
54da4fc0
...
...
@@ -86,7 +86,7 @@ action_list_folders_init (ActionContext * p_actctx)
printf
(
"
\"
%s
\"
,
\"
%s
\"
,%d
\n
"
,
uri
,
name
,
g_list_length
(
contacts
));
g_free
(
uri
);
g_list_foreach
(
contacts
,
(
GFunc
)
g_object_unref
,
NULL
);
g_list_foreach
(
contacts
,
(
GFunc
)
g_object_unref
,
NULL
);
g_list_free
(
contacts
);
g_object_unref
(
book
);
...
...
addressbook/util/eab-book-util.c
View file @
54da4fc0
...
...
@@ -193,7 +193,7 @@ eab_contact_list_from_string (const gchar *str)
GList
*
contacts
=
NULL
;
GString
*
gstr
=
g_string_new
(
NULL
);
gchar
*
str_stripped
;
gchar
*
p
=
(
gchar
*
)
str
;
gchar
*
p
=
(
gchar
*
)
str
;
gchar
*
q
;
if
(
!
p
)
...
...
calendar/gui/alarm-notify/alarm-queue.c
View file @
54da4fc0
...
...
@@ -1486,7 +1486,7 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
e_cal_component_get_description_list
(
comp
,
&
text_list
);
if
(
text_list
)
{
text
=
*
((
ECalComponentText
*
)
text_list
->
data
);
text
=
*
((
ECalComponentText
*
)
text_list
->
data
);
if
(
text
.
value
)
description
=
text
.
value
;
else
...
...
@@ -2103,14 +2103,14 @@ remove_cqa (ClientAlarms *ca, ECalComponentId *id, CompQueuedAlarms *cqa)
static
gboolean
remove_comp_by_id
(
gpointer
key
,
gpointer
value
,
gpointer
userdata
)
{
ClientAlarms
*
ca
=
(
ClientAlarms
*
)
userdata
;
ClientAlarms
*
ca
=
(
ClientAlarms
*
)
userdata
;
debug
((
"..."
));
/* if (!g_hash_table_size (ca->uid_alarms_hash)) */
/* return; */
remove_cqa
(
ca
,
(
ECalComponentId
*
)
key
,
(
CompQueuedAlarms
*
)
value
);
remove_cqa
(
ca
,
(
ECalComponentId
*
)
key
,
(
CompQueuedAlarms
*
)
value
);
return
TRUE
;
}
...
...
@@ -2121,7 +2121,7 @@ remove_client_alarms (ClientAlarms *ca)
{
debug
((
"size %d"
,
g_hash_table_size
(
ca
->
uid_alarms_hash
)));
g_hash_table_foreach_remove
(
ca
->
uid_alarms_hash
,
(
GHRFunc
)
remove_comp_by_id
,
ca
);
g_hash_table_foreach_remove
(
ca
->
uid_alarms_hash
,
(
GHRFunc
)
remove_comp_by_id
,
ca
);
/* The hash table should be empty now */
g_return_if_fail
(
g_hash_table_size
(
ca
->
uid_alarms_hash
)
==
0
);
...
...
calendar/gui/calendar-config.c
View file @
54da4fc0
...
...
@@ -317,7 +317,7 @@ void
calendar_config_free_day_second_zones
(
GSList
*
zones
)
{
if
(
zones
)
{
g_slist_foreach
(
zones
,
(
GFunc
)
g_free
,
NULL
);
g_slist_foreach
(
zones
,
(
GFunc
)
g_free
,
NULL
);
g_slist_free
(
zones
);
}
}
...
...
calendar/gui/dialogs/alarm-dialog.c
View file @
54da4fc0
...
...
@@ -820,7 +820,7 @@ get_widgets (Dialog *dialog)
N_
(
"Send an email"
)
};
GtkComboBox
*
combo
=
(
GtkComboBox
*
)
dialog
->
action_combo
;
GtkComboBox
*
combo
=
(
GtkComboBox
*
)
dialog
->
action_combo
;
GtkCellRenderer
*
cell
;