From fc7b125aaee8e96404cf370ded3d7b8b0abd4f2c Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 18 Nov 2011 08:02:02 +0000 Subject: [PATCH] The current logic only displays text the first time the timer callback is called. Thats after one second. To avoid the blank dialog box for one second set the intial text already when creating the dialog. Signed-off-by: Stefan Schmidt SVN revision: 65372 --- src/modules/conf_randr/e_int_config_randr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/conf_randr/e_int_config_randr.c b/src/modules/conf_randr/e_int_config_randr.c index b94986ae9..3133cbc10 100644 --- a/src/modules/conf_randr/e_int_config_randr.c +++ b/src/modules/conf_randr/e_int_config_randr.c @@ -259,6 +259,8 @@ _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); + char buf[4096]; + if (!cd) return; cd->cfd = cfd; @@ -272,6 +274,11 @@ _e_conf_randr_confirmation_dialog_new(E_Config_Dialog *cfd) cd->dialog->data = cd; e_dialog_icon_set(cd->dialog, "preferences-system-screen-resolution", 48); e_win_delete_callback_set(cd->dialog->win, _e_conf_randr_confirmation_dialog_delete_cb); + 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."), cd->countdown); + e_dialog_text_set(cd->dialog, buf); e_dialog_button_add(cd->dialog, _("Keep"), NULL, _e_conf_randr_confirmation_dialog_keep_cb, cd); e_dialog_button_add(cd->dialog, _("Store Permanently"), NULL, _e_conf_randr_confirmation_dialog_store_cb, cd); e_dialog_button_add(cd->dialog, _("Restore"), NULL, _e_conf_randr_confirmation_dialog_discard_cb, cd);