Revision 1608 src/importcsv.c
| importcsv.c (revision 1608) | ||
|---|---|---|
| 65 | 65 |
#define PAGE_ATTRIBUTES 1 |
| 66 | 66 |
#define PAGE_FINISH 2 |
| 67 | 67 |
|
| 68 |
#define IMPORTCSV_WIDTH 380
|
|
| 69 |
#define IMPORTCSV_HEIGHT 300
|
|
| 68 |
#define IMPORTCSV_WIDTH 420
|
|
| 69 |
#define IMPORTCSV_HEIGHT 320
|
|
| 70 | 70 |
|
| 71 | 71 |
#define FIELDS_N_COLS 3 |
| 72 | 72 |
#define FIELDS_COL_WIDTH_SELECT 10 |
| ... | ... | |
| 228 | 228 |
imp_csv_attrib[i].col = row; |
| 229 | 229 |
gtk_clist_set_row_data |
| 230 | 230 |
(clist, row, &imp_csv_attrib[i]); |
| 231 |
if (imp_csv_attrib[i].enabled) |
|
| 232 |
gtk_clist_set_pixmap(clist, row, FIELD_COL_SELECT, markxpm, markxpmmask); |
|
| 231 | 233 |
} |
| 232 | 234 |
} |
| 233 | 235 |
g_strfreev(strv); |
| ... | ... | |
| 239 | 241 |
return TRUE; |
| 240 | 242 |
} |
| 241 | 243 |
|
| 242 |
static void imp_csv_field_list_selected( GtkCList *clist, gint row, gint column ) {
|
|
| 243 |
} |
|
| 244 |
static void imp_csv_field_list_selected( GtkCList *clist, gint row, gint column, GdkEvent *event ) {
|
|
| 245 |
if (event && event->type == GDK_2BUTTON_PRESS) |
|
| 246 |
return; |
|
| 244 | 247 |
|
| 245 |
static gboolean imp_csv_field_list_toggle( GtkCList *clist, GdkEventButton *event, gpointer data ) {
|
|
| 246 |
return FALSE; |
|
| 248 |
if (column == FIELD_COL_SELECT) {
|
|
| 249 |
struct _ImpCSVAttrib *attr; |
|
| 250 |
attr = gtk_clist_get_row_data( clist, row ); |
|
| 251 |
if (attr) {
|
|
| 252 |
attr->enabled ^= TRUE; |
|
| 253 |
if (attr->enabled) |
|
| 254 |
gtk_clist_set_pixmap(clist, row, FIELD_COL_SELECT, markxpm, markxpmmask); |
|
| 255 |
else |
|
| 256 |
gtk_clist_set_text(clist, row, FIELD_COL_SELECT, ""); |
|
| 257 |
} |
|
| 258 |
} |
|
| 247 | 259 |
} |
| 248 | 260 |
|
| 249 | 261 |
static void imp_csv_field_list_up( GtkWidget *button, gpointer data ) {
|
| ... | ... | |
| 681 | 693 |
|
| 682 | 694 |
titles[ FIELD_COL_SELECT ] = _("S");
|
| 683 | 695 |
titles[ FIELD_COL_FIELD ] = _("CSV Field");
|
| 684 |
titles[ FIELD_COL_ATTRIB ] = _("Attribute Name");
|
|
| 696 |
titles[ FIELD_COL_ATTRIB ] = _("Address Book Field");
|
|
| 685 | 697 |
|
| 686 | 698 |
vbox = gtk_vbox_new(FALSE, 8); |
| 687 | 699 |
gtk_container_add( GTK_CONTAINER( impcsv_dlg.notebook ), vbox ); |
| ... | ... | |
| 733 | 745 |
|
| 734 | 746 |
g_signal_connect( G_OBJECT(clist_field), "select_row", |
| 735 | 747 |
G_CALLBACK(imp_csv_field_list_selected), NULL ); |
| 736 |
g_signal_connect( G_OBJECT(clist_field), "button_press_event", |
|
| 737 |
G_CALLBACK(imp_csv_field_list_toggle), NULL ); |
|
| 738 | 748 |
g_signal_connect( G_OBJECT(up_btn), "clicked", |
| 739 | 749 |
G_CALLBACK(imp_csv_field_list_up), NULL ); |
| 740 | 750 |
g_signal_connect( G_OBJECT(down_btn), "clicked", |
Also available in: Unified diff