From b3b07b6be55f4d7f6c0cb4ee98a989dc8e30d60b Mon Sep 17 00:00:00 2001 From: Leif Middelschulte Date: Tue, 21 Feb 2012 22:05:02 +0000 Subject: [PATCH] Simplify a bit. SVN revision: 68235 --- src/modules/conf_randr/e_int_config_randr_resolutions.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 8d820014c..e557f081d 100644 --- a/src/modules/conf_randr/e_int_config_randr_resolutions.c +++ b/src/modules/conf_randr/e_int_config_randr_resolutions.c @@ -167,8 +167,8 @@ dialog_subdialog_resolutions_update_list(Evas_Object *rep) Ecore_X_Randr_Mode_Info *mode_info, *current_mode; char resolution_text[RESOLUTION_TXT_MAX_LENGTH]; float rate; - int str_ret, i = 0; Eina_Bool enable = EINA_FALSE; + int i = 0; e_widget_ilist_freeze(e_config_runtime_info->gui.subdialogs.resolutions.dialog); e_widget_ilist_clear(e_config_runtime_info->gui.subdialogs.resolutions.dialog); @@ -201,12 +201,7 @@ dialog_subdialog_resolutions_update_list(Evas_Object *rep) else rate = 0.0; - str_ret = snprintf(resolution_text, RESOLUTION_TXT_MAX_LENGTH, "%dx%d@%.1fHz", mode_info->width, mode_info->height, rate); - if (str_ret < 0 || str_ret > (RESOLUTION_TXT_MAX_LENGTH - 1)) - { - fprintf(stderr, "CONF_RANDR: Resolution text could not be created."); - continue; - } + snprintf(resolution_text, (RESOLUTION_TXT_MAX_LENGTH - 1), "%dx%d@%.1fHz", mode_info->width, mode_info->height, rate); e_widget_ilist_append(e_config_runtime_info->gui.subdialogs.resolutions.dialog, NULL, resolution_text, NULL, mode_info, NULL); //select currently enabled mode