diff options
author | Chris Michael <devilhorns@comcast.net> | 2013-08-02 16:59:11 +0100 |
---|---|---|
committer | Deon Thomas <PrinceAMD.Elive@gmail.com> | 2013-08-02 12:17:12 -0400 |
commit | 455fe96f664cecda18b880252ecb2f2674886b63 (patch) | |
tree | ea6a1d7cac8dfff3d388bdfac76cebca1dc793bc | |
parent | 628bcc0280912115e49757b6fea10d3a46fa27a7 (diff) | |
download | enlightenment-455fe96f664cecda18b880252ecb2f2674886b63.tar.gz |
Backport: a7200ae :: Only create primary output frame if we have more than one monitor to choose from.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
Signed-off-by: Deon Thomas <PrinceAMD.Elive@gmail.com>
-rw-r--r-- | src/modules/conf_randr/e_int_config_randr.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/src/modules/conf_randr/e_int_config_randr.c b/src/modules/conf_randr/e_int_config_randr.c index edd0a14c95..e93614eea0 100644 --- a/src/modules/conf_randr/e_int_config_randr.c +++ b/src/modules/conf_randr/e_int_config_randr.c @@ -89,9 +89,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) Evas_Object *o; Evas_Object *ow; Evas_Coord mw = 0, mh = 0, ch = 0, fh = 0; - E_Radio_Group *rg; - Eina_List *l; - Evas_Object *mon, *of; + Eina_List *l, *monitors = NULL; /* create the base list widget */ o = e_widget_list_add(evas, 0, 0); @@ -116,21 +114,29 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) e_smart_randr_min_size_get(cfdata->o_randr, &mw, &mh); } - of = e_widget_framelist_add(evas, _("Primary Output"), 0); - rg = e_widget_radio_group_new(&(cfdata->primary)); - EINA_LIST_FOREACH(e_smart_randr_monitors_get(cfdata->o_randr), l, mon) + monitors = e_smart_randr_monitors_get(cfdata->o_randr); + if (eina_list_count(monitors) > 1) { - int output; - const char *name; + E_Radio_Group *rg; + Evas_Object *mon, *of; - name = e_smart_monitor_name_get(mon); - output = (int)e_smart_monitor_output_get(mon); + of = e_widget_framelist_add(evas, _("Primary Output"), 0); + rg = e_widget_radio_group_new(&(cfdata->primary)); + EINA_LIST_FOREACH(monitors, l, mon) + { + int output; + const char *name; - ow = e_widget_radio_add(evas, name, output, rg); - e_widget_framelist_object_append(of, ow); + name = e_smart_monitor_name_get(mon); + output = (int)e_smart_monitor_output_get(mon); + + ow = e_widget_radio_add(evas, name, output, rg); + e_widget_framelist_object_append(of, ow); + } + + e_widget_list_object_append(o, of, 1, 0, 0.5); + e_widget_size_min_get(of, NULL, &fh); } - e_widget_list_object_append(o, of, 1, 0, 0.5); - e_widget_size_min_get(of, NULL, &fh); ow = e_widget_check_add(evas, _("Restore On Startup"), &(cfdata->restore)); e_widget_list_object_append(o, ow, 1, 0, 0.5); |