diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2011-02-14 06:36:41 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2011-02-14 06:36:41 +0000 |
commit | feb6101e80dbb0f870730420af1cfae342758e93 (patch) | |
tree | 28c6e55ce815d8fc3cb5ca243c1f1de5c5a5d345 | |
parent | 5f66d9ac8697b19fa8cc1556bab81c5a44024af4 (diff) |
renamed 'interface' in struct to 'iface' to prevent compilation problem on some environments.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2844 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/addressbook.c | 46 | ||||
-rw-r--r-- | src/addressitem.h | 2 | ||||
-rw-r--r-- | src/addrindex.c | 42 | ||||
-rw-r--r-- | src/addrindex.h | 2 |
5 files changed, 53 insertions, 46 deletions
@@ -1,3 +1,10 @@ +2011-02-14 + + * src/addressbook.c + src/addressitem.h + src/addrindex.[ch]: renamed 'interface' in struct to 'iface' to + prevent compilation problem on some environments. + 2011-02-10 * src/main.c diff --git a/src/addressbook.c b/src/addressbook.c index 67d50c33..2314ec34 100644 --- a/src/addressbook.c +++ b/src/addressbook.c @@ -965,7 +965,7 @@ static void addressbook_create(void) nodeIf = _addressInterfaceList_; while( nodeIf ) { AdapterInterface *adapter = nodeIf->data; - AddressInterface *iface = adapter->interface; + AddressInterface *iface = adapter->iface; nodeIf = g_list_next(nodeIf); @@ -1366,7 +1366,7 @@ static void addressbook_menuitem_set_sensitive(void) if (pobj->type == ADDR_INTERFACE) { AdapterInterface *adapter = ADAPTER_INTERFACE(pobj); - iface = adapter->interface; + iface = adapter->iface; if (iface && iface->haveLibrary) { /* Enable appropriate File / New command */ atci = adapter->atci; @@ -1377,7 +1377,7 @@ static void addressbook_menuitem_set_sensitive(void) AdapterDSource *ads = ADAPTER_DSOURCE(pobj); ds = ads->dataSource; - iface = ds->interface; + iface = ds->iface; if (!iface->readOnly) { canAdd = canEditAddress = TRUE; } @@ -1397,7 +1397,7 @@ static void addressbook_menuitem_set_sensitive(void) } else if (pobj->type == ADDR_ITEM_FOLDER) { ds = addressbook_find_datasource(&iter); if (ds) { - iface = ds->interface; + iface = ds->iface; if (!iface->readOnly) { canAdd = canEditAddress = TRUE; } @@ -1406,7 +1406,7 @@ static void addressbook_menuitem_set_sensitive(void) } else if (pobj->type == ADDR_ITEM_GROUP) { ds = addressbook_find_datasource(&iter); if (ds) { - iface = ds->interface; + iface = ds->iface; if (!iface->readOnly) { canEditAddress = TRUE; } @@ -1761,7 +1761,7 @@ static gboolean addressbook_obj_is_droppable(GtkTreeModel *model, ads = ADAPTER_DSOURCE(obj); ds = ads ? ads->dataSource : NULL; - iface = ds ? ds->interface : NULL; + iface = ds ? ds->iface : NULL; if (ads && ads->subType == ADDR_BOOK && iface && !iface->readOnly) acceptable = TRUE; @@ -1840,8 +1840,8 @@ static gboolean addressbook_drag_motion(GtkWidget *widget, } #endif - if (!src_ds->interface || - (src_ds->interface->readOnly || !src_ds->interface->haveLibrary)) + if (!src_ds->iface || + (src_ds->iface->readOnly || !src_ds->iface->haveLibrary)) context->actions &= ~GDK_ACTION_MOVE; acceptable = addressbook_obj_is_droppable(model, obj); @@ -1929,8 +1929,8 @@ static void addressbook_drag_received(GtkWidget *widget, acceptable = FALSE; is_move = (context->actions & GDK_ACTION_MOVE) != 0; - if (!src_ds->interface || - (src_ds->interface->readOnly || !src_ds->interface->haveLibrary)) + if (!src_ds->iface || + (src_ds->iface->readOnly || !src_ds->iface->haveLibrary)) is_move = FALSE; if (!_addressListSelection_ || !acceptable) { @@ -2163,7 +2163,7 @@ static gchar *addressbook_edit_datasource(AddressObject *obj, GtkTreeIter *iter) ds = addressbook_find_datasource(iter); if (ds == NULL) return NULL; - iface = ds->interface; + iface = ds->iface; if (!iface->haveLibrary) return NULL; @@ -2309,7 +2309,7 @@ static void addressbook_treenode_delete_cb(gpointer data, guint action, return; /* Only allow deletion from non-readOnly data sources */ - iface = ds->interface; + iface = ds->iface; if (iface->readOnly) return; } @@ -3240,7 +3240,7 @@ static void addressbook_load_tree(void) while (nodeIf) { adapter = nodeIf->data; gtkut_tree_row_reference_get_iter(model, adapter->tree_row, &iter); - iface = adapter->interface; + iface = adapter->iface; atci = adapter->atci; if (iface) { if (iface->useInterface) { @@ -3946,7 +3946,7 @@ static void addressbook_new_jpilot_cb(gpointer data, guint action, GtkWidget *wi return; if (!gtkut_tree_row_reference_equal(addrbook.tree_selected, adapter->tree_row)) return; - iface = adapter->interface; + iface = adapter->iface; if (!iface->haveLibrary) return; @@ -3992,7 +3992,7 @@ static void addressbook_new_ldap_cb(gpointer data, guint action, GtkWidget *widg return; if (!gtkut_tree_row_reference_equal(addrbook.tree_selected, adapter->tree_row)) return; - iface = adapter->interface; + iface = adapter->iface; if (!iface->haveLibrary) return; @@ -4057,7 +4057,7 @@ static void ldapsearch_callback(SyldapServer *sls) ds = ads->dataSource; if (ds == NULL) return; - iface = ds->interface; + iface = ds->iface; if (!iface->haveLibrary) return; server = ds->rawDataSource; @@ -4113,7 +4113,7 @@ static void addressbook_lup_clicked(GtkButton *button, gpointer data) ds = ads->dataSource; if (ds == NULL) return; - iface = ds->interface; + iface = ds->iface; if (!iface->haveLibrary) return; server = ds->rawDataSource; @@ -4340,7 +4340,7 @@ static void addrbookctl_free_address( AddressObject *obj ) { static void addrbookctl_free_interface(AdapterInterface *adapter) { addrbookctl_free_address(ADDRESS_OBJECT(adapter)); - adapter->interface = NULL; + adapter->iface = NULL; adapter->interfaceType = ADDR_IF_NONE; adapter->atci = NULL; adapter->enabled = FALSE; @@ -4386,16 +4386,16 @@ void addrbookctl_build_iflist(void) _addressInterfaceList_ = NULL; list = addrindex_get_interface_list(_addressIndex_); while (list) { - AddressInterface *interface = list->data; - atci = addrbookctl_lookup_iface(interface->type); + AddressInterface *iface = list->data; + atci = addrbookctl_lookup_iface(iface->type); if (atci) { adapter = g_new0(AdapterInterface, 1); - adapter->interfaceType = interface->type; + adapter->interfaceType = iface->type; adapter->atci = atci; - adapter->interface = interface; + adapter->iface = iface; adapter->tree_row = NULL; adapter->enabled = TRUE; - adapter->haveLibrary = interface->haveLibrary; + adapter->haveLibrary = iface->haveLibrary; ADDRESS_OBJECT(adapter)->type = ADDR_INTERFACE; ADDRESS_OBJECT_NAME(adapter) = g_strdup(atci->displayName); _addressInterfaceList_ = g_list_append(_addressInterfaceList_, adapter); diff --git a/src/addressitem.h b/src/addressitem.h index 8752aa0a..8da66142 100644 --- a/src/addressitem.h +++ b/src/addressitem.h @@ -109,7 +109,7 @@ struct _AddressObject { typedef struct _AdapterInterface AdapterInterface; struct _AdapterInterface { AddressObject obj; - AddressInterface *interface; + AddressInterface *iface; AddressIfType interfaceType; AddressTypeControlItem *atci; gboolean enabled; diff --git a/src/addrindex.c b/src/addrindex.c index 6d47e2a8..c18b9595 100644 --- a/src/addrindex.c +++ b/src/addrindex.c @@ -264,7 +264,7 @@ void addrindex_free_datasource( AddressIndex *addrIndex, AddressDataSource *ds ) g_return_if_fail( addrIndex != NULL ); g_return_if_fail( ds != NULL ); - if( ds->interface == NULL ) { + if( ds->iface == NULL ) { iface = addrindex_get_interface( addrIndex, ds->type ); } if( iface == NULL ) return; @@ -314,11 +314,11 @@ void addrindex_free_datasource( AddressIndex *addrIndex, AddressDataSource *ds ) ADDRITEM_SUBTYPE(addrIndex) = 0; ds->type = ADDR_IF_NONE; ds->rawDataSource = NULL; - ds->interface = NULL; + ds->iface = NULL; ds->type = ADDR_IF_NONE; ds->rawDataSource = NULL; - ds->interface = NULL; + ds->iface = NULL; g_free( ds ); } @@ -363,7 +363,7 @@ static void addrindex_free_all_datasources( AddressInterface *iface ) { ds->type = ADDR_IF_NONE; ds->rawDataSource = NULL; - ds->interface = NULL; + ds->iface = NULL; g_free( ds ); node->data = NULL; node = g_list_next( node ); @@ -525,7 +525,7 @@ AddressDataSource *addrindex_create_datasource() { ADDRITEM_SUBTYPE(ds) = 0; ds->type = ADDR_IF_NONE; ds->rawDataSource = NULL; - ds->interface = NULL; + ds->iface = NULL; return ds; } @@ -551,7 +551,7 @@ AddressDataSource *addrindex_index_add_datasource( AddressIndex *addrIndex, Addr ADDRITEM_PARENT(ds) = ADDRITEM_OBJECT(iface); ds->type = ifType; ds->rawDataSource = dataSource; - ds->interface = iface; + ds->iface = iface; iface->listSource = g_list_append( iface->listSource, ds ); addrIndex->dirtyFlag = TRUE; } @@ -576,7 +576,7 @@ AddressDataSource *addrindex_index_remove_datasource( AddressIndex *addrIndex, A if( iface ) { iface->listSource = g_list_remove( iface->listSource, dataSource ); addrIndex->dirtyFlag = TRUE; - dataSource->interface = NULL; + dataSource->iface = NULL; retVal = dataSource; } return retVal; @@ -1003,7 +1003,7 @@ static void addrindex_read_index( AddressIndex *addrIndex, XMLFile *file ) { } if( ds ) { ds->type = addrIndex->lastType; - ds->interface = dsIFace; + ds->iface = dsIFace; dsIFace->listSource = g_list_append( dsIFace->listSource, ds ); } /* printf( "=============================\n\n" ); */ @@ -1727,7 +1727,7 @@ gboolean addrindex_ds_get_modify_flag( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getModifyFlag ) { retVal = ( iface->getModifyFlag ) ( ds->rawDataSource ); @@ -1743,7 +1743,7 @@ gboolean addrindex_ds_get_access_flag( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getAccessFlag ) { retVal = ( iface->getAccessFlag ) ( ds->rawDataSource ); @@ -1759,7 +1759,7 @@ gboolean addrindex_ds_get_read_flag( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getReadFlag ) { retVal = ( iface->getReadFlag ) ( ds->rawDataSource ); @@ -1775,7 +1775,7 @@ gint addrindex_ds_get_status_code( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getStatusCode ) { retVal = ( iface->getStatusCode ) ( ds->rawDataSource ); @@ -1791,7 +1791,7 @@ gint addrindex_ds_read_data( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getReadData ) { retVal = ( iface->getReadData ) ( ds->rawDataSource ); @@ -1807,7 +1807,7 @@ ItemFolder *addrindex_ds_get_root_folder( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getRootFolder ) { retVal = ( iface->getRootFolder ) ( ds->rawDataSource ); @@ -1823,7 +1823,7 @@ GList *addrindex_ds_get_list_folder( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getListFolder ) { retVal = ( iface->getListFolder ) ( ds->rawDataSource ); @@ -1839,7 +1839,7 @@ GList *addrindex_ds_get_list_person( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getListPerson ) { retVal = ( iface->getListPerson ) ( ds->rawDataSource ); @@ -1855,7 +1855,7 @@ gchar *addrindex_ds_get_name( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getName ) { retVal = ( iface->getName ) ( ds->rawDataSource ); @@ -1870,7 +1870,7 @@ void addrindex_ds_set_access_flag( AddressDataSource *ds, gboolean *value ) { AddressInterface *iface; if( ds == NULL ) return; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return; if( iface->setAccessFlag ) { ( iface->setAccessFlag ) ( ds->rawDataSource, value ); @@ -1883,7 +1883,7 @@ void addrindex_ds_set_access_flag( AddressDataSource *ds, gboolean *value ) { gboolean addrindex_ds_get_readonly( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return TRUE; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return TRUE; return iface->readOnly; } @@ -1896,7 +1896,7 @@ GList *addrindex_ds_get_all_persons( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getAllPersons ) { retVal = ( iface->getAllPersons ) ( ds->rawDataSource ); @@ -1912,7 +1912,7 @@ GList *addrindex_ds_get_all_groups( AddressDataSource *ds ) { AddressInterface *iface; if( ds == NULL ) return retVal; - iface = ds->interface; + iface = ds->iface; if( iface == NULL ) return retVal; if( iface->getAllGroups ) { retVal = ( iface->getAllGroups ) ( ds->rawDataSource ); diff --git a/src/addrindex.h b/src/addrindex.h index f998cbca..092ba379 100644 --- a/src/addrindex.h +++ b/src/addrindex.h @@ -88,7 +88,7 @@ typedef struct _AddressDataSource AddressDataSource; struct _AddressDataSource { AddrItemObject obj; AddressIfType type; - AddressInterface *interface; + AddressInterface *iface; gpointer rawDataSource; }; |