From: Enlightenment S. <no-...@en...> - 2010-11-30 12:36:35
|
Log: eve: Do not mess with eve_state.c It is generated by geneet and changes will be overwritten Author: acidx Date: 2010-11-30 04:36:28 -0800 (Tue, 30 Nov 2010) New Revision: 55083 Trac: http://trac.enlightenment.org/e/changeset/55083 Modified: trunk/eve/src/bin/chrome.c trunk/eve/src/bin/eve_state.c Modified: trunk/eve/src/bin/chrome.c =================================================================== --- trunk/eve/src/bin/chrome.c 2010-11-30 12:36:24 UTC (rev 55082) +++ trunk/eve/src/bin/chrome.c 2010-11-30 12:36:28 UTC (rev 55083) @@ -52,6 +52,8 @@ static Eina_Bool more_state_get(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *part __UNUSED__); static void more_del(void *data __UNUSED__, Evas_Object *obj __UNUSED__); +static void proxy_config_home_page_set(Config *config, const char *home_page); + typedef enum { ITEM_TYPE_LAST, ITEM_TYPE_STATIC_FOLDER, @@ -201,7 +203,7 @@ .type = CONFIG_TYPE_STRING, .conf = EVE_CONFIG_HOME_PAGE, .conf_get = config_home_page_get, - .conf_set = config_home_page_set, + .conf_set = proxy_config_home_page_set, }}, NULL, ITEM_FLAG_ARROW }, { ITEM_TYPE_LAST, NULL, NULL, NULL, ITEM_FLAG_NONE }, }, NULL, ITEM_FLAG_ARROW }, @@ -403,6 +405,14 @@ .item_style = "double_label/ewebkit" }; +static void +proxy_config_home_page_set(Config *config, const char *home_page) +{ + char *tmp_uri = uri_sanitize(home_page); + config_home_page_set(config, tmp_uri); + free(tmp_uri); +} + static Eina_List * _eina_hash_sorted_keys_get(Eina_Hash *hash, Eina_Compare_Cb compare_func) { @@ -1085,7 +1095,9 @@ static More_Menu_Item * more_menu_home_page_current_set(Browser_Window *win, More_Menu_Item *mmi __UNUSED__) { - config_home_page_set(config, ewk_view_uri_get(win->current_view)); + char *tmp_uri = uri_sanitize(ewk_view_uri_get(win->current_view)); + config_home_page_set(config, tmp_uri); + free(tmp_uri); return NULL; } Modified: trunk/eve/src/bin/eve_state.c =================================================================== --- trunk/eve/src/bin/eve_state.c 2010-11-30 12:36:24 UTC (rev 55082) +++ trunk/eve/src/bin/eve_state.c 2010-11-30 12:36:28 UTC (rev 55083) @@ -277,11 +277,7 @@ config_home_page_set(Config *config, const char *home_page) { EINA_SAFETY_ON_NULL_RETURN(config); - char *tmp_uri; - if ((tmp_uri = uri_sanitize(home_page))) { - eina_stringshare_replace(&(config->home_page), tmp_uri); - free(tmp_uri); - } + eina_stringshare_replace(&(config->home_page), home_page); } inline const char * |