aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-06-02 07:09:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-06-02 22:35:03 +0800
commit433eac7844481b8ceda0bae8bf08f6bb623185b0 (patch)
treed66a04ad4fa676b4bfce762dee09a82f4434d374 /addressbook/gui
parente6c6cbdfb5fd5723ff840b24b29690235be0d74d (diff)
downloadgsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar
gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.gz
gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.bz2
gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.lz
gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.xz
gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.zst
gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.zip
More code cleanup.
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/addressbook-config.c2
-rw-r--r--addressbook/gui/component/e-book-shell-migrate.c12
-rw-r--r--addressbook/gui/component/openldap-extract.h50
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c4
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c6
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c10
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c4
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c4
-rw-r--r--addressbook/gui/widgets/e-minicard.c2
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c6
10 files changed, 50 insertions, 50 deletions
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index e753351755..6f62d0ab13 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -301,7 +301,7 @@ addressbook_ldap_auth (GtkWidget *window, LDAP *ldap)
return ldap_error;
}
-static int
+static gint
addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap,
const gchar **attrs, LDAPMessage **resp)
{
diff --git a/addressbook/gui/component/e-book-shell-migrate.c b/addressbook/gui/component/e-book-shell-migrate.c
index 4b0b61d186..fce6e0a634 100644
--- a/addressbook/gui/component/e-book-shell-migrate.c
+++ b/addressbook/gui/component/e-book-shell-migrate.c
@@ -144,7 +144,7 @@ dialog_set_progress (MigrationContext *context, double percent)
{
gchar text[5];
- snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f));
+ snprintf (text, sizeof (text), "%d%%", (gint) (percent * 100.0f));
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (context->progress), percent);
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (context->progress), text);
@@ -188,7 +188,7 @@ get_source_name (ESourceGroup *group, const gchar *path)
gboolean conflict;
GString *s = g_string_new ("");
- for (i = 0; p[i]; i ++) ;
+ for (i = 0; p[i]; i ++);
num_elements = i;
i--;
@@ -586,7 +586,7 @@ get_string_child (xmlNode *node,
return retval;
}
-static int
+static gint
get_integer_child (xmlNode *node,
const gchar *name,
gint defval)
@@ -784,7 +784,7 @@ migrate_completion_folders (MigrationContext *context)
if the physical_uri is anything
else, we strip off the args
- (anything after ;) before searching
+ (anything after;) before searching
for the uri. */
if (!strncmp (physical_uri, "file://", 7)) {
@@ -1023,9 +1023,9 @@ migrate_pilot_data (const gchar *old_path, const gchar *new_path)
((ext = strrchr (dent, '.')) && !strcmp (ext, ".db")))) {
/* src and dest file formats are identical for both map and changelog files */
guchar inbuf[4096];
- size_t nread, nwritten;
+ gsize nread, nwritten;
gint fd0, fd1;
- ssize_t n;
+ gssize n;
filename = g_build_filename (old_path, dent, NULL);
if ((fd0 = g_open (filename, O_RDONLY | O_BINARY, 0)) == -1) {
diff --git a/addressbook/gui/component/openldap-extract.h b/addressbook/gui/component/openldap-extract.h
index 630e12e4f6..996bf370a8 100644
--- a/addressbook/gui/component/openldap-extract.h
+++ b/addressbook/gui/component/openldap-extract.h
@@ -147,7 +147,7 @@ struct token {
gchar *sval;
};
-static int
+static gint
get_token( const gchar ** sp, gchar ** token_val )
{
gint kind;
@@ -743,7 +743,7 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr )
{
- for( ; *str != '\0'; LDAP_UTF8_INCR(str) ) {
+ for(; *str != '\0'; LDAP_UTF8_INCR(str) ) {
if( ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr ) ) {
return (gchar *) str;
}
@@ -752,7 +752,7 @@ static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr )
return NULL;
}
-static size_t ldap_utf8_strcspn( const gchar *str, const gchar *set )
+static gsize ldap_utf8_strcspn( const gchar *str, const gchar *set )
{
const gchar *cstr;
const gchar *cset;
@@ -768,7 +768,7 @@ static size_t ldap_utf8_strcspn( const gchar *str, const gchar *set )
return cstr - str;
}
-static size_t ldap_utf8_strspn( const gchar *str, const gchar *set )
+static gsize ldap_utf8_strspn( const gchar *str, const gchar *set )
{
const gchar *cstr;
const gchar *cset;
@@ -843,15 +843,15 @@ static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last)
typedef struct ldap_url_desc {
struct ldap_url_desc *lud_next;
- char *lud_scheme;
- char *lud_host;
- int lud_port;
- char *lud_dn;
- char **lud_attrs;
- int lud_scope;
- char *lud_filter;
- char **lud_exts;
- int lud_crit_exts;
+ gchar *lud_scheme;
+ gchar *lud_host;
+ gint lud_port;
+ gchar *lud_dn;
+ gchar **lud_attrs;
+ gint lud_scope;
+ gchar *lud_filter;
+ gchar **lud_exts;
+ gint lud_crit_exts;
} LDAPURLDesc;
/* from url.c */
@@ -979,7 +979,7 @@ ldap_free_urldesc( LDAPURLDesc *ludp )
LDAP_FREE( ludp );
}
-static int
+static gint
ldap_int_unhex( gint c )
{
return( c >= '0' && c <= '9' ? c - '0'
@@ -994,7 +994,7 @@ ldap_pvt_hex_unescape( gchar *s )
* Remove URL hex escapes from s... done in place. The basic concept for
* this routine is borrowed from the WWW library HTUnEscape() routine.
*/
- char *p;
+ gchar *p;
for ( p = s; *s != '\0'; ++s ) {
if ( *s == '%' ) {
@@ -1017,10 +1017,10 @@ ldap_pvt_hex_unescape( gchar *s )
static gchar **
ldap_str2charray( const gchar *str_in, const gchar *brkstr )
{
- char **res;
- char *str, *s;
- char *lasts;
- int i;
+ gchar **res;
+ gchar *str, *s;
+ gchar *lasts;
+ gint i;
/* protect the input string from strtok */
str = LDAP_STRDUP( str_in );
@@ -1051,7 +1051,7 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr )
res[i] = LDAP_STRDUP( s );
if(res[i] == NULL) {
- for( --i ; i >= 0 ; i-- ) {
+ for( --i; i >= 0; i-- ) {
LDAP_FREE( res[i] );
}
LDAP_FREE( res );
@@ -1068,7 +1068,7 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr )
return( res );
}
-static int
+static gint
ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
{
/*
@@ -1076,8 +1076,8 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
*/
LDAPURLDesc *ludp;
- char *p, *q, *r;
- int i, enclosed;
+ gchar *p, *q, *r;
+ gint i, enclosed;
const gchar *scheme = NULL;
const gchar *url_tmp;
gchar *url;
@@ -1162,7 +1162,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
}
if ( q != NULL ) {
- char *next;
+ gchar *next;
*q++ = '\0';
ldap_pvt_hex_unescape( q );
@@ -1392,7 +1392,7 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
return LDAP_URL_SUCCESS;
}
-static int
+static gint
ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
{
gint rc = ldap_url_parse_ext( url_in, ludpp );
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 7f3699f834..69d11b0e3c 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -495,7 +495,7 @@ name_to_style (const EContactName *name, const gchar *company, gint style)
return string;
}
-static int
+static gint
file_as_get_style (EContactEditor *editor)
{
GtkEntry *file_as = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (glade_xml_get_widget(editor->gui, "combo-file-as"))));
@@ -1533,7 +1533,7 @@ fill_in_im (EContactEditor *editor)
/* Clear */
- for (record_n = 1 ; record_n <= IM_SLOTS; record_n++) {
+ for (record_n = 1; record_n <= IM_SLOTS; record_n++) {
fill_in_im_record (editor, record_n, -1, NULL, -1);
}
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
index c8d795b2e8..1be9758627 100644
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ b/addressbook/gui/merging/eab-contact-merging.c
@@ -183,7 +183,7 @@ dropdown_changed (GtkWidget *dropdown, dropdown_data *data)
return;
}
-static int
+static gint
mergeit (EContactMergingLookup *lookup)
{
GtkWidget *scrolled_window, *label, *hbox, *dropdown;
@@ -218,7 +218,7 @@ mergeit (EContactMergingLookup *lookup)
num_of_email = g_list_length (email_attr_list);
/*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++) {
+ 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);
@@ -369,7 +369,7 @@ check_if_same (EContact *contact, EContact *match)
gint num_of_email;
gchar *str = NULL, *string = NULL, *string1 = NULL;
- for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) ; field++) {
+ for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1); field++) {
email_attr_list = e_contact_get_attributes (match, E_CONTACT_EMAIL);
num_of_email = g_list_length (email_attr_list);
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index fd1681c5b1..dbcc1c1ed2 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -98,7 +98,7 @@ unlink_model(EAddressbookReflowAdapter *adapter)
}
-static int
+static gint
text_height (PangoLayout *layout, const gchar *text)
{
gint height;
@@ -124,7 +124,7 @@ addressbook_set_width (EReflowModel *erm, gint width)
}
/* This function returns the number of items in our EReflowModel. */
-static int
+static gint
addressbook_count (EReflowModel *erm)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
@@ -134,7 +134,7 @@ addressbook_count (EReflowModel *erm)
}
/* This function returns the height of the minicontact in question */
-static int
+static gint
addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
@@ -180,7 +180,7 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent)
return height;
}
-static int
+static gint
addressbook_compare (EReflowModel *erm, gint n1, gint n2)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
@@ -222,7 +222,7 @@ addressbook_compare (EReflowModel *erm, gint n1, gint n2)
}
}
-static int
+static gint
adapter_drag_begin (EMinicard *card, GdkEvent *event, EAddressbookReflowAdapter *adapter)
{
gint ret_val = 0;
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
index cb63c67809..fabf87f24f 100644
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c
@@ -87,14 +87,14 @@ addressbook_dispose(GObject *object)
}
/* This function returns the number of columns in our ETableModel. */
-static int
+static gint
addressbook_col_count (ETableModel *etc)
{
return COLS;
}
/* This function returns the number of rows in our ETableModel. */
-static int
+static gint
addressbook_row_count (ETableModel *etc)
{
EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc);
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index e8b9c5db5a..ece8d84654 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -126,7 +126,7 @@ clear_drag_data (EMinicardView *view)
view->drag_list = NULL;
}
-static int
+static gint
e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter, GdkEvent *event, EMinicardView *view)
{
GdkDragContext *context;
@@ -475,7 +475,7 @@ do_remove (gint i, gpointer user_data)
}
#if 0
-static int
+static gint
compare_to_utf_str (EMinicard *card, const gchar *utf_str)
{
g_return_val_if_fail(card != NULL, 0);
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index c446e1affa..2d9deeecbc 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -875,7 +875,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, g
g_list_free (emails);
}
-static int
+static gint
get_left_width (EMinicard *e_minicard, gboolean is_list)
{
gchar *name;
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 0b3e122846..a75c06daff 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -783,8 +783,8 @@ eab_contact_display_render_compact (EABContactDisplay *display,
max_dimension = calced_height;
if (max_dimension > MAX_COMPACT_IMAGE_DIMENSION) {
- calced_width *= ((float)MAX_COMPACT_IMAGE_DIMENSION / max_dimension);
- calced_height *= ((float)MAX_COMPACT_IMAGE_DIMENSION / max_dimension);
+ calced_width *= ((gfloat)MAX_COMPACT_IMAGE_DIMENSION / max_dimension);
+ calced_height *= ((gfloat)MAX_COMPACT_IMAGE_DIMENSION / max_dimension);
}
}
@@ -891,7 +891,7 @@ eab_contact_display_render_compact (EABContactDisplay *display,
gtk_html_end (GTK_HTML (display), html_stream, GTK_HTML_STREAM_OK);
}
-static int
+static gint
contact_display_button_press_event (GtkWidget *widget,
GdkEvent *event,
EABContactDisplay *display)