Allow fully customized messages in splash

This commit is contained in:
Sanel Zukan
2009-05-18 14:12:59 +00:00
parent 28a2664083
commit 5066e4938c
2 changed files with 10 additions and 14 deletions

View File

@ -10,9 +10,9 @@
* See COPYING for details. * See COPYING for details.
*/ */
#include <stdio.h> // snprintf #include <stdio.h>
#include <FL/Fl_Shared_Image.H>
#include <FL/Fl.H> #include <FL/Fl.H>
#include <FL/Fl_Shared_Image.H>
#include <edelib/Debug.h> #include <edelib/Debug.h>
#include <edelib/Nls.h> #include <edelib/Nls.h>
#include <edelib/Util.h> #include <edelib/Util.h>
@ -263,13 +263,11 @@ bool Splash::next_client(void) {
E_ASSERT(counter < slist->size() && "Internal error; 'counter' out of bounds"); E_ASSERT(counter < slist->size() && "Internal error; 'counter' out of bounds");
char buff[1024];
const char* msg = (*slist_it)->description.c_str(); const char* msg = (*slist_it)->description.c_str();
const char* cmd = (*slist_it)->exec.c_str(); const char* cmd = (*slist_it)->exec.c_str();
snprintf(buff, sizeof(buff), _("Starting %s..."), msg);
icons[counter]->show(); icons[counter]->show();
msgbox->copy_label(buff); msgbox->label(msg);
redraw(); redraw();
/* run command */ /* run command */
@ -296,12 +294,10 @@ bool Splash::next_client_nosplash(void) {
E_ASSERT(counter < slist->size() && "Internal error; 'counter' out of bounds"); E_ASSERT(counter < slist->size() && "Internal error; 'counter' out of bounds");
char buff[1024];
const char* msg = (*slist_it)->description.c_str(); const char* msg = (*slist_it)->description.c_str();
const char* cmd = (*slist_it)->exec.c_str(); const char* cmd = (*slist_it)->exec.c_str();
snprintf(buff, sizeof(buff), _("Starting %s..."), msg);
printf("%s\n", buff); printf("%s\n", msg);
/* run command */ /* run command */
if(!dryrun) if(!dryrun)

View File

@ -6,29 +6,29 @@
[edewm] [edewm]
exec = edewm exec = edewm
icon = edewm.png icon = edewm.png
description = window manager description = Starting window manager...
[ede-desktop] [ede-desktop]
exec = ede-desktop exec = ede-desktop
icon = ede-desktop.png icon = ede-desktop.png
description = desktop description = Starting desktop...
[ede-panel] [ede-panel]
exec = ede-panel exec = ede-panel
icon = ede-panel.png icon = ede-panel.png
description = panel description = Starting panel...
[emountd] [emountd]
exec = emountd exec = emountd
icon = emountd.png icon = emountd.png
description = mount notifier description = Starting mount notifier...
[xscreensaver] [xscreensaver]
exec = xscreensaver -nosplash exec = xscreensaver -nosplash
icon = xscreensaver.png icon = xscreensaver.png
description = screensaver description = Starting screensaver...
[autostart] [autostart]
exec = ede-autostart --safe exec = ede-autostart --safe
icon = autostart.png icon = autostart.png
description = local programs description = Loading local programs...