void roadmap_foursquare_login_dialog(void) { const char *pVal; if (!ssd_dialog_activate(FOURSQUARE_LOGIN_DIALOG_NAME, NULL)) { create_login_dialog(); ssd_dialog_activate(FOURSQUARE_LOGIN_DIALOG_NAME, NULL); } if (roadmap_foursquare_logged_in()) ssd_dialog_set_value("Login Status Label", roadmap_lang_get("Status: logged in")); else ssd_dialog_set_value("Login Status Label", roadmap_lang_get("Status: not logged in")); ssd_dialog_set_value("FoursquareUserName", roadmap_foursquare_get_username()); ssd_dialog_set_value("FoursquarePassword", roadmap_foursquare_get_password()); if (roadmap_foursquare_is_tweet_login_enabled()) pVal = yesno[0]; else pVal = yesno[1]; ssd_dialog_set_data("FoursquareSendLogin", (void *) pVal); if (roadmap_foursquare_is_tweet_badge_enabled()) pVal = yesno[0]; else pVal = yesno[1]; ssd_dialog_set_data("FoursquareSendBadgeUnlock", (void *) pVal); }
void update_checked () { int i; if (!CheckboxDriving[0]) return; for (i = 0; i < NUM_CHECKBOXES_DRIVING; i++) { if (!strcmp (ERTVisabilityGroup_to_string (gState), CheckboxDriving[i]->name)) ssd_dialog_set_data (CheckboxDriving[i]->name, "yes"); else ssd_dialog_set_data (CheckboxDriving[i]->name, "no"); } // for (i = 0; i < NUM_CHECKBOXES_REPORTING; i++) { // if (!strcmp (ERTVisabilityReport_to_string (gReportState), // CheckboxReporting[i]->name)) // ssd_dialog_set_data (CheckboxReporting[i]->name, "yes"); // else // ssd_dialog_set_data (CheckboxReporting[i]->name, "no"); // } }
void editor_segments_fill_dialog (SelectedLine *lines, int lines_count) { char street_name[512]; const char *street_type = ""; const char *t2s = ""; const char *city = ""; int cfcc = ROADMAP_ROAD_LAST; int same_street = 1; int same_city = 1; int i; strcpy (street_name, ""); for (i=0; i<lines_count; i++) { const char *this_name = ""; const char *this_type = ""; const char *this_t2s = ""; const char *this_city = ""; if (lines[i].line.plugin_id == EditorPluginID) { if (editor_db_activate (lines[i].line.fips) != -1) { int street_id = -1; editor_line_get_street (lines[i].line.line_id, &street_id); this_name = editor_street_get_street_fename (street_id); this_type = editor_street_get_street_fetype (street_id); this_t2s = editor_street_get_street_t2s (street_id); this_city = editor_street_get_street_city (street_id); //editor_line_get_direction (lines[i].line.line_id, &this_direction); } } else { RoadMapStreetProperties properties; if (roadmap_locator_activate (lines[i].line.fips) < 0) { continue; } roadmap_square_set_current (lines[i].line.square); roadmap_street_get_properties (lines[i].line.line_id, &properties); this_name = roadmap_street_get_street_name (&properties); this_type = roadmap_street_get_street_fetype (&properties); this_t2s = roadmap_street_get_street_t2s (&properties); this_city = roadmap_street_get_street_city (&properties, ROADMAP_STREET_LEFT_SIDE); /* if (!editor_override_line_get_direction (lines[0].line.line_id, &this_direction)) { this_direction = roadmap_line_route_get_direction (lines[i].line.line_id, ROUTE_CAR_ALLOWED); roadmap_line_route_get_speed_limit (lines[i].line.line_id, &this_speed_limit, &this_speed_limit); } */ } if (same_street) { if (!strlen(street_type)) { street_type = this_type; } if (!strlen(t2s)) { t2s = this_t2s; } if (!strlen(street_name)) { strncpy_safe (street_name, this_name, 512); } else { if (strlen(this_name) && strcmp(this_name, street_name)) { strcpy (street_name, ""); street_type = ""; t2s = ""; same_street = 0; } } } if (same_city) { if (!strlen(city)) { city = this_city; } else { if (strlen(this_city) && strcmp(this_city, city)) { same_city = 0; city = ""; } } } if (lines[i].line.cfcc < cfcc) { cfcc = lines[i].line.cfcc; } } if (same_city && !strlen(city)) { city = editor_segments_find_city (lines[0].line.line_id, lines[0].line.plugin_id, lines[0].line.square); } #ifdef SSD ssd_dialog_set_data ("Road type", (void *) (long)(cfcc - ROADMAP_ROAD_FIRST)); ssd_dialog_set_value ("Name", street_name); ssd_dialog_set_value ("Text to Speech", t2s); ssd_dialog_set_value ("City", city); def_values[0] = ssd_dialog_get_value ("City"); #else roadmap_dialog_set_data ("General", "Road type", (void *) (cfcc - ROADMAP_ROAD_FIRST)); roadmap_dialog_set_data ("General", "Street type", street_type); roadmap_dialog_set_data ("General", "Name", street_name); roadmap_dialog_set_data ("General", "Text to Speech", t2s); roadmap_dialog_set_data ("General", "City", city); #endif }