Parent Directory | Revision Log
Applied gps icon and elemstyle patch
1 | harbaum | 1 | /* |
2 | * Copyright (C) 2008 Till Harbaum <till@harbaum.org>. | ||
3 | * | ||
4 | * This file is part of OSM2Go. | ||
5 | * | ||
6 | * OSM2Go is free software: you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation, either version 3 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * OSM2Go is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with OSM2Go. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | #ifndef APPDATA_H | ||
21 | #define APPDATA_H | ||
22 | |||
23 | #include <stdio.h> | ||
24 | #include <stdlib.h> | ||
25 | #include <string.h> | ||
26 | |||
27 | #include <locale.h> | ||
28 | #include <libintl.h> | ||
29 | |||
30 | harbaum | 308 | #define LOCALEDIR PREFIX "/locale" |
31 | harbaum | 1 | |
32 | #define _(String) gettext(String) | ||
33 | #define N_(String) (String) | ||
34 | |||
35 | #ifdef USE_HILDON | ||
36 | harbaum | 314 | #if (MAEMO_VERSION_MAJOR >= 5) |
37 | harbaum | 266 | #define FREMANTLE |
38 | harbaum | 314 | #define FREMANTLE_PANNABLE_AREA |
39 | #include <hildon/hildon-gtk.h> | ||
40 | #include <hildon/hildon-pannable-area.h> | ||
41 | harbaum | 266 | #endif |
42 | |||
43 | harbaum | 1 | #include <hildon/hildon-program.h> |
44 | #include <hildon/hildon-file-chooser-dialog.h> | ||
45 | #include <hildon/hildon-file-system-model.h> | ||
46 | harbaum | 190 | #include <hildon/hildon-defines.h> |
47 | harbaum | 1 | #include <libosso.h> /* required for screen saver timeout */ |
48 | #define GTK_FM_OK GTK_RESPONSE_OK | ||
49 | #define HILDON_ENTRY_NO_AUTOCAP(a) \ | ||
50 | hildon_gtk_entry_set_input_mode(GTK_ENTRY(a),HILDON_GTK_INPUT_MODE_FULL) | ||
51 | #else | ||
52 | #define GTK_FM_OK GTK_RESPONSE_ACCEPT | ||
53 | #define HILDON_ENTRY_NO_AUTOCAP(a) | ||
54 | #endif | ||
55 | |||
56 | harbaum | 195 | #define ZOOM_BUTTONS |
57 | harbaum | 246 | #define DETAIL_POPUP |
58 | harbaum | 1 | |
59 | #include <gtk/gtk.h> | ||
60 | #include <glib/gstdio.h> | ||
61 | |||
62 | #include <libgnomevfs/gnome-vfs.h> | ||
63 | #include <libgnomevfs/gnome-vfs-inet-connection.h> | ||
64 | |||
65 | #include "pos.h" | ||
66 | #include "osm.h" | ||
67 | |||
68 | #include "canvas.h" | ||
69 | harbaum | 68 | #include "undo.h" |
70 | harbaum | 1 | |
71 | #ifdef USE_HILDON | ||
72 | #include "dbus.h" | ||
73 | #endif | ||
74 | |||
75 | typedef struct appdata_s { | ||
76 | #ifdef USE_HILDON | ||
77 | HildonProgram *program; | ||
78 | HildonWindow *window; | ||
79 | osso_context_t *osso_context; | ||
80 | |||
81 | #else | ||
82 | GtkWidget *window; | ||
83 | #endif | ||
84 | |||
85 | GtkWidget *vbox; | ||
86 | struct map_s *map; | ||
87 | osm_t *osm; | ||
88 | |||
89 | harbaum | 195 | #ifdef ZOOM_BUTTONS |
90 | harbaum | 246 | GtkWidget *btn_zoom_in, *btn_zoom_out, *btn_detail_popup; |
91 | harbaum | 195 | #endif |
92 | |||
93 | harbaum | 1 | struct statusbar_s *statusbar; |
94 | struct settings_s *settings; | ||
95 | struct project_s *project; | ||
96 | struct iconbar_s *iconbar; | ||
97 | struct icon_s *icon; | ||
98 | struct presets_item_s *presets; | ||
99 | |||
100 | /* menu items to be enabled and disabled every now and then */ | ||
101 | struct gps_state_s *gps_state; | ||
102 | |||
103 | #ifdef USE_HILDON | ||
104 | dbus_mm_pos_t mmpos; | ||
105 | achadwick | 28 | GtkWidget *banner; |
106 | harbaum | 1 | #endif |
107 | achadwick | 28 | gboolean banner_is_grabby; |
108 | harbaum | 1 | |
109 | /* flags used to prevent re-appearence of dialogs */ | ||
110 | struct { | ||
111 | gulong not; /* bit is set if dialog is not to be displayed again */ | ||
112 | gulong reply; /* reply to be assumed if "not" bit is set */ | ||
113 | } dialog_again; | ||
114 | |||
115 | struct { | ||
116 | harbaum | 188 | GtkWidget *submenu_track; |
117 | GtkWidget *menu_item_track_import; | ||
118 | GtkWidget *menu_item_track_export; | ||
119 | GtkWidget *menu_item_track_clear; | ||
120 | GtkWidget *menu_item_track_enable_gps; | ||
121 | GtkWidget *menu_item_track_follow_gps; | ||
122 | harbaum | 1 | struct track_s *track; |
123 | harbaum | 277 | #ifndef ENABLE_LIBLOCATION |
124 | /* when using liblocation, events are generated on position change */ | ||
125 | /* and no seperate timer is required */ | ||
126 | harbaum | 1 | guint handler_id; |
127 | harbaum | 277 | #endif |
128 | harbaum | 246 | canvas_item_t *gps_item; // the purple circle |
129 | int warn_cnt;; | ||
130 | harbaum | 1 | } track; |
131 | |||
132 | harbaum | 188 | #if !defined(USE_HILDON) || (MAEMO_VERSION_MAJOR < 5) |
133 | harbaum | 22 | GtkWidget *menu_item_view_fullscreen; |
134 | harbaum | 188 | #endif |
135 | harbaum | 1 | |
136 | harbaum | 188 | GtkWidget *submenu_view; |
137 | harbaum | 1 | |
138 | harbaum | 188 | GtkWidget *submenu_map; |
139 | GtkWidget *menu_item_map_upload; | ||
140 | GtkWidget *menu_item_map_undo; | ||
141 | GtkWidget *menu_item_map_save_changes; | ||
142 | GtkWidget *menu_item_map_undo_changes; | ||
143 | GtkWidget *menu_item_map_relations; | ||
144 | harbaum | 1 | |
145 | harbaum | 188 | GtkWidget *submenu_wms; |
146 | harbaum | 1 | GtkWidget *menu_item_wms_clear; |
147 | GtkWidget *menu_item_wms_adjust; | ||
148 | |||
149 | GtkWidget *menu_item_map_hide_sel; | ||
150 | GtkWidget *menu_item_map_show_all; | ||
151 | |||
152 | harbaum | 188 | #if defined(USE_HILDON) && (MAEMO_VERSION_MAJOR == 5) |
153 | /* submenues are seperate menues under fremantle */ | ||
154 | harbaum | 190 | GtkWidget *app_menu_view, *app_menu_wms, *app_menu_track; |
155 | harbaum | 191 | GtkWidget *app_menu_map; |
156 | harbaum | 188 | #endif |
157 | |||
158 | harbaum | 68 | undo_t undo; |
159 | harbaum | 54 | |
160 | harbaum | 1 | } appdata_t; |
161 | |||
162 | harbaum | 169 | #include "settings.h" |
163 | harbaum | 1 | #include "map.h" |
164 | #include "map_hl.h" | ||
165 | #include "osm_api.h" | ||
166 | #include "statusbar.h" | ||
167 | #include "area_edit.h" | ||
168 | #include "project.h" | ||
169 | #include "diff.h" | ||
170 | #include "iconbar.h" | ||
171 | #include "icon.h" | ||
172 | #include "info.h" | ||
173 | #include "track.h" | ||
174 | #include "gps.h" | ||
175 | #include "wms.h" | ||
176 | #include "josm_presets.h" | ||
177 | #include "relation_edit.h" | ||
178 | #include "misc.h" | ||
179 | #include "map_edit.h" | ||
180 | #include "josm_elemstyles.h" | ||
181 | #include "style.h" | ||
182 | harbaum | 4 | #include "net_io.h" |
183 | harbaum | 64 | #include "banner.h" |
184 | harbaum | 146 | #include "list.h" |
185 | harbaum | 249 | #include "scale_popup.h" |
186 | harbaum | 1 | |
187 | harbaum | 218 | void main_ui_enable(appdata_t *appdata); |
188 | |||
189 | harbaum | 1 | #endif // APPDATA_H |