E_Manager *manager;
struct {
Evas *canvas;
- Evas_Object *dialog, *widget_list, *selected_eo;
+ Evas_Object *dialog, *widget_list;
E_Config_Randr_Dialog_Output_Dialog_Data *selected_output_dd;
E_Config_Randr_Dialog_Confirmation_Dialog_Data *confirmation_dialog;
struct {
void policy_widget_free_cfdata(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
void policy_widget_keep_changes(E_Config_Dialog_Data *cfdata);
void policy_widget_discard_changes(E_Config_Dialog_Data *cfdata);
-void policy_widget_update_radio_buttons(Evas_Object *crtc);
+void policy_widget_update_radio_buttons(E_Config_Randr_Dialog_Output_Dialog_Data *odd);
// Functions for the resolutions widget interaction
Eina_Bool resolution_widget_create_data(E_Config_Dialog_Data *cfdata);
void resolution_widget_free_cfdata(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
void resolution_widget_keep_changes(E_Config_Dialog_Data *cfdata);
void resolution_widget_discard_changes(E_Config_Dialog_Data *cfdata);
-void resolution_widget_update_list(Evas_Object *crtc);
+void resolution_widget_update_list(E_Config_Randr_Dialog_Output_Dialog_Data *odd);
// Functions for the orientation widget interaction
Eina_Bool orientation_widget_create_data(E_Config_Dialog_Data *cfdata);
Eina_Bool orientation_widget_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
Eina_Bool orientation_widget_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
void orientation_widget_free_cfdata(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-void orientation_widget_update_radio_buttons(Evas_Object *crtc);
-void orientation_widget_update_edje(Evas_Object *crtc);
+void orientation_widget_update_radio_buttons(E_Config_Randr_Dialog_Output_Dialog_Data *odd);
+void orientation_widget_update_edje(E_Config_Randr_Dialog_Output_Dialog_Data *odd);
void orientation_widget_keep_changes(E_Config_Dialog_Data *cfdata);
void orientation_widget_discard_changes(E_Config_Dialog_Data *cfdata);
e_layout_child_geometry_get(obj, &e_config_runtime_info->gui.widgets.arrangement.sel_rep_previous_pos.x, &e_config_runtime_info->gui.widgets.arrangement.sel_rep_previous_pos.y, NULL, NULL);
//update data for other logs
- e_config_runtime_info->gui.selected_eo = obj;
e_config_runtime_info->gui.selected_output_dd = (E_Config_Randr_Dialog_Output_Dialog_Data*)evas_object_data_get(obj, "rep_info");
//update resolutions list
- resolution_widget_update_list(obj);
+ resolution_widget_update_list(e_config_runtime_info->gui.selected_output_dd);
//update orientation radio buttons
- orientation_widget_update_radio_buttons(obj);
+ orientation_widget_update_radio_buttons(e_config_runtime_info->gui.selected_output_dd);
//update policy radio buttons
- policy_widget_update_radio_buttons(obj);
+ policy_widget_update_radio_buttons(e_config_runtime_info->gui.selected_output_dd);
}
static void
EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
{
odd->new_orientation = Ecore_X_Randr_Unset;
- odd->previous_orientation = odd->crtc ? odd->crtc->current_orientation : Ecore_X_Randr_Unset;
+ odd->previous_orientation = odd->crtc ? odd->crtc->current_orientation : Ecore_X_Randr_Unset;
}
return EINA_TRUE;
*/
//disable widgets, if no CRTC is selected
- orientation_widget_update_radio_buttons(e_config_runtime_info->gui.selected_eo);
+ orientation_widget_update_radio_buttons(e_config_runtime_info->gui.selected_output_dd);
//evas_object_show(e_config_runtime_info->gui.widgets.orientation.swallowing_edje);
}
void
-orientation_widget_update_radio_buttons(Evas_Object *crtc)
+orientation_widget_update_radio_buttons(E_Config_Randr_Dialog_Output_Dialog_Data *odd)
{
- E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
Ecore_X_Randr_Orientation supported_oris, ori;
//disable widgets, if no crtc is selected
- if (!crtc)
+ if (!odd)
{
e_widget_disabled_set(e_config_runtime_info->gui.widgets.orientation.radio_normal, EINA_TRUE);
e_widget_disabled_set(e_config_runtime_info->gui.widgets.orientation.radio_rot90, EINA_TRUE);
return;
}
- if (!(output_dialog_data = evas_object_data_get(crtc, "rep_info"))) return;
-
- if (output_dialog_data->crtc)
+ if (odd->crtc)
{
//enabled monitor
- supported_oris = output_dialog_data->crtc->orientations;
- ori = (output_dialog_data->new_orientation != Ecore_X_Randr_Unset) ? output_dialog_data->new_orientation : output_dialog_data->crtc->current_orientation;
+ supported_oris = odd->crtc->orientations;
+ ori = (odd->new_orientation != Ecore_X_Randr_Unset) ? odd->new_orientation : odd->crtc->current_orientation;
}
else
{
/*
void
-orientation_widget_update_edje(Evas_Object *crtc)
+orientation_widget_update_edje(E_Config_Randr_Dialog_Output_Dialog_Data *odd)
{
- E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
Ecore_X_Randr_Orientation supported_oris, ori;
char signal[40];
- if (!e_config_runtime_info->gui.selected_eo || !(output_dialog_data = evas_object_data_get(crtc, "rep_info"))) return;
+ if (!odd)
+ return;
- if (output_dialog_data->crtc)
+ if (odd->crtc)
{
//enabled monitor
- supported_oris = output_dialog_data->crtc->orientations;
- ori = output_dialog_data->crtc->current_orientation;
+ supported_oris = odd->crtc->orientations;
+ ori = odd->crtc->current_orientation;
}
else
{
}
void
-policy_widget_update_radio_buttons(Evas_Object *rep)
+policy_widget_update_radio_buttons(E_Config_Randr_Dialog_Output_Dialog_Data *odd)
{
- E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
Ecore_X_Randr_Output_Policy policy;
//disable widgets, if no rep is selected
- if (!rep || !(output_dialog_data = evas_object_data_get(rep, "rep_info")))
+ if (!odd)
{
//Evas_Object *radio_above, *radio_right, *radio_below, *radio_left, *radio_clone, *radio_none;
e_widget_disabled_set(e_config_runtime_info->gui.widgets.policy.radio_above, EINA_TRUE);
e_widget_disabled_set(e_config_runtime_info->gui.widgets.policy.radio_none, EINA_FALSE);
}
- policy = (output_dialog_data->new_policy != Ecore_X_Randr_Unset) ? output_dialog_data->new_policy : output_dialog_data->previous_policy;
+ policy = (odd->new_policy != Ecore_X_Randr_Unset) ? odd->new_policy : odd->previous_policy;
//toggle the switch of the currently used policies
switch (policy)
{
}
void
-resolution_widget_update_list(Evas_Object *rep)
+resolution_widget_update_list(E_Config_Randr_Dialog_Output_Dialog_Data *odd)
{
Eina_List *iter, *modelist = NULL;
- E_Config_Randr_Dialog_Output_Dialog_Data *odd;
Ecore_X_Randr_Mode_Info *mode_info, *current_mode = NULL;
char resolution_text[RESOLUTION_TXT_MAX_LENGTH];
float rate;
e_widget_ilist_freeze(e_config_runtime_info->gui.widgets.resolution.widget);
e_widget_ilist_clear(e_config_runtime_info->gui.widgets.resolution.widget);
- if (!rep || !(odd = evas_object_data_get(rep, "rep_info")))
+ if (!odd)
goto _go_and_return;
//select correct mode list