Parent Directory | Revision Log
Honour gconf proxy settings
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 | /* this define will enable preliminary API 0.6 support */ |
24 | #define API06 |
25 | |
26 | #include <stdio.h> |
27 | #include <stdlib.h> |
28 | #include <string.h> |
29 | |
30 | #include <locale.h> |
31 | #include <libintl.h> |
32 | |
33 | #define LOCALEDIR "/usr/share/locale" |
34 | |
35 | #define _(String) gettext(String) |
36 | #define N_(String) (String) |
37 | |
38 | #ifdef USE_HILDON |
39 | #include <hildon/hildon-program.h> |
40 | #include <hildon/hildon-file-chooser-dialog.h> |
41 | #include <hildon/hildon-file-system-model.h> |
42 | #include <libosso.h> /* required for screen saver timeout */ |
43 | #define GTK_FM_OK GTK_RESPONSE_OK |
44 | #define HILDON_ENTRY_NO_AUTOCAP(a) \ |
45 | hildon_gtk_entry_set_input_mode(GTK_ENTRY(a),HILDON_GTK_INPUT_MODE_FULL) |
46 | |
47 | #ifndef HILDON_HARDKEY_FULLSCREEN |
48 | #define HILDON_HARDKEY_FULLSCREEN GDK_F6 |
49 | #endif |
50 | |
51 | #ifndef HILDON_HARDKEY_INCREASE |
52 | #define HILDON_HARDKEY_INCREASE GDK_F7 |
53 | #endif |
54 | |
55 | #ifndef HILDON_HARDKEY_DECREASE |
56 | #define HILDON_HARDKEY_DECREASE GDK_F8 |
57 | #endif |
58 | |
59 | #else |
60 | #define GTK_FM_OK GTK_RESPONSE_ACCEPT |
61 | #define HILDON_ENTRY_NO_AUTOCAP(a) |
62 | #endif |
63 | |
64 | |
65 | #include <gtk/gtk.h> |
66 | #include <glib/gstdio.h> |
67 | |
68 | #include <libgnomevfs/gnome-vfs.h> |
69 | #include <libgnomevfs/gnome-vfs-inet-connection.h> |
70 | |
71 | #include "pos.h" |
72 | #include "osm.h" |
73 | |
74 | #include "canvas.h" |
75 | #include "undo.h" |
76 | |
77 | #ifdef USE_HILDON |
78 | #include "dbus.h" |
79 | #endif |
80 | |
81 | typedef struct appdata_s { |
82 | #ifdef USE_HILDON |
83 | HildonProgram *program; |
84 | HildonWindow *window; |
85 | osso_context_t *osso_context; |
86 | |
87 | #else |
88 | GtkWidget *window; |
89 | #endif |
90 | |
91 | GtkWidget *vbox; |
92 | struct map_s *map; |
93 | osm_t *osm; |
94 | |
95 | struct statusbar_s *statusbar; |
96 | struct settings_s *settings; |
97 | struct project_s *project; |
98 | struct iconbar_s *iconbar; |
99 | struct icon_s *icon; |
100 | struct presets_item_s *presets; |
101 | |
102 | /* menu items to be enabled and disabled every now and then */ |
103 | gboolean gps_enabled; |
104 | struct gps_state_s *gps_state; |
105 | |
106 | #ifdef USE_HILDON |
107 | dbus_mm_pos_t mmpos; |
108 | GtkWidget *banner; |
109 | #endif |
110 | gboolean banner_is_grabby; |
111 | |
112 | /* flags used to prevent re-appearence of dialogs */ |
113 | struct { |
114 | gulong not; /* bit is set if dialog is not to be displayed again */ |
115 | gulong reply; /* reply to be assumed if "not" bit is set */ |
116 | } dialog_again; |
117 | |
118 | struct { |
119 | GtkWidget *menu_track; |
120 | GtkWidget *menu_item_import; |
121 | GtkWidget *menu_item_export; |
122 | GtkWidget *menu_item_clear; |
123 | GtkWidget *menu_item_enable_gps; |
124 | GtkWidget *menu_item_follow_gps; |
125 | struct track_s *track; |
126 | guint handler_id; |
127 | canvas_item_t *gps_item; // the purple curcle |
128 | } track; |
129 | |
130 | GtkWidget *menu_item_project_close; |
131 | GtkWidget *menu_item_view_fullscreen; |
132 | |
133 | GtkWidget *menu_view; |
134 | |
135 | GtkWidget *menu_osm; |
136 | GtkWidget *menu_item_osm_upload; |
137 | GtkWidget *menu_item_osm_undo; |
138 | GtkWidget *menu_item_osm_save_changes; |
139 | GtkWidget *menu_item_osm_undo_changes; |
140 | GtkWidget *menu_item_osm_relations; |
141 | |
142 | GtkWidget *menu_wms; |
143 | GtkWidget *menu_item_wms_clear; |
144 | GtkWidget *menu_item_wms_adjust; |
145 | |
146 | GtkWidget *menu_map; |
147 | GtkWidget *menu_item_map_hide_sel; |
148 | GtkWidget *menu_item_map_show_all; |
149 | GtkWidget *menu_item_map_no_icons; |
150 | GtkWidget *menu_item_map_no_antialias; |
151 | |
152 | undo_t undo; |
153 | |
154 | } appdata_t; |
155 | |
156 | #include "settings.h" |
157 | #include "map.h" |
158 | #include "map_hl.h" |
159 | #include "osm_api.h" |
160 | #include "statusbar.h" |
161 | #include "area_edit.h" |
162 | #include "project.h" |
163 | #include "diff.h" |
164 | #include "iconbar.h" |
165 | #include "icon.h" |
166 | #include "info.h" |
167 | #include "track.h" |
168 | #include "gps.h" |
169 | #include "wms.h" |
170 | #include "josm_presets.h" |
171 | #include "relation_edit.h" |
172 | #include "misc.h" |
173 | #include "map_edit.h" |
174 | #include "josm_elemstyles.h" |
175 | #include "style.h" |
176 | #include "net_io.h" |
177 | #include "banner.h" |
178 | #include "list.h" |
179 | |
180 | #endif // APPDATA_H |