Allow explicit building of local applets. Shrinked buf size for numbers

This commit is contained in:
Sanel Zukan 2011-10-27 15:11:11 +00:00
parent c97c675153
commit 9f349dae04
3 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,7 @@
SubDir TOP ede-panel ; SubDir TOP ede-panel ;
EdeProgram ede-panel : Panel.cpp AppletManager.cpp ede-panel.cpp ; EdeProgram ede-panel : Panel.cpp AppletManager.cpp ede-panel.cpp ;
#ObjectC++Flags Panel.cpp : -DEDE_PANEL_LOCAL_APPLETS ;
if $(OS) != "SOLARIS" { if $(OS) != "SOLARIS" {
# also must use this flag (on anything but Solaris) or program will crash # also must use this flag (on anything but Solaris) or program will crash

View File

@ -404,6 +404,7 @@ int Panel::handle(int e) {
} }
void Panel::load_applets(void) { void Panel::load_applets(void) {
#ifndef EDE_PANEL_LOCAL_APPLETS
/* FIXME: hardcoded order */ /* FIXME: hardcoded order */
static const char *applets[] = { static const char *applets[] = {
"start_menu.so", "start_menu.so",
@ -429,7 +430,7 @@ void Panel::load_applets(void) {
} }
mgr.fill_group(this); mgr.fill_group(this);
#if 0 #else
mgr.load("./applets/start-menu/start_menu.so"); mgr.load("./applets/start-menu/start_menu.so");
mgr.load("./applets/quick-launch/quick_launch.so"); mgr.load("./applets/quick-launch/quick_launch.so");
mgr.load("./applets/pager/pager.so"); mgr.load("./applets/pager/pager.so");

View File

@ -12,7 +12,7 @@ PagerButton::~PagerButton() {
void PagerButton::set_workspace_label(int l) { void PagerButton::set_workspace_label(int l) {
wlabel = l; wlabel = l;
char buf[16]; char buf[6];
snprintf(buf, sizeof(buf), "%i", l); snprintf(buf, sizeof(buf), "%i", l);
copy_label(buf); copy_label(buf);
} }