forked from enlightenment/enlightenment
Use selective storing for configuration data.
This enables that only parts of the configuration is stored. Right now only implemented: policies vs. everything. SVN revision: 66220
This commit is contained in:
parent
9282dd62d7
commit
208070ff85
|
@ -92,7 +92,7 @@ _surebox_dialog_cb_yes(void *data, E_Dialog *dia)
|
||||||
man = e_manager_current_get();
|
man = e_manager_current_get();
|
||||||
ecore_x_randr_screen_primary_output_current_size_get(man->root, &c_size.width, &c_size.height, NULL, NULL, NULL);
|
ecore_x_randr_screen_primary_output_current_size_get(man->root, &c_size.width, &c_size.height, NULL, NULL, NULL);
|
||||||
|
|
||||||
e_randr_store_configuration(e_randr_screen_info);
|
e_randr_store_configuration(e_randr_screen_info, E_RANDR_CONFIGURATION_STORE_ALL);
|
||||||
|
|
||||||
_fill_data(sb->cfdata);
|
_fill_data(sb->cfdata);
|
||||||
_load_resolutions(sb->cfdata);
|
_load_resolutions(sb->cfdata);
|
||||||
|
|
|
@ -242,11 +242,35 @@ static void
|
||||||
_e_conf_randr_confirmation_dialog_store_cb(void *data, E_Dialog *dia)
|
_e_conf_randr_confirmation_dialog_store_cb(void *data, E_Dialog *dia)
|
||||||
{
|
{
|
||||||
E_Config_Randr_Dialog_Confirmation_Dialog_Data *cdd = (E_Config_Randr_Dialog_Confirmation_Dialog_Data *)data;
|
E_Config_Randr_Dialog_Confirmation_Dialog_Data *cdd = (E_Config_Randr_Dialog_Confirmation_Dialog_Data *)data;
|
||||||
|
E_Randr_Configuration_Store_Modifier modifier = 0;
|
||||||
|
|
||||||
if (!cdd) return;
|
if (!cdd) return;
|
||||||
|
|
||||||
_e_conf_randr_confirmation_dialog_keep_cb(data, dia);
|
//Create modifier
|
||||||
e_randr_store_configuration(e_randr_screen_info);
|
if (dialog_subdialog_policies_basic_check_changed(NULL, e_config_runtime_info))
|
||||||
|
modifier |= E_RANDR_CONFIGURATION_STORE_POLICIES;
|
||||||
|
|
||||||
|
if (dialog_subdialog_resolutions_basic_check_changed(NULL, e_config_runtime_info))
|
||||||
|
modifier |= E_RANDR_CONFIGURATION_STORE_RESOLUTIONS;
|
||||||
|
|
||||||
|
if (dialog_subdialog_arrangement_basic_check_changed(NULL, e_config_runtime_info))
|
||||||
|
modifier |= E_RANDR_CONFIGURATION_STORE_ARRANGEMENT;
|
||||||
|
|
||||||
|
if (dialog_subdialog_orientation_basic_check_changed(NULL, e_config_runtime_info))
|
||||||
|
modifier |= E_RANDR_CONFIGURATION_STORE_ORIENTATIONS;
|
||||||
|
|
||||||
|
//ordinary "keep" functionality
|
||||||
|
dialog_subdialog_arrangement_keep_changes(cdd->cfdata);
|
||||||
|
dialog_subdialog_orientation_keep_changes(cdd->cfdata);
|
||||||
|
dialog_subdialog_policies_keep_changes(cdd->cfdata);
|
||||||
|
dialog_subdialog_resolutions_keep_changes(cdd->cfdata);
|
||||||
|
|
||||||
|
//cleanup dialog
|
||||||
|
_e_conf_randr_confirmation_dialog_delete_cb(dia->win);
|
||||||
|
|
||||||
|
//but actually trigger saving the stuff
|
||||||
|
e_randr_store_configuration(e_randr_screen_info, modifier);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue