19 |
#include <string.h> |
#include <string.h> |
20 |
#include <math.h> |
#include <math.h> |
21 |
|
|
22 |
|
#include <curl/curl.h> |
23 |
|
|
24 |
#include <time.h> |
#include <time.h> |
25 |
#include <sys/time.h> |
#include <sys/time.h> |
26 |
|
|
31 |
|
|
32 |
#ifdef USE_MAEMO |
#ifdef USE_MAEMO |
33 |
#include <hildon/hildon-banner.h> |
#include <hildon/hildon-banner.h> |
34 |
|
#if MAEMO_VERSION_MAJOR >= 5 |
35 |
|
#include <hildon/hildon-note.h> |
36 |
|
#endif |
37 |
#endif |
#endif |
38 |
|
|
39 |
#include <locale.h> |
#include <locale.h> |
97 |
} |
} |
98 |
} |
} |
99 |
|
|
100 |
|
#if !defined(USE_MAEMO) || (MAEMO_VERSION_MAJOR < 5) |
101 |
GtkWidget *dialog = gtk_message_dialog_new( |
GtkWidget *dialog = gtk_message_dialog_new( |
102 |
GTK_WINDOW(NULL), |
GTK_WINDOW(NULL), |
103 |
GTK_DIALOG_DESTROY_WITH_PARENT, |
GTK_DIALOG_DESTROY_WITH_PARENT, |
|
#if !defined(USE_MAEMO) || (MAEMO_VERSION_MAJOR < 5) |
|
104 |
GTK_MESSAGE_ERROR, |
GTK_MESSAGE_ERROR, |
|
#else |
|
|
GTK_MESSAGE_OTHER, |
|
|
#endif |
|
105 |
GTK_BUTTONS_CLOSE, buf); |
GTK_BUTTONS_CLOSE, buf); |
106 |
|
|
107 |
gtk_window_set_title(GTK_WINDOW(dialog), _("ERROR")); |
gtk_window_set_title(GTK_WINDOW(dialog), _("ERROR")); |
108 |
|
#else |
109 |
|
GtkWidget *dialog = |
110 |
|
hildon_note_new_information(GTK_WINDOW(NULL), buf); |
111 |
|
#endif |
112 |
|
|
113 |
gtk_dialog_run(GTK_DIALOG(dialog)); |
gtk_dialog_run(GTK_DIALOG(dialog)); |
114 |
gtk_widget_destroy(dialog); |
gtk_widget_destroy(dialog); |
780 |
if(col_name && !strcmp(col_name, "Del")) { |
if(col_name && !strcmp(col_name, "Del")) { |
781 |
printf("clicked delete\n"); |
printf("clicked delete\n"); |
782 |
|
|
783 |
|
#if !defined(USE_MAEMO) || (MAEMO_VERSION_MAJOR < 5) |
784 |
/* ask user what he wants */ |
/* ask user what he wants */ |
785 |
GtkWidget *dialog = gtk_message_dialog_new( |
GtkWidget *dialog = gtk_message_dialog_new( |
786 |
GTK_WINDOW(appdata->window), |
GTK_WINDOW(appdata->window), |
787 |
GTK_DIALOG_DESTROY_WITH_PARENT, |
GTK_DIALOG_DESTROY_WITH_PARENT, |
|
/* this doesn't fix the text selection issues ... */ |
|
|
#if defined(USE_MAEMO) && (MAEMO_VERSION_MAJOR >=5) |
|
|
GTK_MESSAGE_OTHER, |
|
|
#else |
|
788 |
GTK_MESSAGE_QUESTION, |
GTK_MESSAGE_QUESTION, |
|
#endif |
|
789 |
GTK_BUTTONS_CANCEL, |
GTK_BUTTONS_CANCEL, |
790 |
_("Do you want to close this entry only or do " |
_("Do you want to close this entry only or do " |
791 |
"you want to remove it completely from the list?")); |
"you want to remove it completely from the list?")); |
795 |
_("Close"), 2, |
_("Close"), 2, |
796 |
NULL); |
NULL); |
797 |
|
|
798 |
|
gtk_window_set_title(GTK_WINDOW(dialog), _("Close or remove entry?")); |
799 |
|
#else |
800 |
|
GtkWidget *dialog = |
801 |
|
hildon_note_new_confirmation_add_buttons(GTK_WINDOW(appdata->window), |
802 |
|
_("Do you want to close this entry only or do " |
803 |
|
"you want to remove it completely from the list?"), |
804 |
|
GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, |
805 |
|
_("Remove"), 1, |
806 |
|
_("Close"), 2, |
807 |
|
NULL); |
808 |
|
#endif |
809 |
|
|
810 |
if(gpx->closed) |
if(gpx->closed) |
811 |
gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog), 2, FALSE); |
gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog), 2, FALSE); |
812 |
|
|
|
gtk_window_set_title(GTK_WINDOW(dialog), _("Close or remove entry?")); |
|
|
|
|
813 |
/* set the active flag again if the user answered "no" */ |
/* set the active flag again if the user answered "no" */ |
814 |
switch(gtk_dialog_run(GTK_DIALOG(dialog))) { |
switch(gtk_dialog_run(GTK_DIALOG(dialog))) { |
815 |
|
|
933 |
gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(appdata->gpxview), |
gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(appdata->gpxview), |
934 |
-1, "Icon", renderer, |
-1, "Icon", renderer, |
935 |
"pixbuf", GPXLIST_COL_ICON, |
"pixbuf", GPXLIST_COL_ICON, |
936 |
// "sensitive", GPXLIST_COL_OPEN, |
#ifdef USE_PANNABLE_AREA |
937 |
|
/* at least one entry needs to be sensitive. */ |
938 |
|
/* This is the delete icon if the PANNABLE_AREA is used */ |
939 |
|
"sensitive", GPXLIST_COL_OPEN, |
940 |
|
#endif |
941 |
NULL); |
NULL); |
942 |
|
|
943 |
/* --- "FileName" column --- */ |
/* --- "FileName" column --- */ |
993 |
gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(appdata->gpxview), |
gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(appdata->gpxview), |
994 |
-1, "Del", renderer, |
-1, "Del", renderer, |
995 |
"pixbuf", GPXLIST_COL_DELETE, |
"pixbuf", GPXLIST_COL_DELETE, |
996 |
"sensitive", GPXLIST_COL_OPEN, |
// "sensitive", GPXLIST_COL_OPEN, |
997 |
NULL); |
NULL); |
998 |
#endif |
#endif |
999 |
|
|
1104 |
const gchar *authors[] = { |
const gchar *authors[] = { |
1105 |
"Till Harbaum <till@harbaum.org>", |
"Till Harbaum <till@harbaum.org>", |
1106 |
"John Stowers <john.stowers@gmail.com>", |
"John Stowers <john.stowers@gmail.com>", |
1107 |
|
"GCVote: Guido Wegener <guido.wegener@gmx.de>", |
1108 |
NULL }; |
NULL }; |
1109 |
|
|
1110 |
context.dialog = g_object_new(GTK_TYPE_ABOUT_DIALOG, |
context.dialog = g_object_new(GTK_TYPE_ABOUT_DIALOG, |
1313 |
else if(cache->long_description && (what & SEARCH_DESC) && |
else if(cache->long_description && (what & SEARCH_DESC) && |
1314 |
strcasestr(cache->long_description, phrase)) |
strcasestr(cache->long_description, phrase)) |
1315 |
hit = 1; |
hit = 1; |
1316 |
else if(cache->owner && (what & SEARCH_OWNER) && |
else if(cache->owner && cache->owner->name && (what & SEARCH_OWNER) && |
1317 |
strcasestr(cache->owner, phrase)) |
strcasestr(cache->owner->name, phrase)) |
1318 |
hit = 1; |
hit = 1; |
1319 |
|
|
1320 |
if(hit) { |
if(hit) { |
2308 |
|
|
2309 |
gtk_init (&argc, &argv); |
gtk_init (&argc, &argv); |
2310 |
|
|
2311 |
|
curl_global_init(CURL_GLOBAL_ALL); |
2312 |
|
|
2313 |
#ifdef USE_MAEMO |
#ifdef USE_MAEMO |
2314 |
printf("Installing osso context for \"org.harbaum." APP "\"\n"); |
printf("Installing osso context for \"org.harbaum." APP "\"\n"); |
2315 |
appdata.osso_context = osso_initialize("org.harbaum."APP, |
appdata.osso_context = osso_initialize("org.harbaum."APP, |