563 |
} |
} |
564 |
#endif |
#endif |
565 |
|
|
566 |
|
#ifndef FREMANTLE |
567 |
static gboolean focus_out(GtkWidget *widget, GdkEventFocus *event, |
static gboolean focus_out(GtkWidget *widget, GdkEventFocus *event, |
568 |
gpointer data) { |
gpointer data) { |
569 |
cache_context_t *context = (cache_context_t*)data; |
cache_context_t *context = (cache_context_t*)data; |
575 |
|
|
576 |
return FALSE; |
return FALSE; |
577 |
} |
} |
578 |
|
#else |
579 |
|
static void coo_changed(GtkWidget *widget, gpointer data) { |
580 |
|
notes_save((cache_context_t*)data); |
581 |
|
} |
582 |
|
#endif |
583 |
|
|
584 |
GtkWidget *cache_notes(cache_context_t *context) { |
GtkWidget *cache_notes(cache_context_t *context) { |
585 |
cache_t *cache = context->cache; |
cache_t *cache = context->cache; |
645 |
preset_coordinate_picker(context->appdata, |
preset_coordinate_picker(context->appdata, |
646 |
context->notes.latw, context->notes.lonw); |
context->notes.latw, context->notes.lonw); |
647 |
|
|
648 |
|
/* on fremantle we react on "changed" event instead since this */ |
649 |
|
/* means that editing is done */ |
650 |
|
#ifdef FREMANTLE |
651 |
|
g_signal_connect(G_OBJECT(context->notes.latw), "changed", |
652 |
|
G_CALLBACK(coo_changed), context); |
653 |
|
g_signal_connect(G_OBJECT(context->notes.lonw), "changed", |
654 |
|
G_CALLBACK(coo_changed), context); |
655 |
|
#else |
656 |
g_signal_connect(G_OBJECT(context->notes.latw), "focus-out-event", |
g_signal_connect(G_OBJECT(context->notes.latw), "focus-out-event", |
657 |
G_CALLBACK(focus_out), context); |
G_CALLBACK(focus_out), context); |
658 |
g_signal_connect(G_OBJECT(context->notes.lonw), "focus-out-event", |
g_signal_connect(G_OBJECT(context->notes.lonw), "focus-out-event", |
659 |
G_CALLBACK(focus_out), context); |
G_CALLBACK(focus_out), context); |
660 |
|
#endif |
661 |
|
|
662 |
GtkWidget *ihbox = gtk_hbox_new(FALSE, 0); |
GtkWidget *ihbox = gtk_hbox_new(FALSE, 0); |
663 |
|
|
756 |
return vbox; |
return vbox; |
757 |
} |
} |
758 |
|
|
759 |
|
void notes_logged(cache_context_t *context) { |
760 |
|
|
761 |
|
/* if you log it, you sure also found it */ |
762 |
|
check_button_set_active(context->notes.foundw, TRUE); |
763 |
|
check_button_set_active(context->notes.loggedw, TRUE); |
764 |
|
|
765 |
|
gtk_widget_set_sensitive(context->notes.foundw, FALSE); |
766 |
|
gtk_widget_set_sensitive(context->notes.loggedw, TRUE); |
767 |
|
|
768 |
|
ftime_update(context->notes.foundw, context, TRUE); |
769 |
|
} |
770 |
|
|
771 |
void notes_free(notes_t *notes) { |
void notes_free(notes_t *notes) { |
772 |
if(notes) { |
if(notes) { |
773 |
if(notes->text) xmlFree(notes->text); |
if(notes->text) xmlFree(notes->text); |