file_browser, file_tab: change a default behavior.

Previously, they are disabled if the workspace is not specified.
We don't need this anymore.
Because we gonna support runtime changing for the workspace directory.
This commit is contained in:
Hermet Park 2016-08-07 01:41:47 +09:00
parent dbebb64e32
commit c890ca73b6
3 changed files with 5 additions and 38 deletions

View File

@ -44,15 +44,6 @@ typedef struct config_s
Eina_Bool edc_navigator;
Eina_Bool red_alert;
Eina_Bool file_tab;
/* These two loaded variables are used for value overriding.
file_browser and file_tab will be forcely disabled if the workspace were
not given by user. In that case, these variables would have false always.
So, store original setting values here to keep the Enventor config
properly. */
Eina_Bool file_browser_loaded;
Eina_Bool file_tab_loaded;
} config_data;
static config_data *g_cd = NULL;
@ -132,10 +123,6 @@ config_save(config_data *cd)
return;
}
//Restore loaded file browser & file tab config.
cd->file_browser = cd->file_browser_loaded;
cd->file_tab = cd->file_tab_loaded;
eet_data_write(ef, edd_base, "config", cd, 1);
eet_close(ef);
}
@ -268,10 +255,6 @@ config_load(void)
if (!cd->font_style)
eina_stringshare_replace(&cd->font_style, "Regular");
//Store loaded file browser config.
cd->file_browser_loaded = cd->file_browser;
cd->file_tab_loaded = cd->file_tab;
return cd;
}
@ -356,8 +339,7 @@ Eina_Bool
config_init(const char *input_path, const char *output_path,
const char *workspace_path,
Eina_List *img_path, Eina_List *snd_path,
Eina_List *fnt_path, Eina_List *dat_path,
Eina_Bool default_workspace)
Eina_List *fnt_path, Eina_List *dat_path)
{
eddc_init();
@ -371,14 +353,6 @@ config_init(const char *input_path, const char *output_path,
if (workspace_path[0])
eina_stringshare_replace(&cd->workspace_path, workspace_path);
//In case of default workspace
//we don't turn on file browser and file tab in default.
if (default_workspace)
{
cd->file_browser = EINA_FALSE;
cd->file_tab = EINA_FALSE;
}
if (img_path)
cd->img_path_list = img_path;
@ -739,7 +713,6 @@ config_file_tab_set(Eina_Bool enabled)
EINA_SAFETY_ON_NULL_RETURN(cd);
cd->file_tab = enabled;
cd->file_tab_loaded = enabled;
}
Eina_Bool
@ -1076,7 +1049,6 @@ config_file_browser_set(Eina_Bool enabled)
EINA_SAFETY_ON_NULL_RETURN(cd);
cd->file_browser = enabled;
cd->file_browser_loaded = enabled;
}
Eina_Bool

View File

@ -210,7 +210,7 @@ live_edit_set(void)
base_live_edit_fixed_bar_set(fixed_bar);
}
static Eina_Bool
static void
args_dispatch(int argc, char **argv,
char *edc_path, char *edj_path, char *workspace_path,
Eina_List **img_path, Eina_List **snd_path,
@ -227,7 +227,6 @@ args_dispatch(int argc, char **argv,
Eina_Bool quit = EINA_FALSE;
Eina_Bool help = EINA_FALSE;
Eina_Bool default_workspace = EINA_TRUE;
//No arguments. set defaults
if (argc == 1) goto defaults;
@ -341,13 +340,11 @@ defaults:
{
sprintf(workspace_path, "%s", (char *)eina_list_data_get(wd));
EINA_LIST_FREE(wd, s) free(s);
default_workspace = EINA_FALSE;
}
else
{
sprintf(workspace_path, ".");
}
return default_workspace;
}
static Eina_Bool
@ -361,13 +358,11 @@ config_data_set(int argc, char **argv, Eina_Bool *default_edc,
Eina_List *snd_path = NULL;
Eina_List *fnt_path = NULL;
Eina_List *dat_path = NULL;
Eina_Bool default_workspace =
args_dispatch(argc, argv, edc_path, edj_path, workspace_path,
args_dispatch(argc, argv, edc_path, edj_path, workspace_path,
&img_path, &snd_path, &fnt_path, &dat_path,
default_edc, template, PATH_MAX);
if (!config_init(edc_path, edj_path, workspace_path,
img_path, snd_path, fnt_path, dat_path,
default_workspace))
img_path, snd_path, fnt_path, dat_path))
return EINA_FALSE;
config_update_cb_set(config_update_cb, NULL);

View File

@ -3,7 +3,7 @@
#define MAX_VIEW_SCALE 5.0
#define MIN_VIEW_SCALE 0.1
Eina_Bool config_init(const char *input_path, const char *output_path, const char *workspace_path, Eina_List *img_path, Eina_List *snd_path, Eina_List *fnt_path, Eina_List *dat_path, Eina_Bool default_workspace);
Eina_Bool config_init(const char *input_path, const char *output_path, const char *workspace_path, Eina_List *img_path, Eina_List *snd_path, Eina_List *fnt_path, Eina_List *dat_path);
void config_term(void);
const char *config_input_path_get(void);
const char *config_output_path_get(void);