Revision 2309
| src/addressbook.c (revision 2309) | ||
|---|---|---|
| 845 | 845 |
GtkTreeIter iter; |
| 846 | 846 |
GtkTreePath *path; |
| 847 | 847 |
|
| 848 |
g_print("addressbook_create: text: %s\n", text);
|
|
| 848 |
debug_print("addressbook_create: adapter: %s\n", text);
|
|
| 849 | 849 |
gtk_tree_store_append(tree_store, &iter, NULL); |
| 850 | 850 |
gtk_tree_store_set(tree_store, &iter, |
| 851 | 851 |
COL_FOLDER_NAME, text, |
| ... | ... | |
| 1556 | 1556 |
GtkTreeSelection *selection; |
| 1557 | 1557 |
GtkTreePath *path; |
| 1558 | 1558 |
|
| 1559 |
g_print("addressbook_popup_close\n");
|
|
| 1560 |
|
|
| 1561 | 1559 |
if (!addrbook.tree_opened) |
| 1562 | 1560 |
return; |
| 1563 | 1561 |
|
| ... | ... | |
| 1670 | 1668 |
GtkTreeView *treeview = GTK_TREE_VIEW(addrbook.treeview); |
| 1671 | 1669 |
GtkTreeStore *store; |
| 1672 | 1670 |
|
| 1673 |
g_print("addressbook_change_node_name: name: %s\n", name);
|
|
| 1674 | 1671 |
store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview)); |
| 1675 | 1672 |
gtk_tree_store_set(store, iter, COL_FOLDER_NAME, name, -1); |
| 1676 | 1673 |
} |
| ... | ... | |
| 1740 | 1737 |
AddressBookFile *abf = NULL; |
| 1741 | 1738 |
gchar *name = NULL; |
| 1742 | 1739 |
|
| 1743 |
g_print("addressbook_treenode_edit_cb\n");
|
|
| 1744 |
|
|
| 1745 | 1740 |
selection = gtk_tree_view_get_selection(treeview); |
| 1746 | 1741 |
if (!gtk_tree_selection_get_selected(selection, &model, &iter)) |
| 1747 | 1742 |
return; |
| ... | ... | |
| 1788 | 1783 |
if (name) {
|
| 1789 | 1784 |
GtkTreePath *path; |
| 1790 | 1785 |
|
| 1791 |
g_print("addressbook_treenode_edit_cb: update tree\n");
|
|
| 1792 | 1786 |
/* Update node in tree view */ |
| 1793 | 1787 |
addressbook_change_node_name(&iter, name); |
| 1794 | 1788 |
path = gtk_tree_model_get_path(model, &iter); |
| ... | ... | |
| 1817 | 1811 |
AddressDataSource *ds = NULL; |
| 1818 | 1812 |
gboolean remFlag = FALSE; |
| 1819 | 1813 |
|
| 1820 |
g_print("addressbook_treenode_delete_cb\n");
|
|
| 1821 |
|
|
| 1822 | 1814 |
selection = gtk_tree_view_get_selection(treeview); |
| 1823 | 1815 |
if (!gtk_tree_selection_get_selected(selection, &model, &iter)) |
| 1824 | 1816 |
return; |
| ... | ... | |
| 1924 | 1916 |
gtk_tree_model_iter_parent(model, &parent, &iter); |
| 1925 | 1917 |
gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); |
| 1926 | 1918 |
gtk_tree_selection_select_iter(selection, &parent); |
| 1927 |
g_print("addressbook_treenode_delete_cb: removed\n");
|
|
| 1928 | 1919 |
} |
| 1929 | 1920 |
} |
| 1930 | 1921 |
|
| ... | ... | |
| 2107 | 2098 |
gchar *name = NULL; |
| 2108 | 2099 |
AddressBookFile *abf = NULL; |
| 2109 | 2100 |
|
| 2110 |
g_print("addressbook_edit_address_cb\n");
|
|
| 2111 | 2101 |
if (addrbook.list_selected == NULL) |
| 2112 | 2102 |
return; |
| 2113 | 2103 |
|
| ... | ... | |
| 2525 | 2515 |
ao = NULL; |
| 2526 | 2516 |
gtk_tree_model_get(model, &iter_, COL_OBJ, &ao, -1); |
| 2527 | 2517 |
if (ao) {
|
| 2528 |
printf("ao->type = %d\n", ao->type);
|
|
| 2518 |
/* g_print("ao->type = %d\n", ao->type); */
|
|
| 2529 | 2519 |
if (ao->type == ADDR_DATASOURCE) {
|
| 2530 | 2520 |
AdapterDSource *ads = ADAPTER_DSOURCE(ao); |
| 2531 |
printf("found it\n");
|
|
| 2521 |
/* g_print("found it\n"); */
|
|
| 2532 | 2522 |
ds = ads->dataSource; |
| 2533 | 2523 |
break; |
| 2534 | 2524 |
} |
| ... | ... | |
| 2974 | 2964 |
atci = addrbookctl_lookup(otype); |
| 2975 | 2965 |
if (atci && atci->showInTree) {
|
| 2976 | 2966 |
/* Add object to tree */ |
| 2977 |
g_print("addressbook_add_object: obj->name: %s\n", obj->name);
|
|
| 2967 |
debug_print("addressbook_add_object: obj: %s\n", obj->name);
|
|
| 2978 | 2968 |
gtk_tree_store_append(GTK_TREE_STORE(model), &added, iter); |
| 2979 | 2969 |
gtk_tree_store_set(GTK_TREE_STORE(model), &added, |
| 2980 | 2970 |
COL_FOLDER_NAME, obj->name, |
| ... | ... | |
| 3018 | 3008 |
ADDRESS_OBJECT_NAME(adapter) = g_strdup(ADDRITEM_NAME(itemGroup)); |
| 3019 | 3009 |
adapter->itemGroup = itemGroup; |
| 3020 | 3010 |
|
| 3021 |
g_print("addressbook_node_add_group: name: %s\n", name);
|
|
| 3011 |
debug_print("addressbook_node_add_group: name: %s\n", name);
|
|
| 3022 | 3012 |
store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview)); |
| 3023 | 3013 |
gtk_tree_store_append(store, &new_iter_, iter); |
| 3024 | 3014 |
gtk_tree_store_set(store, &new_iter_, |
| ... | ... | |
| 3075 | 3065 |
ADDRESS_OBJECT_NAME(adapter) = g_strdup(ADDRITEM_NAME(itemFolder)); |
| 3076 | 3066 |
adapter->itemFolder = itemFolder; |
| 3077 | 3067 |
|
| 3078 |
g_print("addressbook_node_add_folder: name: %s\n", name);
|
|
| 3068 |
debug_print("addressbook_node_add_folder: name: %s\n", name);
|
|
| 3079 | 3069 |
gtk_tree_store_append(store, &new_iter_, iter); |
| 3080 | 3070 |
gtk_tree_store_set(store, &new_iter_, |
| 3081 | 3071 |
COL_FOLDER_NAME, name, |
Also available in: Unified diff