save the last used gradient colors and use them the next time the dialog is shown
SVN revision: 24959
This commit is contained in:
parent
cc6b1d0f99
commit
47ded57d3f
|
@ -474,6 +474,13 @@ e_config_init(void)
|
||||||
E_CONFIG_VAL(D, T, wallpaper_import_last_dev, STR);
|
E_CONFIG_VAL(D, T, wallpaper_import_last_dev, STR);
|
||||||
E_CONFIG_VAL(D, T, wallpaper_import_last_path, STR);
|
E_CONFIG_VAL(D, T, wallpaper_import_last_path, STR);
|
||||||
|
|
||||||
|
E_CONFIG_VAL(D, T, wallpaper_grad_c1_r, INT);
|
||||||
|
E_CONFIG_VAL(D, T, wallpaper_grad_c1_g, INT);
|
||||||
|
E_CONFIG_VAL(D, T, wallpaper_grad_c1_b, INT);
|
||||||
|
E_CONFIG_VAL(D, T, wallpaper_grad_c2_r, INT);
|
||||||
|
E_CONFIG_VAL(D, T, wallpaper_grad_c2_g, INT);
|
||||||
|
E_CONFIG_VAL(D, T, wallpaper_grad_c2_b, INT);
|
||||||
|
|
||||||
e_config = e_config_domain_load("e", _e_config_edd);
|
e_config = e_config_domain_load("e", _e_config_edd);
|
||||||
if (e_config)
|
if (e_config)
|
||||||
{
|
{
|
||||||
|
@ -1169,6 +1176,15 @@ e_config_init(void)
|
||||||
e_config->wallpaper_import_last_path = evas_stringshare_add("/");
|
e_config->wallpaper_import_last_path = evas_stringshare_add("/");
|
||||||
IFCFGEND;
|
IFCFGEND;
|
||||||
|
|
||||||
|
IFCFG(0x0098);
|
||||||
|
e_config->wallpaper_grad_c1_r = 0;
|
||||||
|
e_config->wallpaper_grad_c1_g = 0;
|
||||||
|
e_config->wallpaper_grad_c1_b = 0;
|
||||||
|
e_config->wallpaper_grad_c2_r = 255;
|
||||||
|
e_config->wallpaper_grad_c2_g = 255;
|
||||||
|
e_config->wallpaper_grad_c2_b = 255;
|
||||||
|
IFCFGEND;
|
||||||
|
|
||||||
#if 0 /* example of new config */
|
#if 0 /* example of new config */
|
||||||
IFCFG(0x0090); /* the version # where this value(s) was introduced */
|
IFCFG(0x0090); /* the version # where this value(s) was introduced */
|
||||||
e_config->new_value = 10; /* set the value(s) */
|
e_config->new_value = 10; /* set the value(s) */
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
|
||||||
/* increment this whenever a new set of config values are added but the users
|
/* increment this whenever a new set of config values are added but the users
|
||||||
* config doesn't need top be wiped - simply new values need to be put in
|
* config doesn't need top be wiped - simply new values need to be put in
|
||||||
*/
|
*/
|
||||||
#define E_CONFIG_FILE_GENERATION 0x0097
|
#define E_CONFIG_FILE_GENERATION 0x0098
|
||||||
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
|
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
|
||||||
|
|
||||||
#define E_EVAS_ENGINE_DEFAULT 0
|
#define E_EVAS_ENGINE_DEFAULT 0
|
||||||
|
@ -236,6 +236,13 @@ struct _E_Config
|
||||||
|
|
||||||
const char *wallpaper_import_last_dev; // INTERNAL
|
const char *wallpaper_import_last_dev; // INTERNAL
|
||||||
const char *wallpaper_import_last_path; // INTERNAL
|
const char *wallpaper_import_last_path; // INTERNAL
|
||||||
|
|
||||||
|
int wallpaper_grad_c1_r; // INTERNAL
|
||||||
|
int wallpaper_grad_c1_g; // INTERNAL
|
||||||
|
int wallpaper_grad_c1_b; // INTERNAL
|
||||||
|
int wallpaper_grad_c2_r; // INTERNAL
|
||||||
|
int wallpaper_grad_c2_g; // INTERNAL
|
||||||
|
int wallpaper_grad_c2_b; // INTERNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _E_Config_Module
|
struct _E_Config_Module
|
||||||
|
|
|
@ -57,6 +57,7 @@ static int _import_cb_edje_cc_exit(void *data, int type, void *event);
|
||||||
static void _import_cb_delete(E_Win *win);
|
static void _import_cb_delete(E_Win *win);
|
||||||
static void _import_cb_close(void *data, E_Dialog *dia);
|
static void _import_cb_close(void *data, E_Dialog *dia);
|
||||||
static void _import_cb_ok(void *data, E_Dialog *dia);
|
static void _import_cb_ok(void *data, E_Dialog *dia);
|
||||||
|
static void _import_config_save(Import *import);
|
||||||
|
|
||||||
EAPI E_Dialog *
|
EAPI E_Dialog *
|
||||||
e_int_config_wallpaper_gradient(E_Config_Dialog *parent)
|
e_int_config_wallpaper_gradient(E_Config_Dialog *parent)
|
||||||
|
@ -102,7 +103,12 @@ e_int_config_wallpaper_gradient(E_Config_Dialog *parent)
|
||||||
cfdata->color2 = calloc(1, sizeof(E_Color));
|
cfdata->color2 = calloc(1, sizeof(E_Color));
|
||||||
cfdata->color2->a = 255;
|
cfdata->color2->a = 255;
|
||||||
|
|
||||||
// XXX load last used colors from config.
|
cfdata->color1->r = e_config->wallpaper_grad_c1_r;
|
||||||
|
cfdata->color1->g = e_config->wallpaper_grad_c1_g;
|
||||||
|
cfdata->color1->b = e_config->wallpaper_grad_c1_b;
|
||||||
|
cfdata->color2->r = e_config->wallpaper_grad_c2_r;
|
||||||
|
cfdata->color2->g = e_config->wallpaper_grad_c2_g;
|
||||||
|
cfdata->color2->b = e_config->wallpaper_grad_c2_b;
|
||||||
|
|
||||||
ol = e_widget_list_add(evas, 0, 0);
|
ol = e_widget_list_add(evas, 0, 0);
|
||||||
|
|
||||||
|
@ -183,6 +189,7 @@ e_int_config_wallpaper_gradient_del(E_Dialog *dia)
|
||||||
Import *import;
|
Import *import;
|
||||||
|
|
||||||
import = dia->win->data;
|
import = dia->win->data;
|
||||||
|
_import_config_save(import);
|
||||||
|
|
||||||
if (import->exe_handler) ecore_event_handler_del(import->exe_handler);
|
if (import->exe_handler) ecore_event_handler_del(import->exe_handler);
|
||||||
import->exe_handler = NULL;
|
import->exe_handler = NULL;
|
||||||
|
@ -209,7 +216,18 @@ _import_opt_disabled_set(Import *import, int disabled)
|
||||||
static void
|
static void
|
||||||
_import_config_save(Import *import)
|
_import_config_save(Import *import)
|
||||||
{
|
{
|
||||||
// XXX save last used colors
|
if (import->cfdata->color1)
|
||||||
|
{
|
||||||
|
e_config->wallpaper_grad_c1_r = import->cfdata->color1->r;
|
||||||
|
e_config->wallpaper_grad_c1_g = import->cfdata->color1->g;
|
||||||
|
e_config->wallpaper_grad_c1_b = import->cfdata->color1->b;
|
||||||
|
}
|
||||||
|
if (import->cfdata->color2)
|
||||||
|
{
|
||||||
|
e_config->wallpaper_grad_c2_r = import->cfdata->color2->r;
|
||||||
|
e_config->wallpaper_grad_c2_g = import->cfdata->color2->g;
|
||||||
|
e_config->wallpaper_grad_c2_b = import->cfdata->color2->b;
|
||||||
|
}
|
||||||
e_config_save_queue();
|
e_config_save_queue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue