diff --git a/src/modules/conf_randr/e_int_config_randr.c b/src/modules/conf_randr/e_int_config_randr.c
index 727469fe2..6b51fa5b2 100644
--- a/src/modules/conf_randr/e_int_config_randr.c
+++ b/src/modules/conf_randr/e_int_config_randr.c
@@ -22,72 +22,71 @@
#define ECORE_X_RANDR_1_3 ((1 << 16) | 3)
#endif
-
#ifdef Ecore_X_Randr_None
#undef Ecore_X_Randr_None
-#define Ecore_X_Randr_None 0
+#define Ecore_X_Randr_None 0
#else
-#define Ecore_X_Randr_None 0
+#define Ecore_X_Randr_None 0
#endif
#ifdef Ecore_X_Randr_Unset
#undef Ecore_X_Randr_Unset
-#define Ecore_X_Randr_Unset -1
+#define Ecore_X_Randr_Unset -1
#else
-#define Ecore_X_Randr_Unset -1
+#define Ecore_X_Randr_Unset -1
#endif
-#define THEME_FILENAME "/e-module-conf_randr.edj"
-#define TOOLBAR_ICONSIZE 16
+#define THEME_FILENAME "/e-module-conf_randr.edj"
+#define TOOLBAR_ICONSIZE 16
-static void *create_data (E_Config_Dialog *cfd);
-static void free_cfdata (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-static int basic_check_changed (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-static int basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-static Evas_Object *basic_create_widgets (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
-static Eina_Bool _deferred_noxrandr_error (void *data);
+static void *create_data(E_Config_Dialog *cfd);
+static void free_cfdata(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+static int basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+static int basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+static Evas_Object *basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
+static Eina_Bool _deferred_noxrandr_error(void *data);
// Functions for the arrangement subdialog interaction
-extern Eina_Bool dialog_subdialog_arrangement_create_data (E_Config_Dialog_Data *cfdata);
-extern Evas_Object *dialog_subdialog_arrangement_basic_create_widgets (Evas *canvas);
-extern Eina_Bool dialog_subdialog_arrangement_basic_check_changed (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-extern Eina_Bool dialog_subdialog_arrangement_basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-extern void dialog_subdialog_arrangement_free_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-extern void dialog_subdialog_arrangement_keep_changes (E_Config_Dialog_Data *cfdata);
-extern void dialog_subdialog_arrangement_discard_changes (E_Config_Dialog_Data *cfdata);
+extern Eina_Bool dialog_subdialog_arrangement_create_data(E_Config_Dialog_Data *cfdata);
+extern Evas_Object *dialog_subdialog_arrangement_basic_create_widgets(Evas *canvas);
+extern Eina_Bool dialog_subdialog_arrangement_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+extern Eina_Bool dialog_subdialog_arrangement_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+extern void dialog_subdialog_arrangement_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+extern void dialog_subdialog_arrangement_keep_changes(E_Config_Dialog_Data *cfdata);
+extern void dialog_subdialog_arrangement_discard_changes(E_Config_Dialog_Data *cfdata);
// Functions for the policies subdialog interaction
-extern Eina_Bool dialog_subdialog_policies_create_data (E_Config_Dialog_Data *cfdata);
-extern Evas_Object *dialog_subdialog_policies_basic_create_widgets (Evas *canvas);
-extern Eina_Bool dialog_subdialog_policies_basic_check_changed (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-extern Eina_Bool dialog_subdialog_policies_basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-extern void dialog_subdialog_policies_keep_changes (E_Config_Dialog_Data *cfdata);
-extern void dialog_subdialog_policies_discard_changes (E_Config_Dialog_Data *cfdata);
+extern Eina_Bool dialog_subdialog_policies_create_data(E_Config_Dialog_Data *cfdata);
+extern Evas_Object *dialog_subdialog_policies_basic_create_widgets(Evas *canvas);
+extern Eina_Bool dialog_subdialog_policies_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+extern Eina_Bool dialog_subdialog_policies_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+extern void dialog_subdialog_policies_keep_changes(E_Config_Dialog_Data *cfdata);
+extern void dialog_subdialog_policies_discard_changes(E_Config_Dialog_Data *cfdata);
// Functions for the resolutions subdialog interaction
-extern Eina_Bool dialog_subdialog_resolutions_create_data (E_Config_Dialog_Data *cfdata);
-extern Evas_Object *dialog_subdialog_resolutions_basic_create_widgets (Evas *canvas);
-extern Eina_Bool dialog_subdialog_resolutions_basic_check_changed (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-extern Eina_Bool dialog_subdialog_resolutions_basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-extern void dialog_subdialog_resolutions_update_list (Evas *canvas, Evas_Object *crtc);
-extern void dialog_subdialog_resolutions_keep_changes (E_Config_Dialog_Data *cfdata);
-extern void dialog_subdialog_resolutions_discard_changes (E_Config_Dialog_Data *cfdata);
+extern Eina_Bool dialog_subdialog_resolutions_create_data(E_Config_Dialog_Data *cfdata);
+extern Evas_Object *dialog_subdialog_resolutions_basic_create_widgets(Evas *canvas);
+extern Eina_Bool dialog_subdialog_resolutions_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+extern Eina_Bool dialog_subdialog_resolutions_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+extern void dialog_subdialog_resolutions_update_list(Evas *canvas, Evas_Object *crtc);
+extern void dialog_subdialog_resolutions_keep_changes(E_Config_Dialog_Data *cfdata);
+extern void dialog_subdialog_resolutions_discard_changes(E_Config_Dialog_Data *cfdata);
// Functions for the orientation subdialog interaction
-extern Eina_Bool dialog_subdialog_orientation_create_data (E_Config_Dialog_Data *cfdata);
-extern Evas_Object *dialog_subdialog_orientation_basic_create_widgets (Evas *canvas);
-extern Eina_Bool dialog_subdialog_orientation_basic_check_changed (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-extern Eina_Bool dialog_subdialog_orientation_basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-extern void dialog_subdialog_orientation_update_radio_buttons (Evas_Object *crtc);
-extern void dialog_subdialog_orientation_update_edje (Evas_Object *crtc);
-extern void dialog_subdialog_orientation_keep_changes (E_Config_Dialog_Data *cfdata);
-extern void dialog_subdialog_orientation_discard_changes (E_Config_Dialog_Data *cfdata);
+extern Eina_Bool dialog_subdialog_orientation_create_data(E_Config_Dialog_Data *cfdata);
+extern Evas_Object *dialog_subdialog_orientation_basic_create_widgets(Evas *canvas);
+extern Eina_Bool dialog_subdialog_orientation_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+extern Eina_Bool dialog_subdialog_orientation_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+extern void dialog_subdialog_orientation_update_radio_buttons(Evas_Object *crtc);
+extern void dialog_subdialog_orientation_update_edje(Evas_Object *crtc);
+extern void dialog_subdialog_orientation_keep_changes(E_Config_Dialog_Data *cfdata);
+extern void dialog_subdialog_orientation_discard_changes(E_Config_Dialog_Data *cfdata);
/* actual module specifics */
E_Config_Dialog_Data *e_config_runtime_info = NULL;
extern E_Module *conf_randr_module;
char _theme_file_path[PATH_MAX];
- E_Config_Randr_Dialog_Output_Dialog_Data *
+E_Config_Randr_Dialog_Output_Dialog_Data *
_dialog_output_dialog_data_new(E_Randr_Crtc_Info *crtc_info, E_Randr_Output_Info *output_info)
{
E_Config_Randr_Dialog_Output_Dialog_Data *dialog_data;
@@ -109,8 +108,7 @@ _dialog_output_dialog_data_new(E_Randr_Crtc_Info *crtc_info, E_Randr_Output_Info
return NULL;
}
-
- static void *
+static void *
create_data(E_Config_Dialog *cfd)
{
Eina_List *iter;
@@ -152,7 +150,7 @@ _e_conf_randr_create_data_failed_free_data:
return NULL;
}
- static void
+static void
free_cfdata(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
EINA_SAFETY_ON_TRUE_RETURN(!e_randr_screen_info);
@@ -162,10 +160,10 @@ free_cfdata(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
cfdata = NULL;
}
- static Eina_Bool
+static Eina_Bool
_e_conf_randr_confirmation_dialog_timer_cb(void *data)
{
- 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;
char buf[4096];
if (!cdd) return ECORE_CALLBACK_CANCEL;
@@ -175,14 +173,14 @@ _e_conf_randr_confirmation_dialog_timer_cb(void *data)
if (cdd->countdown > 0)
{
snprintf(buf, sizeof(buf),
- _("Does this look OK? Click Keep if it does, or Restore if not.
"
- "If you do not press a button, the previous settings will be restored in %d seconds."), cdd->countdown);
+ _("Does this look OK? Click Keep if it does, or Restore if not.
"
+ "If you do not press a button, the previous settings will be restored in %d seconds."), cdd->countdown);
}
else
{
snprintf(buf, sizeof(buf),
- _("Does this look OK? Click Keep if it does, or Restore if not.
"
- "If you do not press a button, the previous settings will be restored IMMEDIATELY."));
+ _("Does this look OK? Click Keep if it does, or Restore if not.
"
+ "If you do not press a button, the previous settings will be restored IMMEDIATELY."));
}
e_dialog_text_set(cdd->dialog, buf);
@@ -190,7 +188,7 @@ _e_conf_randr_confirmation_dialog_timer_cb(void *data)
return (cdd->countdown > 0) ? ECORE_CALLBACK_RENEW : ECORE_CALLBACK_CANCEL;
}
- static void
+static void
_e_conf_randr_confirmation_dialog_delete_cb(E_Win *win)
{
E_Dialog *dia;
@@ -208,10 +206,10 @@ _e_conf_randr_confirmation_dialog_delete_cb(E_Win *win)
e_object_unref(E_OBJECT(cfd));
}
- static void
+static void
_e_conf_randr_confirmation_dialog_keep_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;
if (!cdd) return;
@@ -222,10 +220,10 @@ _e_conf_randr_confirmation_dialog_keep_cb(void *data, E_Dialog *dia)
_e_conf_randr_confirmation_dialog_delete_cb(dia->win);
}
- static void
+static void
_e_conf_randr_confirmation_dialog_discard_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;
if (!cdd) return;
@@ -236,10 +234,10 @@ _e_conf_randr_confirmation_dialog_discard_cb(void *data, E_Dialog *dia)
_e_conf_randr_confirmation_dialog_delete_cb(dia->win);
}
- static void
+static void
_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;
if (!cdd) return;
@@ -247,7 +245,7 @@ _e_conf_randr_confirmation_dialog_store_cb(void *data, E_Dialog *dia)
e_randr_store_configuration(e_randr_screen_info);
}
- static void
+static void
_e_conf_randr_confirmation_dialog_new(E_Config_Dialog *cfd)
{
E_Config_Randr_Dialog_Confirmation_Dialog_Data *cd = E_NEW(E_Config_Randr_Dialog_Confirmation_Dialog_Data, 1);
@@ -256,7 +254,7 @@ _e_conf_randr_confirmation_dialog_new(E_Config_Dialog *cfd)
cd->cfd = cfd;
- if((cd->dialog = e_dialog_new(cfd->con, "E", "e_randr_confirmation_dialog")))
+ if ((cd->dialog = e_dialog_new(cfd->con, "E", "e_randr_confirmation_dialog")))
{
e_dialog_title_set(cd->dialog, _("New settings confirmation"));
cd->cfdata = cfd->cfdata;
@@ -276,21 +274,20 @@ _e_conf_randr_confirmation_dialog_new(E_Config_Dialog *cfd)
e_dialog_show(cd->dialog);
e_object_ref(E_OBJECT(cfd));
}
-
}
- static Evas_Object *
-basic_create_widgets (E_Config_Dialog *cfd, Evas *canvas, E_Config_Dialog_Data *cfdata)
+static Evas_Object *
+basic_create_widgets(E_Config_Dialog *cfd, Evas *canvas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *table = NULL, *wl = NULL;
EINA_SAFETY_ON_TRUE_RETURN_VAL (!e_randr_screen_info || (e_randr_screen_info->randr_version < ECORE_X_RANDR_1_2), NULL);
EINA_SAFETY_ON_TRUE_RETURN_VAL((!canvas || !cfdata), NULL);
- if(!(cfdata->gui.subdialogs.arrangement.dialog = dialog_subdialog_arrangement_basic_create_widgets(canvas))) goto _dialog_create_subdialog_arrangement_fail;
- if(!(cfdata->gui.subdialogs.policies.dialog = dialog_subdialog_policies_basic_create_widgets(canvas))) goto _dialog_create_subdialog_policies_fail;
- if(!(cfdata->gui.subdialogs.resolutions.dialog = dialog_subdialog_resolutions_basic_create_widgets(canvas))) goto _dialog_create_subdialog_resolutions_fail;
- if(!(cfdata->gui.subdialogs.orientation.dialog = dialog_subdialog_orientation_basic_create_widgets(canvas))) goto _dialog_create_subdialog_orientation_fail;
+ if (!(cfdata->gui.subdialogs.arrangement.dialog = dialog_subdialog_arrangement_basic_create_widgets(canvas))) goto _dialog_create_subdialog_arrangement_fail;
+ if (!(cfdata->gui.subdialogs.policies.dialog = dialog_subdialog_policies_basic_create_widgets(canvas))) goto _dialog_create_subdialog_policies_fail;
+ if (!(cfdata->gui.subdialogs.resolutions.dialog = dialog_subdialog_resolutions_basic_create_widgets(canvas))) goto _dialog_create_subdialog_resolutions_fail;
+ if (!(cfdata->gui.subdialogs.orientation.dialog = dialog_subdialog_orientation_basic_create_widgets(canvas))) goto _dialog_create_subdialog_orientation_fail;
EINA_SAFETY_ON_FALSE_GOTO((table = e_widget_table_add(canvas, EINA_FALSE)), _dialog_create_widgets_fail);
EINA_SAFETY_ON_FALSE_GOTO((wl = e_widget_list_add(canvas, EINA_FALSE, EINA_TRUE)), _dialog_create_widget_list_fail);
@@ -298,10 +295,10 @@ basic_create_widgets (E_Config_Dialog *cfd, Evas *canvas, E_Config_Dialog_Data *
//e_widget_table_object_append(Evas_Object *obj, Evas_Object *sobj, int col, int row, int colspan, int rowspan, int fill_w, int fill_h, int expand_w, int expand_h);
e_widget_table_object_append(table, cfdata->gui.subdialogs.arrangement.dialog, 1, 1, 1, 1, EVAS_HINT_FILL, EVAS_HINT_FILL, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
/*
- e_widget_table_object_append(table, cfdata->gui.subdialogs.policies.dialog, 1, 2, 1, 1, 0, 0, 0, 0);
- e_widget_table_object_append(table, cfdata->gui.subdialogs.orientation.dialog, 2, 2, 1, 1, 0, 0, 0, 0);
- e_widget_table_object_append(table, cfdata->gui.subdialogs.resolutions.dialog, 3, 2, 1, 1, EVAS_HINT_FILL, EVAS_HINT_FILL, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- */
+ e_widget_table_object_append(table, cfdata->gui.subdialogs.policies.dialog, 1, 2, 1, 1, 0, 0, 0, 0);
+ e_widget_table_object_append(table, cfdata->gui.subdialogs.orientation.dialog, 2, 2, 1, 1, 0, 0, 0, 0);
+ e_widget_table_object_append(table, cfdata->gui.subdialogs.resolutions.dialog, 3, 2, 1, 1, EVAS_HINT_FILL, EVAS_HINT_FILL, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ */
//e_widget_list_object_append(Evas_Object *obj, Evas_Object *sobj, int fill, int expand, double align);
e_widget_list_object_append(wl, cfdata->gui.subdialogs.policies.dialog, 0, 0, 0.0);
e_widget_list_object_append(wl, cfdata->gui.subdialogs.orientation.dialog, 0, 0, 0.0);
@@ -330,8 +327,8 @@ _dialog_create_subdialog_arrangement_fail:
}
static int
- basic_apply_data
-(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
+basic_apply_data
+ (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
Eina_Bool ret = EINA_TRUE;
@@ -342,25 +339,25 @@ static int
//the order matters except for policies!
if (dialog_subdialog_policies_basic_check_changed(cfd, cfdata))
- {
- ret &= dialog_subdialog_policies_basic_apply_data(cfd, cfdata);
- if (!ret) return EINA_FALSE;
- }
+ {
+ ret &= dialog_subdialog_policies_basic_apply_data(cfd, cfdata);
+ if (!ret) return EINA_FALSE;
+ }
if (dialog_subdialog_resolutions_basic_check_changed(cfd, cfdata))
- {
- ret &= dialog_subdialog_resolutions_basic_apply_data(cfd, cfdata);
- if (!ret) return EINA_FALSE;
- }
+ {
+ ret &= dialog_subdialog_resolutions_basic_apply_data(cfd, cfdata);
+ if (!ret) return EINA_FALSE;
+ }
if (dialog_subdialog_arrangement_basic_check_changed(cfd, cfdata))
- {
- ret &= dialog_subdialog_arrangement_basic_apply_data(cfd, cfdata);
- if (!ret) return EINA_FALSE;
- }
+ {
+ ret &= dialog_subdialog_arrangement_basic_apply_data(cfd, cfdata);
+ if (!ret) return EINA_FALSE;
+ }
if (dialog_subdialog_orientation_basic_check_changed(cfd, cfdata))
- ret &= dialog_subdialog_orientation_basic_apply_data(cfd, cfdata);
+ ret &= dialog_subdialog_orientation_basic_apply_data(cfd, cfdata);
_e_conf_randr_confirmation_dialog_new(cfd);
@@ -369,54 +366,54 @@ static int
E_Config_Dialog *
e_int_config_randr(E_Container *con, const char *params __UNUSED__){
- E_Config_Dialog *cfd;
- E_Config_Dialog_View *v;
+ E_Config_Dialog *cfd;
+ E_Config_Dialog_View *v;
- if (!e_randr_screen_info || (e_randr_screen_info->randr_version < ECORE_X_RANDR_1_2))
- {
- ecore_timer_add(0.5, _deferred_noxrandr_error, NULL);
- fprintf(stderr, "CONF_RANDR: XRandR version >= 1.2 necessary to work.\n");
- return NULL;
- }
+ if (!e_randr_screen_info || (e_randr_screen_info->randr_version < ECORE_X_RANDR_1_2))
+ {
+ ecore_timer_add(0.5, _deferred_noxrandr_error, NULL);
+ fprintf(stderr, "CONF_RANDR: XRandR version >= 1.2 necessary to work.\n");
+ return NULL;
+ }
- //Dialog already opened?
- if (e_config_dialog_find("E", "screen/screen_setup")) return NULL;
+ //Dialog already opened?
+ if (e_config_dialog_find("E", "screen/screen_setup")) return NULL;
- v = E_NEW(E_Config_Dialog_View, 1);
- v->create_cfdata = create_data;
- v->free_cfdata = free_cfdata;
- v->basic.apply_cfdata = basic_apply_data;
- v->basic.create_widgets = basic_create_widgets;
- v->basic.check_changed = basic_check_changed;
- //v->override_auto_apply = 0;
+ v = E_NEW(E_Config_Dialog_View, 1);
+ v->create_cfdata = create_data;
+ v->free_cfdata = free_cfdata;
+ v->basic.apply_cfdata = basic_apply_data;
+ v->basic.create_widgets = basic_create_widgets;
+ v->basic.check_changed = basic_check_changed;
+ //v->override_auto_apply = 0;
- cfd = e_config_dialog_new(con, _("Screen Setup"),
- "E", "screen/screen_setup",
- "preferences-system-screen-setup", 0, v, NULL);
- return cfd;
+ cfd = e_config_dialog_new(con, _("Screen Setup"),
+ "E", "screen/screen_setup",
+ "preferences-system-screen-setup", 0, v, NULL);
+ return cfd;
}
- static Eina_Bool
+static Eina_Bool
_deferred_noxrandr_error(void *data __UNUSED__)
{
e_util_dialog_show(_("Missing Features"),
- _("Your X Display Server is missing support for
"
- "the XRandR (X Resize and Rotate) extension version 1.2 or above.
"
- "You cannot change screen resolutions without
"
- "the support of this extension. It could also be
"
- "that at the time ecore was built, there
"
- "was no XRandR support detected."));
+ _("Your X Display Server is missing support for
"
+ "the XRandR (X Resize and Rotate) extension version 1.2 or above.
"
+ "You cannot change screen resolutions without
"
+ "the support of this extension. It could also be
"
+ "that at the time ecore was built, there
"
+ "was no XRandR support detected."));
return ECORE_CALLBACK_CANCEL;
}
- static int
-basic_check_changed (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
+static int
+basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
if (!cfdata) return EINA_FALSE;
else
- return (dialog_subdialog_arrangement_basic_check_changed(cfd, cfdata)
- || dialog_subdialog_policies_basic_check_changed(cfd, cfdata)
- || dialog_subdialog_orientation_basic_check_changed(cfd, cfdata)
- || dialog_subdialog_resolutions_basic_check_changed(cfd, cfdata));
+ return dialog_subdialog_arrangement_basic_check_changed(cfd, cfdata)
+ || dialog_subdialog_policies_basic_check_changed(cfd, cfdata)
+ || dialog_subdialog_orientation_basic_check_changed(cfd, cfdata)
+ || dialog_subdialog_resolutions_basic_check_changed(cfd, cfdata);
}
diff --git a/src/modules/conf_randr/e_int_config_randr_arrangement.c b/src/modules/conf_randr/e_int_config_randr_arrangement.c
index 34dff7745..575e96783 100644
--- a/src/modules/conf_randr/e_int_config_randr_arrangement.c
+++ b/src/modules/conf_randr/e_int_config_randr_arrangement.c
@@ -80,7 +80,7 @@ dialog_subdialog_arrangement_create_data(E_Config_Dialog_Data *data)
Eina_List *iter;
E_Config_Randr_Dialog_Output_Dialog_Data *dialog_data;
- EINA_LIST_FOREACH(data->output_dialog_data_list, iter, dialog_data)
+ EINA_LIST_FOREACH (data->output_dialog_data_list, iter, dialog_data)
{
_dialog_subdialog_arrangement_output_dialog_data_fill(dialog_data);
}
@@ -108,7 +108,7 @@ dialog_subdialog_arrangement_basic_create_widgets(Evas *canvas)
fprintf(stderr, "CONF_RANDR: Arrangement subdialog added (%p).\n", subdialog);
//only use information we can restore.
- EINA_LIST_FOREACH(e_config_runtime_info->output_dialog_data_list, iter, output_dialog_data)
+ EINA_LIST_FOREACH (e_config_runtime_info->output_dialog_data_list, iter, output_dialog_data)
{
if ((!output_dialog_data->crtc && !output_dialog_data->output))
continue;
@@ -200,7 +200,7 @@ _dialog_subdialog_arrangement_smart_class_resize(Evas_Object *obj, Evas_Coord w,
lst = evas_object_smart_members_get(obj);
//Calc average aspect ratio from all available monitors
- EINA_LIST_FOREACH(lst, itr, output)
+ EINA_LIST_FOREACH (lst, itr, output)
{
if (output == e_config_runtime_info->gui.subdialogs.arrangement.clipper) continue;
output_dialog_data = evas_object_data_get(output, "output_info");
@@ -221,7 +221,7 @@ _dialog_subdialog_arrangement_smart_class_resize(Evas_Object *obj, Evas_Coord w,
scaling_factor = (((float)parent_geo.w / (float)real_sum_w) < ((float)parent_geo.h / (float)real_sum_h)) ? ((float)parent_geo.w / (float)real_sum_w) : ((float)parent_geo.h / (float)real_sum_h);
scaling_factor *= e_scale;
- EINA_LIST_FOREACH(lst, itr, output)
+ EINA_LIST_FOREACH (lst, itr, output)
{
//Skip elements that are either the clipped smart object or falsely added
//to the list of outputs (which should not happen)
@@ -287,7 +287,7 @@ _dialog_subdialog_arrangement_output_mouse_down_cb(void *data __UNUSED__, Evas *
Eina_List *iter;
Eina_Bool crtc_selected = EINA_FALSE;
- EINA_LIST_FOREACH(evas_object_smart_members_get(evas_object_smart_parent_get(obj)), iter, element)
+ EINA_LIST_FOREACH (evas_object_smart_members_get(evas_object_smart_parent_get(obj)), iter, element)
{
if (e_config_runtime_info->gui.subdialogs.arrangement.clipper == obj) continue;
if (element != obj)
@@ -433,7 +433,7 @@ _dialog_subdialog_arrangement_make_suggestion(Evas_Object *obj)
dya = tmp;
}
//iterate crtc list
- EINA_LIST_FOREACH(crtcs, li, crtc)
+ EINA_LIST_FOREACH (crtcs, li, crtc)
{
if ((crtc == obj) || (crtc == e_config_runtime_info->gui.subdialogs.arrangement.clipper)) continue;
evas_object_geometry_get(crtc, &crtc_geo.x, &crtc_geo.y, &crtc_geo.w, &crtc_geo.h);
@@ -526,7 +526,7 @@ dialog_subdialog_arrangement_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config
EINA_SAFETY_ON_NULL_RETURN(cfdata);
- EINA_LIST_FREE(cfdata->output_dialog_data_list, dialog_data)
+ EINA_LIST_FREE (cfdata->output_dialog_data_list, dialog_data)
{
if (!dialog_data) continue;
if (dialog_data->bg)
@@ -551,7 +551,7 @@ _dialog_subdialog_arrangement_neighbors_get(Evas_Object *obj)
EINA_SAFETY_ON_FALSE_RETURN_VAL((dialog_data = evas_object_data_get(obj, "output_info")), NULL);
evas_object_geometry_get(obj, &geo.x, &geo.y, &geo.w, &geo.h);
- EINA_LIST_FOREACH(crtcs, iter, crtc)
+ EINA_LIST_FOREACH (crtcs, iter, crtc)
{
if ((crtc == obj)
|| (crtc == e_config_runtime_info->gui.subdialogs.arrangement.clipper)) continue;
@@ -601,7 +601,7 @@ _dialog_subdialog_arrangement_determine_positions_recursive(Evas_Object *obj)
if ((dialog_data->new_pos.x != 0) || (dialog_data->new_pos.y != 0))
{
// Find neighbor object we can calculate our own coordinates from
- EINA_LIST_FOREACH(neighbors, iter, crtc)
+ EINA_LIST_FOREACH (neighbors, iter, crtc)
{
evas_object_geometry_get(crtc, &neighbor_geo.x, &neighbor_geo.y, &neighbor_geo.w, &neighbor_geo.h);
if (!(neighbor_info = evas_object_data_get(crtc, "output_info"))) continue;
@@ -665,7 +665,7 @@ _dialog_subdialog_arrangement_determine_positions_recursive(Evas_Object *obj)
{
//Only wander all neighbors recursively, if they can use the current
//element as reference for their position
- EINA_LIST_FOREACH(neighbors, iter, crtc)
+ EINA_LIST_FOREACH (neighbors, iter, crtc)
{
neighbor_info = evas_object_data_get(crtc, "output_info");
if ((neighbor_info->new_pos.x == Ecore_X_Randr_Unset)
@@ -695,7 +695,7 @@ dialog_subdialog_arrangement_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dia
//Create virtual borders around the displayed representations by finding
//relative x and y as virtual 0x0
- EINA_LIST_FOREACH(crtcs, iter, crtc)
+ EINA_LIST_FOREACH (crtcs, iter, crtc)
{
if (crtc == e_config_runtime_info->gui.subdialogs.arrangement.clipper) continue;
//Already reset values for upcoming calculation
@@ -721,7 +721,7 @@ dialog_subdialog_arrangement_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dia
e_config_runtime_info->gui.subdialogs.arrangement.relative_zero.y = relz.y;
if (top_left) _dialog_subdialog_arrangement_determine_positions_recursive(top_left);
- EINA_LIST_FOREACH(crtcs, iter, crtc)
+ EINA_LIST_FOREACH (crtcs, iter, crtc)
{
if ((crtc == e_config_runtime_info->gui.subdialogs.arrangement.clipper) || !(odd = evas_object_data_get(crtc, "output_info")) || !odd->crtc
|| ((odd->new_pos.x == Ecore_X_Randr_Unset) || (odd->new_pos.y == Ecore_X_Randr_Unset))) continue;
@@ -750,7 +750,7 @@ dialog_subdialog_arrangement_basic_check_changed(E_Config_Dialog *cfd __UNUSED__
Eina_List *iter;
E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, output_dialog_data)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, output_dialog_data)
{
if ((output_dialog_data->previous_pos.x != output_dialog_data->new_pos.x)
|| (output_dialog_data->previous_pos.y != output_dialog_data->new_pos.y)
@@ -767,7 +767,7 @@ dialog_subdialog_arrangement_keep_changes(E_Config_Dialog_Data *cfdata)
if (!cfdata) return;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, odd)
{
if (!odd->crtc || ((odd->new_pos.x == Ecore_X_Randr_Unset) || (odd->new_pos.y == Ecore_X_Randr_Unset))) continue;
odd->previous_pos.x = odd->new_pos.x;
@@ -785,7 +785,7 @@ dialog_subdialog_arrangement_discard_changes(E_Config_Dialog_Data *cfdata)
if (!cfdata) return;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, odd)
{
if (!odd->crtc || ((odd->previous_pos.x == Ecore_X_Randr_Unset) || (odd->previous_pos.y == Ecore_X_Randr_Unset))) continue;
if (ecore_x_randr_crtc_pos_set(cfdata->manager->root, odd->crtc->xid, odd->previous_pos.x, odd->previous_pos.y))
diff --git a/src/modules/conf_randr/e_int_config_randr_orientation.c b/src/modules/conf_randr/e_int_config_randr_orientation.c
index 983b89d09..e3aeed310 100644
--- a/src/modules/conf_randr/e_int_config_randr_orientation.c
+++ b/src/modules/conf_randr/e_int_config_randr_orientation.c
@@ -2,37 +2,37 @@
#include "e_randr.h"
#ifndef Ecore_X_Randr_Unset
-#define Ecore_X_Randr_Unset -1
+#define Ecore_X_Randr_Unset -1
#endif
#define RANDR_DIALOG_ORIENTATION_ALL (ECORE_X_RANDR_ORIENTATION_ROT_0 | ECORE_X_RANDR_ORIENTATION_ROT_90 | ECORE_X_RANDR_ORIENTATION_ROT_180 | ECORE_X_RANDR_ORIENTATION_ROT_270 | ECORE_X_RANDR_ORIENTATION_ROT_270 | ECORE_X_RANDR_ORIENTATION_FLIP_X | ECORE_X_RANDR_ORIENTATION_FLIP_Y)
-Eina_Bool dialog_subdialog_orientation_create_data (E_Config_Dialog_Data *cfdata);
+Eina_Bool dialog_subdialog_orientation_create_data(E_Config_Dialog_Data *cfdata);
Evas_Object *dialog_subdialog_orientation_basic_create_widgets(Evas *canvas);
-Eina_Bool dialog_subdialog_orientation_basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-Eina_Bool dialog_subdialog_orientation_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-Eina_Bool dialog_subdialog_orientation_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-void dialog_subdialog_orientation_update_radio_buttons(Evas_Object *crtc);
-void dialog_subdialog_orientation_update_edje(Evas_Object *crtc);
+Eina_Bool dialog_subdialog_orientation_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+Eina_Bool dialog_subdialog_orientation_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+Eina_Bool dialog_subdialog_orientation_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+void dialog_subdialog_orientation_update_radio_buttons(Evas_Object *crtc);
+void dialog_subdialog_orientation_update_edje(Evas_Object *crtc);
//static void _dialog_subdialog_orientation_policy_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
extern E_Config_Dialog_Data *e_config_runtime_info;
extern char _theme_file_path[];
/*
-static void
-_dialog_subdialog_orientation_radio_add_callbacks(void)
-{
+ static void
+ _dialog_subdialog_orientation_radio_add_callbacks(void)
+ {
evas_object_event_callback_add (e_config_runtime_info->gui.subdialogs.orientation.radio_reflect_vertical, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_orientation_policy_mouse_up_cb, NULL);
evas_object_event_callback_add (e_config_runtime_info->gui.subdialogs.orientation.radio_reflect_horizontal, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_orientation_policy_mouse_up_cb, NULL);
evas_object_event_callback_add (e_config_runtime_info->gui.subdialogs.orientation.radio_rot270, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_orientation_policy_mouse_up_cb, NULL);
evas_object_event_callback_add (e_config_runtime_info->gui.subdialogs.orientation.radio_rot180, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_orientation_policy_mouse_up_cb, NULL);
evas_object_event_callback_add (e_config_runtime_info->gui.subdialogs.orientation.radio_rot90, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_orientation_policy_mouse_up_cb, NULL);
evas_object_event_callback_add (e_config_runtime_info->gui.subdialogs.orientation.radio_normal, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_orientation_policy_mouse_up_cb, NULL);
-}
-*/
+ }
+ */
- Eina_Bool
+Eina_Bool
dialog_subdialog_orientation_create_data(E_Config_Dialog_Data *cfdata)
{
E_Config_Randr_Dialog_Output_Dialog_Data *odd;
@@ -41,7 +41,7 @@ dialog_subdialog_orientation_create_data(E_Config_Dialog_Data *cfdata)
if (!cfdata || !cfdata->output_dialog_data_list) return EINA_FALSE;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, odd)
{
ci = odd->crtc;
if (!ci || !ci->current_mode) continue;
@@ -65,7 +65,7 @@ dialog_subdialog_orientation_basic_create_widgets(Evas *canvas)
if (!(subdialog = e_widget_framelist_add(canvas, _("Display Orientation"), EINA_FALSE))) return NULL;
// Add radio buttons
- if(!(rg = e_widget_radio_group_new(&e_config_runtime_info->gui.subdialogs.orientation.radio_val))) goto _dialog_subdialog_orientation_radio_add_fail;
+ if (!(rg = e_widget_radio_group_new(&e_config_runtime_info->gui.subdialogs.orientation.radio_val))) goto _dialog_subdialog_orientation_radio_add_fail;
//IMPROVABLE: use enum to determine objects via 'switch'-statement
e_config_runtime_info->gui.subdialogs.orientation.radio_normal = e_widget_radio_add(canvas, _("Normal"), ECORE_X_RANDR_OUTPUT_POLICY_ABOVE, rg);
@@ -89,14 +89,14 @@ dialog_subdialog_orientation_basic_create_widgets(Evas *canvas)
//_dialog_subdialog_orientation_radio_add_callbacks();
/*
- // Add orientation demonstration edje
- if (!(e_config_runtime_info->gui.subdialogs.orientation.swallowing_edje = edje_object_add(canvas)))
- goto _dialog_subdialog_orientation_edje_add_fail;
- if (!edje_object_file_set(e_config_runtime_info->gui.subdialogs.orientation.swallowing_edje, _theme_file_path, "e/conf/randr/dialog/subdialog/orientation"))
- goto _dialog_subdialog_orientation_edje_set_fail;
+ // Add orientation demonstration edje
+ if (!(e_config_runtime_info->gui.subdialogs.orientation.swallowing_edje = edje_object_add(canvas)))
+ goto _dialog_subdialog_orientation_edje_add_fail;
+ if (!edje_object_file_set(e_config_runtime_info->gui.subdialogs.orientation.swallowing_edje, _theme_file_path, "e/conf/randr/dialog/subdialog/orientation"))
+ goto _dialog_subdialog_orientation_edje_set_fail;
- e_widget_table_object_align_append(subdialog, e_config_runtime_info->gui.subdialogs.orientation.swallowing_edje, 1, 0, 1, 1, 1, 1, 1, 1, 1.0, 1.0);
- */
+ e_widget_table_object_align_append(subdialog, e_config_runtime_info->gui.subdialogs.orientation.swallowing_edje, 1, 0, 1, 1, 1, 1, 1, 1, 1.0, 1.0);
+ */
//disable widgets, if no CRTC is selected
dialog_subdialog_orientation_update_radio_buttons(e_config_runtime_info->gui.selected_eo);
@@ -106,14 +106,14 @@ dialog_subdialog_orientation_basic_create_widgets(Evas *canvas)
return subdialog;
/*
-_dialog_subdialog_orientation_edje_set_fail:
- evas_object_del(ol);
- evas_object_del(e_config_runtime_info->gui.subdialogs.orientation.swallowing_edje);
-_dialog_subdialog_orientation_edje_add_fail:
- fprintf(stderr, "CONF_RANDR: Couldn't set edj for orientation subdialog!\n");
- evas_object_del(subdialog);
- return NULL;
- */
+ _dialog_subdialog_orientation_edje_set_fail:
+ evas_object_del(ol);
+ evas_object_del(e_config_runtime_info->gui.subdialogs.orientation.swallowing_edje);
+ _dialog_subdialog_orientation_edje_add_fail:
+ fprintf(stderr, "CONF_RANDR: Couldn't set edj for orientation subdialog!\n");
+ evas_object_del(subdialog);
+ return NULL;
+ */
_dialog_subdialog_orientation_radio_add_fail:
evas_object_del(subdialog);
fprintf(stderr, "CONF_RANDR: Could not add radio group!\n");
@@ -121,7 +121,7 @@ _dialog_subdialog_orientation_radio_add_fail:
}
#if 0
- static void
+static void
_dialog_subdialog_orientation_policy_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
char signal[40];
@@ -147,9 +147,10 @@ _dialog_subdialog_orientation_policy_mouse_up_cb(void *data, Evas *e, Evas_Objec
fprintf(stderr, "CONF_RANDR: mouse button released. Emitted signal to orientation: %s\n", signal);
}
+
#endif
- void
+void
dialog_subdialog_orientation_update_radio_buttons(Evas_Object *crtc)
{
E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
@@ -157,15 +158,15 @@ dialog_subdialog_orientation_update_radio_buttons(Evas_Object *crtc)
//disable widgets, if no crtc is selected
if (!crtc)
- {
- e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_normal, EINA_TRUE);
- e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot90, EINA_TRUE);
- e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot180, EINA_TRUE);
- e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot270, EINA_TRUE);
- e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_reflect_horizontal, EINA_TRUE);
- e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_reflect_vertical, EINA_TRUE);
- return;
- }
+ {
+ e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_normal, EINA_TRUE);
+ e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot90, EINA_TRUE);
+ e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot180, EINA_TRUE);
+ e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot270, EINA_TRUE);
+ e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_reflect_horizontal, EINA_TRUE);
+ e_widget_disabled_set(e_config_runtime_info->gui.subdialogs.orientation.radio_reflect_vertical, EINA_TRUE);
+ return;
+ }
if (!(output_dialog_data = evas_object_data_get(crtc, "output_info"))) return;
@@ -217,26 +218,31 @@ dialog_subdialog_orientation_update_radio_buttons(Evas_Object *crtc)
switch (ori)
{
case ECORE_X_RANDR_ORIENTATION_ROT_90:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot90, EINA_TRUE);
- break;
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot90, EINA_TRUE);
+ break;
+
case ECORE_X_RANDR_ORIENTATION_ROT_180:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot180, EINA_TRUE);
- break;
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot180, EINA_TRUE);
+ break;
+
case ECORE_X_RANDR_ORIENTATION_ROT_270:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot270, EINA_TRUE);
- break;
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_rot270, EINA_TRUE);
+ break;
+
case ECORE_X_RANDR_ORIENTATION_FLIP_X:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_reflect_horizontal, EINA_TRUE);
- break;
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_reflect_horizontal, EINA_TRUE);
+ break;
+
case ECORE_X_RANDR_ORIENTATION_FLIP_Y:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_reflect_vertical, EINA_TRUE);
- break;
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_reflect_vertical, EINA_TRUE);
+ break;
+
default: //== ECORE_X_RANDR_ORIENTATION_ROT_0:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_normal, EINA_TRUE);
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.orientation.radio_normal, EINA_TRUE);
}
}
- void
+void
dialog_subdialog_orientation_update_edje(Evas_Object *crtc)
{
E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
@@ -265,8 +271,8 @@ dialog_subdialog_orientation_update_edje(Evas_Object *crtc)
edje_object_signal_emit(crtc, signal, "e");
}
- Eina_Bool
-dialog_subdialog_orientation_basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata __UNUSED__)
+Eina_Bool
+dialog_subdialog_orientation_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata __UNUSED__)
{
Ecore_X_Randr_Orientation orientation;
E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
@@ -288,17 +294,17 @@ dialog_subdialog_orientation_basic_apply_data (E_Config_Dialog *cfd, E_Config_Di
return EINA_FALSE;
}
- Eina_Bool
+Eina_Bool
dialog_subdialog_orientation_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata __UNUSED__)
{
E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
if (!e_config_runtime_info->gui.subdialogs.orientation.dialog || !e_config_runtime_info->gui.selected_eo || !(output_dialog_data = evas_object_data_get(e_config_runtime_info->gui.selected_eo, "output_info"))) return EINA_FALSE;
- return ((int)output_dialog_data->previous_orientation != (int)e_config_runtime_info->gui.subdialogs.orientation.radio_val);
+ return (int)output_dialog_data->previous_orientation != (int)e_config_runtime_info->gui.subdialogs.orientation.radio_val;
}
- void
+void
dialog_subdialog_orientation_keep_changes(E_Config_Dialog_Data *cfdata)
{
E_Config_Randr_Dialog_Output_Dialog_Data *odd;
@@ -306,7 +312,7 @@ dialog_subdialog_orientation_keep_changes(E_Config_Dialog_Data *cfdata)
if (!cfdata) return;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, odd)
{
if (!odd || ((int)odd->previous_orientation == Ecore_X_Randr_Unset)) continue;
odd->previous_orientation = odd->new_orientation;
@@ -314,7 +320,7 @@ dialog_subdialog_orientation_keep_changes(E_Config_Dialog_Data *cfdata)
}
}
- void
+void
dialog_subdialog_orientation_discard_changes(E_Config_Dialog_Data *cfdata)
{
E_Config_Randr_Dialog_Output_Dialog_Data *odd;
@@ -322,7 +328,7 @@ dialog_subdialog_orientation_discard_changes(E_Config_Dialog_Data *cfdata)
if (!cfdata) return;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, odd)
{
if (!odd->crtc || ((int)odd->previous_orientation == Ecore_X_Randr_Unset)) continue;
if (ecore_x_randr_crtc_orientation_set(cfdata->manager->root, odd->crtc->xid, odd->previous_orientation))
@@ -333,3 +339,4 @@ dialog_subdialog_orientation_discard_changes(E_Config_Dialog_Data *cfdata)
}
}
}
+
diff --git a/src/modules/conf_randr/e_int_config_randr_policies.c b/src/modules/conf_randr/e_int_config_randr_policies.c
index a8e60069e..593f1c2e5 100644
--- a/src/modules/conf_randr/e_int_config_randr_policies.c
+++ b/src/modules/conf_randr/e_int_config_randr_policies.c
@@ -2,40 +2,40 @@
#include "e_randr.h"
#ifndef ECORE_X_RANDR_1_2
-#define ECORE_X_RANDR_1_2 ((1 << 16) | 2)
+#define ECORE_X_RANDR_1_2 ((1 << 16) | 2)
#endif
#ifndef ECORE_X_RANDR_1_3
-#define ECORE_X_RANDR_1_3 ((1 << 16) | 3)
+#define ECORE_X_RANDR_1_3 ((1 << 16) | 3)
#endif
#ifndef Ecore_X_Randr_Unset
-#define Ecore_X_Randr_Unset -1
+#define Ecore_X_Randr_Unset -1
#endif
Evas_Object *dialog_subdialog_policies_basic_create_widgets(Evas *canvas);
-Eina_Bool dialog_subdialog_policies_basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-Eina_Bool dialog_subdialog_policies_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-Eina_Bool dialog_subdialog_policies_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-void dialog_subdialog_policies_update_radio_buttons(Evas_Object *crtc);
+Eina_Bool dialog_subdialog_policies_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+Eina_Bool dialog_subdialog_policies_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+Eina_Bool dialog_subdialog_policies_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+void dialog_subdialog_policies_update_radio_buttons(Evas_Object *crtc);
-static void _dialog_subdialog_policies_policy_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _dialog_subdialog_policies_policy_mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
extern E_Config_Dialog_Data *e_config_runtime_info;
extern char _theme_file_path[];
/*
-static void
-_dialog_subdialog_policies_radio_add_callbacks(void)
-{
+ static void
+ _dialog_subdialog_policies_radio_add_callbacks(void)
+ {
evas_object_event_callback_add(e_config_runtime_info->gui.subdialogs.policies.radio_none, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_policies_policy_mouse_up_cb, NULL);
evas_object_event_callback_add(e_config_runtime_info->gui.subdialogs.policies.radio_clone, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_policies_policy_mouse_up_cb, NULL);
evas_object_event_callback_add(e_config_runtime_info->gui.subdialogs.policies.radio_left, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_policies_policy_mouse_up_cb, NULL);
evas_object_event_callback_add(e_config_runtime_info->gui.subdialogs.policies.radio_below, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_policies_policy_mouse_up_cb, NULL);
evas_object_event_callback_add(e_config_runtime_info->gui.subdialogs.policies.radio_above, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_policies_policy_mouse_up_cb, NULL);
evas_object_event_callback_add(e_config_runtime_info->gui.subdialogs.policies.radio_right, EVAS_CALLBACK_MOUSE_UP, _dialog_subdialog_policies_policy_mouse_up_cb, NULL);
-}
-*/
+ }
+ */
- Eina_Bool
+Eina_Bool
dialog_subdialog_policies_create_data(E_Config_Dialog_Data *e_config_runtime_info)
{
E_Config_Randr_Dialog_Output_Dialog_Data *odd;
@@ -43,7 +43,7 @@ dialog_subdialog_policies_create_data(E_Config_Dialog_Data *e_config_runtime_inf
if (!e_config_runtime_info || !e_config_runtime_info->output_dialog_data_list) return EINA_FALSE;
- EINA_LIST_FOREACH(e_config_runtime_info->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (e_config_runtime_info->output_dialog_data_list, iter, odd)
{
E_Randr_Output_Info *oi;
if (odd->crtc)
@@ -69,7 +69,7 @@ dialog_subdialog_policies_basic_create_widgets(Evas *canvas)
if (e_config_runtime_info->gui.subdialogs.policies.dialog) return e_config_runtime_info->gui.subdialogs.policies.dialog;
- if(!(subdialog = e_widget_framelist_add(canvas, _("Screen attachement policy"), EINA_FALSE))) return NULL;
+ if (!(subdialog = e_widget_framelist_add(canvas, _("Screen attachement policy"), EINA_FALSE))) return NULL;
// Add radio buttons
if (!(rg = e_widget_radio_group_new(&e_config_runtime_info->gui.subdialogs.policies.radio_val))) goto _dialog_subdialog_policies_radio_add_fail;
@@ -96,65 +96,65 @@ dialog_subdialog_policies_basic_create_widgets(Evas *canvas)
//_dialog_subdialog_policies_radio_add_callbacks();
/*
- // Add policies demonstration edje
- if (!(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje = edje_object_add(canvas)))
- {
+ // Add policies demonstration edje
+ if (!(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje = edje_object_add(canvas)))
+ {
goto _dialog_subdialog_policies_edje_add_fail;
- }
- if (!edje_object_file_set(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje, _theme_file_path, "e/conf/randr/dialog/subdialog/policies"))
- {
+ }
+ if (!edje_object_file_set(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje, _theme_file_path, "e/conf/randr/dialog/subdialog/policies"))
+ {
goto _dialog_subdialog_policies_edje_set_fail;
- }
+ }
- e_widget_table_object_align_append(subdialog, e_config_runtime_info->gui.subdialogs.policies.swallowing_edje, 1, 0, 1, 1, 1, 1, 1, 1, 1.0, 1.0);
- */
+ e_widget_table_object_align_append(subdialog, e_config_runtime_info->gui.subdialogs.policies.swallowing_edje, 1, 0, 1, 1, 1, 1, 1, 1, 1.0, 1.0);
+ */
/*
- evas_object_show(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje);
+ evas_object_show(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje);
- //emit signal to edje so a demonstration can be shown
- snprintf(signal, sizeof(signal), "conf,randr,dialog,policies,%d", e_randr_screen_info->rrvd_info.randr_info_12->output_policy);
- edje_object_signal_emit(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje, signal, "e");
- fprintf(stderr, "CONF_RANDR: Initial signal emitted to policy dialog: %s\n", signal);
+ //emit signal to edje so a demonstration can be shown
+ snprintf(signal, sizeof(signal), "conf,randr,dialog,policies,%d", e_randr_screen_info->rrvd_info.randr_info_12->output_policy);
+ edje_object_signal_emit(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje, signal, "e");
+ fprintf(stderr, "CONF_RANDR: Initial signal emitted to policy dialog: %s\n", signal);
- //Use theme's background as screen representation
- e_config_runtime_info->gui.subdialogs.policies.new_display = edje_object_add(canvas);
- e_theme_edje_object_set(e_config_runtime_info->gui.subdialogs.policies.new_display, "base/theme/widgets", "e/widgets/frame");
- e_config_runtime_info->gui.subdialogs.policies.new_display_background = edje_object_add(canvas);
- e_theme_edje_object_set(e_config_runtime_info->gui.subdialogs.policies.new_display_background, "base/theme/background", "e/desktop/background");
- edje_object_part_swallow(e_config_runtime_info->gui.subdialogs.policies.new_display, "e.swallow.content", e_config_runtime_info->gui.subdialogs.policies.new_display_background);
- edje_object_part_text_set(e_config_runtime_info->gui.subdialogs.policies.new_display, "e.text.label", _("New display"));
- edje_object_part_swallow(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje, "new_display.swallow.content", e_config_runtime_info->gui.subdialogs.policies.new_display);
- //add theme's frame
- //for now use the theme's background for the new display as well
- e_config_runtime_info->gui.subdialogs.policies.current_displays_setup = edje_object_add(canvas);
- e_theme_edje_object_set(e_config_runtime_info->gui.subdialogs.policies.current_displays_setup, "base/theme/widgets", "e/widgets/frame");
- e_config_runtime_info->gui.subdialogs.policies.current_displays_setup_background = edje_object_add(canvas);
- e_theme_edje_object_set(e_config_runtime_info->gui.subdialogs.policies.current_displays_setup_background, "base/theme/background", "e/desktop/background");
- edje_object_part_swallow(e_config_runtime_info->gui.subdialogs.policies.current_displays_setup, "e.swallow.content", e_config_runtime_info->gui.subdialogs.policies.current_displays_setup_background);
- edje_object_part_text_set(e_config_runtime_info->gui.subdialogs.policies.current_displays_setup, "e.text.label", _("Used display"));
- edje_object_part_swallow(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje, "current_displays_setup.swallow.content", e_config_runtime_info->gui.subdialogs.policies.current_displays_setup);
- */
+ //Use theme's background as screen representation
+ e_config_runtime_info->gui.subdialogs.policies.new_display = edje_object_add(canvas);
+ e_theme_edje_object_set(e_config_runtime_info->gui.subdialogs.policies.new_display, "base/theme/widgets", "e/widgets/frame");
+ e_config_runtime_info->gui.subdialogs.policies.new_display_background = edje_object_add(canvas);
+ e_theme_edje_object_set(e_config_runtime_info->gui.subdialogs.policies.new_display_background, "base/theme/background", "e/desktop/background");
+ edje_object_part_swallow(e_config_runtime_info->gui.subdialogs.policies.new_display, "e.swallow.content", e_config_runtime_info->gui.subdialogs.policies.new_display_background);
+ edje_object_part_text_set(e_config_runtime_info->gui.subdialogs.policies.new_display, "e.text.label", _("New display"));
+ edje_object_part_swallow(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje, "new_display.swallow.content", e_config_runtime_info->gui.subdialogs.policies.new_display);
+ //add theme's frame
+ //for now use the theme's background for the new display as well
+ e_config_runtime_info->gui.subdialogs.policies.current_displays_setup = edje_object_add(canvas);
+ e_theme_edje_object_set(e_config_runtime_info->gui.subdialogs.policies.current_displays_setup, "base/theme/widgets", "e/widgets/frame");
+ e_config_runtime_info->gui.subdialogs.policies.current_displays_setup_background = edje_object_add(canvas);
+ e_theme_edje_object_set(e_config_runtime_info->gui.subdialogs.policies.current_displays_setup_background, "base/theme/background", "e/desktop/background");
+ edje_object_part_swallow(e_config_runtime_info->gui.subdialogs.policies.current_displays_setup, "e.swallow.content", e_config_runtime_info->gui.subdialogs.policies.current_displays_setup_background);
+ edje_object_part_text_set(e_config_runtime_info->gui.subdialogs.policies.current_displays_setup, "e.text.label", _("Used display"));
+ edje_object_part_swallow(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje, "current_displays_setup.swallow.content", e_config_runtime_info->gui.subdialogs.policies.current_displays_setup);
+ */
evas_object_show(subdialog);
return subdialog;
/*
-_dialog_subdialog_policies_edje_set_fail:
- evas_object_del(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje);
-_dialog_subdialog_policies_edje_add_fail:
- fprintf(stderr, "CONF_RANDR: Couldn't set edj for policies subdialog!\n");
- evas_object_del(subdialog);
- return NULL;
- */
+ _dialog_subdialog_policies_edje_set_fail:
+ evas_object_del(e_config_runtime_info->gui.subdialogs.policies.swallowing_edje);
+ _dialog_subdialog_policies_edje_add_fail:
+ fprintf(stderr, "CONF_RANDR: Couldn't set edj for policies subdialog!\n");
+ evas_object_del(subdialog);
+ return NULL;
+ */
_dialog_subdialog_policies_radio_add_fail:
evas_object_del(subdialog);
return NULL;
}
- static void
+static void
_dialog_subdialog_policies_policy_mouse_up_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
char signal[29];
@@ -181,7 +181,7 @@ _dialog_subdialog_policies_policy_mouse_up_cb(void *data __UNUSED__, Evas *e __U
fprintf(stderr, "CONF_RANDR: mouse button released. Emitted signal to policy: %s\n", signal);
}
- Eina_Bool
+Eina_Bool
dialog_subdialog_policies_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata __UNUSED__)
{
if (!e_randr_screen_info || !e_config_runtime_info->gui.selected_output_dd) return EINA_FALSE;
@@ -194,15 +194,15 @@ dialog_subdialog_policies_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Co
return EINA_TRUE;
}
- Eina_Bool
+Eina_Bool
dialog_subdialog_policies_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
if (!e_randr_screen_info || !cfdata || !cfdata->gui.selected_output_dd) return EINA_FALSE;
- return ((int)cfdata->gui.selected_output_dd->previous_policy != (int)cfdata->gui.subdialogs.policies.radio_val);
+ return (int)cfdata->gui.selected_output_dd->previous_policy != (int)cfdata->gui.subdialogs.policies.radio_val;
}
- void
+void
dialog_subdialog_policies_update_radio_buttons(Evas_Object *crtc)
{
E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
@@ -233,7 +233,7 @@ dialog_subdialog_policies_update_radio_buttons(Evas_Object *crtc)
if (output_dialog_data->crtc && output_dialog_data->crtc->outputs)
{
- output = (E_Randr_Output_Info*)eina_list_data_get(eina_list_last(output_dialog_data->crtc->outputs));
+ output = (E_Randr_Output_Info *)eina_list_data_get(eina_list_last(output_dialog_data->crtc->outputs));
}
else if (output_dialog_data->output)
{
@@ -247,26 +247,31 @@ dialog_subdialog_policies_update_radio_buttons(Evas_Object *crtc)
switch (policy)
{
case ECORE_X_RANDR_OUTPUT_POLICY_RIGHT:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_right, EINA_TRUE);
- break;
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_right, EINA_TRUE);
+ break;
+
case ECORE_X_RANDR_OUTPUT_POLICY_BELOW:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_below, EINA_TRUE);
- break;
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_below, EINA_TRUE);
+ break;
+
case ECORE_X_RANDR_OUTPUT_POLICY_LEFT:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_left, EINA_TRUE);
- break;
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_left, EINA_TRUE);
+ break;
+
case ECORE_X_RANDR_OUTPUT_POLICY_CLONE:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_clone, EINA_TRUE);
- break;
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_clone, EINA_TRUE);
+ break;
+
case ECORE_X_RANDR_OUTPUT_POLICY_NONE:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_none, EINA_TRUE);
- break;
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_none, EINA_TRUE);
+ break;
+
default: //== ECORE_X_RANDR_OUTPUT_POLICY_ABOVE:
- e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_above, EINA_TRUE);
+ e_widget_radio_toggle_set(e_config_runtime_info->gui.subdialogs.policies.radio_above, EINA_TRUE);
}
}
- void
+void
dialog_subdialog_policies_keep_changes(E_Config_Dialog_Data *cfdata)
{
E_Config_Randr_Dialog_Output_Dialog_Data *odd;
@@ -274,7 +279,7 @@ dialog_subdialog_policies_keep_changes(E_Config_Dialog_Data *cfdata)
if (!cfdata) return;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, odd)
{
if (!odd || ((int)odd->previous_policy == Ecore_X_Randr_Unset)) continue;
odd->previous_policy = odd->new_policy;
@@ -282,7 +287,7 @@ dialog_subdialog_policies_keep_changes(E_Config_Dialog_Data *cfdata)
}
}
- void
+void
dialog_subdialog_policies_discard_changes(E_Config_Dialog_Data *cfdata)
{
E_Config_Randr_Dialog_Output_Dialog_Data *odd;
@@ -290,10 +295,11 @@ dialog_subdialog_policies_discard_changes(E_Config_Dialog_Data *cfdata)
if (!cfdata) return;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, odd)
{
if (!odd->crtc || ((int)odd->previous_policy == Ecore_X_Randr_Unset)) continue;
odd->new_policy = odd->previous_policy;
odd->previous_policy = Ecore_X_Randr_Unset;
}
}
+
diff --git a/src/modules/conf_randr/e_int_config_randr_resolutions.c b/src/modules/conf_randr/e_int_config_randr_resolutions.c
index c66c32278..63c377c6f 100644
--- a/src/modules/conf_randr/e_int_config_randr_resolutions.c
+++ b/src/modules/conf_randr/e_int_config_randr_resolutions.c
@@ -4,30 +4,30 @@
#ifdef Ecore_X_Randr_Unset
#undef Ecore_X_Randr_Unset
-#define Ecore_X_Randr_Unset -1
+#define Ecore_X_Randr_Unset -1
#else
-#define Ecore_X_Randr_Unset -1
+#define Ecore_X_Randr_Unset -1
#endif
#ifdef Ecore_X_Randr_None
#undef Ecore_X_Randr_None
#endif
-#define Ecore_X_Randr_None 0
+#define Ecore_X_Randr_None 0
-#define ICON_WIDTH 10
-#define ICON_HEIGHT 10
+#define ICON_WIDTH 10
+#define ICON_HEIGHT 10
#define RESOLUTION_TXT_MAX_LENGTH 50
Evas_Object *dialog_subdialog_resolutions_basic_create_widgets(Evas *canvas);
-Eina_Bool dialog_subdialog_resolutions_basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-Eina_Bool dialog_subdialog_resolutions_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-void dialog_subdialog_resolutions_update_list(Evas_Object *crtc);
-void dialog_subdialog_resolutions_keep_changes(E_Config_Dialog_Data *cfdata);
-void dialog_subdialog_resolutions_discard_changes(E_Config_Dialog_Data *cfdata);
+Eina_Bool dialog_subdialog_resolutions_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+Eina_Bool dialog_subdialog_resolutions_basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+void dialog_subdialog_resolutions_update_list(Evas_Object *crtc);
+void dialog_subdialog_resolutions_keep_changes(E_Config_Dialog_Data *cfdata);
+void dialog_subdialog_resolutions_discard_changes(E_Config_Dialog_Data *cfdata);
extern E_Config_Dialog_Data *e_config_runtime_info;
- Eina_Bool
+Eina_Bool
dialog_subdialog_resolutions_create_data(E_Config_Dialog_Data *cfdata)
{
E_Config_Randr_Dialog_Output_Dialog_Data *odd;
@@ -36,7 +36,7 @@ dialog_subdialog_resolutions_create_data(E_Config_Dialog_Data *cfdata)
if (!cfdata || !cfdata->output_dialog_data_list) return EINA_FALSE;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, odd)
{
if (odd->previous_mode || odd->preferred_mode)
{
@@ -46,20 +46,20 @@ dialog_subdialog_resolutions_create_data(E_Config_Dialog_Data *cfdata)
}
if (odd->crtc)
{
- if(!(mi = odd->crtc->current_mode))
- mi = (Ecore_X_Randr_Mode_Info*)eina_list_data_get(eina_list_last(odd->crtc->outputs_common_modes));
+ if (!(mi = odd->crtc->current_mode))
+ mi = (Ecore_X_Randr_Mode_Info *)eina_list_data_get(eina_list_last(odd->crtc->outputs_common_modes));
odd->previous_mode = mi;
}
else if (odd->output)
{
- odd->preferred_mode = (Ecore_X_Randr_Mode_Info*)eina_list_data_get(eina_list_last(odd->output->preferred_modes));
+ odd->preferred_mode = (Ecore_X_Randr_Mode_Info *)eina_list_data_get(eina_list_last(odd->output->preferred_modes));
}
}
return EINA_TRUE;
}
- Evas_Object *
+Evas_Object *
dialog_subdialog_resolutions_basic_create_widgets(Evas *canvas)
{
Evas_Object *subdialog;
@@ -74,11 +74,11 @@ dialog_subdialog_resolutions_basic_create_widgets(Evas *canvas)
return subdialog;
}
- Eina_Bool
-dialog_subdialog_resolutions_basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata __UNUSED__)
+Eina_Bool
+dialog_subdialog_resolutions_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata __UNUSED__)
{
//Apply new mode
- Ecore_X_Randr_Mode_Info* selected_mode;
+ Ecore_X_Randr_Mode_Info *selected_mode;
Ecore_X_ID selected_mode_xid;
E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
Ecore_X_Randr_Output *output = NULL;
@@ -103,7 +103,7 @@ dialog_subdialog_resolutions_basic_apply_data (E_Config_Dialog *cfd, E_Config_Di
fprintf(stderr, "CONF_RANDR: Trying to find a CRTC for output %x, %d crtcs are possible.\n", output_dialog_data->output->xid, eina_list_count(output_dialog_data->output->possible_crtcs));
output = &output_dialog_data->output->xid;
noutputs = 1;
- EINA_LIST_FOREACH(output_dialog_data->output->possible_crtcs, iter, crtc_iter)
+ EINA_LIST_FOREACH (output_dialog_data->output->possible_crtcs, iter, crtc_iter)
{
if (!crtc_iter->outputs)
{
@@ -119,7 +119,7 @@ dialog_subdialog_resolutions_basic_apply_data (E_Config_Dialog *cfd, E_Config_Di
return EINA_FALSE;
}
//get selected mode
- if ((selected_mode = (Ecore_X_Randr_Mode_Info*)e_widget_ilist_selected_data_get(e_config_runtime_info->gui.subdialogs.resolutions.dialog)))
+ if ((selected_mode = (Ecore_X_Randr_Mode_Info *)e_widget_ilist_selected_data_get(e_config_runtime_info->gui.subdialogs.resolutions.dialog)))
{
selected_mode_xid = selected_mode->xid;
}
@@ -144,18 +144,18 @@ dialog_subdialog_resolutions_basic_apply_data (E_Config_Dialog *cfd, E_Config_Di
return EINA_FALSE;
}
- Eina_Bool
+Eina_Bool
dialog_subdialog_resolutions_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata __UNUSED__)
{
- Ecore_X_Randr_Mode_Info* selected_mode;
+ Ecore_X_Randr_Mode_Info *selected_mode;
E_Config_Randr_Dialog_Output_Dialog_Data *output_dialog_data;
- if (!e_config_runtime_info->gui.selected_eo || !(selected_mode = (Ecore_X_Randr_Mode_Info*)e_widget_ilist_selected_data_get(e_config_runtime_info->gui.subdialogs.resolutions.dialog)) || !(output_dialog_data = evas_object_data_get(e_config_runtime_info->gui.selected_eo, "output_info"))) return EINA_FALSE;
+ if (!e_config_runtime_info->gui.selected_eo || !(selected_mode = (Ecore_X_Randr_Mode_Info *)e_widget_ilist_selected_data_get(e_config_runtime_info->gui.subdialogs.resolutions.dialog)) || !(output_dialog_data = evas_object_data_get(e_config_runtime_info->gui.selected_eo, "output_info"))) return EINA_FALSE;
- return (selected_mode != output_dialog_data->previous_mode);
+ return selected_mode != output_dialog_data->previous_mode;
}
- void
+void
dialog_subdialog_resolutions_update_list(Evas_Object *crtc)
{
Eina_List *iter, *modelist = NULL;
@@ -189,13 +189,13 @@ dialog_subdialog_resolutions_update_list(Evas_Object *crtc)
else
modelist = output_dialog_data->output->modes;
}
- EINA_LIST_FOREACH(modelist, iter, mode_info)
+ EINA_LIST_FOREACH (modelist, iter, mode_info)
{
//calculate refresh rate
if (!mode_info) continue;
if (mode_info->hTotal && mode_info->vTotal)
- rate = ((float) mode_info->dotClock /
- ((float) mode_info->hTotal * (float) mode_info->vTotal));
+ rate = ((float)mode_info->dotClock /
+ ((float)mode_info->hTotal * (float)mode_info->vTotal));
else
rate = 0.0;
@@ -209,7 +209,7 @@ dialog_subdialog_resolutions_update_list(Evas_Object *crtc)
//select currently enabled mode
if (mode_info == current_mode)
- e_widget_ilist_selected_set(e_config_runtime_info->gui.subdialogs.resolutions.dialog, i);
+ e_widget_ilist_selected_set(e_config_runtime_info->gui.subdialogs.resolutions.dialog, i);
i++;
}
@@ -222,7 +222,6 @@ dialog_subdialog_resolutions_update_list(Evas_Object *crtc)
e_widget_ilist_thaw(e_config_runtime_info->gui.subdialogs.resolutions.dialog);
}
-
void
dialog_subdialog_resolutions_keep_changes(E_Config_Dialog_Data *cfdata)
{
@@ -231,7 +230,7 @@ dialog_subdialog_resolutions_keep_changes(E_Config_Dialog_Data *cfdata)
if (!cfdata) return;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, odd)
{
if (odd && odd->new_mode && (odd->new_mode != odd->previous_mode))
{
@@ -241,7 +240,7 @@ dialog_subdialog_resolutions_keep_changes(E_Config_Dialog_Data *cfdata)
}
}
- void
+void
dialog_subdialog_resolutions_discard_changes(E_Config_Dialog_Data *cfdata)
{
E_Config_Randr_Dialog_Output_Dialog_Data *odd;
@@ -249,7 +248,7 @@ dialog_subdialog_resolutions_discard_changes(E_Config_Dialog_Data *cfdata)
if (!cfdata) return;
- EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
+ EINA_LIST_FOREACH (cfdata->output_dialog_data_list, iter, odd)
{
//for now, there is no way to redisable an output during discartion
if (!odd->crtc || !odd->previous_mode) continue;
@@ -262,3 +261,4 @@ dialog_subdialog_resolutions_discard_changes(E_Config_Dialog_Data *cfdata)
}
}
}
+
diff --git a/src/modules/conf_randr/e_mod_main.c b/src/modules/conf_randr/e_mod_main.c
index 1cd124db5..5fd08be06 100644
--- a/src/modules/conf_randr/e_mod_main.c
+++ b/src/modules/conf_randr/e_mod_main.c
@@ -11,7 +11,7 @@ E_Module *conf_randr_module = NULL;
EAPI E_Module_Api e_modapi =
{
E_MODULE_API_VERSION,
- "Settings - Screen Setup"
+ "Settings - Screen Setup"
};
EAPI void *
@@ -28,7 +28,8 @@ EAPI int
e_modapi_shutdown(E_Module *m __UNUSED__)
{
E_Config_Dialog *cfd;
- while ((cfd = e_config_dialog_get("E", "screen/randr"))) e_object_del(E_OBJECT(cfd));
+ while ((cfd = e_config_dialog_get("E", "screen/randr")))
+ e_object_del(E_OBJECT(cfd));
e_configure_registry_item_del("screen/randr");
e_configure_registry_category_del("screen");
conf_randr_module = NULL;
@@ -40,3 +41,4 @@ e_modapi_save(E_Module *m __UNUSED__)
{
return 1;
}
+