Parent Directory | Revision Log
The "look at me still talking when there's mapping to do" update. UI: Make display more responsive during long busy periods. Use Hildon banners if available, or temporary statusbar messages for non-Hildon. Some message wording changes. Bugfix: Prevent some segfaults when tapping screen during a redraw by putting a grabby banner in the way. Etc: Update credits.
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 | #include "version.h" | ||
31 | |||
32 | #define LOCALEDIR "/usr/share/locale" | ||
33 | |||
34 | #define _(String) gettext(String) | ||
35 | #define N_(String) (String) | ||
36 | |||
37 | #ifdef USE_HILDON | ||
38 | #include <hildon/hildon-program.h> | ||
39 | #include <hildon/hildon-file-chooser-dialog.h> | ||
40 | #include <hildon/hildon-file-system-model.h> | ||
41 | #include <libosso.h> /* required for screen saver timeout */ | ||
42 | #define GTK_FM_OK GTK_RESPONSE_OK | ||
43 | #define HILDON_ENTRY_NO_AUTOCAP(a) \ | ||
44 | hildon_gtk_entry_set_input_mode(GTK_ENTRY(a),HILDON_GTK_INPUT_MODE_FULL) | ||
45 | #else | ||
46 | #define GTK_FM_OK GTK_RESPONSE_ACCEPT | ||
47 | #define HILDON_ENTRY_NO_AUTOCAP(a) | ||
48 | #endif | ||
49 | |||
50 | |||
51 | #include <gtk/gtk.h> | ||
52 | #include <glib/gstdio.h> | ||
53 | |||
54 | #include <libgnomevfs/gnome-vfs.h> | ||
55 | #include <libgnomevfs/gnome-vfs-inet-connection.h> | ||
56 | |||
57 | #include "pos.h" | ||
58 | #include "osm.h" | ||
59 | |||
60 | #include "canvas.h" | ||
61 | |||
62 | #ifdef USE_HILDON | ||
63 | #include "dbus.h" | ||
64 | #endif | ||
65 | |||
66 | typedef struct appdata_s { | ||
67 | #ifdef USE_HILDON | ||
68 | HildonProgram *program; | ||
69 | HildonWindow *window; | ||
70 | osso_context_t *osso_context; | ||
71 | |||
72 | #else | ||
73 | GtkWidget *window; | ||
74 | #endif | ||
75 | |||
76 | GtkWidget *vbox; | ||
77 | struct map_s *map; | ||
78 | osm_t *osm; | ||
79 | |||
80 | struct statusbar_s *statusbar; | ||
81 | struct settings_s *settings; | ||
82 | struct project_s *project; | ||
83 | struct iconbar_s *iconbar; | ||
84 | struct icon_s *icon; | ||
85 | struct presets_item_s *presets; | ||
86 | |||
87 | /* menu items to be enabled and disabled every now and then */ | ||
88 | gboolean gps_enabled; | ||
89 | struct gps_state_s *gps_state; | ||
90 | |||
91 | #ifdef USE_HILDON | ||
92 | dbus_mm_pos_t mmpos; | ||
93 | achadwick | 28 | GtkWidget *banner; |
94 | harbaum | 1 | #endif |
95 | achadwick | 28 | gboolean banner_is_grabby; |
96 | harbaum | 1 | |
97 | /* flags used to prevent re-appearence of dialogs */ | ||
98 | struct { | ||
99 | gulong not; /* bit is set if dialog is not to be displayed again */ | ||
100 | gulong reply; /* reply to be assumed if "not" bit is set */ | ||
101 | } dialog_again; | ||
102 | |||
103 | struct { | ||
104 | char *import_path; | ||
105 | GtkWidget *menu_track; | ||
106 | GtkWidget *menu_item_import; | ||
107 | GtkWidget *menu_item_export; | ||
108 | GtkWidget *menu_item_clear; | ||
109 | GtkWidget *menu_item_gps; | ||
110 | struct track_s *track; | ||
111 | guint handler_id; | ||
112 | canvas_item_t *gps_item; // the purple curcle | ||
113 | } track; | ||
114 | |||
115 | GtkWidget *menu_item_project_close; | ||
116 | harbaum | 22 | GtkWidget *menu_item_view_fullscreen; |
117 | harbaum | 1 | |
118 | GtkWidget *menu_view; | ||
119 | |||
120 | GtkWidget *menu_osm; | ||
121 | harbaum | 4 | GtkWidget *menu_item_osm_upload; |
122 | GtkWidget *menu_item_osm_diff; | ||
123 | harbaum | 15 | GtkWidget *menu_item_osm_undo_changes; |
124 | harbaum | 1 | |
125 | GtkWidget *menu_wms; | ||
126 | GtkWidget *menu_item_wms_clear; | ||
127 | GtkWidget *menu_item_wms_adjust; | ||
128 | |||
129 | GtkWidget *menu_map; | ||
130 | GtkWidget *menu_item_map_hide_sel; | ||
131 | GtkWidget *menu_item_map_show_all; | ||
132 | harbaum | 14 | GtkWidget *menu_item_map_no_icons; |
133 | harbaum | 24 | GtkWidget *menu_item_map_no_antialias; |
134 | harbaum | 1 | |
135 | } appdata_t; | ||
136 | |||
137 | #include "map.h" | ||
138 | #include "map_hl.h" | ||
139 | #include "osm_api.h" | ||
140 | #include "statusbar.h" | ||
141 | #include "area_edit.h" | ||
142 | #include "project.h" | ||
143 | #include "settings.h" | ||
144 | #include "diff.h" | ||
145 | #include "iconbar.h" | ||
146 | #include "icon.h" | ||
147 | #include "info.h" | ||
148 | #include "track.h" | ||
149 | #include "gps.h" | ||
150 | #include "wms.h" | ||
151 | #include "josm_presets.h" | ||
152 | #include "relation_edit.h" | ||
153 | #include "misc.h" | ||
154 | #include "map_edit.h" | ||
155 | #include "josm_elemstyles.h" | ||
156 | #include "style.h" | ||
157 | harbaum | 4 | #include "net_io.h" |
158 | harbaum | 1 | |
159 | #endif // APPDATA_H |