#include "addrbook.h"
#include "addrindex.h"
#include "addressadd.h"
+#include "addrduplicates.h"
#include "addressbook_foldersel.h"
#include "vcard.h"
#include "editvcard.h"
static void addressbook_list_select_remove ( AddrItemObject *aio );
static void addressbook_import_ldif_cb ( void );
+static void addressbook_find_duplicates_cb ( void );
static void addressbook_import_mutt_cb ( void );
static void addressbook_import_pine_cb ( void );
static void addressbook_export_html_cb ( void );
{N_("/_Tools/---"), NULL, NULL, 0, "<Separator>", NULL},
{N_("/_Tools/Export _HTML..."), NULL, addressbook_export_html_cb, 0, NULL, NULL},
{N_("/_Tools/Export LDI_F..."), NULL, addressbook_export_ldif_cb, 0, NULL, NULL},
+ {N_("/_Tools/---"), NULL, NULL, 0, "<Separator>", NULL},
+ {N_("/_Tools/Find duplicates..."), NULL, addressbook_find_duplicates_cb, 0, NULL, NULL},
{N_("/_Help"), NULL, NULL, 0, "<Branch>", NULL},
{N_("/_Help/_About"), NULL, about_show, 0, NULL, NULL}
};
/**
* Refresh addressbook and save to file(s).
*/
-static void addressbook_refresh( void )
+void addressbook_refresh( void )
{
if (addrbook.window) {
if (addrbook.treeSelected) {
gchar *text[N_LIST_COLS];
gboolean flgFirst = TRUE, haveAddr = FALSE;
GList *node;
+#ifdef USE_LDAP
AddressBookFile *abf = addressbook_get_book_file();
+#endif
if( person == NULL ) return;
addressbook_exp_ldif( cache );
}
+static void addressbook_find_duplicates_cb(void)
+{
+ addrduplicates_find(GTK_WINDOW(addrbook.window));
+}
+
static void addressbook_start_drag(GtkWidget *widget, gint button,
GdkEvent *event,
void *data)
if (gtk_clist_get_selection_info
(GTK_CLIST(widget), x - 24, y - 24, &row, &column)) {
- if (y > height - 24 && height + vpos < total_height)
+ if (y > height - 24 && height + vpos < total_height) {
gtk_adjustment_set_value(pos, (vpos+5 > height ? height : vpos+5));
-
- if (y < 24 && y > 0)
+ gtk_adjustment_changed(pos);
+ }
+ if (y < 24 && y > 0) {
gtk_adjustment_set_value(pos, (vpos-5 < 0 ? 0 : vpos-5));
-
+ gtk_adjustment_changed(pos);
+ }
node = gtk_ctree_node_nth(GTK_CTREE(widget), row);
if (node != NULL) {