Beispiel #1
0
static BOOL twitter_button_handler( void )
{
   const char *username = ssd_dialog_get_value( "TwitterUserName" );
   const char *password = ssd_dialog_get_value( "TwitterPassword" );
   const char *tweet_signup = ssd_dialog_get_data( WELCOME_WIZ_DLG_TWITTER_SET_SIGNUP );
   BOOL is_tweet_signup = !strcmp( tweet_signup, "yes" );
   BOOL res = FALSE;

   if (!username || !*username){
      roadmap_messagebox("Error", "Please enter a user name");
      return FALSE;
   }

   if (!password || !*password){
      roadmap_messagebox("Error", "Please enter password");
      return FALSE;
   }

   roadmap_twitter_set_username( username );
   roadmap_twitter_set_password( password );
   roadmap_twitter_set_signup( is_tweet_signup );

   roadmap_config_save(TRUE);
   res = Realtime_TwitterConnect( username, password, roadmap_twitter_is_signup_enabled() );

   if ( res )
   {
      roadmap_twitter_set_signup( FALSE );
   }
   return TRUE;
}
void roadmap_foursquare_set_logged_in (BOOL is_logged_in) {
   if (is_logged_in)
      roadmap_config_set(&FOURSQUARE_CFG_PRM_LOGGED_IN_Var, FOURSQUARE_CFG_PRM_LOGGED_IN_Yes);
   else
      roadmap_config_set(&FOURSQUARE_CFG_PRM_LOGGED_IN_Var, FOURSQUARE_CFG_PRM_LOGGED_IN_No);
   roadmap_config_save(0);
}
Beispiel #3
0
void roadmap_lang_set_default_lang(const char *lang){
   if (!initialized)
      roadmap_lang_initialize_params();

   roadmap_config_set(&RoadMapConfigDefaultLanguage, lang);
   roadmap_config_save(0);
}
Beispiel #4
0
void save_changes () {
   int i;
   const char *selected;

   for (i = 0; i < NUM_CHECKBOXES_DRIVING; i++) {
      selected = ssd_dialog_get_data (CheckboxDriving[i]->name);
      if (!strcmp (selected, "yes")) {
         break;
      }
   }

   gState = ERTVisabilityGroup_from_string (CheckboxDriving[i]->name);
   roadmap_config_set (&RT_CFG_PRM_VISGRP_Var,
            (const char *) CheckboxDriving[i]->name);

//   for (i = 0; i < NUM_CHECKBOXES_REPORTING; i++) {
//      selected = ssd_dialog_get_data (CheckboxReporting[i]->name);
//      if (!strcmp (selected, "yes")) {
//         break;
//      }
//   }
//   gReportState = ERTVisabilityReport_from_string (CheckboxReporting[i]->name);
//
//   roadmap_config_set (&RT_CFG_PRM_VISREP_Var,
//            (const char *) CheckboxReporting[i]->name);

   roadmap_config_save (FALSE);

   OnSettingsChanged_VisabilityGroup ();
   roadmap_social_send_permissions();
}
Beispiel #5
0
void roadmap_lang_set_system_lang(const char *lang, BOOL download){
   if (!initialized)
      roadmap_lang_initialize_params();
   if (download)
      roadmap_lang_download_lang_file( lang, NULL );
   roadmap_config_set(&RoadMapConfigSystemLanguage, lang);
   roadmap_config_save(TRUE);
}
Beispiel #6
0
void roadmap_lang_set_system_lang(const char *lang, RoadMapCallback callback){
   if (!initialized)
      roadmap_lang_initialize_params();
   roadmap_lang_download_lang_file( lang, callback );
   roadmap_config_set(&RoadMapConfigSystemLanguage, lang);
   roadmap_config_save(0);
   NOPH_SetSystemLanguage(lang);
}
Beispiel #7
0
void roadmap_lang_set_lang_file_update_time(char *lang_value, char *update_time){

   RoadMapConfigDescriptor descriptor;

   descriptor.category = lang_value;
   descriptor.name = "Update time";
   roadmap_config_declare("session",&descriptor, "", NULL);

   roadmap_config_set (&descriptor, update_time);
   roadmap_config_save(FALSE);
}
Beispiel #8
0
void roadmap_mood_set(const char *value){
   roadmap_config_declare
        ("user", &MoodCfg, "happy", NULL);

   roadmap_analytics_log_event(ANALYTICS_EVENT_MOOD, ANALYTICS_EVENT_INFO_CHANGED_TO, value);

   roadmap_config_set (&MoodCfg, value);
   roadmap_config_save(1);
   gState = roadmap_mood_from_string(value);
#ifdef QTMOBILITY
    roadmap_mood_changed(gState);
#endif
   OnMoodChanged();
}
Beispiel #9
0
static void set_custom_bonus_last_shown_id(int id){
   roadmap_config_set_integer(&RoadMapConfigCustomBonusLastID, id);
   roadmap_config_save(FALSE);
}
Beispiel #10
0
void roadmap_browser_set_show_external (void) {
   roadmap_config_set (&RoadMapConfigShowExternal, "yes");
   roadmap_config_save(0);
}
Beispiel #11
0
static void set_first_time_no(){
   roadmap_config_set(&WELCOME_WIZ_FIRST_TIME_Var, WELCOME_WIZ_FIRST_TIME_No);
   roadmap_config_save(TRUE);
}
void roadmap_foursquare_disable_tweet_login() {
   roadmap_config_set(&FOURSQUARE_CFG_PRM_TWEET_LOGIN_Var,
         FOURSQUARE_CFG_PRM_TWEET_LOGIN_Disabled);
   roadmap_config_save(0);
}
static void set_geo_location_displayed(){
   roadmap_config_set(&GEO_LOCATION_DISPLAYED_Var, GEO_LOCATION_Yes);
   roadmap_config_save(TRUE);
}
Beispiel #14
0
static void on_recieved_completed (void) {
   char updateText[] = "We've made a few infrastructural changes that require re-start. Please exit and re-start waze.";
   const char *user_lang = roadmap_lang_get_user_lang();//"heb";//todomt 
   const char *force_lang = roadmap_config_get( &RoadMapConfigForceLanguage);
   // compare the old and new server id's - if different, user needs to restart
   int oldServerId = roadmap_config_get_integer(&RoadMapConfigSystemServerId);
   int newServerId = GeoConfigContext.id;

   // Save the RT server ID.
   roadmap_config_set_integer (&RoadMapConfigSystemServerId,
            GeoConfigContext.id);

#ifndef J2ME // in J2ME don't download the language until user chooses it manually // TODODAN
   //set the language
   if (!strcmp(force_lang, "")){
	   roadmap_lang_set_system_lang (GeoConfigContext.lang, NULL);
   }else{
	   roadmap_lang_set_system_lang (force_lang, NULL);
   }
#endif

   // Save version
   roadmap_config_set_integer (&RoadMapConfigGeoConfigVersion,
            GeoConfigContext.version);

   //Save new configuration
   roadmap_config_save (0);

   //Remove timer
   roadmap_main_remove_periodic (GeoConfigTimer);

   roadmap_log (ROADMAP_DEBUG,"GeoServerConfig Completed setting all parameters!!" );
   roadmap_log (ROADMAP_INFO, "GeoServerConfig: user_lang='%s' newServerId=%d", user_lang, newServerId );

   if ((user_lang[0] == 0) && (newServerId != 2)){
      roadmap_lang_download_conf_file(on_lang_conf_downloaded);
      return;
   }

   if ((user_lang[0] == 0) && (newServerId == 2)){
      roadmap_lang_set_system_lang(GeoConfigContext.lang, NULL);
   }

   if ((oldServerId==-1)){
      ssd_progress_msg_dialog_show("Downloading language");
	  roadmap_lang_download_lang_file(roadmap_lang_get_system_lang(), on_user_lang_downloaded); //on_user_lang_downloaded();//todomt 
      return;
   }

#ifndef J2ME
   roadmap_lang_download_lang_file(GeoConfigContext.lang, NULL);
#endif


   ssd_progress_msg_dialog_hide();

   clean_up();

   roadmap_screen_refresh();

   if (GeoConfigContext.callback)
      (*GeoConfigContext.callback)();

   GeoConfigContext.callback = NULL;

//   if ((oldServerId!=newServerId)&&(oldServerId!=-1)){
//
//      roadmap_lang_set_update_time("");
//#ifndef J2ME
//      roadmap_lang_set_lang_file_update_time("heb","");
//      roadmap_lang_set_lang_file_update_time("eng","");
//#endif
//      roadmap_prompts_set_update_time ("");
//      roadmap_splash_set_update_time ("");
//      roadmap_splash_reset_check_time();
//      roadmap_config_save(FALSE);
//#if (defined (IPHONE) || defined (ANDROID))
//      roadmap_tile_remove_all(roadmap_locator_active());
//#endif
//      roadmap_messagebox_cb(roadmap_lang_get("Please restart Waze"), roadmap_lang_get(updateText), restart_msg_cb);
//   }

}
void roadmap_foursquare_set_username(const char *user_name) {
   roadmap_config_set(&FOURSQUARE_CFG_PRM_NAME_Var, user_name); //AR: we save only username
   roadmap_config_save(0);
}
void roadmap_foursquare_set_password(const char *password) {
   roadmap_config_set(&FOURSQUARE_CFG_PRM_PASSWORD_Var, FOURSQUARE_CFG_PRM_PASSWORD_Default/*password*/); //AR: we don't want to save login details
   roadmap_config_save(0);
}
Beispiel #17
0
static void roadmap_groups_set_tip_shown (void) {

   roadmap_config_set(&RoadMapConfigGroupsTipShown,"yes");
   roadmap_config_save(0);
}
void roadmap_foursquare_disable_tweet_badge() {
   roadmap_config_set(&FOURSQUARE_CFG_PRM_TWEET_BADGE_Var,
         FOURSQUARE_CFG_PRM_TWEET_BADGE_Disabled);
   roadmap_config_save(0);
}
Beispiel #19
0
static void set_terms_accepted(){
   roadmap_config_set(&WELCOME_WIZ_TERMS_OF_USE_Var, WELCOME_WIZ_FIRST_TIME_Yes);
   roadmap_config_save(TRUE);
}