Diff of /trunk/src/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 178 by harbaum, Tue Jun 16 15:27:37 2009 UTC revision 179 by harbaum, Thu Jun 18 12:15:17 2009 UTC
# Line 126  cb_menu_upload(GtkMenuItem *item, gpoint Line 126  cb_menu_upload(GtkMenuItem *item, gpoint
126    appdata_t *appdata = (appdata_t*)data;    appdata_t *appdata = (appdata_t*)data;
127    if(!appdata->osm || !appdata->project) return;    if(!appdata->osm || !appdata->project) return;
128    
129    if(project_check_demo(appdata->window, appdata->project))    if(project_check_demo(GTK_WIDGET(appdata->window), appdata->project))
130      return;      return;
131    
132    osm_upload(appdata, appdata->osm, appdata->project);    osm_upload(appdata, appdata->osm, appdata->project);
# Line 137  cb_menu_download(GtkMenuItem *item, gpoi Line 137  cb_menu_download(GtkMenuItem *item, gpoi
137    appdata_t *appdata = (appdata_t*)data;    appdata_t *appdata = (appdata_t*)data;
138    if(!appdata->project) return;    if(!appdata->project) return;
139    
140    if(project_check_demo(appdata->window, appdata->project))    if(project_check_demo(GTK_WIDGET(appdata->window), appdata->project))
141      return;      return;
142    
143    /* if we have valid osm data loaded: save state first */    /* if we have valid osm data loaded: save state first */
# Line 1128  int main(int argc, char *argv[]) { Line 1128  int main(int argc, char *argv[]) {
1128    
1129    /* let gtk do its thing before loading the data, */    /* let gtk do its thing before loading the data, */
1130    /* so the user sees something */    /* so the user sees something */
1131    while(gtk_events_pending()) {    while(gtk_events_pending())
     putchar('.');  
1132      gtk_main_iteration();      gtk_main_iteration();
   }  
1133    
1134    /* load project if one is specified in the settings */    /* load project if one is specified in the settings */
1135    if(appdata.settings->project)    if(appdata.settings->project)
# Line 1143  int main(int argc, char *argv[]) { Line 1141  int main(int argc, char *argv[]) {
1141    if(appdata.settings && appdata.settings->enable_gps)    if(appdata.settings && appdata.settings->enable_gps)
1142      track_enable_gps(&appdata, TRUE);      track_enable_gps(&appdata, TRUE);
1143    
1144    /* ------------ jump into main loop ---------------- */    /* again let the ui do its thing */
1145      while(gtk_events_pending())
1146        gtk_main_iteration();
1147    
1148      /* start to interact with the user now that the gui is running */
1149      if(appdata.settings->first_run_demo) {
1150        messagef(GTK_WIDGET(appdata.window), _("Welcome to OSM2Go"),
1151                 _("This is the first time you run OSM2Go. "
1152                   "A demo project has been loaded to get you "
1153                   "started. You can play around with this demo as much "
1154                   "as you like. However, you cannot upload or download "
1155                   "the demo project.\n\n"
1156                   "In order to start working on real data you'll have "
1157                   "to setup a new project and enter your OSM user name "
1158                   "and password. You'll then be able to download the "
1159                   "latest data from OSM and upload your changes into "
1160                   "the OSM main database."
1161                   ));
1162      }
1163    
1164      /* ------------ jump into main loop ---------------- */
1165    gtk_main();    gtk_main();
1166    
1167    puts("gtk_main() left");    puts("gtk_main() left");

Legend:
Removed from v.178  
changed lines
  Added in v.179