Importing EDE2 code to svn... NOTE: It doesn't compile! Stuff thats broken: edewm, eworkpanel, eiconman,

emenueditor
This commit is contained in:
Vedran Ljubovic
2006-08-20 18:43:09 +00:00
commit 65018f75b7
1004 changed files with 88271 additions and 0 deletions

990
eworkpanel/EDE_Config.cpp Executable file
View File

@@ -0,0 +1,990 @@
// EDE_Config.cpp: implementation of the EDE_Config class.
//
//////////////////////////////////////////////////////////////////////
/*#include "fl_internal.h"
#include <efltk/vsnprintf.h>
#include <efltk/Fl_String_List.h>
#include <efltk/Fl_Exception.h>
#include <efltk/Fl_Config.h>
#include <efltk/filename.h>
#include <efltk/fl_utf8.h>*/
#include "EDE_Config.h"
#include <fltk/filename.h>
#include "NLS.h"
#include <ctype.h>
#include <locale.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
#ifdef _WIN32_WCE
#include <stdlibx.h>
#endif
//#include <config.h>
#ifdef _WIN32
# include <io.h>
# include <direct.h>
# include <windows.h>
# define access(a,b) _access(a,b)
# define mkdir(a,b) _mkdir(a)
# define R_OK 4
#else
# include <unistd.h>
#endif /* _WIN32 */
// This is used for comment inside config files:
#define EDE_VERSION 2.0
#define LOCALE_TO_C() \
char *locale = setlocale(LC_ALL, ""); \
char *restore_locale = locale ? strdup(locale) : strdup("C"); \
setlocale(LC_ALL, "C")
#define RESTORE_LOCALE() \
setlocale(LC_ALL, restore_locale); \
free(restore_locale)
// From Enumerations.h
#ifdef _WIN32
# undef slash
# define slash '\\'
#else
# undef slash
# define slash '/'
#endif
// End Enumerations.h
// From config.h
#define CONFIGDIR "/usr/share/ede"
// End config.h
static int is_path_rooted(const char *fn)
{
/* see if an absolute name was given: */
#ifdef _WIN32
if (fn[0] == '/' || fn[0] == '.' || fn[0] == '\\' || fn[1]==':')
#else
if (fn[0] == '/' || fn[0] == '.')
#endif
return 1;
return 0;
}
// recursively create a path in the file system
static bool makePath( const char *path ) {
if(access(path, 0)) {
const char *s = strrchr( path, slash );
if ( !s ) return 0;
int len = s-path;
char *p = (char*)malloc( len+1 );
memcpy( p, path, len );
p[len] = 0;
makePath( p );
free( p );
return ( mkdir( path, 0777 ) == 0 );
}
return true;
}
// strip the filename and create a path
static bool makePathForFile( const char *path )
{
const char *s = strrchr( path, slash );
if ( !s ) return false;
int len = s-path;
char *p = (char*)malloc( len+1 );
memcpy( p, path, len );
p[len] = 0;
bool ret=makePath( p );
free( p );
return ret;
}
char *get_sys_dir() {
#ifndef _WIN32
return CONFIGDIR;
#else
static char path[PATH_MAX];
HKEY hKey;
if(RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion", 0, KEY_READ, &hKey)==ERROR_SUCCESS)
{
DWORD size=4096;
RegQueryValueExW(hKey, L"CommonFilesDir", NULL, NULL, (LPBYTE)path, &size);
RegCloseKey(hKey);
return path;
}
return "C:\\EDE\\";
#endif
}
char *get_homedir() {
char *path = new char[PATH_MAX];
const char *str1;
str1=getenv("HOME");
if (str1) {
memcpy(path, str1, strlen(str1)+1);
return path;
}
return 0;
}
char *EDE_Config::find_config_file(const char *filename, bool create, int mode)
{
static char path[4096];
if(is_path_rooted(filename)) {
strncpy(path, filename, sizeof(path));
return (create || !access(path, R_OK)) ? path : 0;
}
if(mode==USER) {
char *cptr = get_homedir();
char *ret=0;
if(cptr) {
snprintf(path, sizeof(path)-1, "%s%c%s%c%s", cptr, slash, ".ede", slash, filename);
if(create || !access(path, R_OK)) {
ret = path;
}
delete []cptr;
return ret;
}
return 0;
} else {
snprintf(path, sizeof(path)-1, "%s%c%s", get_sys_dir(), slash, filename);
return (create || !access(path, R_OK)) ? path : 0;
}
}
// Vedran - a few string management functions...
// strdupcat() - it's cool to strcat with implied realloc
// -- NOTE: due to use of realloc *always* use strdupcat return value:
// dest = strdupcat(dest,src);
// and *never* use it like:
// strdupcat(dest,src);
char *strdupcat(char *dest, const char *src)
{
if (!dest) {
dest=(char*)malloc(strlen(src));
} else {
dest=(char*)realloc (dest, strlen(dest)+strlen(src)+1);
}
strcat(dest,src);
return dest;
}
// wstrim() - for trimming characters (used in parser)
// parts of former fl_trimleft and fl_trimright from Fl_Util.cpp
char* wstrim(char *string)
{
char *start;
if(string == NULL )
return NULL;
if (*string) {
int len = strlen(string);
if (len) {
char *p = string + len;
do {
p--;
if ( !isspace(*p) ) break;
} while ( p != string );
if ( !isspace(*p) ) p++;
*p = 0;
}
}
for(start = string; *start && isspace (*start); start++);
memmove(string, start, strlen(start) + 1);
return string;
}
// hmmmh?
//char* wstrim(const char *string)
//{
// char *newstring = strdup(string);
// return wstrim(newstring);
//}
// from_string() - adapted from Fl_String_List to use vector
std::vector<char*> from_string(const char *str, const char *separator)
{
if(!str) return std::vector<char*> ();
const char *ptr = str;
const char *s = strstr(ptr, separator);
std::vector<char*> retval;
if(s) {
unsigned separator_len = strlen(separator);
do {
unsigned len = s - ptr;
if (len) {
retval.push_back(strndup(ptr,len));
} else {
retval.push_back(NULL);
}
ptr = s + separator_len;
s = strstr(ptr, separator);
}
while(s);
if(*ptr) {
retval.push_back(strdup(ptr));
}
} else {
retval.push_back(strdup(ptr));
}
return retval;
}
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
#define S(item) ((EDE_Config_Section*)item)
EDE_Config::EDE_Config(const char *vendor, const char *application, int mode)
: EDE_Config_Section("","",0)
{
m_vendor=m_app=m_filename=NULL;
m_cur_sec = 0;
m_changed=false;
m_error = 0;
if(vendor) m_vendor = strdup(vendor);
if(application) m_app = strdup(application);
if(strlen(m_app) > 0) {
const char *file=0;
char tmp[PATH_MAX];
#ifdef _WIN32
if(mode==SYSTEM)
snprintf(tmp, sizeof(tmp)-1, "%s%c%s.conf", m_app, slash, m_app);
else
#endif
snprintf(tmp, sizeof(tmp)-1, "apps%c%s%c%s.conf", slash, m_app, slash, m_app);
file = find_config_file(tmp, true, mode);
if(file) {
bool ret = makePathForFile(file);
if(ret) {
m_filename = strdup(file);
read_file(true);
} else
m_error = CONF_ERR_FILE;
} else
m_error = CONF_ERR_FILE;
} else
m_error = CONF_ERR_FILE;
}
EDE_Config::EDE_Config(const char *filename, bool read, bool create)
: EDE_Config_Section("","",0)
{
m_vendor=m_app=m_filename=NULL;
if(filename) m_filename = strdup(filename); else m_filename = strdup("");
// TODO: shouldn't we just return false if there's no filename??
// use case: creating a new file (nonexistant)
m_error = 0;
m_cur_sec = 0;
m_changed=false;
if(create && strlen(m_filename)>0) {
makePathForFile(m_filename);
}
if(read) read_file(create);
}
EDE_Config::~EDE_Config()
{
flush();
clear();
if(m_filename) free(m_filename);
if(m_vendor) free(m_vendor);
if(m_app) free(m_app);
}
/* get error string associated with error number */
const char *EDE_Config::strerror(int error)
{
switch(error)
{
case CONF_SUCCESS: return _("Successful completion");
case CONF_ERR_FILE: return _("Could not access config file");
case CONF_ERR_SECTION: return _("Config file section not found");
case CONF_ERR_KEY: return _("Key not found in section");
case CONF_ERR_MEMORY: return _("Could not allocate memory");
case CONF_ERR_NOVALUE: return _("Invalid value associated with key");
default: return _("Unknown error");
}
}
bool EDE_Config::read_file(bool create)
{
bool error = false;
if(m_filename && strlen(m_filename)<1) {
m_error = CONF_ERR_FILE;
return false;
}
if(create && !(access(m_filename, F_OK)==0)) {
FILE *f = fopen(m_filename, "w+");
if(f) {
fputs(" ", f);
fclose(f);
} else error=true;
}
if(error) {
m_error = CONF_ERR_FILE;
return false;
}
// If somebody calls this function two times, we
// need to clean earlier section list...
clear();
/////
struct stat fileStat;
stat(m_filename, &fileStat);
unsigned int size = fileStat.st_size;
if(size == 0) {
m_error = 0;
return true;
}
FILE *fp = fopen(m_filename, "r");
if(!fp) {
//fprintf(stderr, "fp == 0: %s\n", m_filename);
m_error = CONF_ERR_FILE;
return false;
}
unsigned bsize = size*sizeof(char);
char *buffer = (char*)malloc(bsize+1);
buffer[bsize] = 0;
if(!buffer) {
m_error = CONF_ERR_MEMORY;
return false;
}
unsigned int readed = fread(buffer, 1, size, fp);
if(readed <= 0) {
free((char*)buffer);
fclose(fp);
m_error = CONF_ERR_FILE;
return false;
}
fclose(fp);
/* old parser
EDE_String_List strings(buffer, "\n");
free((char*)buffer);
EDE_Config_Section *section = this;
for(unsigned n=0; n<strings.size(); n++)
{
EDE_String line;
int comment_pos = strings[n].rpos('#');
if(comment_pos>=0) {
line = strings[n].sub_str(comment_pos, strings[n].length()-comment_pos).trim();
} else {
line = strings[n].trim();
}
if(line[0] == '[')
{
int pos = line.pos(']');
if(pos>=0)
{
EDE_String sec(line.sub_str(1, pos-1));
section = create_section(sec);
}
}
else if(line[0] != '#')
{
int pos = line.pos('=');
if(pos==-1) pos = line.pos(':');
if(pos>=0) {
EDE_String key(line.sub_str(0, pos));
pos++;
EDE_String value(line.sub_str(pos, line.length()-pos));
section->add_entry(key, value);
}
}
}
*/
// new parser by Vedran
// I like writing parsers
// too bad others don't like me writing parsers...
// TODO: i did some stupid things here for debugging, need to check
int pos=0;
bool comment, iskey, issection;
char *key, *value, *sectionname;
key=strdup(""); value=strdup(""); sectionname=strdup("");
EDE_Config_Section *section = this;
do {
int c=buffer[pos];
if ((c == '\n') || (c == '\0')) {
comment=false; iskey=true; issection=false;
sectionname = wstrim(sectionname);
key = wstrim(key);
value = wstrim(value);
if (strlen(sectionname) > 0)
section = create_section(sectionname);
if (strlen(key) > 0)
section->add_entry(key,value);
free(sectionname); free(key); free(value);
key=strdup(""); value=strdup(""); sectionname=strdup("");
}
else if (c == '#')
comment = true;
else if (comment == false) {
if (c == '[')
issection = true;
else if (c == ']')
issection = false;
else if ((c == '=') || (c == ':'))
iskey = false;
else {
if (issection)
sectionname = strdupcat(sectionname, (const char*) &c);
else if (iskey)
key = strdupcat(key, (const char*) &c);
else
value = strdupcat(value,(const char*) &c);
}
}
pos++;
} while (buffer[pos] != '\0');
free(key); free(value); free(sectionname);
m_error = 0;
m_changed=false;
return true;
}
bool EDE_Config::flush()
{
if(!m_changed) return true;
if(strlen(m_filename) < 1) return false;
FILE *file = fopen(m_filename, "w+");
// if(!file)
// fl_throw(::strerror(errno));
LOCALE_TO_C();
fprintf(file, "# EDE INI Version %f\n", EDE_VERSION);
if(m_vendor && strlen(m_vendor)>0) fprintf(file, "# Vendor: %s\n", m_vendor);
if(m_app && strlen(m_app)>0) fprintf(file, "# Application: %s\n", m_app);
// Flush sections
write_section(0, file);
RESTORE_LOCALE();
fclose(file);
m_error = 0;
m_changed=false;
return true;
}
EDE_Config_Section *EDE_Config::create_section(const char* name)
{
if(strlen(name)<1) return 0;
EDE_Config_Section *section = find_section(name, true);
if(section) return section;
char *lastptr = strrchr(name,'/'); // int pos = name.rpos('/')+1;
int pos;
if(lastptr) {
pos = lastptr-name + 1;
} else {
section = new EDE_Config_Section(name, "", 0);
sections().push_back(section);
return section;
}
//char* sec_name(name.sub_str(pos, name.length()-pos));
char *sec_name = strndup(name+pos, strlen(name)-pos);
//char* sec_path(name.sub_str(0, pos));
char *sec_path = strndup(name, pos);
EDE_Config_Section *parent = find_section(sec_path, false);
EDE_Config_Sections *list = &sections();
if(!parent) {
// Fl_String_List sections;
std::vector<char*> sections = from_string(sec_path, "/");
char* path = strdup("");
for(unsigned n=0; n<sections.size(); n++) {
if(parent) list = &parent->sections();
parent = new EDE_Config_Section(sections.at(n), path, parent);
list->push_back(parent);
path = strdupcat (path, sections.at(n));
path = strdupcat (path, (char *)'/');
}
free(path);
}
if(parent) list = &parent->sections();
section = new EDE_Config_Section(sec_name, sec_path, parent);
list->push_back(section);
free(sec_name); free(sec_path);
m_error = 0;
return section;
}
EDE_Config_Section *EDE_Config::find_section(const char *path, bool perfect_match) const
{
if(!path || !*path) return 0;
std::vector<char*> sections = from_string(path, "/");
if(sections.size()==0)
return find(path, false);
EDE_Config_Section *section = (EDE_Config_Section *)this;
for(unsigned n=0; n<sections.size(); n++) {
EDE_Config_Section *tmp = section->find(sections.at(n), false);
if(!tmp) {
if(perfect_match)
return 0;
else
break;
}
section = tmp;
}
return section;
}
void EDE_Config::remove_key(const char *section, const char *key)
{
if(key) {
EDE_Config_Section *sect = find_section(section, true);
if(sect->remove_entry(key)) {
m_error = 0;
m_changed = true;
return;
}
}
m_error = CONF_ERR_KEY;
}
// finding and removing stuff from deque
void sectremove(EDE_Config_Sections sects, EDE_Config_Section *sect) {
for (unsigned int n=0; n<sects.size(); n++) {
EDE_Config_Section *current = (EDE_Config_Section *)sects.at(n);
if (current == sect)
sects.erase(sects.begin()+n);
}
return;
}
void EDE_Config::remove_sec(const char *section)
{
if(!section) return;
EDE_Config_Section *sect;
if((sect = find_section(section, true)) != 0) {
if(sect->parent()) {
sectremove(sect->parent()->sections(),sect);
} else {
sectremove(sections(),sect);
}
delete sect;
m_error = 0;
m_changed = true;
return;
}
m_error = CONF_ERR_SECTION;
}
/*
* Read functions
*/
int EDE_Config::_read_string(EDE_Config_Section *s, const char *key, char *ret, const char *def_value, int size)
{
if(!key || !s) {
if(def_value) strncpy(ret, def_value, size);
else ret[0] = '\0';
m_error = (!key ? CONF_ERR_KEY : CONF_ERR_SECTION);
return m_error;
}
char *val = s->find_entry(key);
if(val) {
int len = strlen(val); // convert from unsigned... and now:
len = (len<size) ? len+1 : size;
memcpy(ret, val, len);
return (m_error = CONF_SUCCESS);
}
free(val);
if(def_value) strncpy(ret, def_value, size);
else ret[0] = '\0';
m_error = CONF_ERR_KEY;
return m_error;
}
int EDE_Config::_read_string(EDE_Config_Section *s, const char *key, char *&ret, const char *def_value)
{
if(!key || !s) {
ret = def_value?strdup(def_value):0;
m_error = (!key ? CONF_ERR_KEY : CONF_ERR_SECTION);
return m_error;
}
char *val = s->find_entry(key);
if(val && strlen(val)>0)
{
ret = strdup(val);
return (m_error = CONF_SUCCESS);
}
free(val);
ret = def_value ? strdup(def_value) : 0;
m_error = CONF_ERR_KEY;
return m_error;
}
/*int EDE_Config::_read_string(EDE_Config_Section *s, const char *key, Fl_String &ret, const char *def_value)
{
if(!key || !s) {
ret = def_value;
m_error = !key ? CONF_ERR_KEY : CONF_ERR_SECTION;
return m_error;
}
Fl_String *val = s->find_entry(key);
if(val) {
ret = (*val);
return (m_error = CONF_SUCCESS);
}
ret = def_value;
return (m_error = CONF_ERR_KEY);
}*/
int EDE_Config::_read_long(EDE_Config_Section *s, const char *key, long &ret, long def_value)
{
char* tmp;
if(!_read_string(s, key, tmp, 0)) {
ret = tmp[0] ? strtol(tmp, NULL, 10) : def_value;
} else
ret = def_value;
return m_error;
}
int EDE_Config::_read_int(EDE_Config_Section *s, const char *key, int &ret, int def_value)
{
char* tmp;
if(!_read_string(s, key, tmp, 0)) {
ret = atoi(tmp);
if ((errno = ERANGE) || (ret == 0 && strcmp(tmp,"0") != 0)) ret = def_value;
} else
ret = def_value;
return m_error;
}
int EDE_Config::_read_float (EDE_Config_Section *s, const char *key, float &ret, float def_value)
{
char* tmp;
if(!_read_string(s, key, tmp, 0)) {
LOCALE_TO_C();
ret = (float)strtod(tmp, 0);
RESTORE_LOCALE();
} else
ret = def_value;
return m_error;
}
int EDE_Config::_read_double(EDE_Config_Section *s, const char *key, double &ret, double def_value)
{
char* tmp;
if(!_read_string(s, key, tmp, 0)) {
LOCALE_TO_C();
ret = strtod(tmp, 0);
RESTORE_LOCALE();
} else
ret = def_value;
return m_error;
}
int EDE_Config::_read_bool(EDE_Config_Section *s, const char *key, bool &ret, bool def_value)
{
char* tmp;
if(_read_string(s, key, tmp, 0)) {
ret = def_value;
return m_error;
}
if ((strncasecmp(tmp,"true",4)) ||
(strncasecmp(tmp,"yes",3)) ||
(strncasecmp(tmp,"on",2)) ||
(strcasecmp(tmp,"1"))) {
ret = true;
} else if((strncasecmp(tmp,"false",5)) ||
(strncasecmp(tmp,"no",2)) ||
(strncasecmp(tmp,"off",3)) ||
(strcasecmp(tmp,"0"))) {
ret = false;
} else {
m_error = CONF_ERR_NOVALUE;
ret = def_value;
}
return m_error;
}
int EDE_Config::_read_color(EDE_Config_Section *s, const char *key, fltk::Color &ret, fltk::Color def_value)
{
char* tmp;
if(_read_string(s, key, tmp, 0)) {
ret = def_value;
return m_error;
}
int r=0,g=0,b=0;
if(sscanf(tmp, "RGB(%d,%d,%d)", &r, &g, &b)!=3) {
ret = def_value;
return (m_error = CONF_ERR_NOVALUE);
}
ret = fltk::color(r,g,b);
return m_error;
}
/*
* Write functions
*/
/*int EDE_Config::_write_string(EDE_Config_Section *s, const char *key, const char *value)
{
char* val(value);
return _write_string(s, key, val);
}*/
int EDE_Config::_write_string(EDE_Config_Section *s, const char *key, const char* value)
{
if(!s) return (m_error = CONF_ERR_SECTION);
if(!key) return (m_error = CONF_ERR_KEY);
/* This logic is now in add_entry, cause we can't pass around pointers into structure
char *val = s->find_entry(key);
if(val) {
strncpy(val, value, strlen(value));
} else */
if (value) s->add_entry(key, value); else s->add_entry(key, "");
m_changed=true;
return (m_error=CONF_SUCCESS);
}
int EDE_Config::_write_long(EDE_Config_Section *s, const char *key, const long value)
{
char tmp[128]; snprintf(tmp, sizeof(tmp)-1, "%ld", value);
return _write_string(s, key, tmp);
}
int EDE_Config::_write_int(EDE_Config_Section *s, const char *key, const int value)
{
char tmp[128]; snprintf(tmp, sizeof(tmp)-1, "%d", value);
return _write_string(s, key, tmp);
}
int EDE_Config::_write_float(EDE_Config_Section *s, const char *key, const float value)
{
LOCALE_TO_C();
char tmp[32]; snprintf(tmp, sizeof(tmp)-1, "%g", value);
RESTORE_LOCALE();
return _write_string(s, key, tmp);
}
int EDE_Config::_write_double(EDE_Config_Section *s, const char *key, const double value)
{
LOCALE_TO_C();
char tmp[32]; snprintf(tmp, sizeof(tmp)-1, "%g", value);
RESTORE_LOCALE();
return _write_string(s, key, tmp);
}
int EDE_Config::_write_bool(EDE_Config_Section *s, const char *key, const bool value)
{
if(value) return _write_string(s, key, "1");
return _write_string(s, key, "0");
}
int EDE_Config::_write_color(EDE_Config_Section *s, const char *key, const fltk::Color value)
{
unsigned char r,g,b;
fltk::split_color(value, r,g,b);
char tmp[32];
snprintf(tmp, sizeof(tmp)-1, "RGB(%d,%d,%d)", r,g,b);
return _write_string(s, key, tmp);
}
//////////////////////////////////////
//////////////////////////////////////
//////////////////////////////////////
EDE_Config_Section::EDE_Config_Section(const char* name, const char* path, EDE_Config_Section *par)
: m_parent(par)
{
m_name=strdup(name);
m_path=strdup(path);
}
EDE_Config_Section::~EDE_Config_Section()
{
free(m_name);
free(m_path);
clear();
}
void EDE_Config_Section::clear()
{
for(unsigned n=0; n<sections().size(); n++) {
EDE_Config_Section *s = (EDE_Config_Section *)sections()[n];
delete s;
}
m_lines.clear();
m_sections.clear();
}
void EDE_Config_Section::write_section(int indent, FILE *fp) const
{
for(int a=0; a<indent; a++) fprintf(fp, " ");
if(strlen(name())>0)
fprintf(fp, "[%s%s]\n", path(), name());
for(unsigned n=0; n<m_lines.size(); n++) {
if(strlen(m_lines.at(n)) > 0) {
for(int a=0; a<indent; a++) fprintf(fp, " ");
// fprintf(fp, " %s=%s\n", it.id().c_str(), it.value().c_str());
fprintf(fp, " %s\n", m_lines.at(n));
}
}
fprintf(fp, "\n");
for(unsigned n=0; n<sections().size(); n++) {
EDE_Config_Section *child = S(sections()[n]);
child->write_section(indent+2, fp);
}
}
void EDE_Config_Section::add_entry(const char* key, const char* value)
{
int keylen = strlen(key);
if(!key || keylen<1) return;
if(!value) return;
char *tmp = strdup(key);
char *tmp2 = strdup(value);
tmp = wstrim(tmp);
tmp2 = wstrim(tmp2);
tmp = strdupcat(tmp, "=");
tmp = strdupcat(tmp, tmp2);
free(tmp2);
// if key already exists, delete
bool found = false;
for (unsigned i=0; i<lines().size(); i++) {
if (!found && strncmp(lines().at(i), tmp, keylen) == 0) {
lines().erase(lines().begin()+i);
found = true;
}
}
lines().push_back(tmp);
}
bool EDE_Config_Section::remove_entry(const char* key)
{
bool found=false;
char *tmp = strdup(key);
tmp = strdupcat (tmp, "=");
for (unsigned i=0; i<lines().size(); i++) {
if (strncmp(lines().at(i), tmp, strlen(tmp)) == 0) {
lines().erase(lines().begin()+i);
found=true;
}
}
free(tmp);
return found;
}
char* EDE_Config_Section::find_entry(const char *key) const
{
bool found=false;
char *ret;
char *search = strdup(key);
search = strdupcat(search, "=");
for (unsigned i=0; i<lines().size(); i++) {
if (!found && strncmp(lines().at(i), search, strlen(search)) == 0) {
ret = strdup(lines().at(i)+strlen(search));
found = true;
}
}
free(search); // this sometimes fails, dunno why....
if (found) { return ret; } else { return 0; }
}
EDE_Config_Section *EDE_Config_Section::find(const char *name, bool recursive) const
{
const EDE_Config_Sections *list = &sections();
for(uint n=0; n<list->size(); n++) {
EDE_Config_Section *s = (EDE_Config_Section*) list->at(n);
if(strcmp(s->name(), name) == 0) {
return s;
}
if(recursive) {
s = s->find(name, recursive);
if(s) return s;
}
}
return 0;
}

752
eworkpanel/EDE_Config.h Executable file
View File

@@ -0,0 +1,752 @@
/*
* EDE_Config
* Library for configuration files
* Copyright (c) 2000. - 2005. EDE Authors
* WWW: http://ede.sf.net
*
* This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
* version 2. See COPYING for details.
*
* Author : Mikko Lahteenmaki (mikko@fltk.net)
* Port to FLTK2: Vedran Ljubovic (vljubovic@smartnet.ba)
*
* Please report all bugs and problems to "efltk-bugs@fltk.net"
*
*/
#ifndef _EDE_CONFIG_H_
#define _EDE_CONFIG_H_
/*#include "Enumerations.h"
#include "Fl_Util.h"
#include "Fl_String.h"
#include "Fl_Color.h"
#include "Fl_Ptr_List.h"
#include "Fl_Map.h"*/
#include <fltk/Color.h>
#include <deque>
#include <vector>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32_WCE
#include <fltk/x.h>
#endif
/**
* \defgroup EDE_Config EDE_Config globals
*/
/*@{*/
/**
* Error codes for EDE_Config
*/
enum ConfErrors {
CONF_SUCCESS = 0, ///< successful operation
CONF_ERR_FILE, ///< trouble accessing config file or directory
CONF_ERR_SECTION, ///< requested section was not found
CONF_ERR_KEY, ///< requested key was not found
CONF_ERR_MEMORY, ///< memory allocation error
CONF_ERR_NOVALUE, ///< key found, but invalid value associated with it
};
/** List used for sections in Fl_Config_Section */
//FIXME
//typedef Fl_Ptr_List Fl_Config_Sections;
typedef std::deque<void*> EDE_Config_Sections;
/** Map used for entries in Fl_Config_Section */
//FIXME
//typedef Fl_String_String_Map Fl_Config_Lines;
//this is not exactly compatible, but that's the best we can do...
typedef std::vector<char*> EDE_Config_Lines;
/*@}*/
class EDE_Config;
/**
* The configuration section.
* Represents one section in config (ini) file.
* @see EDE_Config
*/
//FIXME: class FL_API EDE_Config_Section
class EDE_Config_Section
{
friend class EDE_Config;
public:
EDE_Config_Section(const char* name, const char* path, EDE_Config_Section *par);
virtual ~EDE_Config_Section();
/**
* Destroys all sections and entries.
*/
virtual void clear();
/**
* Returns pointer to parent section, NULL for Fl_Config (root)
*/
EDE_Config_Section *parent() const { return m_parent; }
/**
* Returns name of section, without path.
* @see path()
*/
const char* name() const { return m_name; }
/**
* Returns path to section, without name.
* @see name()
*/
const char* path() const { return m_path; }
/**
* Returns const reference to entry map.
*/
const EDE_Config_Lines &lines() const { return m_lines; }
/**
* Returns reference to entry map.
*/
EDE_Config_Lines &lines() { return m_lines; }
/**
* Returns const reference to section list.
*/
const EDE_Config_Sections &sections() const { return m_sections; }
/**
* Returns reference to section list.
*/
EDE_Config_Sections &sections() { return m_sections; }
/**
* Find section named 'name'.
* @param section_name name of section to find
* @param recursive set true to perform recursive search.
*/
EDE_Config_Section *find(const char *section_name, bool recursive=false) const;
protected:
EDE_Config_Section *m_parent;
char *m_name, *m_path;
EDE_Config_Lines m_lines; //Line map
EDE_Config_Sections m_sections; //Section list
void write_section(int indent, FILE *fp) const;
void add_entry(const char* key, const char* value);
bool remove_entry(const char* key);
char* find_entry(const char *key) const;
};
/**
* The configuration holder. This class maybe used very easily to
* store application settings to file. Either system wide or user specific,
* depending on config type. Fl_Config is derived Fl_Config_Section, please
* take look a look at functions it provides also.
* @see Fl_Config_Section
*/
//FIXME: class FL_API Fl_Config : public Fl_Config_Section {
class EDE_Config : public EDE_Config_Section {
public:
/**
* Config file modes
*/
enum ConfigType {
USER=1, ///< User specific config file
SYSTEM ///< System wide config file
};
/**
* Creates/reads/writes app specific config file.
*
* LINUX:<br>
* File is created in ($home)/.ede/apps/($application)/($application).conf
* Or ($prefix)/share/ede/apps/($application)/($application).conf
*
* <br>WIN32:<br>
* ($home)\Local Settings\.ede\apps\($application)/($application).conf
* Or ($common files)\($application)\($application).conf
*
* Location depends on ConfigType 'mode', USER or SYSTEM
*
* @param vendor aplication vendor, written down to file
* @param application name, written down to file
* @param mode which mode to use
*/
EDE_Config(const char *vendor, const char *application, int mode=USER);
/**
* Access custom file in filesystem.
*
* @param filename path to config (ini) file.
* @param readfile if true, file is readed on constructor. I.e no need for read_file()
* @param createfile if true, file is created if it doesn't exists.
*/
EDE_Config(const char *filename, bool readfile=true, bool createfile=true);
/**
* Destroys config
*/
virtual ~EDE_Config();
/**
* Finds config file, depending on mode.
* NOTE: User MUST NOT free returned pointer!
*
* LINUX:<br>
* File is created in ($home)/.ede/apps/($application)/($application).conf
* Or ($prefix)/share/ede/apps/($application)/($application).conf
*
* <br>WIN32:<br>
* ($home)\Local Settings\.ede\apps\($application)/($application).conf
* Or ($common files)\($application)\($application).conf
*
* @param filename Relative filename, e.g. "myapp_config.ini"
* @param create if true, path is returned even if file is not found. Otherwise NULL if path not found.
* @param mode which mode to use
*/
static char *find_config_file(const char *filename, bool create=true, int mode=USER);
/**
* (re)read file. NOTE: Deletes current entries from this Fl_Config object.
* @param create if true, file is created if it doesn't exists.
* @see filename()
*/
bool read_file(bool create = true);
/**
* Flush entries to file.
* Returns true on success.
* @see filename()
*/
bool flush();
/** Returns current filename. */
const char* filename() const { return m_filename; }
/** Set new filename. You need to call read_file() to get new entries. */
void filename(const char *filename) { strncpy(m_filename, filename, strlen(filename)); }
/** Set new filename. You need to call read_file() to get new entries. */
// void filename(const Fl_String &filename) { m_filename = filename; }
/** Returns current vendor name. */
const char* vendor() const { return m_vendor; }
/** Set new vendor name. */
void vendor(const char *vendor) { strncpy(m_vendor, vendor, strlen(vendor)); }
/** Set new vendor name. */
// void vendor(const Fl_String &vendor) { m_vendor = vendor; }
/** Returns current application name. */
const char* application() const { return m_app; }
/** Set new application name. */
void application(const char *app) { strncpy(m_app, app, strlen(app)); }
/** Set new application name. */
// void application(const Fl_String &app) { m_app = app; }
/**
* Returns true, if data changed.
* call flush() to sync changes to file
* @see flush()
*/
bool is_changed() const { return m_changed; }
/**
* Set changed, forces flush() to write file.
* Even if it is not changed.
*/
void set_changed() { m_changed = true; }
/**
* Returns last error happened.
*/
int error() const { return m_error; }
/**
* Reset error, normally you don't need to call this.
*/
void reset_error() { m_error = 0; }
/**
* Return string presentation for last happened error.
*/
const char *strerror() const { return EDE_Config::strerror(m_error); }
/**
* Return error string, associated with 'errnum'
*/
static const char *strerror(int errnum);
/**
* Create new section. You can pass full path as section name.
* For example: create_section("/path/to/my/section");
* All nested sections are created automatically.
*
* Returns pointer to created section, NULL if failed.
*/
// EDE_Config_Section *create_section(const char *path) { char* tmp(path); return create_section(tmp); }
/**
* Create new section. You can pass full path as section name.
* For example: create_section("/path/to/my/section");
* All nested sections are created automatically.
*
* Returns pointer to created section, NULL if failed.
*/
EDE_Config_Section *create_section(const char* path);
/**
* Find section. You can pass full path as section name.
* For example: find_section("/path/to/my/section");
*
* Returns pointer to found section, NULL if not found.
*
* @param perfect_match is true, it returns NULL if no exact section found. Otherwise it returns last found section in path.
*/
EDE_Config_Section *find_section(const char *path, bool perfect_match=true) const;
/**
* Return child sections of section specified 'secpath'
*/
EDE_Config_Sections *section_list(const char *secpath) const { EDE_Config_Section *s=find_section(secpath); return s ? (&s->sections()) : 0; }
/**
* Return entries of section specified 'secpath'
*/
EDE_Config_Lines *line_list(const char *secpath) const { EDE_Config_Section *s=find_section(secpath); return s ? (&s->lines()) : 0; }
/**
* Set default section for read/write operations.
* NOTE: section is created, if it's not found.<BR>
* NOTE: You can pass path to section e.g "/path/to/my/section"
*/
void set_section(const char *secpath) { set_section(create_section(secpath)); }
/**
* Set default section for read/write operations.
*/
void set_section(EDE_Config_Section *sec) { m_cur_sec = sec; }
/**
* Remove entry associated with 'key' from section.
* NOTE: You can pass path to section e.g "/path/to/my/section"
*/
void remove_key(const char *section, const char *key);
/**
* Remove section specified by 'section'.
* NOTE: You can pass path to section e.g "/path/to/my/section"
*/
void remove_sec(const char *section);
/**
* Read Fl_String entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
// int read(const char *key, char* ret, const char *def_value) { return _read_string(m_cur_sec, key, ret, def_value); }
/**
* Read char* entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
* @param size of 'ret' char* array.
*/
int read(const char *key, char *ret, const char *def_value, int size) { return _read_string(m_cur_sec, key, ret, def_value, size); }
/**
* Read char* entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: 'ret' is allocated by Fl_Confing, user MUST free 'ret' by calling free() function.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int read(const char *key, char *&ret, const char *def_value=0) { return _read_string(m_cur_sec, key, ret, def_value); }
/**
* Read long entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int read(const char *key, long &ret, long def_value=0) { return _read_long(m_cur_sec, key, ret, def_value); }
/**
* Read int entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int read(const char *key, int &ret, int def_value=0) { return _read_int(m_cur_sec, key, ret, def_value); }
/**
* Read float entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int read(const char *key, float &ret, float def_value=0) { return _read_float(m_cur_sec, key, ret, def_value); }
/**
* Read double entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int read(const char *key, double &ret, double def_value=0) { return _read_double(m_cur_sec, key, ret, def_value); }
/**
* Read bool entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int read(const char *key, bool &ret, bool def_value=0) { return _read_bool(m_cur_sec, key, ret, def_value); }
/**
* Read Fl_Color entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int read(const char *key, fltk::Color &ret, fltk::Color def_value=0) { return _read_color(m_cur_sec, key, ret, def_value); }
/**
* Write Fl_String entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
// int write(const char *key, const Fl_String &value) { return _write_string(m_cur_sec, key, value); }
/**
* Write const char* entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int write(const char *key, const char *value) { return _write_string(m_cur_sec, key, value); }
/**
* Write long entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int write(const char *key, const long value) { return _write_long(m_cur_sec, key, value); }
/**
* Write int entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int write(const char *key, const int value) { return _write_int(m_cur_sec, key, value); }
/**
* Write float entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int write(const char *key, const float value) { return _write_float(m_cur_sec, key, value); }
/**
* Write double entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int write(const char *key, const double value) { return _write_double(m_cur_sec, key, value); }
/**
* Write bool entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int write(const char *key, const bool value) { return _write_bool(m_cur_sec, key, value); }
/**
* Write Fl_Color entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: This function assumes that current section is set with set_section().
*
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int write(const char *key, const fltk::Color value) { return _write_color(m_cur_sec, key, value); }
/**
* Read Fl_String entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
// int get(const char *section, const char *key, Fl_String &ret, const char *def_value) { return _read_string(find_section(section), key, ret, def_value); }
/**
* Read char* entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int get(const char *section, const char *key, char *ret, const char *def_value, int size) { return _read_string(find_section(section), key, ret, def_value, size); }
/**
* Read char* entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: 'ret' is allocated by Fl_Confing, user MUST free 'ret' by calling free() function.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int get(const char *section, const char *key, char *&ret, const char *def_value=0) { return _read_string(find_section(section), key, ret, def_value); }
/**
* Read long entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int get(const char *section, const char *key, long &ret, long def_value=0) { return _read_long(find_section(section), key, ret, def_value); }
/**
* Read int entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int get(const char *section, const char *key, int &ret, int def_value=0) { return _read_int(find_section(section), key, ret, def_value); }
/**
* Read float entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int get(const char *section, const char *key, float &ret, float def_value=0) { return _read_float(find_section(section), key, ret, def_value); }
/**
* Read double entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int get(const char *section, const char *key, double &ret, double def_value=0) { return _read_double(find_section(section), key, ret, def_value); }
/**
* Read bool entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int get(const char *section, const char *key, bool &ret, bool def_value=0) { return _read_bool(find_section(section), key, ret, def_value); }
/**
* Read Fl_Color entry from config.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param ret Result is stored to this.
* @param def_value Default value for ret, if not found.
*/
int get(const char *section, const char *key, fltk::Color &ret, fltk::Color def_value=0) { return _read_color(find_section(section), key, ret, def_value); }
/**
* Write Fl_String entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
// int set(const char *section, const char *key, const Fl_String &value) { return _write_string(create_section(section), key, value); }
/**
* Write const char *entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int set(const char *section, const char *key, const char *value) { return _write_string(create_section(section), key, value); }
/**
* Write long entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int set(const char *section, const char *key, const long value) { return _write_long(create_section(section), key, value); }
/**
* Write int entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int set(const char *section, const char *key, const int value) { return _write_int(create_section(section), key, value); }
/**
* Write float entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int set(const char *section, const char *key, const float value) { return _write_float(create_section(section), key, value); }
/**
* Write bool entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int set(const char *section, const char *key, const bool value) { return _write_double(create_section(section), key, value); }
/**
* Write Fl_Color entry to config. You must call flush() to sunc changes to file.
* Returns CONF_SUCCESS on success, otherwise errorcode.
* NOTE: section must be set as first parameter!
*
* @param section Section for entry
* @param key Key to entry.
* @param value value to set. if entry with 'key' exists, value is replaced.
*/
int set(const char *section, const char *key, const fltk::Color value) { return _write_color(create_section(section), key, value); }
private:
int m_error;
char* m_filename;
char *m_vendor, *m_app;
EDE_Config_Section *m_cur_sec;
bool m_changed;
//int _read_string(Fl_Config_Section *s, const char *key, Fl_String &ret, const char *def_value);
int _read_string(EDE_Config_Section *s, const char *key, char *ret, const char *def_value, int size);
int _read_string(EDE_Config_Section *s, const char *key, char *&ret, const char *def_value);
int _read_long (EDE_Config_Section *s, const char *key, long &ret, long def_value);
int _read_int (EDE_Config_Section *s, const char *key, int &ret, int def_value);
int _read_float (EDE_Config_Section *s, const char *key, float &ret, float def_value);
int _read_double(EDE_Config_Section *s, const char *key, double &ret, double def_value);
int _read_bool (EDE_Config_Section *s, const char *key, bool &ret, bool def_value);
int _read_color (EDE_Config_Section *s, const char *key, fltk::Color &ret, fltk::Color def_value);
//int _write_string(Fl_Config_Section *s, const char *key, const Fl_String &value);
int _write_string(EDE_Config_Section *s, const char *key, const char *value);
int _write_long (EDE_Config_Section *s, const char *key, const long value);
int _write_int (EDE_Config_Section *s, const char *key, const int value);
int _write_float (EDE_Config_Section *s, const char *key, const float value);
int _write_double(EDE_Config_Section *s, const char *key, const double value);
int _write_bool (EDE_Config_Section *s, const char *key, const bool value);
int _write_color (EDE_Config_Section *s, const char *key, const fltk::Color value);
};
// Backward compatibility...
static inline const char* ede_find_config_file(const char *filename, bool create=true) {
return EDE_Config::find_config_file(filename, create, EDE_Config::USER);
}
#endif

22
eworkpanel/Makefile Executable file
View File

@@ -0,0 +1,22 @@
CPPFILES = aboutdialog.cpp logoutdialog.cpp panelbutton.cpp keyboardchooser.cpp taskbutton.cpp workpanel.cpp item.cpp cpumonitor.cpp dock.cpp mainmenu.cpp mainmenu_scan.cpp
TARGET = eworkpanel
POFILES = locale/ru.po\
locale/sr.po\
locale/sk.po\
locale/hu.po\
include ../makeinclude
install:
$(INSTALL_PROGRAM) $(TARGET) $(bindir)
$(INSTALL_LOCALE)
uninstall:
$(RM) $(bindir)/$(TARGET)
clean:
$(RM) $(TARGET)
$(RM) *.o

12
eworkpanel/NLS.h Executable file
View File

@@ -0,0 +1,12 @@
// Native language support - under construction
// Copyright (c) 2000. - 2005. EDE Authors
// This program is licenced under terms of the
// GNU General Public Licence version 2 or newer.
// See COPYING for details.
#ifndef _NLS_H_
#define _NLS_H_
#define _(s) s
#endif

54
eworkpanel/aboutdialog.cpp Executable file
View File

@@ -0,0 +1,54 @@
// generated by Extended Fast Light User Interface Designer (eFluid) version 2.0003
#include "aboutdialog.h"
//#include <efltk/Fl_Locale.h>
#include "NLS.h"
#include <edeconf.h>
static fltk::Window* mAboutDialogWindow;
static void cb_OK(Fl_Button*, void*) {
mAboutDialogWindow->hide();
}
void AboutDialog(fltk::Widget*, void*) {
fltk::Window* w;
{fltk::Window* o = mAboutDialogWindow = new fltk::Window(355, 305, _("About Equinox Desktop Environment"));
w = o;
o->shortcut(0xff1b);
{fltk::Box* o = new fltk::Box(5, 10, 345, 35, _("Equinox Desktop Environment "PACKAGE_VERSION));
o->box(fltk::BORDER_FRAME);
o->label_font(fl_fonts+1);
o->color((fltk::Color)56);
o->label_color((Fl_Color)32);
o->label_size(16);
// o->align(FL_ALIGN_INSIDE|FL_ALIGN_WRAP);
}
{fltk::Box* o = new fltk::Box(5, 105, 345, 135, _(" This program is based in part on the work of FLTK project (www.fltk.org). Th\
is program is free software, you can redistribute it and/or modify it under th\
e terms of GNU General Public License as published by the Free Software Founda\
tion, either version 2 of the License, or (at your option) any later version. \
This program is distributed in the hope that it will be useful, but WITHOUT AN\
Y WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FO\
R A PARTICULAR PURPOSE. See the GNU General Public License for more details. Y\
ou should have received a copy of the GNU General Public Licence along with th\
is program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave,\
Cambridge, MA 02139, USA"));
o->label_size(10);
// o->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE|FL_ALIGN_WRAP);
}
{fltk::Button* o = new fltk::Button(270, 275, 80, 25, _("&OK"));
o->callback((fltk::Callback*)cb_OK);
// o->align(FL_ALIGN_WRAP);
}
new fltk::Divider(5, 260, 345, 15, _("label"));
{fltk::Box* o = new fltk::Box(5, 70, 345, 15, _("(C)Copyright 2000-2004 EDE Authors"));
o->label_size(10);
o->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE|FL_ALIGN_WRAP);
}
// o->set_modal();
o->end();
o->resizable(o);
}
mAboutDialogWindow->end();
mAboutDialogWindow->show();
}

44
eworkpanel/aboutdialog.fld Executable file
View File

@@ -0,0 +1,44 @@
# data file for the eFLTK User Interface Designer (eFLUID)
version 2.0003
images_dir ./
i18n
header_name {.h}
code_name {.cpp}
gridx 5
gridy 5
snap 3
decl {// Work Panel for EDE is (C) Copyright 2000-2002 by Martin Pekar and others, this program is provided under the terms of GNU GPL v.2, see file COPYING for more information.} {}
decl {\#include <efltk/Fl_Locale.h>} {}
Function {AboutDialog(Fl_Widget*, void*)} {open return_type void
} {
Fl_Window mAboutDialogWindow {
label {About Equinox Desktop Environment} open
private xywh {386 286 355 305} resizable modal visible
} {
Fl_Box {} {
label {Equinox Desktop Environment v1.0.1.1} selected
private xywh {5 10 345 35} align FL_ALIGN_INSIDE|FL_ALIGN_WRAP box BORDER_FRAME label_font 1 color 56 label_color 32 label_size 16
}
Fl_Box {} {
label { This program is based in part on the work of FLTK project (www.fltk.org). This program is free software, you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public Licence along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA}
private xywh {5 105 345 135} align FL_ALIGN_TOP|FL_ALIGN_INSIDE|FL_ALIGN_WRAP label_size 10
}
Fl_Button {} {
label {&OK}
callback {mAboutDialogWindow->hide();}
private xywh {270 275 80 25} align FL_ALIGN_WRAP
}
Fl_Divider {} {
label label
xywh {5 260 345 15}
}
Fl_Box {} {
label {(C)Copyright 2000-2004 EDE Authors}
private xywh {5 70 345 15} align FL_ALIGN_TOP|FL_ALIGN_INSIDE|FL_ALIGN_WRAP label_size 10
}
}
code {mAboutDialogWindow->end();
mAboutDialogWindow->show();} {}
}

22
eworkpanel/aboutdialog.h Executable file
View File

@@ -0,0 +1,22 @@
// generated by Extended Fast Light User Interface Designer (eFluid) version 2.0003
#ifndef _ABOUTDIALOG_H_
#define _ABOUTDIALOG_H_
/*#include <efltk/Fl.h>
#include <efltk/Fl_Locale.h>
#include <efltk/Fl_Window.h>
#include <efltk/Fl_Box.h>
#include <efltk/Fl_Button.h>
#include <efltk/Fl_Divider.h>*/
#include <fltk/Fl.h>
//#include <fltk/Locale.h>
#include <fltk/Window.h>
#include <fltk/Box.h>
#include <fltk/Button.h>
#include <fltk/Divider.h>
void AboutDialog(fltk::Widget*, void*);
#endif

390
eworkpanel/cpumonitor.cpp Executable file
View File

@@ -0,0 +1,390 @@
/*
* IceWM
*
* Copyright (C) 1998-2001 Marko Macek
*
* CPU Status
*
* For eWorkPanel by Mikko Lahteenmaki 2003
*/
#include "cpumonitor.h"
#include <limits.h>
#include <unistd.h>
#include <stdarg.h>
#include <ctype.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#if defined(linux)
//#include <linux/kernel.h>
#include <sys/sysinfo.h>
#endif
#ifdef HAVE_KSTAT_H
#include <kstat.h>
#endif
#if (defined(linux) || defined(HAVE_KSTAT_H))
#define UPDATE_INTERVAL .5f
void cpu_timeout_cb(void *d) {
((CPUMonitor*)d)->update_status();
fltk::repeat_timeout(UPDATE_INTERVAL, cpu_timeout_cb, d);
}
CPUMonitor::CPUMonitor()
: fltk::Widget(0,0,30,0)
{
box(fltk::THIN_DOWN_BOX);
//box(FL_BORDER_BOX);
m_draw_label = true;
m_samples = m_old_samples = -1;
cpu = 0;
colors[IWM_USER] = FL_RED;
colors[IWM_NICE] = FL_GREEN;
colors[IWM_SYS] = FL_DARK3;
colors[IWM_IDLE] = FL_NO_COLOR;
fltk::add_timeout(UPDATE_INTERVAL, cpu_timeout_cb, this);
}
CPUMonitor::~CPUMonitor() {
clear();
}
void CPUMonitor::clear()
{
if(!cpu) return;
for (int i=0; i < samples(); i++) {
delete cpu[i]; cpu[i] = 0;
}
delete cpu;
cpu = 0;
m_old_samples = -1;
}
void CPUMonitor::draw()
{
if(!cpu) {
fltk::push_clip(0,0,w(),h());
parent()->draw_group_box();
draw_frame();
fltk::pop_clip();
return;
}
if(colors[IWM_IDLE] == FL_NO_COLOR) {
fltk::push_clip(0,0,w(),h());
parent()->draw_group_box();
fltk::pop_clip();
}
draw_frame();
int n, h = height() - box()->dh();
int c=0;
for (int i=box()->dx(); i < samples()+box()->dx(); i++)
{
int user = cpu[c][IWM_USER];
int nice = cpu[c][IWM_NICE];
int sys = cpu[c][IWM_SYS];
int idle = cpu[c][IWM_IDLE];
int total = user + sys + nice + idle;
c++;
int y = height() - 1 - box()->dy();
if (total > 0)
{
if (sys) {
n = (h * (total - sys)) / total; // check rounding
if (n >= y) n = y;
if (n < 1) n = 1;
fltk::color(colors[IWM_SYS]);
fltk::line(i, y, i, n);
y = n - 1;
}
if (nice) {
n = (h * (total - sys - nice))/ total;
if (n >= y) n = y;
if (n < 1) n = 1;
fltk::color(colors[IWM_NICE]);
fltk::line(i, y, i, n);
y = n - 1;
}
if (user) {
n = (h * (total - sys - nice - user))/ total;
if (n >= y) n = y;
if (n < 1) n = 1;
fltk::color(colors[IWM_USER]);
fltk::line(i, y, i, n);
y = n - 1;
}
}
if (idle) {
if(colors[IWM_IDLE] != FL_NO_COLOR)
{
fltk::color(colors[IWM_IDLE]);
fltk::line(i, box()->dy(), i, y);
}
}
}
int cpu_percent = cpu[samples()-1][0]*2;
if(m_draw_label && cpu_percent<=100) {
char l[5];
strcpy(l, itoa(cpu_percent));
strcat(l, '%');
label(l);
draw_inside_label();
}
}
void CPUMonitor::layout()
{
label_size(h()/2);
w(h()*2);
m_samples = w() - box()->dw();
if(!cpu || m_old_samples != m_samples) {
clear();
cpu = new int*[m_samples];
for(int i=0; i < m_samples; i++) {
cpu[i] = new int[IWM_STATES];
cpu[i][IWM_USER] = cpu[i][IWM_NICE] = cpu[i][IWM_SYS] = 0;
cpu[i][IWM_IDLE] = 1;
}
last_cpu[IWM_USER] = last_cpu[IWM_NICE] = last_cpu[IWM_SYS] = last_cpu[IWM_IDLE] = 0;
update_status();
m_old_samples = m_samples;
}
fltk::Widget::layout();
}
void CPUMonitor::update_status()
{
if(!cpu) return;
for (int i=1; i < samples(); i++) {
cpu[i - 1][IWM_USER] = cpu[i][IWM_USER];
cpu[i - 1][IWM_NICE] = cpu[i][IWM_NICE];
cpu[i - 1][IWM_SYS] = cpu[i][IWM_SYS];
cpu[i - 1][IWM_IDLE] = cpu[i][IWM_IDLE];
}
get_cpu_info();
// Update tooltip
char load[255];
snprintf(load, sizeof(load)-1,
_("CPU Load:\n"
"User: %d%%\n"
"Nice: %d%%\n"
"Sys: %d%%\n"
"Idle: %d%%"),
cpu[samples()-1][0]*2, cpu[samples()-1][1]*2,
cpu[samples()-1][2]*2, cpu[samples()-1][3]*2);
tooltip(load);
redraw();
}
void CPUMonitor::get_cpu_info()
{
if(!cpu) return;
#ifdef linux
char *p, buf[128];
long cur[IWM_STATES];
int len, fd = open("/proc/stat", O_RDONLY);
cpu[samples()-1][IWM_USER] = 0;
cpu[samples()-1][IWM_NICE] = 0;
cpu[samples()-1][IWM_SYS] = 0;
cpu[samples()-1][IWM_IDLE] = 0;
if (fd == -1)
return;
len = read(fd, buf, sizeof(buf) - 1);
if (len != sizeof(buf) - 1) {
close(fd);
return;
}
buf[len] = 0;
p = buf;
while (*p && (*p < '0' || *p > '9'))
p++;
for (int i = 0; i < 4; i++) {
cur[i] = strtoul(p, &p, 10);
cpu[samples()-1][i] = cur[i] - last_cpu[i];
last_cpu[i] = cur[i];
}
close(fd);
#if 0
fprintf(stderr, "cpu: %d %d %d %d",
cpu[samples()-1][IWM_USER], cpu[samples()-1][IWM_NICE],
cpu[samples()-1][IWM_SYS], cpu[samples()-1][IWM_IDLE]);
#endif
#endif /* linux */
#ifdef HAVE_KSTAT_H
# ifdef HAVE_OLD_KSTAT
# define ui32 ul
#endif
static kstat_ctl_t *kc = NULL;
static kid_t kcid;
kid_t new_kcid;
kstat_t *ks = NULL;
kstat_named_t *kn = NULL;
int changed,change,total_change;
unsigned int thiscpu;
register int i,j;
static unsigned int ncpus;
static kstat_t **cpu_ks=NULL;
static cpu_stat_t *cpu_stat=NULL;
static long cp_old[CPU_STATES];
long cp_time[CPU_STATES], cp_pct[CPU_STATES];
/* Initialize the kstat */
if (!kc) {
kc = kstat_open();
if (!kc) {
perror("kstat_open ");
return;/* FIXME : need err handler? */
}
changed = 1;
kcid = kc->kc_chain_id;
fcntl(kc->kc_kd, F_SETFD, FD_CLOEXEC);
} else {
changed = 0;
}
/* Fetch the kstat data. Whenever we detect that the kstat has been
changed by the kernel, we 'continue' and restart this loop.
Otherwise, we break out at the end. */
while (1) {
new_kcid = kstat_chain_update(kc);
if (new_kcid) {
changed = 1;
kcid = new_kcid;
}
if (new_kcid < 0) {
perror("kstat_chain_update ");
return;/* FIXME : need err handler? */
}
if (new_kcid != 0)
continue; /* kstat changed - start over */
ks = kstat_lookup(kc, "unix", 0, "system_misc");
if (kstat_read(kc, ks, 0) == -1) {
perror("kstat_read ");
return;/* FIXME : need err handler? */
}
if (changed) {
/* the kstat has changed - reread the data */
thiscpu = 0; ncpus = 0;
kn = (kstat_named_t *)kstat_data_lookup(ks, "ncpus");
if ((kn) && (kn->value.ui32 > ncpus)) {
/* I guess I should be using 'new' here... FIXME */
ncpus = kn->value.ui32;
if ((cpu_ks = (kstat_t **)
realloc(cpu_ks, ncpus * sizeof(kstat_t *))) == NULL)
{
perror("realloc: cpu_ks ");
return;/* FIXME : need err handler? */
}
if ((cpu_stat = (cpu_stat_t *)
realloc(cpu_stat, ncpus * sizeof(cpu_stat_t))) == NULL)
{
perror("realloc: cpu_stat ");
return;/* FIXME : need err handler? */
}
}
for (ks = kc->kc_chain; ks; ks = ks->ks_next) {
if (strncmp(ks->ks_name, "cpu_stat", 8) == 0) {
new_kcid = kstat_read(kc, ks, NULL);
if (new_kcid < 0) {
perror("kstat_read ");
return;/* FIXME : need err handler? */
}
if (new_kcid != kcid)
break;
cpu_ks[thiscpu] = ks;
thiscpu++;
if (thiscpu > ncpus) {
fprintf(stderr, "kstat finds too many cpus: should be %d", ncpus);
return;/* FIXME : need err handler? */
}
}
}
if (new_kcid != kcid)
continue;
ncpus = thiscpu;
changed = 0;
}
for (i = 0; i<(int)ncpus; i++) {
new_kcid = kstat_read(kc, cpu_ks[i], &cpu_stat[i]);
if (new_kcid < 0) {
perror("kstat_read ");
return;/* FIXME : need err handler? */
}
}
if (new_kcid != kcid)
continue; /* kstat changed - start over */
else
break;
} /* while (1) */
/* Initialize the cp_time array */
for (i = 0; i < CPU_STATES; i++)
cp_time[i] = 0L;
for (i = 0; i < (int)ncpus; i++) {
for (j = 0; j < CPU_STATES; j++)
cp_time[j] += (long) cpu_stat[i].cpu_sysinfo.cpu[j];
}
/* calculate the percent utilization for each category */
/* cpu_state calculations */
total_change = 0;
for (i = 0; i < CPU_STATES; i++) {
change = cp_time[i] - cp_old[i];
if (change < 0) /* The counter rolled over */
change = (int) ((unsigned long)cp_time[i] - (unsigned long)cp_old[i]);
cp_pct[i] = change;
total_change += change;
cp_old[i] = cp_time[i]; /* copy the data for the next run */
}
/* this percent calculation isn't really needed, since the repaint
routine takes care of this... */
for (i = 0; i < CPU_STATES; i++)
cp_pct[i] =
((total_change > 0) ?
((int)(((1000.0 * (float)cp_pct[i]) / total_change) + 0.5)) :
((i == CPU_IDLE) ? (1000) : (0)));
/* OK, we've got the data. Now copy it to cpu[][] */
cpu[samples()-1][IWM_USER] = cp_pct[CPU_USER];
cpu[samples()-1][IWM_NICE] = cp_pct[CPU_WAIT];
cpu[samples()-1][IWM_SYS] = cp_pct[CPU_KERNEL];
cpu[samples()-1][IWM_IDLE] = cp_pct[CPU_IDLE];
#endif /* have_kstat_h */
}
#endif

57
eworkpanel/cpumonitor.h Executable file
View File

@@ -0,0 +1,57 @@
#ifndef _CPUMONITOR_H_
#define _CPUMONITOR_H_
#include <edeconf.h>
#if (defined(linux) || defined(HAVE_KSTAT_H))
#ifdef HAVE_KSTAT_H
#include <kstat.h>
#include <sys/sysinfo.h>
#endif /* have_kstat_h */
enum {
IWM_USER = 0,
IWM_NICE,
IWM_SYS,
IWM_IDLE,
IWM_STATES
};
/*#include <efltk/Fl_Widget.h>
#include <efltk/Fl_Locale.h>
#include <efltk/fl_draw.h>
#include <efltk/Fl.h>*/
#include <fltk/Widget.h>
#include <fltk/draw.h>
#include <fltk/Fl.h>*/
class CPUMonitor : public fltk::Widget {
public:
CPUMonitor();
virtual ~CPUMonitor();
void clear();
void update_status();
void get_cpu_info();
virtual void draw();
virtual void layout();
virtual void preferred_size(int &w, int &h) { w=this->w(); }
int samples() const { return m_samples; }
private:
bool m_draw_label;
int m_old_samples;
int m_samples;
int **cpu;
long last_cpu[IWM_STATES];
fltk::Color colors[IWM_STATES];
};
#endif
#endif

40
eworkpanel/dock.cpp Executable file
View File

@@ -0,0 +1,40 @@
#include "dock.h"
//#include <efltk/Fl.h>
#include <fltk/Fl.h>
Dock::Dock()
: fltk::Group(0,0,0,0)
{
//box(FL_THIN_DOWN_BOX);
color(FL_INVALID_COLOR); //Draw with parent color
layout_align(FL_ALIGN_RIGHT);
layout_spacing(1);
end();
}
void Dock::add_to_tray(Fl_Widget *w)
{
insert(*w, 0);
w->layout_align(FL_ALIGN_LEFT);
w->show();
int new_width = this->w() + w->width() + layout_spacing();
this->w(new_width);
parent()->relayout();
fltk::redraw();
}
void Dock::remove_from_tray(Fl_Widget *w)
{
remove(w);
int new_width = this->w() - w->width() - layout_spacing();
this->w(new_width);
parent()->relayout();
fltk::redraw();
}

16
eworkpanel/dock.h Executable file
View File

@@ -0,0 +1,16 @@
#ifndef _DOCK_H_
#define _DOCK_H_
//#include <efltk/Fl_Group.h>
#include <fltk/Group.h>
class Dock : public fltk::Group
{
public:
Dock();
void add_to_tray(fltk::Widget *w);
void remove_from_tray(fltk::Widget *w);
};
#endif

170
eworkpanel/icons/about.xpm Executable file
View File

@@ -0,0 +1,170 @@
/* XPM */
static char * about_xpm[] = {
"16 16 151 2",
" c None",
". c #939393",
"+ c #818181",
"@ c #7E7E7E",
"# c #797878",
"$ c #A2A2A2",
"% c #ACACAC",
"& c #BFBFBF",
"* c #9E9E9E",
"= c #8E8E8E",
"- c #707070",
"; c #4D4D4D",
"> c #323031",
", c #999999",
"' c #FAFAFA",
") c #FFFFFF",
"! c #D3D3D3",
"~ c #888888",
"{ c #C2C2C2",
"] c #C1C1C1",
"^ c #515251",
"/ c #343232",
"( c #535353",
"_ c #C3C3C3",
": c #FBFBFC",
"< c #CCCCCF",
"[ c #9D9DA0",
"} c #EFEFF1",
"| c #1A1A1A",
"1 c #737373",
"2 c #2B2B2B",
"3 c #ABABAB",
"4 c #EAEAEB",
"5 c #E5E5DE",
"6 c #7F7F74",
"7 c #808177",
"8 c #C0BFB4",
"9 c #F4F4F3",
"0 c #AEAFAF",
"a c #070707",
"b c #373536",
"c c #3B3B3B",
"d c #191919",
"e c #5B5B5B",
"f c #B5B5BB",
"g c #D4D4AA",
"h c #F5F651",
"i c #FCF646",
"j c #FADE71",
"k c #C6C4C4",
"l c #2D2D2E",
"m c #000000",
"n c #353535",
"o c #161616",
"p c #040404",
"q c #666666",
"r c #E0E0E1",
"s c #EAEBEC",
"t c #FDFB93",
"u c #FBDD43",
"v c #E2D3BC",
"w c #E1E1E6",
"x c #080808",
"y c #272727",
"z c #282828",
"A c #090909",
"B c #FCFCFC",
"C c #FBFBFD",
"D c #F9F8F5",
"E c #ECE4D4",
"F c #DFE0E4",
"G c #E4E3E3",
"H c #D6D6D6",
"I c #545454",
"J c #121212",
"K c #1D1D1D",
"L c #3A3939",
"M c #141313",
"N c #4B4B4B",
"O c #E4E4E4",
"P c #EDEDED",
"Q c #F5F5F5",
"R c #F7F7F9",
"S c #F2F3F7",
"T c #E9E9E9",
"U c #DADADA",
"V c #CACACA",
"W c #282728",
"X c #171717",
"Y c #2A2828",
"Z c #151415",
"` c #7A7A7A",
" . c #DEDEDE",
".. c #EEEEEE",
"+. c #F0F0F0",
"@. c #EBEBEB",
"#. c #E0E0E0",
"$. c #CCCCCC",
"%. c #B4B4B4",
"&. c #8F9090",
"*. c #454545",
"=. c #808080",
"-. c #D1D1D1",
";. c #DCDCDC",
">. c #E6E6E6",
",. c #D2D2D2",
"'. c #BDBDBD",
"). c #A5A5A5",
"!. c #3E3D3D",
"~. c #898989",
"{. c #C5C6C5",
"]. c #D0D0D0",
"^. c #D9D9D9",
"/. c #ADADAD",
"(. c #7D7E7E",
"_. c #A8A9B4",
":. c #BFC1CA",
"<. c #C6C9CC",
"[. c #C6C6C6",
"}. c #BEBEBE",
"|. c #ACADB0",
"1. c #97989B",
"2. c #818187",
"3. c #4B4C56",
"4. c #C6C379",
"5. c #D5C989",
"6. c #C9BCA4",
"7. c #BAB9BA",
"8. c #B1B1B0",
"9. c #B4B39D",
"0. c #C2C4AD",
"a. c #BDBF93",
"b. c #988C45",
"c. c #FCE35C",
"d. c #FFEB66",
"e. c #FFC846",
"f. c #F99635",
"g. c #D47C49",
"h. c #877F7C",
"i. c #7F7E79",
"j. c #D9AC5D",
"k. c #FDC27A",
"l. c #FAB96C",
"m. c #EE973D",
"n. c #AE5333",
"o. c #895E38",
"p. c #81432A",
"q. c #7C3D37",
"r. c #764033",
"s. c #6A2922",
"t. c #662E2E",
" . + @ # ",
" $ % & * = - ; > ",
" , ' ) ! ~ { ] ^ / ",
" ( _ ) : < [ } ) { | ",
" 1 2 3 4 5 6 7 8 9 0 a b ",
" c d e f g h i j k l m n ",
" o p q r s t u v w @ x y ",
" z m A _ B C D E F G H I J K ",
"L M p N O P Q R S T U V ~ W X Y ",
" Z ` .O ..+.@.#.$.%.&.*. ",
" n =.-.;.O >.#.,.'.).~ !. ",
" ~.{.].^.^.,._ /., (. ",
" _.:.<.[.}.|.1.2.3. ",
" 4.5.6.7.8.9.0.a.b. ",
" c.d.e.f.g.h.i.j.k.l.m.n. ",
" o.p.q. r.s.t. "};

19
eworkpanel/icons/clean.xpm Executable file
View File

@@ -0,0 +1,19 @@
/* XPM */
static char * clean_xpm[] = {
"16 15 1 1",
" c None",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};

208
eworkpanel/icons/desktop.xpm Executable file
View File

@@ -0,0 +1,208 @@
/* XPM */
static char * desktop_xpm[] = {
"16 16 189 2",
" c None",
". c #80AADB",
"+ c #89B2E2",
"@ c #83AFE2",
"# c #7CABE2",
"$ c #74A8E2",
"% c #6DA4E2",
"& c #65A0E2",
"* c #609EE2",
"= c #5E9CE2",
"- c #5E9DE2",
"; c #65A0E4",
"> c #4299E6",
", c #003458",
"' c #8BB3E2",
") c #ADD4FF",
"! c #93C7FF",
"~ c #74B8FF",
"{ c #51A7FF",
"] c #2F95FF",
"^ c #0F86FF",
"/ c #007AFF",
"( c #0074FF",
"_ c #0075FF",
": c #0076FF",
"< c #007DFC",
"[ c #003656",
"} c #91B5E1",
"| c #CDE1F8",
"1 c #C2DBF8",
"2 c #B9D7F8",
"3 c #AFD2F8",
"4 c #A4CDF8",
"5 c #9AC8F8",
"6 c #92C5F8",
"7 c #8EC3F8",
"8 c #8DC2F8",
"9 c #8BC2F8",
"0 c #8AC1F8",
"a c #92C5FA",
"b c #5FB1F4",
"c c #003257",
"d c #9CBCE2",
"e c #FDFEFD",
"f c #F7FFFF",
"g c #F6FFFF",
"h c #F6FBFD",
"i c #F5FBFD",
"j c #F3FCFD",
"k c #F1FAFD",
"l c #EEF9FD",
"m c #EBF8FD",
"n c #E9F7FD",
"o c #F0FBFE",
"p c #8FC9F1",
"q c #003056",
"r c #FCFFFF",
"s c #F7DCBA",
"t c #F6C892",
"u c #F1E0C7",
"v c #F0FFFF",
"w c #EEFDFF",
"x c #E7F7FF",
"y c #E7F9FF",
"z c #E6FAFF",
"A c #E2F8FF",
"B c #E0F8FF",
"C c #E3F6FF",
"D c #84C4F2",
"E c #9BBCE2",
"F c #F9FFFF",
"G c #F6A94B",
"H c #F97700",
"I c #F6BD73",
"J c #BFCFD5",
"K c #B3B9BD",
"L c #E8FBFF",
"M c #C0CCD2",
"N c #A6ACB0",
"O c #A9B1B5",
"P c #A7AFB3",
"Q c #D5E7F1",
"R c #85C8F7",
"S c #9ABCE2",
"T c #F4BE7A",
"U c #F7982B",
"V c #F1CA95",
"W c #D8EDF2",
"X c #D4E2EA",
"Y c #E1F6FF",
"Z c #D4E6F1",
"` c #C9DBE6",
" . c #C8DCE8",
".. c #C6DCE7",
"+. c #D7EFFB",
"@. c #82C4F3",
"#. c #9ABBE2",
"$. c #F4FDFF",
"%. c #ECF9FF",
"&. c #E9F9FF",
"*. c #E6F8FF",
"=. c #E4F7FF",
"-. c #DDF2FF",
";. c #DCF3FF",
">. c #DAF4FF",
",. c #D6F3FF",
"'. c #D5F3FF",
"). c #D8F2FF",
"!. c #7FC2F2",
"~. c #99BBE2",
"{. c #F1FBFF",
"]. c #E9F8FF",
"^. c #E6F9FF",
"/. c #DAF1FF",
"(. c #D9F2FF",
"_. c #D6F4FF",
":. c #D3F2FF",
"<. c #D1F1FF",
"[. c #D5F1FF",
"}. c #7EC2F2",
"|. c #98BBE2",
"1. c #EDFEFF",
"2. c #F0BD7A",
"3. c #F6992B",
"4. c #EBC795",
"5. c #D1EAF2",
"6. c #CDDFEA",
"7. c #CCE3F1",
"8. c #C2D9E6",
"9. c #C1DAE8",
"0. c #C0D9E7",
"a. c #CFEBFB",
"b. c #7DC3F3",
"c. c #EAFFFF",
"d. c #F3A84B",
"e. c #FE7900",
"f. c #F0BA73",
"g. c #B5CBD5",
"h. c #ABB6BD",
"i. c #D7F5FF",
"j. c #B6C8D2",
"k. c #A1AAB0",
"l. c #A3AEB5",
"m. c #A1ADB3",
"n. c #C7E2F1",
"o. c #7EC4F7",
"p. c #97BBE2",
"q. c #E9FBFF",
"r. c #E8D7BA",
"s. c #EAC492",
"t. c #E2DBC7",
"u. c #DAF7FF",
"v. c #D8F4FF",
"w. c #D1EFFF",
"x. c #D1F0FF",
"y. c #CFF1FF",
"z. c #CCF1FF",
"A. c #C9F0FF",
"B. c #CDEFFF",
"C. c #7AC0F2",
"D. c #003156",
"E. c #9FBEE4",
"F. c #EFFCFF",
"G. c #E6FCFF",
"H. c #E1FFFF",
"I. c #E0FAFF",
"J. c #DEF3FF",
"K. c #DBF3FF",
"L. c #D4F0FF",
"M. c #D2EFFF",
"N. c #CFEFFF",
"O. c #CDEEFF",
"P. c #D5F2FF",
"Q. c #81C4F5",
"R. c #64A9E4",
"S. c #8BC8F3",
"T. c #87C6F2",
"U. c #86C5F2",
"V. c #83C4F2",
"W. c #81C3F2",
"X. c #80C3F2",
"Y. c #7CC1F2",
"Z. c #7AC1F2",
"`. c #81C5F5",
" + c #54B4F6",
".+ c #00375F",
"++ c #003358",
"@+ c #00375E",
"#+ c #001A2B",
". + @ # $ % & * = - - - ; > , ",
"' ) ! ~ { ] ^ / ( _ _ _ : < [ ",
"} | 1 2 3 4 5 6 7 8 9 0 a b c ",
"d e f g g h i j k l m n o p q ",
"d r s t u v w x y z A B C D q ",
"E F G H I J K L M N O P Q R q ",
"S g T U V W X Y Z ` ...+.@.q ",
"#.$.%.&.*.*.=.-.;.>.,.'.).!.q ",
"~.{.].^.C C Y /.(._.:.<.[.}.q ",
"|.1.2.3.4.5.6.).7.8.9.0.a.b.q ",
"|.c.d.e.f.g.h.i.j.k.l.m.n.o.q ",
"p.q.r.s.t.u.v.w.x.y.z.A.B.C.D. ",
"E.F.G.H.I.J.K.).L.M.N.O.P.Q.D. ",
"R.S.T.U.D V.W.X.}.Y.Y.Z.`. +.+ ",
"++q q q q q q q q q q q q @+#+ ",
" "};

76
eworkpanel/icons/ede-small.xpm Executable file
View File

@@ -0,0 +1,76 @@
/* XPM */
static char * ede_small2_xpm[] = {
"16 16 57 1",
" c None",
". c #002F78",
"+ c #002C77",
"@ c #002E78",
"# c #003079",
"$ c #00367B",
"% c #003179",
"& c #002B76",
"* c #003D7D",
"= c #004E84",
"- c #082775",
"; c #002A76",
"> c #003E7E",
", c #005285",
"' c #082072",
") c #081C6F",
"! c #081F71",
"~ c #003B7D",
"{ c #3F8299",
"] c #005486",
"^ c #082675",
"/ c #085887",
"( c #081D70",
"_ c #082975",
": c #081169",
"< c #004D83",
"[ c #608F9F",
"} c #002D77",
"| c #003F7E",
"1 c #257694",
"2 c #13678E",
"3 c #082574",
"4 c #082172",
"5 c #11648C",
"6 c #2B7995",
"7 c #004480",
"8 c #085B89",
"9 c #397F98",
"0 c #004681",
"a c #081A6F",
"b c #196C8F",
"c c #005586",
"d c #085988",
"e c #082474",
"f c #082373",
"g c #003D7E",
"h c #307C97",
"i c #081C70",
"j c #00387C",
"k c #1D7091",
"l c #11668D",
"m c #207392",
"n c #005185",
"o c #004581",
"p c #004580",
"q c #00347A",
"r c #082A76",
"..++++++++++++@.",
".#$$$$$$$$$$$$%.",
"&* =-",
";> ,-",
";> ,')!~{ ]^",
";> /(@._:< [>&",
";> _}+'|1 2_^#",
";> 34%5 6$',7+",
";> -8 904ab c^",
";> de^@' ,^",
";> 2ff@.3g ,^",
";> h.i'ij ,^",
";> klm ,^",
";g n^",
"@%7opppo0oppopq@",
"..r___________@."};

316
eworkpanel/icons/ede_small.xpm Executable file
View File

@@ -0,0 +1,316 @@
/* XPM */
static char * ede_small_xpm[] = {
"54 15 298 2",
" c None",
". c #4A484A",
"+ c #454345",
"@ c #000000",
"# c #996523",
"$ c #3A332A",
"% c #706D70",
"& c #282726",
"* c #434243",
"= c #E7EEDE",
"- c #E4EDDA",
"; c #E3ECD7",
"> c #E2EBD6",
", c #DFE9D3",
"' c #DDE8CF",
") c #D9E5CA",
"! c #C4CEB8",
"~ c #791818",
"{ c #7D1616",
"] c #7E1617",
"^ c #7F1617",
"/ c #801717",
"( c #7F1717",
"_ c #7A1515",
": c #671314",
"< c #675E5E",
"[ c #410E92",
"} c #4C12AB",
"| c #5314B9",
"1 c #5A1BBF",
"2 c #5E1FC1",
"3 c #6428C3",
"4 c #6931C4",
"5 c #6D37C4",
"6 c #713FBE",
"7 c #8D5F22",
"8 c #603A08",
"9 c #030303",
"0 c #050504",
"a c #131313",
"b c #DDE8D0",
"c c #DBE6CD",
"d c #D4DFC6",
"e c #CAD4BE",
"f c #CFDBC0",
"g c #D2DDC4",
"h c #D3E0C2",
"i c #D2E0C1",
"j c #8C2727",
"k c #912625",
"l c #912423",
"m c #922726",
"n c #8B2727",
"o c #5211B8",
"p c #5718BD",
"q c #5E26B7",
"r c #5C2CA9",
"s c #532A95",
"t c #1B132B",
"u c #404040",
"v c #2F2E2F",
"w c #787578",
"x c #494749",
"y c #0E0E0E",
"z c #4C4B4C",
"A c #D4E1C3",
"B c #33362F",
"C c #2F312C",
"D c #3E413A",
"E c #953738",
"F c #993738",
"G c #943839",
"H c #903636",
"I c #983637",
"J c #873637",
"K c #5C1FBC",
"L c #6124C2",
"M c #612CB7",
"N c #7B7B7B",
"O c #F9E445",
"P c #A5A3A5",
"Q c #2F2F2F",
"R c #3B3B3B",
"S c #CCDCB9",
"T c #CBDCB8",
"U c #A24B4B",
"V c #A44949",
"W c #984C4E",
"X c #9E4B4B",
"Y c #A44A4A",
"Z c #A24A4A",
"` c #642CBC",
" . c #6930C4",
".. c #6D39BF",
"+. c #4A4C4A",
"@. c #949295",
"#. c #E2DEE2",
"$. c #3E3D3E",
"%. c #0F0F0F",
"&. c #353435",
"*. c #C3D3AF",
"=. c #C5D6AF",
"-. c #C1D5AA",
";. c #AA5C5C",
">. c #AB5A5A",
",. c #A35D5C",
"'. c #AA5959",
"). c #AC5B5B",
"!. c #6D39C1",
"~. c #743DC8",
"{. c #7845C9",
"]. c #7D7C7D",
"^. c #757275",
"/. c #817F81",
"(. c #757475",
"_. c #121212",
":. c #191919",
"<. c #343334",
"[. c #BCD0A4",
"}. c #BBD2A2",
"|. c #B9D09E",
"1. c #BACF9E",
"2. c #B6CE9A",
"3. c #B6CB9A",
"4. c #ACC290",
"5. c #A4BA87",
"6. c #96AB7B",
"7. c #B16B6C",
"8. c #B3696A",
"9. c #AC6E6E",
"0. c #B46A6A",
"a. c #7243BC",
"b. c #7C49CC",
"c. c #8352CF",
"d. c #8659CD",
"e. c #8B60CE",
"f. c #9169D2",
"g. c #966FD1",
"h. c #9B75D5",
"i. c #9F7DD5",
"j. c #A19DA1",
"k. c #6F6C6F",
"l. c #A9A7A9",
"m. c #E2DFE2",
"n. c #2C2B2C",
"o. c #010101",
"p. c #1E1D1C",
"q. c #2A2A2B",
"r. c #1F1F1F",
"s. c #B5CC97",
"t. c #B2CB95",
"u. c #AEC790",
"v. c #899C70",
"w. c #90A477",
"x. c #A1B784",
"y. c #AEC391",
"z. c #ADC390",
"A. c #A9C289",
"B. c #B97C7D",
"C. c #BD7E7E",
"D. c #B97E7E",
"E. c #BD7C7C",
"F. c #BB7A7B",
"G. c #8E63D1",
"H. c #8658CF",
"I. c #8B5FD0",
"J. c #8962C8",
"K. c #616061",
"L. c #F4F0F4",
"M. c #9E9D9E",
"N. c #CCC9CC",
"O. c #F6F3F6",
"P. c #212021",
"Q. c #4A494B",
"R. c #232323",
"S. c #AEC68E",
"T. c #ABC689",
"U. c #9CB27F",
"V. c #3E4731",
"W. c #4C583D",
"X. c #C48F8F",
"Y. c #C68F8E",
"Z. c #C09191",
"`. c #C58E8D",
" + c #936BD3",
".+ c #777677",
"++ c #E7E3E7",
"@+ c #878587",
"#+ c #B3B0B2",
"$+ c #FCF8FC",
"%+ c #171717",
"&+ c #ADAAAD",
"*+ c #878687",
"=+ c #A4C17E",
"-+ c #A2BF7D",
";+ c #899F6B",
">+ c #CDA0A0",
",+ c #CDA1A1",
"'+ c #CDA2A2",
")+ c #CD9FA0",
"!+ c #A07DD7",
"~+ c #9871D5",
"{+ c #9C78D6",
"]+ c #676667",
"^+ c #AFABAF",
"/+ c #F6F2F6",
"(+ c #6C6A6C",
"_+ c #282728",
":+ c #C1BDC1",
"<+ c #BAB7BA",
"[+ c #060606",
"}+ c #9BBB73",
"|+ c #9ABA71",
"1+ c #7B955B",
"2+ c #D6B1B1",
"3+ c #D7B0B0",
"4+ c #D4B2B2",
"5+ c #D1ADAE",
"6+ c #D6AFAF",
"7+ c #D7B2B1",
"8+ c #A382D8",
"9+ c #515051",
"0+ c #CAC6C9",
"a+ c #BEBABE",
"b+ c #585558",
"c+ c #C4C0C4",
"d+ c #CECACE",
"e+ c #252525",
"f+ c #020202",
"g+ c #93B668",
"h+ c #92B566",
"i+ c #91B365",
"j+ c #DFC3C4",
"k+ c #DBC3C3",
"l+ c #DCC0C1",
"m+ c #BFA6A8",
"n+ c #A888DA",
"o+ c #AC8FDD",
"p+ c #4A4848",
"q+ c #ACA9AB",
"r+ c #B3B0B3",
"s+ c #CCC8CC",
"t+ c #D4D0D4",
"u+ c #464546",
"v+ c #080808",
"w+ c #575557",
"x+ c #8DB05F",
"y+ c #8AAE5B",
"z+ c #8AAE5A",
"A+ c #86AC55",
"B+ c #85AB53",
"C+ c #84AA52",
"D+ c #83AA51",
"E+ c #82A74F",
"F+ c #81A451",
"G+ c #E8D3D4",
"H+ c #E9D3D4",
"I+ c #E9D4D5",
"J+ c #DDCACB",
"K+ c #B094DE",
"L+ c #B69CE1",
"M+ c #BAA2E2",
"N+ c #C0AAE4",
"O+ c #C6B1E6",
"P+ c #CBB9E7",
"Q+ c #D0C0E9",
"R+ c #D4C5EC",
"S+ c #525352",
"T+ c #6C6B6C",
"U+ c #626263",
"V+ c #4E4D4E",
"W+ c #4C4C4C",
"X+ c #818081",
"Y+ c #535253",
"Z+ c #101010",
"`+ c #222122",
" @ c #393839",
".@ c #6B8844",
"+@ c #79994C",
"@@ c #7FA34E",
"#@ c #80A54D",
"$@ c #7B9D4D",
"%@ c #D0C5C4",
"&@ c #D0C6C5",
"*@ c #D1C6C5",
"=@ c #C1B8B6",
"-@ c #8B8181",
";@ c #B59EDA",
">@ c #BBA4DE",
",@ c #AE9ACC",
"'@ c #545354",
")@ c #59585A",
"!@ c #858485",
"~@ c #838183",
"{@ c #6D6B6D",
"]@ c #595959",
"^@ c #312C38",
"/@ c #43404B",
" . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ",
" # $ % & * @ = = - ; > , ' ) ! @ @ ~ { ] ^ / ( _ : @ < @ [ } | 1 2 3 4 5 6 @ ",
" 7 8 9 0 @ a @ b b c d e f g h i @ @ j k l k k k k m n @ @ o p 2 q r s s s s t ",
" u v w x y z @ b A h @ B C D @ @ @ @ E F G @ @ @ H F I J @ @ K L M @ @ @ @ @ @ @ ",
" N O O P Q R @ b S T @ @ U V W @ @ X Y Z @ @ ` ...@ ",
" +.@.O #.$.%.&.v @ *.=.-.@ @ @ @ @ @ @ @ ;.>.,.@ @ '.).@ @ !.~.{.@ @ @ @ @ @ @ ",
" ].^./.O (._.9 :.<. @ [.}.|.1.2.3.4.5.6.@ @ 7.8.9.@ @ 8.0.@ @ a.b.c.d.e.f.g.h.i.@ ",
" j.k.l.m.n.o.p.q.r. @ s.t.u.v.w.x.y.z.A.@ @ B.C.D.@ @ E.F.@ @ G.H.I.J.e.e.e.e.e.@ ",
" K.L.M.N.O.P.9 k.Q.y R. @ S.T.U.@ @ @ @ V.W.@ @ X.Y.Z.@ @ Y.`.@ @ G.G. +@ @ @ @ @ @ @ ",
" .+++@+#+$+<.%+&+*+@ %+ @ =+-+;+@ @ >+,+'+@ @ )+,+@ @ !+~+{+@ ",
" ]+^+ /./+(+_+:+<+[+%. @ }+|+1+@ @ 2+3+4+@ @ 5+6+7+@ @ !+!+8+@ ",
" 9+0+a+b+c+d+e+f+ @ g+h+i+@ @ @ @ @ @ @ @ j+j+k+@ @ @ l+j+j+m+@ @ !+n+o+@ @ @ @ @ @ @ ",
" p+q+r+s+t+u+v+w+ @ x+y+z+A+B+C+D+E+F+@ @ G+H+I+H+H+H+H+H+J+@ @ !+K+L+M+N+O+P+Q+R+@ ",
" S+T+U+V+W+X+Y+Z+`+ @ @ .@.@.@.@.@+@@@#@$@@ @ %@%@&@&@&@*@=@-@@ @ !+;@>@,@N+N+N+N+N+@ ",
" '@)@!@~@{@]@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ^@/@@ @ @ @ @ @ @ "};

150
eworkpanel/icons/favourites.xpm Executable file
View File

@@ -0,0 +1,150 @@
/* XPM */
static char * favourites_xpm[] = {
"16 15 132 2",
" c None",
". c #EDCFD2",
"+ c #F3E6E9",
"@ c #FEE0E0",
"# c #FED2D0",
"$ c #EDB0B2",
"% c #DE6062",
"& c #F1CDCD",
"* c #F3CECE",
"= c #F6D2D2",
"- c #ECCACA",
"; c #DBA2A7",
"> c #F0C0C2",
", c #FEEDED",
"' c #FEE2E2",
") c #FECFCF",
"! c #FEBDBF",
"~ c #FEB3B3",
"{ c #FD9595",
"] c #DB5F62",
"^ c #FBB0B1",
"/ c #FEA7A7",
"( c #FEACAB",
"_ c #FEB9B9",
": c #FEC8C9",
"< c #FED3D3",
"[ c #FEDDDE",
"} c #FEDBDB",
"| c #FED2D2",
"1 c #FEC6C6",
"2 c #FEB7B7",
"3 c #FEA8A9",
"4 c #FE9C9C",
"5 c #FA6C6B",
"6 c #F78282",
"7 c #FE7E7E",
"8 c #FE8988",
"9 c #FEADAE",
"0 c #FEBABA",
"a c #FEC9CA",
"b c #FEC7C7",
"c c #FEC4C4",
"d c #FEAFAE",
"e c #FE9A9A",
"f c #FE7374",
"g c #FC4949",
"h c #9D5054",
"i c #FB5756",
"j c #FE7475",
"k c #FE8484",
"l c #FE9393",
"m c #FEA1A1",
"n c #FEABAB",
"o c #FEB7B8",
"p c #FEB4B4",
"q c #FEA4A5",
"r c #FE8A89",
"s c #FE6969",
"t c #FE4A4A",
"u c #FC3738",
"v c #A33F41",
"w c #FD4748",
"x c #FE6A6A",
"y c #FE7777",
"z c #FE8586",
"A c #FE9292",
"B c #FE9B9B",
"C c #FEA2A3",
"D c #FEA3A4",
"E c #FE8F8F",
"F c #FE7979",
"G c #FE6363",
"H c #FE5757",
"I c #FA3535",
"J c #9A5053",
"K c #F32D2F",
"L c #FE5C5C",
"M c #FE6565",
"N c #FE7171",
"O c #FE7B7C",
"P c #FE8181",
"Q c #FE8383",
"R c #FE7C7B",
"S c #FE7272",
"T c #FF9500",
"U c #FE5454",
"V c #FE4545",
"W c #F73E3D",
"X c #7E2A2B",
"Y c #E03E3E",
"Z c #FE4B4B",
"` c #FE5C5D",
" . c #FE6D6D",
".. c #FE7373",
"+. c #FE6B6C",
"@. c #FE4C4D",
"#. c #6A2324",
"$. c #B56767",
"%. c #F13A3A",
"&. c #FE5352",
"*. c #FE5A59",
"=. c #FE6161",
"-. c #FE6665",
";. c #FFFF1A",
">. c #FFC600",
",. c #CC4040",
"'. c #FE4D4C",
"). c #FE5353",
"!. c #FE5857",
"~. c #FE5959",
"{. c #FFFF5D",
"]. c #FFFF8C",
"^. c #FFFFB6",
"/. c #BF4948",
"(. c #F74A4A",
"_. c #FE4747",
":. c #FD4647",
"<. c #FD4A4B",
"[. c #FE4A4B",
"}. c #FFFFCC",
"|. c #5A292A",
"1. c #B24949",
"2. c #F84848",
"3. c #FE3D3E",
"4. c #F83738",
"5. c #A43D3D",
"6. c #D44F4F",
"7. c #9A3837",
"8. c #EC2525",
"9. c #75302F",
"0. c #8F3A3B",
"a. c #BF4242",
" . + @ # $ % ",
" & * = - ; > , ' ) ! ~ { ] ",
" ^ / ( _ : < [ } | 1 2 3 4 5 ",
"6 7 8 4 9 0 1 a b c 0 d e f g h ",
"i j k l m n ~ 2 o p q r s t u v ",
"w x y z A B C D 4 E F G H t I J ",
"K L M N O P k Q R S T T U V W X ",
"Y Z ` M ...y T T +.T T @.T T #.",
"$.%.&.*.=.-.T ;.>.T ;.;.T >.;.T ",
" ,.V '.).!.~.T {.].^.^.].{.T ",
" /.(._.:.<.[.T >.}.}.>.T |. ",
" 1.2.3.4.T {.].^.^.].{.T ",
" 5.6.T ;.>.T ;.;.T >.;.T ",
" 7.T T 8.T T T T ",
" 9.0.a.T T "};

88
eworkpanel/icons/file.xpm Executable file
View File

@@ -0,0 +1,88 @@
/* XPM */
static char * file_xpm[] = {
"16 16 69 1",
" c None",
". c #C6C6D5",
"+ c #9494AD",
"@ c #FBFBFC",
"# c #F8F8FA",
"$ c #F4F4F7",
"% c #EEEEF2",
"& c #EAEAF0",
"* c #DEDEE7",
"= c #E0E0E9",
"- c #C1C8D5",
"; c #BEC5D3",
"> c #BBC1CF",
", c #B8BFCE",
"' c #AFB5C7",
") c #C9C9D7",
"! c #F5F5F8",
"~ c #F0F0F4",
"{ c #E4E4EB",
"] c #C0C7D4",
"^ c #BBC2D0",
"/ c #B9C0CE",
"( c #B3B9CA",
"_ c #DBDBE5",
": c #CDCDDA",
"< c #BFBFD0",
"[ c #F7F7F9",
"} c #F2F2F6",
"| c #E7E7EE",
"1 c #E3E3EA",
"2 c #D0D0DC",
"3 c #C4C4D3",
"4 c #C2C2D1",
"5 c #FAFAFB",
"6 c #BDC3D1",
"7 c #B4BACB",
"8 c #AEB4C7",
"9 c #9EA3B9",
"0 c #9BA1B6",
"a c #F9F9FA",
"b c #DCDCE5",
"c c #D6D6E1",
"d c #D2D2DE",
"e c #D1D1DD",
"f c #CECEDB",
"g c #BCC3D1",
"h c #B6BDCD",
"i c #B0B7C7",
"j c #AAB0C3",
"k c #AAAFC2",
"l c #A6ACBF",
"m c #A5ABBF",
"n c #E5E5EC",
"o c #DFDFE8",
"p c #DDDDE6",
"q c #DADAE4",
"r c #D7D7E2",
"s c #B5BBCB",
"t c #B1B8C8",
"u c #ADB3C6",
"v c #A9AFC1",
"w c #EFEFF3",
"x c #E8E8EE",
"y c #E6E6ED",
"z c #B6BCCC",
"A c #B2B8C9",
"B c #ABB1C3",
"C c #F3F3F6",
"D c #E1E1E9",
" ........+ ",
" .@#$%&*=.+ ",
" .@-;>,'=.)+ ",
" .@#!~%{=++++ ",
" .@];^/(=_:<+ ",
" .@[!}~|1234+ ",
" .5];6>7890.+ ",
" .a$}%&bcdef+ ",
" .!g^hijklmd+ ",
" .!$%n1opqrc+ ",
" .[^s(t8ujvc+ ",
" .[wxy{=obqr+ ",
" .$z7(AiuBkr+ ",
" .Cx|n{Do_qr+ ",
" .~xxyt8obqr+ ",
" ++++++++++++ "};

205
eworkpanel/icons/find.xpm Executable file
View File

@@ -0,0 +1,205 @@
/* XPM */
static char * find_xpm[] = {
"16 16 186 2",
" c None",
". c #71A0D1",
"+ c #7FACD8",
"@ c #79A5D0",
"# c #719FC8",
"$ c #6293BE",
"% c #90BBE5",
"& c #B1D5F2",
"* c #E4F7FF",
"= c #F6FDFF",
"- c #F7FFFF",
"; c #ECF8FF",
"> c #A4CAE2",
", c #346386",
"' c #8FBAE4",
") c #DCF4FF",
"! c #FBFFFF",
"~ c #FBFCFF",
"{ c #F4FAFF",
"] c #EBF7FF",
"^ c #E7F4FF",
"/ c #E9FAFF",
"( c #BAE3FD",
"_ c #13446B",
": c #719FD0",
"< c #B7D7F2",
"[ c #F7FEFF",
"} c #F7FCFF",
"| c #F1F9FF",
"1 c #EBF6FF",
"2 c #E4F3FF",
"3 c #DDEFFE",
"4 c #CAE5FD",
"5 c #C3E7FF",
"6 c #528AB6",
"7 c #85AFD9",
"8 c #EFFCFF",
"9 c #F7FBFF",
"0 c #EEF7FF",
"a c #EAF6FE",
"b c #E6F3FE",
"c c #DFF0FE",
"d c #CDE5FD",
"e c #B4D9FC",
"f c #B8DBFF",
"g c #A8D4FE",
"h c #003258",
"i c #76A4D0",
"j c #E5F6FF",
"k c #EAF5FF",
"l c #E6F3FF",
"m c #E2F1FE",
"n c #D4E9FE",
"o c #BFDDFC",
"p c #B0D3FB",
"q c #ABD0FA",
"r c #AFD2FD",
"s c #97C3F4",
"t c #002F52",
"u c #699FCF",
"v c #C5E8FF",
"w c #C3E1FD",
"x c #C4E1FE",
"y c #C1DDFC",
"z c #AFD2FB",
"A c #A8CCFA",
"B c #A5C8F9",
"C c #A1C3F8",
"D c #A3C2FA",
"E c #91BBF9",
"F c #003157",
"G c #325881",
"H c #8FC0ED",
"I c #BCDEFF",
"J c #AED2FC",
"K c #ABCEFA",
"L c #A6C8F9",
"M c #9FC0F8",
"N c #98B9F7",
"O c #91B1F5",
"P c #96B4FF",
"Q c #2F67A1",
"R c #000C16",
"S c #618ABF",
"T c #4B7EAC",
"U c #B6DBFF",
"V c #B3D2FF",
"W c #A2C4F8",
"X c #9BBCF8",
"Y c #91B0F6",
"Z c #89A6F5",
"` c #8AA2FD",
" . c #5F8AF0",
".. c #54879C",
"+. c #8B7F00",
"@. c #ABCCFF",
"#. c #758492",
"$. c #3A6FA2",
"%. c #6EA0DB",
"&. c #A4C3FF",
"*. c #93B2FE",
"=. c #88A5FD",
"-. c #7895F6",
";. c #386CC4",
">. c #586674",
",. c #F5FC73",
"'. c #FCE56A",
"). c #754200",
"!. c #A1C6FF",
"~. c #F8F8FD",
"{. c #95A1AD",
"]. c #214561",
"^. c #1E5A90",
"/. c #195287",
"(. c #175189",
"_. c #134783",
":. c #1A2628",
"<. c #C0710D",
"[. c #DCA026",
"}. c #DBC095",
"|. c #E6C07B",
"1. c #774500",
"2. c #A1C5FE",
"3. c #F6FAFF",
"4. c #E8EEFD",
"5. c #B4C2DE",
"6. c #77859B",
"7. c #5D697A",
"8. c #596679",
"9. c #5D6A7D",
"0. c #5372A1",
"a. c #22170E",
"b. c #854B0C",
"c. c #C08330",
"d. c #E2C692",
"e. c #E5BF7B",
"f. c #784700",
"g. c #F0F6FE",
"h. c #DDEAFF",
"i. c #CDDEFF",
"j. c #C4D7F9",
"k. c #BCD0F1",
"l. c #B3CAF1",
"m. c #B8CDF2",
"n. c #83B2F8",
"o. c #89510C",
"p. c #E1C694",
"q. c #E3BC75",
"r. c #7E4C01",
"s. c #A6C9FF",
"t. c #F1F6FF",
"u. c #D9E7FF",
"v. c #D1E2FF",
"w. c #CFE1FF",
"x. c #CCE0FF",
"y. c #C2D9FF",
"z. c #C7DEFF",
"A. c #8ABBFF",
"B. c #0F3162",
"C. c #874F09",
"D. c #C88C3C",
"E. c #C39748",
"F. c #B3700D",
"G. c #A4C7FE",
"H. c #EDF4FE",
"I. c #D6E4FE",
"J. c #CDDEFE",
"K. c #C9DCFE",
"L. c #C7DBFE",
"M. c #BDD6FE",
"N. c #C3DAFF",
"O. c #87B8FF",
"P. c #0E3162",
"Q. c #844F0D",
"R. c #925B19",
"S. c #623901",
"T. c #4988E5",
"U. c #5691E5",
"V. c #528EE5",
"W. c #508CE3",
"X. c #508BE3",
"Y. c #4F8BE3",
"Z. c #4D8AE3",
"`. c #4F8BE4",
" + c #478DF3",
".+ c #241400",
" . + @ # $ ",
" % & * = - ; > , ",
" ' ) ! ~ { ] ^ / ( _ ",
": < [ } | 1 2 3 4 5 6 ",
"7 8 9 0 a b c d e f g h ",
"i j k l m n o p q r s t ",
"u v w x y z A B C D E F ",
"G H I J K L M N O P Q R ",
"S T U V W X Y Z ` ...+. ",
"@.#.$.%.&.*.=.-.;.>.,.'.). ",
"!.~.{.].^./.(._.:.<.[.}.|.1. ",
"2.3.4.5.6.7.8.9.0.a.b.c.d.e.f. ",
"2.g.h.i.j.k.l.m.n. o.c.p.q.r.",
"s.t.u.v.w.x.y.z.A.B. C.D.E.F.",
"G.H.I.J.K.L.M.N.O.P. Q.R.S.",
"T.U.V.W.X.Y.Z.`. + .+ "};

138
eworkpanel/icons/help.xpm Executable file
View File

@@ -0,0 +1,138 @@
/* XPM */
static char * help_xpm[] = {
"16 16 119 2",
" c None",
". c #724700",
"+ c #774800",
"@ c #856D3C",
"# c #985817",
"$ c #8E6106",
"% c #8C5E00",
"& c #6A4C19",
"* c #797A7B",
"= c #D0D4DB",
"- c #EEF5F5",
"; c #EBB3B2",
"> c #ED2423",
", c #D51E23",
"' c #9A2423",
") c #C6CFD7",
"! c #FFFFFF",
"~ c #FFDBDB",
"{ c #FF6767",
"] c #FF6A6A",
"^ c #F95354",
"/ c #D52A2D",
"( c #4B3000",
"_ c #6A4500",
": c #C9343A",
"< c #FFBABB",
"[ c #DEDEDE",
"} c #949999",
"| c #735959",
"1 c #7E2020",
"2 c #B03E3E",
"3 c #F76868",
"4 c #FA8989",
"5 c #DBC5C7",
"6 c #583600",
"7 c #7F5902",
"8 c #751E21",
"9 c #FF2828",
"0 c #FF4F4F",
"a c #BE8B8B",
"b c #E9D8D8",
"c c #B1B4B9",
"d c #7B4F0E",
"e c #CB262C",
"f c #FF4A4A",
"g c #DE3232",
"h c #7D8080",
"i c #FBFBFB",
"j c #EAECF0",
"k c #8A795C",
"l c #823E0E",
"m c #EB2626",
"n c #FF4B4B",
"o c #901414",
"p c #DEE3E3",
"q c #FBFFFF",
"r c #9F9B8C",
"s c #EA6867",
"t c #FD7E7E",
"u c #6D2020",
"v c #C7A6A6",
"w c #FDE0E0",
"x c #917675",
"y c #EAE9E6",
"z c #717171",
"A c #CD3333",
"B c #FF7373",
"C c #8C1F20",
"D c #8F6A26",
"E c #D5D8DC",
"F c #A1A2A2",
"G c #E44242",
"H c #F86D70",
"I c #95321F",
"J c #875603",
"K c #9B9A9B",
"L c #FCFCFE",
"M c #E9EDED",
"N c #B61C1C",
"O c #FA6666",
"P c #D65E63",
"Q c #703E15",
"R c #835000",
"S c #DEE4E7",
"T c #FBECEC",
"U c #D94C4C",
"V c #730808",
"W c #B3AEAE",
"X c #F39393",
"Y c #FD7778",
"Z c #823135",
"` c #493100",
" . c #E68788",
".. c #EF3F3F",
"+. c #D11818",
"@. c #BA3F3F",
"#. c #BDBEBE",
"$. c #DEE0E0",
"%. c #F8FAFA",
"&. c #FCFFFF",
"*. c #A47177",
"=. c #644100",
"-. c #BA5960",
";. c #EF7A7D",
">. c #FD6B6D",
",. c #FD9595",
"'. c #FAFCFD",
"). c #F8FBFE",
"!. c #DADDE2",
"~. c #868A8F",
"{. c #5E3E00",
"]. c #8B492D",
"^. c #A14336",
"/. c #9A5655",
"(. c #A29E96",
"_. c #9E937C",
":. c #6E5935",
"<. c #472C00",
"[. c #643F00",
" . + @ # $ % ",
" & * = - ; > , ' ",
" ) ! ! ! ~ { ] ^ / ( ",
"_ : < ! [ } | 1 2 3 4 5 6 ",
"7 8 9 0 a b ! c ",
"d e f g h i j k ",
"l m n o p q r ",
" s t u v w x ",
" y ! z A B C ",
"D E ! F G H I ",
"J K L M N O P Q ",
"R S T U V W X Y Z ` ",
" .] ..+.@.#.$.%.&.*. =. ",
" -.;.>.,.'.).!.~. ",
" ( {. ].^./.(._.:.<.[. ",
" "};

164
eworkpanel/icons/keyboard.xpm Executable file
View File

@@ -0,0 +1,164 @@
/* XPM */
static char * keyboard_xpm[] = {
"16 16 145 2",
" c None",
". c #5071B8",
"+ c #B9CBF5",
"@ c #E2ECFC",
"# c #4D6497",
"$ c #B7FBFA",
"% c #ACEBFA",
"& c #A9CCED",
"* c #F5F5FF",
"= c #F3F5FF",
"- c #C7D8FE",
"; c #465D92",
"> c #A3D2C3",
", c #ADEEE0",
"' c #B4F4E6",
") c #B4FFFD",
"! c #ADFAED",
"~ c #B1E4D7",
"{ c #D8E8EF",
"] c #DDE4FF",
"^ c #A1BDFD",
"/ c #324778",
"( c #7DCBB1",
"_ c #8BE8BD",
": c #92F7E7",
"< c #95FAF2",
"[ c #92F2E0",
"} c #89E1B7",
"| c #78D69D",
"1 c #6FCA96",
"2 c #B6D5E8",
"3 c #A3BDFF",
"4 c #90B0F8",
"5 c #2D4274",
"6 c #35C36D",
"7 c #6CE3C4",
"8 c #6EF8FC",
"9 c #70F9FF",
"0 c #6DE1C4",
"a c #66D196",
"b c #60CE98",
"c c #2CB87D",
"d c #3FA685",
"e c #9EB9FF",
"f c #89ABFD",
"g c #799CEC",
"h c #1B2E5A",
"i c #1FB789",
"j c #02C093",
"k c #31E1F3",
"l c #4BEAFF",
"m c #4EE6F9",
"n c #4CCE95",
"o c #45C47B",
"p c #2DB974",
"q c #09A044",
"r c #118E5C",
"s c #89A8E6",
"t c #8FB0FE",
"u c #7498EA",
"v c #6183D2",
"w c #00B1BC",
"x c #00B9A0",
"y c #00BFA4",
"z c #0BCFFF",
"A c #13CDF7",
"B c #13B762",
"C c #0BAB37",
"D c #009F30",
"E c #00903C",
"F c #1080A5",
"G c #88A1D3",
"H c #99B8FF",
"I c #759AEB",
"J c #6387D9",
"K c #5D81D4",
"L c #06A6F8",
"M c #00AB94",
"N c #00A92D",
"O c #00B694",
"P c #00BCF2",
"Q c #00B4D6",
"R c #00A675",
"S c #009528",
"T c #008462",
"U c #1272BA",
"V c #91A5CE",
"W c #A3C0FF",
"X c #7EA2F4",
"Y c #6589DC",
"Z c #4968B1",
"` c #45A7E6",
" . c #0095B6",
".. c #009E35",
"+. c #00A34E",
"@. c #00ABE1",
"#. c #00A8FF",
"$. c #0099B0",
"%. c #008430",
"&. c #006C79",
"*. c #2368A7",
"=. c #A0AFD1",
"-. c #AFC8FF",
";. c #86A8F8",
">. c #5270B4",
",. c #0D86C5",
"'. c #008844",
"). c #0093A6",
"!. c #0095E8",
"~. c #008FE1",
"{. c #0082A4",
"]. c #006D6B",
"^. c #0055A0",
"/. c #5B7EA7",
"(. c #BAC7E5",
"_. c #BBD2FF",
":. c #7995D2",
"<. c #097067",
"[. c #0073BC",
"}. c #0074C8",
"|. c #0070C3",
"1. c #0061B4",
"2. c #0050A4",
"3. c #3E6EA5",
"4. c #AEB6C7",
"5. c #D5E2FF",
"6. c #95ABD9",
"7. c #182646",
"8. c #1D6199",
"9. c #175EA3",
"0. c #12589D",
"a. c #4174A9",
"b. c #7D91AA",
"c. c #B6BCC7",
"d. c #DFE8F7",
"e. c #A5B6D9",
"f. c #192848",
"g. c #5D7B9F",
"h. c #D4D9E1",
"i. c #F0F4FC",
"j. c #B7C5E3",
"k. c #243458",
"l. c #92B0F2",
"m. c #ABBBD7",
"n. c #28385C",
" . ",
" + @ # ",
" $ % & * = - ; ",
" > , ' ) ! ~ { ] ^ / ",
" ( _ : < [ } | 1 2 3 4 5 ",
" 6 7 8 9 0 a b c d e f g h ",
"i j k l m n o p q r s t u v ",
"w x y z A B C D E F G H I J K ",
"L M N O P Q R S T U V W X Y Z ",
"` ...+.@.#.$.%.&.*.=.-.;.>. ",
" ,.'.).!.~.{.].^./.(._.:. ",
" <.[.}.|.1.2.3.4.5.6.7. ",
" 8.9.0.a.b.c.d.e.f. ",
" g.h.i.j.k. ",
" l.m.n. ",
" "};

165
eworkpanel/icons/lock.xpm Executable file
View File

@@ -0,0 +1,165 @@
/* XPM */
static char * lock_xpm[] = {
"16 16 146 2",
" c None",
". c #006495",
"+ c #2D81AA",
"@ c #267CA6",
"# c #247CA6",
"$ c #237BA4",
"% c #1F7BA4",
"& c #1A78A5",
"* c #1777A2",
"= c #1677A2",
"- c #1275A0",
"; c #1577A2",
"> c #006395",
", c #227DA6",
"' c #9EC2D8",
") c #238FB9",
"! c #2D93BD",
"~ c #2E93BD",
"{ c #2593BD",
"] c #3792BE",
"^ c #4694BE",
"/ c #5295C0",
"( c #5999BF",
"_ c #5E99C2",
": c #6B9CC3",
"< c #90ABC9",
"[ c #086F9E",
"} c #9CC0D8",
"| c #006BA4",
"1 c #0078AA",
"2 c #007BAE",
"3 c #007CAF",
"4 c #2491BE",
"5 c #59A6CC",
"6 c #63A9CD",
"7 c #3F8FBB",
"8 c #3B88B5",
"9 c #458CB6",
"0 c #4C8FBA",
"a c #5590BB",
"b c #85A7C7",
"c c #006396",
"d c #2A80AA",
"e c #3797BD",
"f c #0077AA",
"g c #007EB1",
"h c #007FB1",
"i c #6FBAD9",
"j c #FFFFFF",
"k c #71A8C9",
"l c #5090BB",
"m c #5992BB",
"n c #6095BC",
"o c #78A0C5",
"p c #06719F",
"q c #2B92BD",
"r c #2C93BF",
"s c #ECFCFF",
"t c #7DB5D4",
"u c #85B6D5",
"v c #659BC0",
"w c #5F95BC",
"x c #679ABD",
"y c #7DA1C4",
"z c #006C9E",
"A c #0B80B2",
"B c #9ECEE6",
"C c #539AC2",
"D c #418AB6",
"E c #4A8FB8",
"F c #8FBBD8",
"G c #99BED9",
"H c #659ABD",
"I c #729CC2",
"J c #7CA2C3",
"K c #006A9C",
"L c #027DB1",
"M c #2382B3",
"N c #68ABCE",
"O c #A7D0E7",
"P c #BCD7EB",
"Q c #92BAD4",
"R c #6E9BC0",
"S c #769EBE",
"T c #7FA4C7",
"U c #006B9C",
"V c #1A7FB2",
"W c #3B90BB",
"X c #FBFFFF",
"Y c #EEF9FF",
"Z c #739CBE",
"` c #7FA4C5",
" . c #80A6C7",
".. c #00699C",
"+. c #2683B3",
"@. c #6EACCE",
"#. c #CAE4F3",
"$. c #B4D4E9",
"%. c #B9D5E9",
"&. c #BFD9EB",
"*. c #7BA1C4",
"=. c #85A8C6",
"-. c #85ABCA",
";. c #006799",
">. c #3086B4",
",. c #77AECF",
"'. c #82B2D2",
"). c #C6DAEC",
"!. c #7EA6C5",
"~. c #91AECA",
"{. c #7EACCC",
"]. c #006499",
"^. c #7EB1D0",
"/. c #89B3D2",
"(. c #C9DDEE",
"_. c #88AAC9",
":. c #95B2CC",
"<. c #81B1CE",
"[. c #006399",
"}. c #5F99C2",
"|. c #F6FFFF",
"1. c #ECF8FF",
"2. c #EFF9FF",
"3. c #F0FAFF",
"4. c #8CAFCA",
"5. c #9DB6D0",
"6. c #89B6D2",
"7. c #006296",
"8. c #649AC0",
"9. c #4D8FBA",
"0. c #DEEFFB",
"a. c #F1FBFF",
"b. c #F3FCFF",
"c. c #DBE9F6",
"d. c #93B3CE",
"e. c #A7BED4",
"f. c #89B6D1",
"g. c #006397",
"h. c #91ABCA",
"i. c #A4BDD3",
"j. c #D5D4E3",
"k. c #3797BF",
"l. c #87B5D1",
"m. c #9DBFD8",
"n. c #3596BF",
"o. c #005F95",
" . + @ # $ % & * = - ; > ",
" , ' ) ! ~ { ] ^ / ( _ : < [ ",
". } | 1 2 3 4 5 6 7 8 9 0 a b c ",
"d e f g h i j j j j k l m n o p ",
"@ q 2 h r j s t u j j v w x y z ",
"# ~ 3 A B j C D E F j G H I J K ",
"$ { L M N O D E l m P Q R S T U ",
"% ] V W X j j j j j j Y Z ` ...",
"& ^ +.@.j #.$.%.P &.Y j *.=.-.;.",
"* / >.,.j '.m w H R ).j !.~.{.].",
"= ( 8 ^.j /.w H R Z (.j _.:.<.[.",
"- }.9 '.j |.1.Y 2.3.j j 4.5.6.7.",
"; 8.9.v 0.1.Y 2.3.a.b.c.d.e.f.g.",
"> h.a n x I S ` =.~.:.5.i.j.k.> ",
" [ b o y J T .-.{.<.l.m.n.o. ",
" c p z K U ..;.].[.7.7.> "};

25
eworkpanel/icons/logout.xpm Executable file
View File

@@ -0,0 +1,25 @@
/* XPM */
static char * logout_xpm[] = {
"16 16 6 1",
" c None",
". c #8B8B8B",
"+ c #7F7F7F",
"@ c #296FC4",
"# c #4C4C4C",
"$ c #7E7E7E",
" ",
" ",
" ...........+ ",
" .@@@@@@@@@@+# ",
" .@@@@@@@@@@+# ",
" .@@@@@@@@@@+# ",
" .@@@@@@@@@@+# ",
" .@@@@@@@@@@+# ",
" .@@@@@@@@@@+# ",
" .@@@@@@@@@@+# ",
" +++$++++++++# ",
" ###.+++##### ",
" .+++# ",
" .+++++++# ",
" ",
" "};

124
eworkpanel/icons/mini_penguin.xpm Executable file
View File

@@ -0,0 +1,124 @@
/* XPM */
static char * mini_penguin_xpm[] = {
"15 15 106 2",
" c None",
". c #4A484A",
"+ c #454345",
"@ c #996523",
"# c #3A332A",
"$ c #706D70",
"% c #282726",
"& c #434243",
"* c #8D5F22",
"= c #603A08",
"- c #030303",
"; c #050504",
"> c #000000",
", c #131313",
"' c #404040",
") c #2F2E2F",
"! c #787578",
"~ c #494749",
"{ c #0E0E0E",
"] c #4C4B4C",
"^ c #7B7B7B",
"/ c #F8F4F8",
"( c #F7F4F7",
"_ c #A5A3A5",
": c #2F2F2F",
"< c #3B3B3B",
"[ c #4A4C4A",
"} c #949295",
"| c #FFFBFF",
"1 c #E2DEE2",
"2 c #3E3D3E",
"3 c #0F0F0F",
"4 c #353435",
"5 c #7D7C7D",
"6 c #757275",
"7 c #817F81",
"8 c #F3EFF3",
"9 c #757475",
"0 c #121212",
"a c #191919",
"b c #343334",
"c c #A19DA1",
"d c #6F6C6F",
"e c #A9A7A9",
"f c #E2DFE2",
"g c #2C2B2C",
"h c #010101",
"i c #1E1D1C",
"j c #2A2A2B",
"k c #1F1F1F",
"l c #616061",
"m c #F4F0F4",
"n c #9E9D9E",
"o c #CCC9CC",
"p c #F6F3F6",
"q c #212021",
"r c #4A494B",
"s c #232323",
"t c #777677",
"u c #E7E3E7",
"v c #878587",
"w c #B3B0B2",
"x c #FCF8FC",
"y c #171717",
"z c #ADAAAD",
"A c #878687",
"B c #676667",
"C c #AFABAF",
"D c #F6F2F6",
"E c #6C6A6C",
"F c #282728",
"G c #C1BDC1",
"H c #BAB7BA",
"I c #060606",
"J c #515051",
"K c #CAC6C9",
"L c #BEBABE",
"M c #585558",
"N c #C4C0C4",
"O c #CECACE",
"P c #252525",
"Q c #020202",
"R c #4A4848",
"S c #ACA9AB",
"T c #B3B0B3",
"U c #CCC8CC",
"V c #D4D0D4",
"W c #464546",
"X c #080808",
"Y c #575557",
"Z c #525352",
"` c #6C6B6C",
" . c #626263",
".. c #4E4D4E",
"+. c #4C4C4C",
"@. c #818081",
"#. c #535253",
"$. c #101010",
"%. c #222122",
"&. c #393839",
"*. c #545354",
"=. c #59585A",
"-. c #858485",
";. c #838183",
">. c #6D6B6D",
",. c #595959",
" . + ",
" @ # $ % & ",
" * = - ; > , ",
" ' ) ! ~ { ] ",
" ^ / ( _ : < ",
" [ } | 1 2 3 4 ) ",
" 5 6 7 8 9 0 - a b ",
" c d e f g h i j k ",
" l m n o p q - d r { s ",
" t u v w x b y z A > y ",
" B C 7 D E F G H I 3 ",
" J K L M N O P Q ",
" R S T U V W X Y ",
" Z ` ...+.@.#.$.%.&. ",
" *.=.-.;.>.,. "};

199
eworkpanel/icons/panel.xpm Executable file
View File

@@ -0,0 +1,199 @@
/* XPM */
static char * panel_xpm[] = {
"16 16 180 2",
" c None",
". c #C2D4D4",
"+ c #D4E0DD",
"@ c #DAE4DD",
"# c #D6E6E7",
"$ c #A0C0E0",
"% c #799BBF",
"& c #7EA0C1",
"* c #83A5C7",
"= c #8DAECE",
"- c #99B9D5",
"; c #B4D0E8",
"> c #BDD6EB",
", c #C1DEF6",
"' c #6A97CD",
") c #4A85D7",
"! c #3272CD",
"~ c #2063C1",
"{ c #175BB5",
"] c #1455A9",
"^ c #105098",
"/ c #79A1CD",
"( c #CEECFF",
"_ c #6989AF",
": c #469D2C",
"< c #5EC647",
"[ c #41942B",
"} c #33592C",
"| c #94A9AD",
"1 c #97BBE2",
"2 c #629AE3",
"3 c #5695F2",
"4 c #3C81E9",
"5 c #2A72DF",
"6 c #1C65D1",
"7 c #0D55BA",
"8 c #3371BE",
"9 c #C6E2FE",
"0 c #9FC3E8",
"a c #559D36",
"b c #8AD768",
"c c #89D968",
"d c #70D657",
"e c #5FBF51",
"f c #3972A0",
"g c #68A0F3",
"h c #5D9BF0",
"i c #4085E7",
"j c #2D76DD",
"k c #1D66CE",
"l c #185EBD",
"m c #92B8E5",
"n c #CBEAFF",
"o c #597692",
"p c #56A136",
"q c #548A47",
"r c #7C9F61",
"s c #9CB054",
"t c #86D155",
"u c #7B9B51",
"v c #5086CF",
"w c #69A1F1",
"x c #498BE9",
"y c #337ADF",
"z c #1A64CD",
"A c #6C9EDC",
"B c #D9F1FF",
"C c #95B9E2",
"D c #509435",
"E c #72A867",
"F c #8CC064",
"G c #93CB67",
"H c #86CE58",
"I c #A9B655",
"J c #3268A7",
"K c #5B97EA",
"L c #5997ED",
"M c #397FE1",
"N c #3A7CD8",
"O c #C1DBF7",
"P c #C2E3FF",
"Q c #556E8F",
"R c #52902E",
"S c #8EB256",
"T c #73C153",
"U c #79C15C",
"V c #A0CF6A",
"W c #A5B04F",
"X c #2960A0",
"Y c #3781E6",
"Z c #4D90ED",
"` c #3E84E3",
" . c #92BBEE",
".. c #D6EFFF",
"+. c #82A9D6",
"@. c #418928",
"#. c #62AB57",
"$. c #7BB955",
"%. c #638E56",
"&. c #81C651",
"*. c #ABB550",
"=. c #5D83AA",
"-. c #3E87E9",
";. c #277AEA",
">. c #4F90E8",
",. c #CBE3FA",
"'. c #A3CEFF",
"). c #42628D",
"!. c #2F8114",
"~. c #48AA2D",
"{. c #5B9B41",
"]. c #449D35",
"^. c #7EC451",
"/. c #A3B253",
"(. c #778790",
"_. c #A3C8F5",
":. c #63A4F6",
"<. c #A6CAF6",
"[. c #C1E0FE",
"}. c #5695E5",
"|. c #2D423A",
"1. c #2C7E0F",
"2. c #41A723",
"3. c #537F3D",
"4. c #518A41",
"5. c #70B84B",
"6. c #213A0C",
"7. c #4A5B6F",
"8. c #9AB5D2",
"9. c #B4D5F9",
"0. c #6DA5F4",
"a. c #619CDB",
"b. c #313B27",
"c. c #2D800F",
"d. c #5BB136",
"e. c #5C8E3F",
"f. c #54943D",
"g. c #67AC44",
"h. c #3A4641",
"i. c #929997",
"j. c #AAABA8",
"k. c #A4B0B8",
"l. c #A0C8F6",
"m. c #A3C8F8",
"n. c #B7D9F8",
"o. c #596C76",
"p. c #287010",
"q. c #53A42F",
"r. c #6DB546",
"s. c #71AE50",
"t. c #82A2AD",
"u. c #DEF1FF",
"v. c #EDFCFF",
"w. c #EAF9FF",
"x. c #E5F3FD",
"y. c #C2DFF9",
"z. c #96C6FC",
"A. c #7FBFFF",
"B. c #2E4B5F",
"C. c #214512",
"D. c #38831C",
"E. c #419624",
"F. c #5C7982",
"G. c #B5D4F4",
"H. c #CDE9FF",
"I. c #D2E8FC",
"J. c #C0E0FE",
"K. c #A7D5FF",
"L. c #7CADDC",
"M. c #4D739E",
"N. c #25303B",
"O. c #1F400F",
"P. c #4C5D71",
"Q. c #97BCE5",
"R. c #C1E5FF",
"S. c #9FC4DB",
"T. c #5B7A92",
"U. c #252B30",
"V. c #415678",
"W. c #2C3134",
" . + @ ",
" # $ % & & * = - ; > ",
" , ' ) ! ~ { ] ^ / ( _ ",
": < [ } | 1 2 3 4 5 6 7 8 9 0 ",
"a b c d e f g h i j k l m n o ",
"p q r s t u v w x y z A B C ",
"D E F G H I J K L M N O P Q ",
"R S T U V W X Y Z ` ...+. ",
"@.#.$.%.&.*.=.-.;.>.,.'.). ",
"!.~.{.].^./.(._.:.<.[.}.|. ",
"1.2.3.4.5.6. 7.8.9.0.a.b. ",
"c.d.e.f.g.h.i.j.k.l.m.n.o. ",
" p.q.r.s.t.u.v.w.x.y.z.A.B. ",
" C.D.E.F.G.H.I.J.K.L.M.N. ",
" O. P.Q.R.S.T.U. ",
" V.W. "};

358
eworkpanel/icons/penguin.xpm Executable file
View File

@@ -0,0 +1,358 @@
/* XPM */
static char * penguin_xpm[] = {
"32 32 323 2",
" c None",
". c #A5A5A5",
"+ c #727272",
"@ c #555555",
"# c #6B6B6B",
"$ c #7D7D7D",
"% c #A4A4A4",
"& c #A7A7A7",
"* c #848484",
"= c #868686",
"- c #979797",
"; c #999999",
"> c #959595",
", c #8B8B8B",
"' c #737373",
") c #757575",
"! c #808080",
"~ c #777777",
"{ c #A2A2A2",
"] c #A0A0A0",
"^ c #9C9C9C",
"/ c #969696",
"( c #909090",
"_ c #898989",
": c #838383",
"< c #767676",
"[ c #3F3F3F",
"} c #616161",
"| c #ADADAD",
"1 c #EAEAEA",
"2 c #F4F4F4",
"3 c #B9B9B9",
"4 c #929292",
"5 c #8D8D8D",
"6 c #878787",
"7 c #7E7E7E",
"8 c #747474",
"9 c #6A6A6A",
"0 c #636363",
"a c #292929",
"b c #474747",
"c c #575757",
"d c #6F6F6F",
"e c #A3A3A3",
"f c #EBEBEB",
"g c #FCFCFC",
"h c #FEFEFE",
"i c #F5F5F5",
"j c #BCBCBC",
"k c #858585",
"l c #7F7F7F",
"m c #7A7A7A",
"n c #7B7B7B",
"o c #6C6C6C",
"p c #424242",
"q c #000000",
"r c #4A4A4A",
"s c #6D6D6D",
"t c #444444",
"u c #E0E0E0",
"v c #FDFDFD",
"w c #FFFFFF",
"x c #FBFBFB",
"y c #989898",
"z c #E2E2E2",
"A c #F3F3F3",
"B c #E8E8E8",
"C c #B5B5B5",
"D c #1B1B1B",
"E c #010101",
"F c #6E6E6E",
"G c #212121",
"H c #5B5B5B",
"I c #BABABA",
"J c #F2F2F2",
"K c #F9F9F9",
"L c #FAFAFA",
"M c #B4B4B4",
"N c #ECECEC",
"O c #F8F8F8",
"P c #0B0B0B",
"Q c #3A3A3A",
"R c #EEEEEE",
"S c #F7F7F7",
"T c #BBBBBB",
"U c #C2C2C2",
"V c #8F8F8F",
"W c #ABABAB",
"X c #CBCBCB",
"Y c #040404",
"Z c #535353",
"` c #060606",
" . c #464646",
".. c #4C4C4C",
"+. c #D0D0D0",
"@. c #E1E1E1",
"#. c #EFEFEF",
"$. c #696969",
"%. c #656565",
"&. c #565656",
"*. c #F1F1F1",
"=. c #BFBFBF",
"-. c #050505",
";. c #101010",
">. c #7E7D7D",
",. c #5E5E5E",
"'. c #030303",
"). c #3D3D3D",
"!. c #434343",
"~. c #CDCDCD",
"{. c #D9D9D9",
"]. c #DFDFDF",
"^. c #9B9B9B",
"/. c #676767",
"(. c #E6E6E6",
"_. c #D1D1D1",
":. c #919191",
"<. c #020202",
"[. c #070707",
"}. c #0D0D0D",
"|. c #363536",
"1. c #242424",
"2. c #C1C1C1",
"3. c #CACACA",
"4. c #F3F370",
"5. c #FEFE55",
"6. c #FEFE57",
"7. c #FEFE53",
"8. c #FEFE4F",
"9. c #FFF043",
"0. c #FAD554",
"a. c #D5D5D5",
"b. c #080808",
"c. c #111111",
"d. c #5C5C5C",
"e. c #1A1A1A",
"f. c #090909",
"g. c #2C2C2C",
"h. c #3B3B3B",
"i. c #595959",
"j. c #B1B1B1",
"k. c #C4C49E",
"l. c #F3F364",
"m. c #FFFF45",
"n. c #FFFE42",
"o. c #FFF23E",
"p. c #FFD33D",
"q. c #F2D69D",
"r. c #171717",
"s. c #404040",
"t. c #0A0A0A",
"u. c #373737",
"v. c #F9F9DB",
"w. c #FDFD5B",
"x. c #FFF339",
"y. c #FFCE36",
"z. c #F1CB8D",
"A. c #DEDDDD",
"B. c #E4E4E4",
"C. c #666666",
"D. c #0E0E0E",
"E. c #2D2D2D",
"F. c #0C0C0C",
"G. c #F5F2CA",
"H. c #FCD952",
"I. c #F2C481",
"J. c #DDDCDB",
"K. c #D8D7D7",
"L. c #D8D8D8",
"M. c #3C3C3C",
"N. c #222222",
"O. c #2A2A2A",
"P. c #202020",
"Q. c #CFCFCF",
"R. c #F0F0F0",
"S. c #E2E1E1",
"T. c #D9D8D9",
"U. c #D3D3D3",
"V. c #D6D6D6",
"W. c #D4D4D4",
"X. c #1C1C1C",
"Y. c #232323",
"Z. c #141414",
"`. c #131313",
" + c #F6F6F6",
".+ c #EFEEEF",
"++ c #DBDBDB",
"@+ c #DCDCDC",
"#+ c #C5C5C5",
"$+ c #4D4D4D",
"%+ c #1D1D1D",
"&+ c #282828",
"*+ c #121212",
"=+ c #3E3E3E",
"-+ c #3C3B3B",
";+ c #AEAEAE",
">+ c #DDDDDD",
",+ c #E5E5E5",
"'+ c #F3F2F2",
")+ c #CCCCCC",
"!+ c #B0B0B0",
"~+ c #303030",
"{+ c #454545",
"]+ c #B7B6B7",
"^+ c #A4A3A3",
"/+ c #ADACAC",
"(+ c #282727",
"_+ c #4F4F4F",
":+ c #C4C4C4",
"<+ c #E7E7E7",
"[+ c #C3C3C3",
"}+ c #B6B6B6",
"|+ c #A8A8A8",
"1+ c #8E8E8E",
"2+ c #353535",
"3+ c #EDEDED",
"4+ c #E9E9E9",
"5+ c #C7C7C7",
"6+ c #A1A1A1",
"7+ c #8C8C8C",
"8+ c #343434",
"9+ c #D7D7D7",
"0+ c #E3E3E3",
"a+ c #B2B2B2",
"b+ c #A6A6A6",
"c+ c #9A9A9A",
"d+ c #8A8A8A",
"e+ c #545353",
"f+ c #BDBDBD",
"g+ c #C9C9C9",
"h+ c #B7B7B7",
"i+ c #ACACAC",
"j+ c #9E9E9E",
"k+ c #939393",
"l+ c #888888",
"m+ c #4B4B4B",
"n+ c #DADADA",
"o+ c #DEDEDE",
"p+ c #CECECE",
"q+ c #AFAFAF",
"r+ c #BEBEBE",
"s+ c #C6C6C6",
"t+ c #B3B3B3",
"u+ c #434242",
"v+ c #C0C0C0",
"w+ c #A9A9A9",
"x+ c #AAAAAA",
"y+ c #FCFCD4",
"z+ c #FCFC98",
"A+ c #F8F76E",
"B+ c #F6F14B",
"C+ c #F1E64C",
"D+ c #DFD474",
"E+ c #CEC69B",
"F+ c #BFBEBC",
"G+ c #A7A7A0",
"H+ c #C1C0A4",
"I+ c #E2E2C6",
"J+ c #F2F2B9",
"K+ c #F6F386",
"L+ c #F3F056",
"M+ c #EBDF5B",
"N+ c #FDFA99",
"O+ c #FDF896",
"P+ c #FDF88F",
"Q+ c #FDF481",
"R+ c #FDED67",
"S+ c #F8DA40",
"T+ c #F2C73B",
"U+ c #EDBB4A",
"V+ c #DBAF67",
"W+ c #BEB19E",
"X+ c #B8B088",
"Y+ c #E0D377",
"Z+ c #F5EDB0",
"`+ c #F9F2BF",
" @ c #FCF4B8",
".@ c #FCF2A1",
"+@ c #F7E46A",
"@@ c #EFC83B",
"#@ c #E0A53D",
"$@ c #CC895E",
"%@ c #FCE136",
"&@ c #FCE13D",
"*@ c #FBE254",
"=@ c #FADE5A",
"-@ c #F9D754",
";@ c #F7C444",
">@ c #F2AA35",
",@ c #EB9031",
"'@ c #E17832",
")@ c #D66A33",
"!@ c #BB8061",
"~@ c #CC9F4E",
"{@ c #E8AE44",
"]@ c #EEBC62",
"^@ c #F1C373",
"/@ c #F1C273",
"(@ c #ECB55F",
"_@ c #E29C3E",
":@ c #D37C2B",
"<@ c #BA5527",
"[@ c #90251E",
"}@ c #F2C767",
"|@ c #F1B64E",
"1@ c #EEA740",
"2@ c #EC9537",
"3@ c #E57F33",
"4@ c #DF6B36",
"5@ c #D65C3E",
"6@ c #CD5B4C",
"7@ c #C66E63",
"8@ c #856559",
"9@ c #A7886A",
"0@ c #D28C60",
"a@ c #CF7347",
"b@ c #CB6137",
"c@ c #C7562E",
"d@ c #BF4E29",
"e@ c #B7462A",
"f@ c #AC4233",
"g@ c #A04340",
"h@ c #9A5555",
" ",
" . + @ @ # $ % ",
" & * = - ; ; > , ' ) - ",
" ! ~ { . ] ^ / ( _ : < [ # ",
" } ! | 1 2 3 4 5 6 7 8 9 0 a b ",
" c d e f g h i j k l < m n o p q r ",
" s t = u g v h w x y < | z A B C D E F ",
" / G H I J K L x L M ; { N v x O A ^ E P n ",
" b Q @ u R J i S T U V W - L O J f X E Y Z ",
" ` ...+.@.B f #.$.9 %.+ &.2 *.f @.=.E -.;.>. ",
" ,.'.).!.4 ~.{.].z ^./.~ C > N (.u _.:.<.[.}.) ",
" |.Y 1.Q ..e 2.3.4.5.6.7.8.9.0.a.X ] a '.b.c.d. ",
" e.` f.g.h.i.| j.k.l.m.n.o.p.q.].{.F '.-.P r.!. ",
" s.t.-.E ;.u.W S K L v.w.x.y.z.@.u A.B.C.` D.e.E. ",
" F.E <.q q d *.i S K O G.H.I.J.K.a.L.L._.M.c.D N.F ",
" O.q q E q P.Q.f R.i O S 2 N S.T.U.V.L.W.X e e.X.Y.Z.[ ",
" H E.`.'.E E q s @.B R J +S +.+B u ++@+K.+.#+j $+%+&+&+*+=+ ",
" -+}.<.Z.;+>+,+f *.i + +'+R (.z >+a.)+=.!+! ~+{+]+^+/+ ",
" (+c.<._+:+L.u B R J 2 2 *.R <+@.{.Q.[+}+|+1+2+.. ",
" G E : [+U.@+B.1 R #.R.3+4+z @+U.5+T | 6+7+h.&. ",
" 8+Y { 2.Q.9+u (.1 f 1 B 0+>+a.X =.a+b+c+d+[ e+ ",
" p f.|+f+g+U.++u 0+,+B.z >+9+~.[+h+i+j+k+l+M.m+ ",
" O.j+h+:+~.a.n+o+].o+n+V.p+#+j q+e - 1+$ p ",
" [ d+a+r+s+~.U.9+9+a.U.~.s+j t+b+^.:.l+$.u+ ",
" d - h+v+#+)+p+p+~.g+U j t+w+j+> 7++ d ",
" # x+3 2.#+5+s+[+=.3 a+W { c+( ~ s ",
" y+z+A+B+C+D+E+F+f+I }+q+x+G+H+I+J+K+L+M+ ",
" N+O+P+Q+R+S+T+U+V+W+j.;+& X+Y+Z+`+ @.@+@@@#@$@ ",
" %@&@*@=@-@;@>@,@'@)@!@c+- :.~@{@]@^@/@(@_@:@<@[@ ",
" }@|@1@2@3@4@5@6@7@8@ 9@0@a@b@c@d@e@f@g@h@ ",
" ",
" "};

155
eworkpanel/icons/programs.xpm Executable file
View File

@@ -0,0 +1,155 @@
/* XPM */
static char * programs_xpm[] = {
"16 16 136 2",
" c None",
". c #469FFF",
"+ c #4193FF",
"@ c #4499FF",
"# c #2C63AC",
"$ c #4DA0FF",
"% c #B5D9FB",
"& c #AAD3FB",
"* c #ADD3FB",
"= c #89C4FF",
"- c #184888",
"; c #4495FF",
"> c #AED5FB",
", c #6DB3F9",
"' c #6FB2F9",
") c #6BAEF8",
"! c #67ABF6",
"~ c #549FF9",
"{ c #3E91FF",
"] c #ACD4FB",
"^ c #6BAEF9",
"/ c #6CAFF8",
"( c #66AAF7",
"_ c #5DA3F6",
": c #74AEF7",
"< c #9EC4F8",
"[ c #92BCF7",
"} c #8DB5F5",
"| c #88B1F3",
"1 c #83ABF2",
"2 c #80A8F0",
"3 c #87AEF5",
"4 c #0940B7",
"5 c #AAD2FB",
"6 c #67ACF8",
"7 c #68ABF8",
"8 c #61A4F7",
"9 c #5B9FF5",
"0 c #5399F3",
"a c #498FF1",
"b c #3F85EF",
"c c #367CEB",
"d c #2E73E8",
"e c #286BE6",
"f c #2164E2",
"g c #2163E5",
"h c #023AB6",
"i c #4394FF",
"j c #A7D0FA",
"k c #63A9F7",
"l c #61A7F7",
"m c #5BA0F6",
"n c #5499F4",
"o c #4B90F2",
"p c #4186EF",
"q c #377DEB",
"r c #2E73E7",
"s c #266AE5",
"t c #2062E2",
"u c #1C5DDF",
"v c #1A5CE2",
"w c #A4CEF9",
"x c #5DA5F7",
"y c #5DA1F6",
"z c #559AF4",
"A c #4C91F3",
"B c #4489F1",
"C c #3A7FED",
"D c #3075E9",
"E c #276BE5",
"F c #2062E1",
"G c #1B5CDE",
"H c #1758DB",
"I c #1857DE",
"J c #0239B6",
"K c #A1CBF9",
"L c #589FF6",
"M c #559BF5",
"N c #4F96F3",
"O c #478CF2",
"P c #3D84F0",
"Q c #3378EB",
"R c #2B6EE7",
"S c #2265E3",
"T c #1C5DDE",
"U c #1757DB",
"V c #1554DA",
"W c #1555DD",
"X c #0139B5",
"Y c #4696FF",
"Z c #FFFFFF",
"` c #FBFBFB",
" . c #F2F2F2",
".. c #E9E9E9",
"+. c #E0E0E0",
"@. c #D7D7D7",
"#. c #D4D4D4",
"$. c #A9A9A9",
"%. c #BABABA",
"&. c #9E9990",
"*. c #0A3DAF",
"=. c #FEFEFE",
"-. c #F8F8F8",
";. c #F1F1F1",
">. c #E8E8E8",
",. c #DCDCDC",
"'. c #D6D6D6",
"). c #D2D2D2",
"!. c #A7A7A7",
"~. c #B7B7B7",
"{. c #929292",
"]. c #BAB6AC",
"^. c #0E41B3",
"/. c #F0F0F0",
"(. c #E5E5E5",
"_. c #DDDDDD",
":. c #D3D3D3",
"<. c #D0D0D0",
"[. c #ABABAB",
"}. c #B5B5B5",
"|. c #939393",
"1. c #ADADAD",
"2. c #938E85",
"3. c #0A3DAE",
"4. c #FFFFFE",
"5. c #F4F4F4",
"6. c #EDEDED",
"7. c #DBDBDB",
"8. c #AEAEAE",
"9. c #969696",
"0. c #878787",
"a. c #AFABA1",
"b. c #0D40B2",
"c. c #0037B2",
"d. c #0034A8",
"e. c #0038B6",
" ",
" . + @ # ",
" $ % & * = - ",
"; > , ' ) ! ~ { + + + + + . ",
"; ] ^ / ( _ : < [ } | 1 2 3 4 ",
"; 5 6 7 8 9 0 a b c d e f g h ",
"i j k l m n o p q r s t u v h ",
"i w x y z A B C D E F G H I J ",
"i K L M N O P Q R S T U V W X ",
"Y Z Z Z Z ` ...+.@.#.$.%.&.*. ",
"Y Z Z =.-.;.>.,.'.).!.~.{.].^. ",
"Y Z =.-./.(._.:.<.[.}.|.1.2.3. ",
"Y 4.5.6.(.7.#.<.1.8.9.!.0.a.b. ",
" c.d.d.d.d.d.d.d.d.d.d.d.e. ",
" ",
" "};

View File

@@ -0,0 +1,178 @@
/* XPM */
static char * programs_user_xpm[] = {
"18 18 157 2",
" c None",
". c #4193FF",
"+ c #ACD4FB",
"@ c #AAD3FB",
"# c #A9D1FB",
"$ c #A7CFFA",
"% c #72B6F9",
"& c #70B3F9",
"* c #6DAFF8",
"= c #67ABF7",
"- c #62A8F6",
"; c #70B1F9",
"> c #6DB0F8",
", c #68ABF7",
"' c #63A8F6",
") c #5CA1F6",
"! c #99C2F8",
"~ c #95BEF7",
"{ c #8FB9F6",
"] c #8BB3F4",
"^ c #86AFF2",
"/ c #82AAF2",
"( c #7FA7EF",
"_ c #7CA4EF",
": c #0034A8",
"< c #6CAFF8",
"[ c #69ACF8",
"} c #63A6F7",
"| c #5DA1F6",
"1 c #569CF4",
"2 c #4E94F2",
"3 c #448AF0",
"4 c #3B81ED",
"5 c #3379E9",
"6 c #2C70E7",
"7 c #3770E2",
"8 c #7290DC",
"9 c #7C89D2",
"0 c #1B3BA1",
"a c #A6CFFB",
"b c #69ACF7",
"c c #63A8F7",
"d c #5DA2F6",
"e c #579BF5",
"f c #4F94F2",
"g c #468AF1",
"h c #3C81ED",
"i c #5B8DE6",
"j c #4B7FE3",
"k c #2C69E1",
"l c #A59DCE",
"m c #EBDAE1",
"n c #F2C4C8",
"o c #B16686",
"p c #A3CDFA",
"q c #63A9F7",
"r c #5EA2F6",
"s c #589DF5",
"t c #4F94F3",
"u c #488DF2",
"v c #5189E7",
"w c #E4ABB9",
"x c #FCBDBD",
"y c #F9C2C5",
"z c #ECB7BF",
"A c #FFDCDB",
"B c #FFD1D1",
"C c #FFB3B2",
"D c #FF9091",
"E c #D8676A",
"F c #A1CBFA",
"G c #5EA3F6",
"H c #579CF5",
"I c #5198F4",
"J c #4A8FF2",
"K c #7A8DD2",
"L c #DE7E8C",
"M c #FF7373",
"N c #FF8889",
"O c #FFA8A7",
"P c #FFC1C0",
"Q c #FFC2C3",
"R c #FFB8B7",
"S c #FE9F9E",
"T c #FF6D6D",
"U c #E94647",
"V c #FFFFFF",
"W c #FDFDFD",
"X c #E97777",
"Y c #F54443",
"Z c #FF5D5D",
"` c #FF7A7B",
" . c #FF8F8F",
".. c #FF9B9C",
"+. c #FF8988",
"@. c #FE6363",
"#. c #FF3939",
"$. c #E53031",
"%. c #FAFAFA",
"&. c #F3F3F3",
"*. c #DCA0A2",
"=. c #EA4142",
"-. c #FF4646",
";. c #FF5C5D",
">. c #FE6B6C",
",. c #FF7171",
"'. c #FF6B6A",
"). c #FF5A59",
"!. c #FF4848",
"~. c #FF3535",
"{. c #DA2E2E",
"]. c #E8E8E8",
"^. c #DDDBDB",
"/. c #D48383",
"(. c #FD2F2F",
"_. c #FF4B4A",
":. c #FE5555",
"<. c #FF5958",
"[. c #FF5655",
"}. c #FF4C4C",
"|. c #FF3D3E",
"1. c #FF2C2C",
"2. c #BF3436",
"3. c #F6F6F6",
"4. c #EFEFEF",
"5. c #DEDEDE",
"6. c #D7D7D7",
"7. c #CFCDCD",
"8. c #D54444",
"9. c #FF3635",
"0. c #FF3D3D",
"a. c #FE4241",
"b. c #FF4141",
"c. c #FE3939",
"d. c #FA2A2A",
"e. c #EE2929",
"f. c #883435",
"g. c #263B97",
"h. c #BD3840",
"i. c #FE2F2E",
"j. c #FE2829",
"k. c #F62829",
"l. c #F12324",
"m. c #F41717",
"n. c #AA3C3D",
"o. c #000000",
"p. c #290E0F",
"q. c #993031",
"r. c #D72F2F",
"s. c #E92021",
"t. c #E81213",
"u. c #B52526",
"v. c #4E2E2F",
"w. c #551A1A",
"x. c #9F2C2C",
"y. c #B62527",
"z. c #542021",
" ",
" ",
" . . . . ",
" . + @ # $ . ",
". + % & * = - . . . . . . . . ",
". @ ; > , ' ) ! ~ { ] ^ / ( _ : ",
". # < [ } | 1 2 3 4 5 6 7 8 9 0 ",
". a b c d e f g h i j k l m n o ",
". p q r s t u v w x y z A B C D E ",
". F G H I J K L M N O P Q R S T U ",
". V V V V W X Y Z ` .....+.@.#.$. ",
". V V V %.&.*.=.-.;.>.,.'.).!.~.{. ",
". V V %.&.].^./.(._.:.<.[.}.|.1.2. ",
". V 3.4.].5.6.7.8.9.0.a.b.c.d.e.f. ",
" : : : : : : : g.h.i.j.k.l.m.n. ",
" o.o.o.o.o.o.p.q.r.s.t.u.v. ",
" w.x.y.z. ",
" "};

177
eworkpanel/icons/run.xpm Executable file
View File

@@ -0,0 +1,177 @@
/* XPM */
static char * run_xpm[] = {
"16 16 158 2",
" c None",
". c #2D2D52",
"+ c #454584",
"@ c #555589",
"# c #6A6A91",
"$ c #262655",
"% c #4A4A8C",
"& c #595995",
"* c #5D5D9B",
"= c #6969A6",
"- c #7E7EB3",
"; c #9898C8",
"> c #5E5E81",
", c #39396B",
"' c #2F2F68",
") c #414184",
"! c #63639A",
"~ c #7272A6",
"{ c #7E7EB1",
"] c #8787B9",
"^ c #8C8CBC",
"/ c #AFAFD2",
"( c #ACACD7",
"_ c #21214E",
": c #2E2E62",
"< c #3F3F84",
"[ c #50508B",
"} c #9E9EC5",
"| c #C4C4DF",
"1 c #C0C0DC",
"2 c #A9A9CF",
"3 c #9595C2",
"4 c #9A9AC6",
"5 c #A6A6CD",
"6 c #AAAAD2",
"7 c #6C6C99",
"8 c #28285D",
"9 c #555591",
"0 c #B8B8D5",
"a c #BEBEDB",
"b c #8989BB",
"c c #6868A4",
"d c #8B8BB6",
"e c #AEAED2",
"f c #ADADD1",
"g c #BDBDDB",
"h c #D7D7F0",
"i c #7676A1",
"j c #202045",
"k c #4B4B8A",
"l c #A8A8CC",
"m c #BBBBDA",
"n c #7878B1",
"o c #464681",
"p c #29295A",
"q c #38385A",
"r c #ADADD7",
"s c #BCBCDB",
"t c #C5C5DF",
"u c #DDDDEE",
"v c #A8A8D3",
"w c #1A1A36",
"x c #2F2F54",
"y c #555596",
"z c #7272A7",
"A c #C6C6E0",
"B c #8383B8",
"C c #474785",
"D c #0C0C1E",
"E c #2E2E4D",
"F c #B2B2DC",
"G c #CCCCE4",
"H c #D1D1E7",
"I c #C3C3DE",
"J c #ABABD1",
"K c #52528E",
"L c #555597",
"M c #6A6AA3",
"N c #9191BE",
"O c #B5B5D7",
"P c #565692",
"Q c #0A0A1D",
"R c #8787AF",
"S c #CACAE5",
"T c #B4B4D6",
"U c #8B8BBB",
"V c #7171AA",
"W c #42427D",
"X c #464676",
"Y c #8E8EBC",
"Z c #454582",
"` c #8E8EB9",
" . c #D2D2EC",
".. c #DADAEB",
"+. c #CDCDE4",
"@. c #8A8ABB",
"#. c #5B5B99",
"$. c #3A3A76",
"%. c #7171AC",
"&. c #9898C5",
"*. c #A0A0CA",
"=. c #57578F",
"-. c #373758",
";. c #8A8AB1",
">. c #D3D3ED",
",. c #D3D3E7",
"'. c #E6E6F2",
"). c #E7E7F3",
"!. c #7C7CB1",
"~. c #353570",
"{. c #8181B6",
"]. c #9F9FC9",
"^. c #A6A6CB",
"/. c #7878A2",
"(. c #BBBBE1",
"_. c #D1D1E9",
":. c #DEDEEE",
"<. c #F6F6FB",
"[. c #F3F3FA",
"}. c #8383B2",
"|. c #111125",
"1. c #6C6C8E",
"2. c #A1A1CF",
"3. c #B7B7D8",
"4. c #B5B5D6",
"5. c #BCBCDA",
"6. c #C8C8E5",
"7. c #D5D5E9",
"8. c #D7D7EA",
"9. c #D2D2E7",
"0. c #EFEFF7",
"a. c #EEEEF7",
"b. c #B1B1D4",
"c. c #9898C7",
"d. c #40406E",
"e. c #5B5B7F",
"f. c #AEAED9",
"g. c #B5B5D8",
"h. c #CFCFE8",
"i. c #D4D4E8",
"j. c #D8D8EA",
"k. c #B2B2D4",
"l. c #ABABD3",
"m. c #9797C7",
"n. c #6666A5",
"o. c #28285B",
"p. c #313160",
"q. c #BBBBD6",
"r. c #EEEEFB",
"s. c #363672",
"t. c #454576",
"u. c #333364",
"v. c #2A2A5D",
"w. c #9999C4",
"x. c #7070A9",
"y. c #393975",
"z. c #52528F",
"A. c #41417D",
" . + @ # ",
" $ % & * = - ; > ",
" , ' ) ! ~ { ] ^ / ( _ ",
" : < [ } | 1 2 3 4 5 6 7 ",
" 8 9 0 a b c [ d e f g h i ",
" j k l m n o p q r s t u v w ",
"x y z A B C D E F G H I J K ",
"L M N O P Q R S H T U V W ",
"X V Y 5 Z ` ...+.@.#.$. ",
" %.&.*.=. -.;.>.,.'.).!.~. ",
" {.].2 ^./.(._.:.'.<.[.}.|. ",
"1.2.3.4.5.6.7.8.9.0.a.b.c.d. ",
" e.f.g.h.i.j.k.U ^ l.m.n.o. ",
" p.=.q.r.I @.#.s.t.u.v. ",
" w.6 x.y. ",
" z.A. "};

138
eworkpanel/icons/showdesktop.xpm Executable file
View File

@@ -0,0 +1,138 @@
/* XPM */
static char * showdesktop_xpm[] = {
"16 16 119 2",
" c None",
". c #FEDB6F",
"+ c #8F6346",
"@ c #F8C400",
"# c #FEBD09",
"$ c #A75416",
"% c #FED105",
"& c #FB9611",
"* c #E7C21D",
"= c #FECE20",
"- c #BD6418",
"; c #41A0EE",
"> c #5AA9F6",
", c #8DB7B8",
"' c #F9DA36",
") c #FEB635",
"! c #99BFE7",
"~ c #BBD1ED",
"{ c #DAE0F3",
"] c #EEDA7B",
"^ c #FEDC48",
"/ c #D09959",
"( c #B8CFE9",
"_ c #FBF6F8",
": c #F6F0F3",
"< c #EDEBF5",
"[ c #E8DDD1",
"} c #FEDE68",
"| c #FED261",
"1 c #7C879F",
"2 c #1F6BD1",
"3 c #5FC0F9",
"4 c #93DBFD",
"5 c #BDE0F2",
"6 c #F0EDF3",
"7 c #EDEDF5",
"8 c #E9EBF7",
"9 c #E7D8CB",
"0 c #FCE0AC",
"a c #DEB78C",
"b c #4972B9",
"c c #256AD8",
"d c #2262C3",
"e c #83D8FE",
"f c #D1F8FE",
"g c #CFF8FE",
"h c #B3E6FB",
"i c #D7E3F0",
"j c #F6F3F7",
"k c #F0F2F9",
"l c #DDCEC9",
"m c #B3958B",
"n c #CCBEC4",
"o c #88A0CE",
"p c #225DC8",
"q c #1D5FD7",
"r c #1D67DB",
"s c #60B0DE",
"t c #CBFEFE",
"u c #CAF5FE",
"v c #AAE6FE",
"w c #B5DAF3",
"x c #F5F2F6",
"y c #F2F3F8",
"z c #E8E2E6",
"A c #D5CCD2",
"B c #DDDEEB",
"C c #E4E0E7",
"D c #6891D7",
"E c #1053D6",
"F c #0B4CD8",
"G c #256EE4",
"H c #52A0CF",
"I c #AEEDFE",
"J c #B1E7FE",
"K c #97D3F9",
"L c #DCE7F3",
"M c #FDF9FB",
"N c #F9F8FC",
"O c #FCFBFD",
"P c #F9F5F7",
"Q c #F8F2F2",
"R c #BEC5DE",
"S c #2F69D0",
"T c #4D90F1",
"U c #59A1FE",
"V c #4693CB",
"W c #9BE0FE",
"X c #95D7FE",
"Y c #A9D3F3",
"Z c #F2F1F3",
"` c #D7DEE9",
" . c #B5C6E0",
".. c #83A4D6",
"+. c #6290D3",
"@. c #6CA3E1",
"#. c #73B1F3",
"$. c #447CC4",
"%. c #3983C3",
"&. c #87D5FE",
"*. c #8CCFFD",
"=. c #76B3ED",
"-. c #5396E1",
";. c #4089E2",
">. c #4393F0",
",. c #50A6FE",
"'. c #3F84D6",
"). c #102F60",
"!. c #3170AC",
"~. c #74C5FE",
"{. c #6FBDFE",
"]. c #53A8FE",
"^. c #52ABFE",
"/. c #4191EC",
"(. c #163F77",
"_. c #2864A4",
":. c #79C8FE",
"<. c #4299F8",
"[. c #1C5399",
" . + ",
" @ # $ ",
" % & ",
" * = - ",
" ; > , ' ) ",
" ! ~ { ] ^ / ",
" ( _ : < [ } | 1 2 ",
" 3 4 5 6 7 8 9 0 a b c d ",
"e f g h i j k l m n o p q r ",
"s t u v w x y z A B C D E F G ",
" H I J K L M N O P Q R S T U ",
" V W X Y Z ` ...+.@.#.$. ",
" %.&.*.=.-.;.>.,.'.). ",
" !.~.{.].^./.(. ",
" _.:.<.[. ",
" "};

160
eworkpanel/icons/shutdown.xpm Executable file
View File

@@ -0,0 +1,160 @@
/* XPM */
static char * shutdown_xpm[] = {
"16 16 141 2",
" c None",
". c #A01105",
"+ c #B14030",
"@ c #AF3829",
"# c #AE3829",
"$ c #AF3526",
"% c #AC3525",
"& c #AC3423",
"* c #AC3122",
"= c #AC3120",
"- c #AA2E20",
"; c #AC3421",
"> c #9F1005",
", c #DDB593",
"' c #C6714C",
") c #C77954",
"! c #C87C54",
"~ c #C87E58",
"{ c #CA8158",
"] c #C98159",
"^ c #CC855A",
"/ c #CA875C",
"( c #CA8A5E",
"_ c #CE8F63",
": c #D5A576",
"< c #A72718",
"[ c #DCB492",
"} c #B23E18",
"| c #B8532E",
"1 c #B95831",
"2 c #BC5C36",
"3 c #BD6038",
"4 c #D39173",
"5 c #D59376",
"6 c #C06B43",
"7 c #C26E48",
"8 c #C4724B",
"9 c #C4754E",
"0 c #C67953",
"a c #D39E72",
"b c #A01205",
"c c #B03F2F",
"d c #C87C57",
"e c #B8522C",
"f c #BB5E37",
"g c #C46B49",
"h c #F7D4C5",
"i c #FFFFFF",
"j c #F3D0BF",
"k c #CA815D",
"l c #C67B54",
"m c #C77E57",
"n c #D09468",
"o c #A82B19",
"p c #C77753",
"q c #F8D7C8",
"r c #DCA288",
"s c #E3B097",
"t c #FFEFE5",
"u c #FFFAF3",
"v c #CD8863",
"w c #C8825C",
"x c #CF9469",
"y c #A72413",
"z c #E2AB93",
"A c #C26D46",
"B c #F2CFBD",
"C c #EEC6B3",
"D c #C57750",
"E c #E5B59E",
"F c #F0CDBA",
"G c #C98661",
"H c #D1956B",
"I c #A72312",
"J c #C87754",
"K c #C3714A",
"L c #FFF0E6",
"M c #FFF2E8",
"N c #CA8963",
"O c #D0976D",
"P c #A52110",
"Q c #D8997B",
"R c #C4744D",
"S c #FFF0E7",
"T c #C8815A",
"U c #ECC5B1",
"V c #D7A07F",
"W c #D19B72",
"X c #A51F0E",
"Y c #D89B7E",
"Z c #FFF1E7",
"` c #C98560",
" . c #EDC7B2",
".. c #DCAC90",
"+. c #D29D76",
"@. c #A51D0C",
"#. c #CC815E",
"$. c #CA8862",
"%. c #FFF5EC",
"&. c #D39977",
"*. c #D79F79",
"=. c #A21B09",
"-. c #DBA285",
";. c #FADFD1",
">. c #F1CFBC",
",. c #E9C0A9",
"'. c #F9DED0",
"). c #D59E7F",
"!. c #D4A17D",
"~. c #A21907",
"{. c #CA8A5F",
"]. c #CF8B6A",
"^. c #E2B39A",
"/. c #E3B59B",
"(. c #FCE4D5",
"_. c #FFFFF9",
":. c #D9A185",
"<. c #D5A283",
"[. c #D7A685",
"}. c #A21705",
"|. c #AC3422",
"1. c #CC8A5F",
"2. c #C5764F",
"3. c #FDE7DA",
"4. c #D49E7F",
"5. c #DAA98D",
"6. c #D7A585",
"7. c #A21905",
"8. c #D5A677",
"9. c #CF926E",
"0. c #E1B195",
"a. c #E1B59A",
"b. c #D9A88B",
"c. c #E5C8AE",
"d. c #C77C57",
"e. c #9F1105",
"f. c #D7A582",
"g. c #DBB092",
"h. c #C77955",
"i. c #A01201",
"j. c #A11703",
" . + @ # $ % & * = - ; > ",
" @ , ' ) ! ~ { ] ^ / ( _ : < ",
". [ } | 1 2 3 4 5 6 7 8 9 0 a b ",
"c d e f g h i i i i j k l m n o ",
"@ p 1 g i i q r s t i u v w x y ",
"# ! 2 h i z A B C D E i F G H I ",
"$ ~ J i q A K t L l m M i N O P ",
"% { 4 i Q K R L S m T U i V W X ",
"& ] 5 i Y R D S Z T ` .i ..+.@.",
"* ^ #.i j D l Z M ` $.%.i &.*.=.",
"= / 7 t i -.m ;.>.$.,.i '.).!.~.",
"- {.8 ].i i ;.^./.(.i _.:.<.[.}.",
"|.1.2.l v ;.i i i i 3.:.4.5.6.7.",
"> 8.0 m w G 9.0.a.&.).<.b.c.d.e.",
" < a n x H O W +.*.!.f.g.h.i. ",
" b o y I P X @.=.~.}.j.e. "};

162
eworkpanel/icons/sound.xpm Executable file
View File

@@ -0,0 +1,162 @@
/* XPM */
static char * sound_xpm[] = {
"16 16 143 2",
" c None",
". c #7094A6",
"+ c #6D99A9",
"@ c #73949A",
"# c #6A9BB4",
"$ c #6D828C",
"% c #54595B",
"& c #A0D0E7",
"* c #689BB2",
"= c #5890AB",
"- c #536771",
"; c #2A2A2A",
"> c #424242",
", c #5C5C5C",
"' c #86BBD8",
") c #608191",
"! c #084268",
"~ c #A0D9F5",
"{ c #131313",
"] c #272727",
"^ c #404040",
"/ c #565656",
"( c #787C7E",
"_ c #4B83A5",
": c #001A2E",
"< c #022136",
"[ c #055087",
"} c #94D2F0",
"| c #435D6A",
"1 c #B9B9B9",
"2 c #F6F6F6",
"3 c #CCCCCC",
"4 c #595959",
"5 c #757575",
"6 c #4E8EB3",
"7 c #557384",
"8 c #15546E",
"9 c #005080",
"0 c #55B8EA",
"a c #A5EBFF",
"b c #8BCCEE",
"c c #2B2C2C",
"d c #E9E9E9",
"e c #F5F5F5",
"f c #F8F8F8",
"g c #8F8F8F",
"h c #7B7B7B",
"i c #638CA4",
"j c #447089",
"k c #5C8F9C",
"l c #98DBE9",
"m c #8DDBFF",
"n c #86D4FD",
"o c #72BEE5",
"p c #777777",
"q c #DFDFDF",
"r c #EBEBEB",
"s c #EFEFEF",
"t c #E1E1E1",
"u c #7D7D7D",
"v c #78A8C1",
"w c #29648D",
"x c #1D5D82",
"y c #55AED3",
"z c #54B1D8",
"A c #58B3DB",
"B c #65BBE3",
"C c #B2B2B2",
"D c #D1D1D1",
"E c #DCDCDC",
"F c #DEDEDE",
"G c #D8D8D8",
"H c #858585",
"I c #909A9F",
"J c #1C608D",
"K c #033B57",
"L c #0881A2",
"M c #329ABD",
"N c #359BBF",
"O c #55B1DB",
"P c #A1A1A1",
"Q c #B5B5B5",
"R c #C2C2C2",
"S c #C4C4C4",
"T c #C3C3C3",
"U c #8C8C8C",
"V c #95A0A6",
"W c #145683",
"X c #033241",
"Y c #004F65",
"Z c #0083A5",
"` c #0082A1",
" . c #49AAD8",
".. c #787878",
"+. c #A4A4A4",
"@. c #ABABAB",
"#. c #ACACAC",
"$. c #A7A7A7",
"%. c #999999",
"&. c #65A3C1",
"*. c #10507C",
"=. c #0D323C",
"-. c #00212D",
";. c #00556C",
">. c #00738D",
",. c #2CA1CF",
"'. c #737474",
"). c #797979",
"!. c #8B8B8B",
"~. c #919191",
"{. c #3E80A0",
"]. c #185775",
"^. c #001015",
"/. c #02141A",
"(. c #001A27",
"_. c #069BCE",
":. c #4D8FA4",
"<. c #484848",
"[. c #3A3A3A",
"}. c #A6A6A6",
"|. c #B0B0B0",
"1. c #01588A",
"2. c #13576F",
"3. c #001C2E",
"4. c #0096C8",
"5. c #9C9C9C",
"6. c #A2A2A2",
"7. c #AAAAAA",
"8. c #B3B3B3",
"9. c #B1BCBF",
"0. c #003C6B",
"a. c #003968",
"b. c #67A2B5",
"c. c #006596",
"d. c #074E6B",
"e. c #003764",
"f. c #5399B1",
"g. c #ADBDC3",
"h. c #006E9D",
"i. c #003562",
"j. c #023B5E",
"k. c #01375C",
"l. c #044262",
" . + @ ",
" # $ % & * ",
" = - ; > , ' ) ",
" ! ~ { ] ^ / ( _ ",
" : < [ } | 1 2 3 4 5 6 7 ",
" 8 9 0 a b c d e f g h i j ",
" k l m n o p q r s t u v w ",
" x y z A B C D E F G H I J ",
" K L M N O P Q R S T U V W ",
" X Y Z ` ...+.@.#.$.%.&.*. ",
" =.-.;.>.,.'.).U !.~.+.{.]. ",
" ^./.(._.:.<.[.4 }.|.1.2. ",
" 3.4.5.6.7.8.9.0. ",
" a.b.C 1 R c.d. ",
" e.f.g.h.i. ",
" j.k.l. "};

View File

@@ -0,0 +1,202 @@
/* XPM */
static char * sound_xpm[] = {
"16 16 183 2",
" c None",
". c #3B9929",
"+ c #4EAB37",
"@ c #49B437",
"# c #49B335",
"$ c #4EBC38",
"% c #368E23",
"& c #6A9A3F",
"* c #69AA41",
"= c #83B64E",
"- c #7FB24E",
"; c #8ACB6A",
"> c #69CB52",
", c #6FCB53",
"' c #7EA568",
") c #636764",
"! c #757475",
"~ c #5D5D5D",
"{ c #6D9832",
"] c #9EBB60",
"^ c #A0D777",
"/ c #5B9146",
"( c #515550",
"_ c #667467",
": c #7D9A7B",
"< c #C7C4C8",
"[ c #AFAEAF",
"} c #8F8F8F",
"| c #757575",
"1 c #424242",
"2 c #6D9941",
"3 c #73A644",
"4 c #7FCC5B",
"5 c #679149",
"6 c #181C17",
"7 c #5F5C5F",
"8 c #E5E1E6",
"9 c #FFFFFF",
"0 c #EBEBED",
"a c #969697",
"b c #C9CACB",
"c c #C6C6C6",
"d c #4C4C4C",
"e c #679133",
"f c #77AB43",
"g c #75BF55",
"h c #8FC968",
"i c #577144",
"j c #727274",
"k c #F5F4F5",
"l c #FEFEFD",
"m c #CCCCCB",
"n c #858587",
"o c #D4D5D3",
"p c #9E9E9E",
"q c #111111",
"r c #5E8E3A",
"s c #66A437",
"t c #4E803D",
"u c #78856B",
"v c #333B2D",
"w c #4F4E4F",
"x c #B8B8BA",
"y c #D9D9D7",
"z c #DDDE79",
"A c #D6D04B",
"B c #E8CB87",
"C c #D5D4D7",
"D c #535354",
"E c #0A0A0A",
"F c #262626",
"G c #3D7530",
"H c #629C39",
"I c #3B8727",
"J c #355B2C",
"K c #070707",
"L c #1C1C1C",
"M c #9A9A9A",
"N c #DDDDE1",
"O c #F4F5B9",
"P c #FFDB56",
"Q c #E5D1BA",
"R c #CCCDD0",
"S c #3A3A3A",
"T c #090909",
"U c #212121",
"V c #508C32",
"W c #68AE44",
"X c #19350F",
"Y c #000000",
"Z c #3D3D3D",
"` c #EFEFEF",
" . c #FEFEFE",
".. c #FCFBFD",
"+. c #EFE7DF",
"@. c #E1E1E5",
"#. c #E8E8E8",
"$. c #B1B1B1",
"%. c #242424",
"&. c #141414",
"*. c #478B2B",
"=. c #336C1D",
"-. c #122209",
";. c #050404",
">. c #8A8A8B",
",. c #F0F0F0",
"'. c #F2F1F1",
"). c #F7F7F8",
"!. c #F3F5F7",
"~. c #E9E9E9",
"{. c #D8D8D8",
"]. c #C4C4C4",
"^. c #5F5F5F",
"/. c #171717",
"(. c #468528",
"_. c #47902A",
":. c #5A754D",
"<. c #2A2729",
"[. c #BABABA",
"}. c #E0E0E0",
"|. c #ECECEC",
"1. c #DFDFDF",
"2. c #C9C9C9",
"3. c #7C7C7C",
"4. c #252525",
"5. c #488828",
"6. c #2B7013",
"7. c #404A3D",
"8. c #445D3F",
"9. c #B8B7B9",
"0. c #D3D3D3",
"a. c #E1E1E1",
"b. c #E4E4E4",
"c. c #DEDEDE",
"d. c #CFCFCF",
"e. c #B7B7B7",
"f. c #A0A0A0",
"g. c #4D842E",
"h. c #5A8F41",
"i. c #759257",
"j. c #69865B",
"k. c #A19DA7",
"l. c #C3C3CA",
"m. c #D0D1D4",
"n. c #D4D4D4",
"o. c #CDCDCD",
"p. c #BBBBBC",
"q. c #A1A1A3",
"r. c #8C8C91",
"s. c #515259",
"t. c #3E7829",
"u. c #335D28",
"v. c #1F4719",
"w. c #335426",
"x. c #8A9A66",
"y. c #CDCBA1",
"z. c #C7C9BA",
"A. c #C2C4C5",
"B. c #BABABB",
"C. c #A9ACAC",
"D. c #AEB1AA",
"E. c #A3A686",
"F. c #002510",
"G. c #002A0F",
"H. c #33581C",
"I. c #E3E665",
"J. c #FFF16C",
"K. c #FFCE45",
"L. c #EBA553",
"M. c #B19D92",
"N. c #999A99",
"O. c #D8BB79",
"P. c #FEE2A2",
"Q. c #FDDD7F",
"R. c #E7A330",
"S. c #753517",
"T. c #A47822",
"U. c #B17126",
"V. c #A54C22",
"W. c #7F2817",
"X. c #974520",
"Y. c #903B1F",
"Z. c #78241A",
" ",
" . + + @ # $ % ",
"& * = - ; > , ' ) ! ~ ",
"{ ] ^ / ( _ : < [ } | 1 ",
"2 3 4 5 6 7 8 9 0 a b c d ",
"e f g h i j k l m n o 9 p q ",
"r s t u v w x y z A B C D E F ",
"G H I J K L M N O P Q R S T U ",
" V W X Y Z ` ...+.@.#.$.%.&. ",
" *.=.-.;.>.,.'.).!.~.{.].^./.Y ",
" (._.:.<.[.}.|.,.|.1.2.$.3.4. ",
" 5.6.7.8.9.0.a.b.c.d.e.f.| ",
" g.h.i.j.k.l.m.n.o.p.q.r.s. ",
" t.u.v.w.x.y.z.A.B.C.D.E. ",
" F.G.H.I.J.K.L.M.N.O.P.Q.R.S. ",
" T.U.V.W. X.Y.Z. "};

91
eworkpanel/icons/tux.xpm Executable file
View File

@@ -0,0 +1,91 @@
/* XPM */
static char * tux_xpm[] = {
"18 18 70 1",
" c None",
". c #000000",
"+ c #363636",
"@ c #5A5A5A",
"# c #0E0E0E",
"$ c #0D0D0D",
"% c #151515",
"& c #999999",
"* c #909090",
"= c #9C9C9C",
"- c #555555",
"; c #998B54",
"> c #E2CD41",
", c #BFAB31",
"' c #675930",
") c #131313",
"! c #81702D",
"~ c #E4BE29",
"{ c #DAAB05",
"] c #6A4411",
"^ c #343434",
"/ c #232323",
"( c #C8C8C5",
"_ c #DED4AF",
": c #E5DEB5",
"< c #939291",
"[ c #1A1A1A",
"} c #878787",
"| c #F5F5F5",
"1 c #EBEBEB",
"2 c #F0F0F0",
"3 c #DADADA",
"4 c #3B3B3B",
"5 c #DEDEDE",
"6 c #F7F7F7",
"7 c #F1F1F1",
"8 c #E8E8E8",
"9 c #7E7E7E",
"0 c #606060",
"a c #C4C4C4",
"b c #E9E9E9",
"c c #ECECEC",
"d c #575757",
"e c #141414",
"f c #58564D",
"g c #F0DE76",
"h c #4A3E00",
"i c #DBDBDB",
"j c #E4E4E4",
"k c #A99E88",
"l c #9F9149",
"m c #534508",
"n c #54472D",
"o c #B5A74B",
"p c #F8D505",
"q c #DCBB00",
"r c #6D6957",
"s c #B9B9B9",
"t c #A2A2A2",
"u c #4D4A41",
"v c #F7DB31",
"w c #E6C70C",
"x c #917F0F",
"y c #7B6D11",
"z c #8B7500",
"A c #5F4D00",
"B c #070500",
"C c #232116",
"D c #C7B134",
"E c #836E00",
" ",
" ",
" ",
" ..+@ ",
" #$%%. ",
" &*=-. ",
" ;>,') ",
" !~{]^ ",
" /(_:<[ ",
" }|1234. ",
" .561789. ",
" .0abc3de ",
" fgh^ijklmn ",
" opqrstuvwx ",
" yzAB..CDE ",
" ",
" ",
" "};

127
eworkpanel/item.cpp Executable file
View File

@@ -0,0 +1,127 @@
#include "item.h"
#include "mainmenu.h"
void layout_menu(EItemGroup *g, void *) {
g->add_items();
}
EItemGroup::EItemGroup(MainMenu *menu, int type, const char *name)
: fltk::Item_Group(name)
{
m_modified = 0;
m_menu = menu;
m_gtype = type;
about_to_show = (fltk::Callback*)layout_menu;
m_access = true;
}
void EItemGroup::add_items()
{
struct stat s;
if(lstat(dir(), &s) == 0) {
if(!m_modified) {
m_modified = s.st_mtime;
}
if(m_modified != s.st_mtime) {
//dir has changed..
m_modified = s.st_mtime;
clear();
}
}
if(!children() && access()) {
begin();
if(group_type()==BROWSER_GROUP)
menu()->scan_filebrowser(dir());
else if(group_type()==APP_GROUP)
menu()->scan_programitems(dir());
end();
}
}
static fltk::Menu_Button *popupMenu=0;
static const char *dir = 0;
void cb_menu(fltk::Widget *wid, long user_data)
{
if(!dir) return;
char cmd[FL_PATH_MAX];
EDE_Config pGlobalConfig(find_config_file("ede.conf", false));
// we can't use Fl_String here, because gcc3.2.3 bug, so we will use
// plain char with stupid FL_PATH_MAX
switch(user_data) {
case 1: {
char term[FL_PATH_MAX];
pGlobalConfig.get("Terminal", "Terminal", term, 0, sizeof(term));
if(pGlobalConfig.error() && !term[0] || (strlen(term) == 0))
strncpy(term, "xterm", sizeof(term));
snprintf(cmd, sizeof(cmd)-1, "cd %s; %s\n", dir, term);
}
break;
case 2: {
char browser[FL_PATH_MAX];
pGlobalConfig.get("Web", "Browser", browser, 0, sizeof(browser));
if(pGlobalConfig.error() && !browser[0] || (strlen(browser) == 0))
strncpy(browser, "mozilla", sizeof(browser));
snprintf(cmd, sizeof(cmd)-1, "%s %s\n", browser, dir);
}
break;
case 0:
fltk::exit_modal();
default:
return;
}
fltk::start_child_process(cmd, false);
}
int popup_menu()
{
if(!popupMenu) {
popupMenu = new fltk::Menu_Button(0,0,0,0,0);
popupMenu->parent(0);
popupMenu->type(fltk::Menu_Button::POPUP3);
popupMenu->add(_("Open with terminal..."),0,(fltk::Callback*)cb_menu,(void*)1);
popupMenu->add(_("Open with browser..."),0,(fltk::Callback*)cb_menu,(void*)2);
popupMenu->add(new fltk::Menu_Divider());
popupMenu->add(_("Close Menu"),0,(fltk::Callback*)cb_menu,(void*)0);
}
return popupMenu->popup();
}
int EItemGroup::handle(int event)
{
if(event == FL_RELEASE) {
if( fltk::event_button() == 3) {
::dir = this->dir();
int ret = popup_menu();
::dir = 0;
if(ret) return 0;
}
return 1;
}
return fltk::Item_Group::handle(event);
}
int EItem::handle(int event)
{
if(event==FL_RELEASE) {
if(type()==FILE) {
if(fltk::event_button() == 3) {
::dir = this->dir();
int ret = popup_menu();
::dir = 0;
return 1;
}
if(((EItemGroup*)parent())->group_type()==BROWSER_GROUP) return 1;
}
}
return fltk::Item::handle(event);
}

98
eworkpanel/item.h Executable file
View File

@@ -0,0 +1,98 @@
#ifndef _ITEM_H_
#define _ITEM_H_
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
/*#include <efltk/Fl.h>
#include <efltk/Fl_Window.h>
#include <efltk/x.h>
#include <efltk/Fl_Menu_Button.h>
#include <efltk/Fl_Item_Group.h>
#include <efltk/Fl_Item.h>
#include <efltk/filename.h>
#include <efltk/Fl_Divider.h>
#include <efltk/Fl_Locale.h>
#include <efltk/Fl_Config.h>
#include <efltk/Fl_Image.h>
#include <efltk/Fl_Locale.h>*/
#include <fltk/Fl.h>
#include <fltk/Window.h>
#include <fltk/x.h>
#include <fltk/Menu_Button.h>
#include <fltk/Item_Group.h>
#include <fltk/Item.h>
#include <fltk/filename.h>
#include <fltk/Divider.h>
#include <fltk/Locale.h>
#include "EDE_Config.h"
#include <fltk/Image.h>
class MainMenu;
enum {
NO_TYPE = 0,
APP_GROUP,
BROWSER_GROUP
};
class EItemGroup : public fltk::Item_Group {
public:
EItemGroup(MainMenu *menu, int type, const char *name=0);
~EItemGroup() { }
void add_items();
int handle(int event);
int group_type() const { return m_gtype; }
void group_type(int val) { m_gtype = val; }
bool access() const { return m_access; }
void access(bool val) { m_access = val; }
// void dir(const Fl_String &dir) { m_dir = dir; }
void dir(const char *dir) { strcpy(m_dir, dir); }
const char *dir() const { return m_dir; }
MainMenu *menu() { return m_menu; }
private:
long m_modified;
int m_gtype;
char* m_dir;
bool m_access;
MainMenu *m_menu;
};
class EItem : public fltk::Item {
public:
EItem(MainMenu *menu, const char *name=0) : fltk::Item(name) { m_menu = menu; }
enum { FILE=fltk::Item::NO_EXECUTE+1 };
int handle(int event);
const char* dir() const { return ((EItemGroup*)parent())->dir(); }
void exec(const char *exec) { strcpy(m_exec, exec); }
// void exec(const Fl_String &exec) { m_exec = exec; }
const char* exec() const { return m_exec; }
void filename(const char *filename) { strcpy(m_filename, filename); }
// void filename(const Fl_String &filename) { m_filename = filename; }
const char* filename() const { return m_filename; }
MainMenu *menu() const { return m_menu; }
private:
char* m_filename;
char* m_exec;
MainMenu *m_menu;
};
#endif

303
eworkpanel/keyboardchooser.cpp Executable file
View File

@@ -0,0 +1,303 @@
// Copyright (c) 2000. - 2005. EDE Authors
// This program is licenced under terms of the
// GNU General Public Licence version 2 or newer.
// See COPYING for details.
#include "keyboardchooser.h"
#define MAX_KEYBOARDS 5
KeyboardChooser *kbcapplet;
static fltk::Image keyboard_pix((const char **)keyboard_xpm);
void setKeyboard(const char* pKbdLayout)
{
if(!pKbdLayout.empty()) {
char* proc = (char*)malloc(strlen("setxkbmap ")+strlen(pKbdLayout));
proc = strcpy(proc, "setxkbmap ");
pKbdLayout = strcat(proc,pKbdLayout);
fltk::start_child_process(proc, false);
char pShortKbd[2];
strncpy(pShortKbd, pKbdLayout, 2);
kbcapplet->tooltip(pKbdLayout);
kbcapplet->label(pShortKbd);
kbcapplet->redraw();
}
}
// count occurences of character within string
int strcount(const char *string, int character)
{
char *p = string;
int counter;
while (p != 0)
if (p++ == character) counter++;
return counter;
}
void CB_setKeyboard(fltk::Item *item, void *pData)
{
EDE_Config pGlobalConfig(find_config_file("ede.conf", true));
if (!pGlobalConfig.error() && item) {
char* kbdname = item->field_name();
pGlobalConfig.set("Keyboard", "Layout", kbdname);
pGlobalConfig.flush();
setKeyboard(kbdname);
// update history
char* recentlist;
pGlobalConfig.get("Keyboard", "RecentKeyboards", recentlist, "");
if (strstr(recentlist, kbdname) != NULL) return;
if (strcount(recentlist, '|') > MAX_KEYBOARDS)
recentlist = strchr(recentlist, '|');
recentlist = realloc(recentlist, strlen(recentlist)+strlen(kbdname)+1);
strcat(recentlist, "|");
strcat(recentlist, kbdname);
pGlobalConfig.set("Keyboard", "RecentKeyboards", recentlist);
pGlobalConfig.flush();
// refresh menu list
for (int i=0; i<kbcapplet->children(); i++) {
if (strcmp(kbcapplet->child(i)->field_name(),kbdname) != 0) return;
}
fltk::Item *mKbdItem = new fltk::Item(item->label());
mKbdItem->field_name(kbdname);
mKbdItem->callback((fltk::Callback*)CB_setKeyboard);
mKbdItem->image(keyboard_pix);
kbcapplet->insert(*mKbdItem,0);
}
}
// in case something fails, this function will produce a
// static list of keymaps
void addKeyboardsOld(KeyboardChooser *mPanelMenu)
{
char *countries[49] = {
"us", "en_US", "us_intl", "am", "az", "by", "be", "br",
"bg", "ca", "cz", "cz_qwerty", "dk", "dvorak", "ee",
"fi", "fr", "fr_CH", "de", "de_CH", "el", "hr", "hu",
"is", "il", "it", "jp", "lt", "lt_std", "lt_p", "lv",
"mk", "no", "pl", "pt", "ro", "ru", "sr", "si",
"sk", "sk_qwerty", "es", "se", "th", "ua", "gb", "vn",
"nec/jp", "tr"
};
mPanelMenu->begin();
fltk::Item *mKbdItem = new fltk::Item("English (US)");
mKbdItem->field_name("us");
mKbdItem->callback((Fl_Callback*)CB_setKeyboard);
mKbdItem->image(keyboard_pix);
new fltk::Divider(10, 5);
fltk::Item_Group *more = new fltk::Item_Group(_("More..."));
mPanelMenu->end();
more->begin();
for (int i=0; i<49; i++)
{
fltk::Item *mKbdItem = new fltk::Item(countries[i]);
mKbdItem->field_name(countries[i]);
mKbdItem->callback((Fl_Callback*)CB_setKeyboard);
mKbdItem->image(keyboard_pix);
}
more->end();
}
void addKeyboards(KeyboardChooser *mPanelMenu)
{
const char* X11DirList[2] = {"/usr/X11R6/lib/X11/", "/usr/local/X11R6/lib/X11/"};
const char* rulesFileList[2] = {"xkb/rules/xorg.lst", "xkb/rules/xfree86.lst"};
char* xdir, xfilename;
FILE *fp;
char kbdnames[300][15];
char kbddescriptions[300][50];
EDE_Config pGlobalConfig(fl_find_config_file("ede.conf", true));
// First look for directory
for(int ii=0; ii<2; ii++)
if( fltk::is_dir(X11DirList[ii]) ) {
xdir = strdup(X11DirList[ii]);
goto step2;
}
addKeyboardsOld(mPanelMenu); return;
// Look for filename
step2:
for(int ii=0; ii<2; ii++) {
xfilename = (char*) malloc(strlen(xdir)+strlen(rulesFileList[ii]));
strcpy(xfilename,xdir)
strcat(xfilename,rulesFileList[ii]);
if( fltk::file_exists(xfilename) )
goto step3;
}
addKeyboardsOld(mPanelMenu); return;
// now load layouts into widget...
step3:
fp = fopen(xfilename, "r");
if(!fp) {
addKeyboardsOld(mPanelMenu); return;
}
// warning: ugly code ahead (parser)
char line[256]; line[0]='\0';
while ((!feof(fp)) && (!strstr(line,"! layout"))) {
fgets(line,255,fp);
}
int kbdno = 0;
while ((!feof(fp) && (strcmp(line,"\n")))) {
fgets(line,255,fp);
int i=0, j=0;
char name[10];
char description[200];
while((line[i] != 13) && (line[i] != 10)) {
while ((line[i] == 32) || (line[i] == 9))
i++;
while ((line[i] != 32) && (line[i] != 9))
name[j++] = line[i++];
name[j] = 0; j=0;
while ((line[i] == 32) || (line[i] == 9))
i++;
while ((line[i] != 13) && (line[i] != 10))
description[j++] = line[i++];
description[j] = 0;
}
strcpy (kbdnames[kbdno],name);
strcpy (kbddescriptions[kbdno++],description);
}
fclose(fp);
// now populate the menu
// main menu with "More..."
mPanelMenu->begin();
char* recentlist;
pGlobalConfig.get("Keyboard", "RecentKeyboards", recentlist, "");
for (int i = 0; i < kbdno; i++) {
if (strchr(recentlist,kbdnames[i]) != NULL) {
fltk::Item *mKbdItem = new fltk::Item(kbddescriptions[i]);
mKbdItem->field_name(kbdnames[i]);
mKbdItem->callback((Fl_Callback*)CB_setKeyboard);
mKbdItem->image(keyboard_pix);
}
}
new fltk::Divider(10, 5);
fltk::Item_Group *more = new fltk::Item_Group(_("More..."));
mPanelMenu->end();
more->begin();
for (int i=0;i<kbdno;i++) {
fltk::Item *mKbdItem = new fltk::Item(kbddescriptions[i]);
mKbdItem->field_name(kbdnames[i]);
mKbdItem->callback((Fl_Callback*)CB_setKeyboard);
mKbdItem->image(keyboard_pix);
}
more->end();
/* for (int i=0; i<rules->layouts.num_desc; i++)
{
mPanelMenu->begin();
Fl_Item *mKbdItem = new Fl_Item(rules->layouts.desc[i].name);
mKbdItem->callback((Fl_Callback*)CB_setKeyboard);
mKbdItem->image(keyboard_pix);
mPanelMenu->end();
}*/
return;
}
void getKeyboard(KeyboardChooser *mButton)
{
char* pKbdLayout;
EDE_Config pGlobalConfig(find_config_file("ede.conf", true));
pGlobalConfig.get("Keyboard", "Layout", pKbdLayout, "us");
setKeyboard(pKbdLayout);
}
// ----------------------------
// KeyboardChooser class
// ----------------------------
KeyboardChooser::KeyboardChooser(int x, int y, int w, int h, fltk::Boxtype up_c, fltk::Boxtype down_c, const char *label)
: fltk::Menu_Button(x, y, w, h, label)
{
kbcapplet = this;
m_open = false;
Height = 0;
up = up_c;
down = down_c;
anim_speed(2);
anim_flags(BOTTOM_TO_TOP);
addKeyboards(this);
getKeyboard(this);
}
void KeyboardChooser::draw()
{
fltk::Boxtype box = up;
fltk::Flags flags;
fltk::Color color;
if (!active_r()) {
flags = fltk::INACTIVE;
color = this->color();
} else if (belowmouse()) {
flags = fltk::HIGHLIGHT;
color = highlight_color();
if (!color) color = this->color();
box = down;
} else {
flags = 0;
color = this->color();
}
if(!box->fills_rectangle()) {
fltk::push_clip(0, 0, this->w(), this->h());
parent()->draw_group_box();
fltk::pop_clip();
}
box->draw(0, 0, this->w(), this->h(), color, flags);
int x,y,w,h;
x = y = 0;
w = this->w(); h = this->h();
box->inset(x,y,w,h);
draw_inside_label(x,y,w,h,flags);
}
void KeyboardChooser::calculate_height()
{
fltk::Style *s = fltk::Style::find("Menu");
Height = s->box->dh();
for(int n=0; n<children(); n++)
{
fltk::Widget *i = child(n);
if(!i) break;
if(!i->visible()) continue;
fltk::font(i->label_font(), i->label_size());
Height += i->height()+s->leading;
}
}
int KeyboardChooser::popup()
{
m_open = true;
calculate_height();
int retval = fltk::Menu_::popup(0, 0-Height);//, w(), h());
m_open = false;
return retval;
}

60
eworkpanel/keyboardchooser.h Executable file
View File

@@ -0,0 +1,60 @@
// Copyright (c) 2000. - 2005. EDE Authors
// This program is licenced under terms of the
// GNU General Public Licence version 2 or newer.
// See COPYING for details.
#ifndef keyboardchooser_h
#define keyboardchooser_h
/*#include <efltk/Fl.h>
#include <efltk/Fl_Window.h>
#include <efltk/x.h>
#include <efltk/Fl_Menu_Button.h>
#include <efltk/Fl_Button.h>
#include <efltk/Fl_Item_Group.h>
#include <efltk/Fl_Item.h>
#include <efltk/Fl_Util.h>
#include <efltk/Fl_Config.h>
#include <efltk/Fl_Image.h>
#include <efltk/Fl_Divider.h>
#include <efltk/Fl_Item_Group.h>
#include <efltk/fl_draw.h>
#include <efltk/Fl_Locale.h>*/
#include <fltk/Fl.h>
#include <fltk/Window.h>
#include <fltk/x.h>
#include <fltk/Menu_Button.h>
#include <fltk/Button.h>
#include <fltk/Item_Group.h>
#include <fltk/Item.h>
#include <fltk/Util.h>
#include "EDE_Config.h"
#include <fltk/Image.h>
#include <fltk/Divider.h>
#include <fltk/Item_Group.h>
#include <fltk/draw.h>
#include "icons/keyboard.xpm"
class KeyboardChooser : public fltk::Menu_Button
{
public:
KeyboardChooser(int, int, int, int, fltk::Boxtype, fltk::Boxtype, const char *l=0);
void calculate_height();
virtual void draw();
virtual int popup();
virtual void preferred_size(int &w, int &h) const { w=this->w(); }
bool is_open() { return m_open; }
private:
int Height;
fltk::Boxtype up, down;
bool m_open;
};
#endif

179
eworkpanel/locale/hu.po Executable file
View File

@@ -0,0 +1,179 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2005-02-09 11:23+0100\n"
"Last-Translator: Nemeth Otto <otto_nemeth@freemail.hu>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: aboutdialog.cpp:14
msgid "About Equinox Desktop Environment"
msgstr "Az Equinox Desktop Environment -ről"
#: aboutdialog.cpp:17
msgid "Equinox Desktop Environment "
msgstr "Equinox Desktop Environment "
#: aboutdialog.cpp:25
msgid " This program is based in part on the work of FLTK project (www.fltk.org). This program is free software, you can redistribute it and/or modify it under the terms of GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public Licence along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA"
msgstr ""
#: aboutdialog.cpp:38
#: logoutdialog.cpp:220
msgid "&OK"
msgstr "&OK"
#: aboutdialog.cpp:42
msgid "label"
msgstr "címke"
#: aboutdialog.cpp:43
msgid "(C)Copyright 2000-2004 EDE Authors"
msgstr "(C)Copyright 2000-2004 EDE Authors"
#: cpumonitor.cpp:194
#, c-format
msgid ""
"CPU Load:\n"
"User: %d%%\n"
"Nice: %d%%\n"
"Sys: %d%%\n"
"Idle: %d%%"
msgstr ""
"CPU terh.:\n"
"User: %d%%\n"
"Nice: %d%%\n"
"Sys: %d%%\n"
"Idle: %d%%"
#: item.cpp:91
msgid "Open with terminal..."
msgstr "Megnyitás terminálban..."
#: item.cpp:92
msgid "Open with browser..."
msgstr "Megnyitás böngészővel..."
#: item.cpp:94
msgid "Close Menu"
msgstr "Menü bezárása"
#: keyboardchooser.cpp:86
#: keyboardchooser.cpp:179
msgid "More..."
msgstr "Egyéb..."
#: logoutdialog.cpp:92
msgid "You are not allowed to restart !"
msgstr "Nincs megfelelő jogosultságod az újraindításhoz !"
#: logoutdialog.cpp:111
msgid "You are not allowed to shutdown !"
msgstr "Nincs megfelelő jogosultságod a leállításhoz !"
#: logoutdialog.cpp:185
msgid "Logout"
msgstr "Kilépés"
#: logoutdialog.cpp:194
msgid "&logout from the current session"
msgstr "&kijelentkezés"
#: logoutdialog.cpp:197
msgid "Logout from the current session."
msgstr "Kijelentkezés."
#: logoutdialog.cpp:200
msgid "&restart the computer"
msgstr "a számítógép új&raindítása"
#: logoutdialog.cpp:203
msgid "Restart the computer."
msgstr "A számítógép újraindítása."
#: logoutdialog.cpp:205
msgid "Restart the computer. You do not have privileges to do that."
msgstr "Újraindítás - Nincs megfelelő jogosultságod."
#: logoutdialog.cpp:210
msgid "&shut down the computer"
msgstr "a &számítógép leállítása"
#: logoutdialog.cpp:213
msgid "Shut down the computer."
msgstr "A számítógép leállítása."
#: logoutdialog.cpp:215
msgid "Shut down the computer. You do not have privileges to do that."
msgstr "Leállítás - Nincs megfelelő jogosultságod."
#: logoutdialog.cpp:224
msgid "&Cancel"
msgstr "Mégs&em"
#: logoutdialog.cpp:228
msgid "Logout, restart or shut down the computer?"
msgstr "Kijelentkezés, újraindítás vagy leállítás?"
#: mainmenu.cpp:45
msgid "Welcome to the Equinox Desktop Environment."
msgstr "Üdvözöllel az Equinox Desktop Environment-ben."
#: mainmenu_scan.cpp:45
msgid "Open Directory.."
msgstr "Könyvtár megnyitása..."
#: taskbutton.cpp:165
msgid " Close "
msgstr "Bezárás"
#: taskbutton.cpp:167
msgid " Kill"
msgstr "Kilövés"
#: taskbutton.cpp:172
msgid " Minimize"
msgstr "Minimalizálás"
#: taskbutton.cpp:173
msgid " Restore"
msgstr "Visszaállítás"
#: workpanel.cpp:253
#, c-format
msgid ""
"Received: %ld kB (%.1f kB/s)\n"
"Sent: %ld kB (%.1f kB/s)\n"
"Duration: %d min %d sec"
msgstr ""
"Fogadott: %ld kB (%.1f kB/s)\n"
"Küldött: %ld kB (%.1f kB/s)\n"
"Időtartam: %d perc %d másodperc"
#: workpanel.cpp:331
msgid "Workspace"
msgstr "Munkaterület"
#: workpanel.cpp:465
msgid "Show desktop"
msgstr "Asztal megjelenítése"
#: workpanel.cpp:479
msgid "Workspaces"
msgstr "Munkaterületek"
#: workpanel.cpp:523
msgid "Settings"
msgstr "Beállítások"
#: workpanel.cpp:528
msgid "About EDE..."
msgstr "Az EDÉ-ről..."
#: workpanel.cpp:597
msgid "Volume control"
msgstr "Hangerőszabályzó"

257
eworkpanel/locale/id.po Executable file
View File

@@ -0,0 +1,257 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: eworkpanel\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-04 11:48+0100\n"
"PO-Revision-Date: 2002-11-29 16:05+0700\n"
"Last-Translator: Bambang Purnomosidi D. P. <i-am-the-boss@bpdp.org>\n"
"Language-Team: id <i-am-the-boss@bpdp.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
#: aboutdialog.cpp:14
msgid "About Equinox Desktop Environment"
msgstr "Tentang Equinox Desktop Environment"
#: aboutdialog.cpp:17
#, fuzzy
msgid "Equinox Desktop Environment "
msgstr "Tentang Equinox Desktop Environment"
#: aboutdialog.cpp:25
msgid ""
" This program is based in part on the work of FLTK project (www.fltk.org). "
"This program is free software, you can redistribute it and/or modify it "
"under the terms of GNU General Public License as published by the Free "
"Software Foundation, either version 2 of the License, or (at your option) "
"any later version. This program is distributed in the hope that it will be "
"useful, but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General "
"Public License for more details. You should have received a copy of the GNU "
"General Public Licence along with this program; if not, write to the Free "
"Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA"
msgstr ""
"Program ini berbasis pada hasil pekerjaan proyek FLTK (www.fltk.org). "
"Program ini adalah free software, anda bisa mendistribusikan kembali dan/"
"atau memodifikasinya dengan syarat-syarat yang diatur pada GNU General "
"Public License, versi 2 atau versi yang lebih baru. Program ini "
"didistribusikan dengan harapan akan berguna, tetapi TANPA JAMINAN; bahkan "
"tanpa jaminan daya jual dan tujuan-tujuan tertentu. Lihat GNU General Public "
"License untuk lebih jelasnya. Anda seharusnya telah menerima salinan GNU "
"General Public License bersama dengan program ini; jikat tidak, silahkan "
"minta ke Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, "
"USA."
#: aboutdialog.cpp:38 logoutdialog.cpp:220
msgid "&OK"
msgstr "&OK"
#: aboutdialog.cpp:42
msgid "label"
msgstr ""
#: aboutdialog.cpp:43
msgid "(C)Copyright 2000-2004 EDE Authors"
msgstr ""
#: cpumonitor.cpp:194
#, c-format
msgid ""
"CPU Load:\n"
"User: %d%%\n"
"Nice: %d%%\n"
"Sys: %d%%\n"
"Idle: %d%%"
msgstr ""
#: item.cpp:91
#, fuzzy
msgid "Open with terminal..."
msgstr "Buka dengan xterm.."
#: item.cpp:92
#, fuzzy
msgid "Open with browser..."
msgstr "Buka dengan browser.."
#: item.cpp:94
msgid "Close Menu"
msgstr "Menu Tutup"
#: keyboardchooser.cpp:86 keyboardchooser.cpp:179
msgid "More..."
msgstr ""
#: logoutdialog.cpp:92
msgid "You are not allowed to restart !"
msgstr ""
#: logoutdialog.cpp:111
msgid "You are not allowed to shutdown !"
msgstr ""
#: logoutdialog.cpp:185
msgid "Logout"
msgstr "Logout"
#: logoutdialog.cpp:194
msgid "&logout from the current session"
msgstr "&logut dari sessi saat ini"
#: logoutdialog.cpp:197
msgid "Logout from the current session."
msgstr "Logout dari sessi saat ini."
#: logoutdialog.cpp:200
msgid "&restart the computer"
msgstr "$restart komputer"
#: logoutdialog.cpp:203
#, fuzzy
msgid "Restart the computer."
msgstr "$restart komputer"
#: logoutdialog.cpp:205
msgid "Restart the computer. You do not have privileges to do that."
msgstr ""
#: logoutdialog.cpp:210
msgid "&shut down the computer"
msgstr "&shut down komputer"
#: logoutdialog.cpp:213
#, fuzzy
msgid "Shut down the computer."
msgstr "&shut down komputer"
#: logoutdialog.cpp:215
msgid "Shut down the computer. You do not have privileges to do that."
msgstr ""
#: logoutdialog.cpp:224
msgid "&Cancel"
msgstr "&Batalkan"
#: logoutdialog.cpp:228
msgid "Logout, restart or shut down the computer?"
msgstr "Logout, restart atau shut down komputer?"
#: mainmenu.cpp:45
msgid "Welcome to the Equinox Desktop Environment."
msgstr "Selamat datang di Equinox Desktop Environment."
#: mainmenu_scan.cpp:45
msgid "Open Directory.."
msgstr "Buka Direktori.."
#: taskbutton.cpp:165
#, fuzzy
msgid " Close "
msgstr "Menu Tutup"
#: taskbutton.cpp:167
msgid " Kill"
msgstr ""
#: taskbutton.cpp:172
msgid " Minimize"
msgstr ""
#: taskbutton.cpp:173
msgid " Restore"
msgstr ""
#: workpanel.cpp:253
#, c-format
msgid ""
"Received: %ld kB (%.1f kB/s)\n"
"Sent: %ld kB (%.1f kB/s)\n"
"Duration: %d min %d sec"
msgstr ""
"Diterima: %ld kB (%.1f kB/detik)\n"
"Dikirim: %ld kB (%.1f kB/detik)\n"
"Durasi: %d menit %d detik"
#: workpanel.cpp:331
msgid "Workspace"
msgstr "Ruangkerja"
#: workpanel.cpp:465
msgid "Show desktop"
msgstr ""
#: workpanel.cpp:479
msgid "Workspaces"
msgstr "Ruangkerja"
#: workpanel.cpp:523
msgid "Settings"
msgstr "Seting"
#: workpanel.cpp:528
msgid "About EDE..."
msgstr "Tentang EDE..."
#: workpanel.cpp:597
msgid "Volume control"
msgstr "Kontrol volume"
#~ msgid "CPU Load: %3.2f %3.2f %3.2f, %d processes."
#~ msgstr "CPU Load: %3.2f %3.2f %3.2f, %d processes."
#~ msgid "&Programs"
#~ msgstr "&Program"
#~ msgid "&Favourites"
#~ msgstr "&Favorit"
#~ msgid "F&ind"
#~ msgstr "Car&i"
#~ msgid "&Help"
#~ msgstr "&Pertolongan"
#~ msgid "&About"
#~ msgstr "&Tentang"
#~ msgid "&Run..."
#~ msgstr "&Jalankan..."
#~ msgid "&Panel"
#~ msgstr "&Panel"
#~ msgid "Edit panels menu"
#~ msgstr "Menu edit panel"
#~ msgid "Panel settings"
#~ msgstr "Seting panel"
#~ msgid "Control panel"
#~ msgstr "Panel kontrol"
#~ msgid "Install new software"
#~ msgstr "Install perangkat lunak baru"
#~ msgid "L&ock screen"
#~ msgstr "L&ock layar"
#~ msgid "&Logout"
#~ msgstr "&Logout"
#~ msgid "Restart the computer. This action is only allowed to \"root\" user!"
#~ msgstr "Restart komputer. Hanya diijinkan untuk root !"
#~ msgid ""
#~ "Shut down the computer. This action is only allowed to \"root\" user!"
#~ msgstr "Shut down komputer. Hanya diijinkan untuk root !"
#~ msgid "&User programs"
#~ msgstr "Program-program &User"
#~ msgid "&Browser"
#~ msgstr "&Browser"

185
eworkpanel/locale/messages.pot Executable file
View File

@@ -0,0 +1,185 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-04 11:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: aboutdialog.cpp:14
msgid "About Equinox Desktop Environment"
msgstr ""
#: aboutdialog.cpp:17
msgid "Equinox Desktop Environment "
msgstr ""
#: aboutdialog.cpp:25
msgid ""
" This program is based in part on the work of FLTK project (www.fltk.org). "
"This program is free software, you can redistribute it and/or modify it "
"under the terms of GNU General Public License as published by the Free "
"Software Foundation, either version 2 of the License, or (at your option) "
"any later version. This program is distributed in the hope that it will be "
"useful, but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General "
"Public License for more details. You should have received a copy of the GNU "
"General Public Licence along with this program; if not, write to the Free "
"Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA"
msgstr ""
#: aboutdialog.cpp:38 logoutdialog.cpp:220
msgid "&OK"
msgstr ""
#: aboutdialog.cpp:42
msgid "label"
msgstr ""
#: aboutdialog.cpp:43
msgid "(C)Copyright 2000-2004 EDE Authors"
msgstr ""
#: cpumonitor.cpp:194
#, c-format
msgid ""
"CPU Load:\n"
"User: %d%%\n"
"Nice: %d%%\n"
"Sys: %d%%\n"
"Idle: %d%%"
msgstr ""
#: item.cpp:91
msgid "Open with terminal..."
msgstr ""
#: item.cpp:92
msgid "Open with browser..."
msgstr ""
#: item.cpp:94
msgid "Close Menu"
msgstr ""
#: keyboardchooser.cpp:86 keyboardchooser.cpp:179
msgid "More..."
msgstr ""
#: logoutdialog.cpp:92
msgid "You are not allowed to restart !"
msgstr ""
#: logoutdialog.cpp:111
msgid "You are not allowed to shutdown !"
msgstr ""
#: logoutdialog.cpp:185
msgid "Logout"
msgstr ""
#: logoutdialog.cpp:194
msgid "&logout from the current session"
msgstr ""
#: logoutdialog.cpp:197
msgid "Logout from the current session."
msgstr ""
#: logoutdialog.cpp:200
msgid "&restart the computer"
msgstr ""
#: logoutdialog.cpp:203
msgid "Restart the computer."
msgstr ""
#: logoutdialog.cpp:205
msgid "Restart the computer. You do not have privileges to do that."
msgstr ""
#: logoutdialog.cpp:210
msgid "&shut down the computer"
msgstr ""
#: logoutdialog.cpp:213
msgid "Shut down the computer."
msgstr ""
#: logoutdialog.cpp:215
msgid "Shut down the computer. You do not have privileges to do that."
msgstr ""
#: logoutdialog.cpp:224
msgid "&Cancel"
msgstr ""
#: logoutdialog.cpp:228
msgid "Logout, restart or shut down the computer?"
msgstr ""
#: mainmenu.cpp:45
msgid "Welcome to the Equinox Desktop Environment."
msgstr ""
#: mainmenu_scan.cpp:45
msgid "Open Directory.."
msgstr ""
#: taskbutton.cpp:165
msgid " Close "
msgstr ""
#: taskbutton.cpp:167
msgid " Kill"
msgstr ""
#: taskbutton.cpp:172
msgid " Minimize"
msgstr ""
#: taskbutton.cpp:173
msgid " Restore"
msgstr ""
#: workpanel.cpp:253
#, c-format
msgid ""
"Received: %ld kB (%.1f kB/s)\n"
"Sent: %ld kB (%.1f kB/s)\n"
"Duration: %d min %d sec"
msgstr ""
#: workpanel.cpp:331
msgid "Workspace"
msgstr ""
#: workpanel.cpp:465
msgid "Show desktop"
msgstr ""
#: workpanel.cpp:479
msgid "Workspaces"
msgstr ""
#: workpanel.cpp:523
msgid "Settings"
msgstr ""
#: workpanel.cpp:528
msgid "About EDE..."
msgstr ""
#: workpanel.cpp:597
msgid "Volume control"
msgstr ""

248
eworkpanel/locale/ru.po Executable file
View File

@@ -0,0 +1,248 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-04 11:48+0100\n"
"PO-Revision-Date: 2002-11-28 HO:MI+ZONE\n"
"Last-Translator: aabbvv <null@list.ru>\n"
"Language-Team: RUSSIAN <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=koi8-r\n"
"Content-Transfer-Encoding: 8bit\n"
#: aboutdialog.cpp:14
msgid "About Equinox Desktop Environment"
msgstr "<22> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#: aboutdialog.cpp:17
#, fuzzy
msgid "Equinox Desktop Environment "
msgstr "<22> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#: aboutdialog.cpp:25
msgid ""
" This program is based in part on the work of FLTK project (www.fltk.org). "
"This program is free software, you can redistribute it and/or modify it "
"under the terms of GNU General Public License as published by the Free "
"Software Foundation, either version 2 of the License, or (at your option) "
"any later version. This program is distributed in the hope that it will be "
"useful, but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General "
"Public License for more details. You should have received a copy of the GNU "
"General Public Licence along with this program; if not, write to the Free "
"Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA"
msgstr ""
#: aboutdialog.cpp:38 logoutdialog.cpp:220
msgid "&OK"
msgstr "&OK"
#: aboutdialog.cpp:42
msgid "label"
msgstr ""
#: aboutdialog.cpp:43
msgid "(C)Copyright 2000-2004 EDE Authors"
msgstr ""
#: cpumonitor.cpp:194
#, c-format
msgid ""
"CPU Load:\n"
"User: %d%%\n"
"Nice: %d%%\n"
"Sys: %d%%\n"
"Idle: %d%%"
msgstr ""
#: item.cpp:91
#, fuzzy
msgid "Open with terminal..."
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.."
#: item.cpp:92
#, fuzzy
msgid "Open with browser..."
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.."
#: item.cpp:94
msgid "Close Menu"
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
#: keyboardchooser.cpp:86 keyboardchooser.cpp:179
msgid "More..."
msgstr ""
#: logoutdialog.cpp:92
msgid "You are not allowed to restart !"
msgstr ""
#: logoutdialog.cpp:111
msgid "You are not allowed to shutdown !"
msgstr ""
#: logoutdialog.cpp:185
msgid "Logout"
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD>"
#: logoutdialog.cpp:194
msgid "&logout from the current session"
msgstr "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>"
#: logoutdialog.cpp:197
msgid "Logout from the current session."
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>"
#: logoutdialog.cpp:200
msgid "&restart the computer"
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#: logoutdialog.cpp:203
#, fuzzy
msgid "Restart the computer."
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#: logoutdialog.cpp:205
msgid "Restart the computer. You do not have privileges to do that."
msgstr ""
#: logoutdialog.cpp:210
msgid "&shut down the computer"
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#: logoutdialog.cpp:213
#, fuzzy
msgid "Shut down the computer."
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#: logoutdialog.cpp:215
msgid "Shut down the computer. You do not have privileges to do that."
msgstr ""
#: logoutdialog.cpp:224
msgid "&Cancel"
msgstr "<22><><EFBFBD><EFBFBD>&<26><>"
#: logoutdialog.cpp:228
msgid "Logout, restart or shut down the computer?"
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?"
#: mainmenu.cpp:45
msgid "Welcome to the Equinox Desktop Environment."
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> Equinox Desktop Environment."
#: mainmenu_scan.cpp:45
msgid "Open Directory.."
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.."
#: taskbutton.cpp:165
#, fuzzy
msgid " Close "
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
#: taskbutton.cpp:167
msgid " Kill"
msgstr ""
#: taskbutton.cpp:172
msgid " Minimize"
msgstr ""
#: taskbutton.cpp:173
msgid " Restore"
msgstr ""
#: workpanel.cpp:253
#, c-format
msgid ""
"Received: %ld kB (%.1f kB/s)\n"
"Sent: %ld kB (%.1f kB/s)\n"
"Duration: %d min %d sec"
msgstr ""
"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %ld <20><> (%.1f <20><>/<2F>)\n"
"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: %ld <20><> (%.1f <20><>/<2F>)\n"
"<22><><EFBFBD><EFBFBD><EFBFBD>: %d <20><><EFBFBD> %d <20><><EFBFBD>"
#: workpanel.cpp:331
msgid "Workspace"
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
#: workpanel.cpp:465
msgid "Show desktop"
msgstr ""
#: workpanel.cpp:479
msgid "Workspaces"
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>"
#: workpanel.cpp:523
msgid "Settings"
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#: workpanel.cpp:528
msgid "About EDE..."
msgstr "<22> EDE..."
#: workpanel.cpp:597
msgid "Volume control"
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "CPU Load: %3.2f %3.2f %3.2f, %d processes."
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>: %3.2f %3.2f %3.2f, %d <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>."
#~ msgid "&Programs"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "&Favourites"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "F&ind"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "&Help"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "&About"
#~ msgstr "<22> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "&Run..."
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..."
#~ msgid "&Panel"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "Edit panels menu"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
#~ msgid "Panel settings"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "Control panel"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "Install new software"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "L&ock screen"
#~ msgstr "&<26><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "&Logout"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "Restart the computer. This action is only allowed to \"root\" user!"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \"root\"!"
#~ msgid ""
#~ "Shut down the computer. This action is only allowed to \"root\" user!"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \"root\"!"
#~ msgid "&User programs"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#~ msgid "&Browser"
#~ msgstr "<22><><EFBFBD><EFBFBD><EFBFBD>.."

259
eworkpanel/locale/sk.po Executable file
View File

@@ -0,0 +1,259 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: eworkpanel 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-04 11:48+0100\n"
"PO-Revision-Date: 2002-04-21 14:50+0200\n"
"Last-Translator: Martin Pekar <cortex@nextra.sk>\n"
"Language-Team: Slovak <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: aboutdialog.cpp:14
msgid "About Equinox Desktop Environment"
msgstr "O Equinox Desktop Environment"
#: aboutdialog.cpp:17
#, fuzzy
msgid "Equinox Desktop Environment "
msgstr "O Equinox Desktop Environment"
#: aboutdialog.cpp:25
msgid ""
" This program is based in part on the work of FLTK project (www.fltk.org). "
"This program is free software, you can redistribute it and/or modify it "
"under the terms of GNU General Public License as published by the Free "
"Software Foundation, either version 2 of the License, or (at your option) "
"any later version. This program is distributed in the hope that it will be "
"useful, but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General "
"Public License for more details. You should have received a copy of the GNU "
"General Public Licence along with this program; if not, write to the Free "
"Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA"
msgstr ""
"Tento program je z časti založený na práci projektu FLTK (www.fltk.org)."
"Tento program je voľný softvér, môžete ho redistribuovať a/alebo modifikovať "
"podľa podmienok licencie GNU General Public License publikovanej nadáciou "
"the Free Software Foundation, buď verzie 2 tejto licencie, alebo (podľa "
"vášho uváženia) ľubovoľnej novšej verzie. Tento program je distribuovaný v "
"nádeji, že bude užitočný, ale BEZ AKEJKOĽVEK ZÁRUKY; dokonca bez obsiahnutej "
"záruky OBCHODOVATEĽNOSTI alebo VÝHOD PRE URČITÝ ÚČEL. Ďalšie podrobnosti "
"hľadajte v licencii GNU General Public License. S týmto programom by ste "
"mali dostať kópiu licencie GNU General Public Licence; ak nie, napíšte do "
"nadácie the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA "
"02139, USA."
#: aboutdialog.cpp:38 logoutdialog.cpp:220
msgid "&OK"
msgstr "&OK"
#: aboutdialog.cpp:42
msgid "label"
msgstr ""
#: aboutdialog.cpp:43
msgid "(C)Copyright 2000-2004 EDE Authors"
msgstr ""
#: cpumonitor.cpp:194
#, c-format
msgid ""
"CPU Load:\n"
"User: %d%%\n"
"Nice: %d%%\n"
"Sys: %d%%\n"
"Idle: %d%%"
msgstr ""
#: item.cpp:91
#, fuzzy
msgid "Open with terminal..."
msgstr "Otvoriť v xterme.."
#: item.cpp:92
#, fuzzy
msgid "Open with browser..."
msgstr "Otvoriť v prehliadači.."
#: item.cpp:94
msgid "Close Menu"
msgstr "Zavrieť ponuku"
#: keyboardchooser.cpp:86 keyboardchooser.cpp:179
msgid "More..."
msgstr ""
#: logoutdialog.cpp:92
msgid "You are not allowed to restart !"
msgstr ""
#: logoutdialog.cpp:111
msgid "You are not allowed to shutdown !"
msgstr ""
#: logoutdialog.cpp:185
msgid "Logout"
msgstr "Odhlásenie"
#: logoutdialog.cpp:194
msgid "&logout from the current session"
msgstr "&odhlásiť sa z aktuálneho sedenia"
#: logoutdialog.cpp:197
msgid "Logout from the current session."
msgstr "Odhlásenie sa z aktuálneho sedenia."
#: logoutdialog.cpp:200
msgid "&restart the computer"
msgstr "&reštarťovať počítač"
#: logoutdialog.cpp:203
#, fuzzy
msgid "Restart the computer."
msgstr "&reštarťovať počítač"
#: logoutdialog.cpp:205
msgid "Restart the computer. You do not have privileges to do that."
msgstr ""
#: logoutdialog.cpp:210
msgid "&shut down the computer"
msgstr "&vypnúť počítač"
#: logoutdialog.cpp:213
#, fuzzy
msgid "Shut down the computer."
msgstr "&vypnúť počítač"
#: logoutdialog.cpp:215
msgid "Shut down the computer. You do not have privileges to do that."
msgstr ""
#: logoutdialog.cpp:224
msgid "&Cancel"
msgstr "&Zrušiť"
#: logoutdialog.cpp:228
msgid "Logout, restart or shut down the computer?"
msgstr "Odhlásiť sa, reštartovať alebo vypnúť počítač?"
#: mainmenu.cpp:45
msgid "Welcome to the Equinox Desktop Environment."
msgstr "Vitajte v Equinox Desktop Environment."
#: mainmenu_scan.cpp:45
msgid "Open Directory.."
msgstr "Otvoriť adresár.."
#: taskbutton.cpp:165
#, fuzzy
msgid " Close "
msgstr "Zavrieť ponuku"
#: taskbutton.cpp:167
msgid " Kill"
msgstr ""
#: taskbutton.cpp:172
msgid " Minimize"
msgstr ""
#: taskbutton.cpp:173
msgid " Restore"
msgstr ""
#: workpanel.cpp:253
#, c-format
msgid ""
"Received: %ld kB (%.1f kB/s)\n"
"Sent: %ld kB (%.1f kB/s)\n"
"Duration: %d min %d sec"
msgstr ""
"Prijatých : %ld kB (%.1f kB/s)\n"
"Odoslaných : %ld kB (%.1f kB/s)\n"
"Čas trvania: %d minút %d sekúnd"
#: workpanel.cpp:331
msgid "Workspace"
msgstr "Pracovná plocha"
#: workpanel.cpp:465
msgid "Show desktop"
msgstr ""
#: workpanel.cpp:479
msgid "Workspaces"
msgstr "Pracovné plochy"
#: workpanel.cpp:523
msgid "Settings"
msgstr "Nastavenia"
#: workpanel.cpp:528
msgid "About EDE..."
msgstr "O EDE..."
#: workpanel.cpp:597
msgid "Volume control"
msgstr "Nastavenie hlasitosti"
#~ msgid "CPU Load: %3.2f %3.2f %3.2f, %d processes."
#~ msgstr "Zaťaženie procesora: %3.2f %3.2f %3.2f, %d procesov."
#~ msgid "&Programs"
#~ msgstr "&Programy"
#~ msgid "&Favourites"
#~ msgstr "&Obľúbené"
#~ msgid "F&ind"
#~ msgstr "N&ájsť"
#~ msgid "&Help"
#~ msgstr "&Nápoveda"
#~ msgid "&About"
#~ msgstr "&O programe"
#~ msgid "&Run..."
#~ msgstr "&Spustiť..."
#~ msgid "&Panel"
#~ msgstr "&Panel"
#~ msgid "Edit panels menu"
#~ msgstr "Editovať ponuku panelu"
#~ msgid "Panel settings"
#~ msgstr "Nastavenie panela"
#~ msgid "Control panel"
#~ msgstr "Kontrólny panel"
#~ msgid "Install new software"
#~ msgstr "Inštalovať nový softvér"
#~ msgid "L&ock screen"
#~ msgstr "&Zablokovať obrazovku"
#~ msgid "&Logout"
#~ msgstr "&Odhlásenie"
#~ msgid "Restart the computer. This action is only allowed to \"root\" user!"
#~ msgstr ""
#~ "Reštartovanie počítača. Táto akcia je povolená iba \"root\" užívateľovi!"
#~ msgid ""
#~ "Shut down the computer. This action is only allowed to \"root\" user!"
#~ msgstr "Vypnúť počítač. Táto akcia je povolená iba \"root\" užívateľovi!"
#~ msgid "&User programs"
#~ msgstr "&Užívateľove programy"
#~ msgid "&Browser"
#~ msgstr "&Prehliadač"

257
eworkpanel/locale/sr.po Executable file
View File

@@ -0,0 +1,257 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: eworkpanel 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-04 11:48+0100\n"
"PO-Revision-Date: 2002-12-02 04:33+0100\n"
"Last-Translator: Dejan Lekic <dejan@nu6.org>\n"
"Language-Team: LINUKS.org T.T. <i18n@linuks.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: aboutdialog.cpp:14
msgid "About Equinox Desktop Environment"
msgstr "О Иквинокс Десктоп Окружењу"
#: aboutdialog.cpp:17
#, fuzzy
msgid "Equinox Desktop Environment "
msgstr "О Иквинокс Десктоп Окружењу"
#: aboutdialog.cpp:25
msgid ""
" This program is based in part on the work of FLTK project (www.fltk.org). "
"This program is free software, you can redistribute it and/or modify it "
"under the terms of GNU General Public License as published by the Free "
"Software Foundation, either version 2 of the License, or (at your option) "
"any later version. This program is distributed in the hope that it will be "
"useful, but WITHOUT ANY WARRANTY; without even the implied warranty of "
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General "
"Public License for more details. You should have received a copy of the GNU "
"General Public Licence along with this program; if not, write to the Free "
"Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA"
msgstr ""
"Овај програм је базиран на FLTK пројекту (www.fltk.org). Овај програм је "
"слободан софтвер, можете га редистрибуирати и/или модификовати под условима "
"постављеним GNU General Public лиценцом објављеном од стране Free Software "
"Foundation, било да је то верзија 2 Лиценце, или (опционо) било која каснија "
"верзија. Овај програм је дистрибуиран у нади да ће бити употребљив, али БЕЗ "
"ИКАКВИХ ГАРАНЦИЈА; чак без имплицитне гаранције ПРОДАЈЕ РОБЕ или ПОГОДНОСТИ "
"ЗА НЕКУ СПЕЦИФИЧНУ НАМЕНУ. Погледајте \"GNU General Public License\" за више "
"детаља. Требало би да сте добили копију \"GNU General Public License\" "
"лиценце заједно са овим програмом; ако нисте, пишите на Free Software "
"Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."
#: aboutdialog.cpp:38 logoutdialog.cpp:220
msgid "&OK"
msgstr "&ОК"
#: aboutdialog.cpp:42
msgid "label"
msgstr ""
#: aboutdialog.cpp:43
msgid "(C)Copyright 2000-2004 EDE Authors"
msgstr ""
#: cpumonitor.cpp:194
#, c-format
msgid ""
"CPU Load:\n"
"User: %d%%\n"
"Nice: %d%%\n"
"Sys: %d%%\n"
"Idle: %d%%"
msgstr ""
#: item.cpp:91
#, fuzzy
msgid "Open with terminal..."
msgstr "Отвори са икс-терм-ом."
#: item.cpp:92
#, fuzzy
msgid "Open with browser..."
msgstr "Отвори са браузером..."
#: item.cpp:94
msgid "Close Menu"
msgstr "Затвори мени"
#: keyboardchooser.cpp:86 keyboardchooser.cpp:179
msgid "More..."
msgstr ""
#: logoutdialog.cpp:92
msgid "You are not allowed to restart !"
msgstr ""
#: logoutdialog.cpp:111
msgid "You are not allowed to shutdown !"
msgstr ""
#: logoutdialog.cpp:185
msgid "Logout"
msgstr "Излогуј"
#: logoutdialog.cpp:194
msgid "&logout from the current session"
msgstr "Из&логуј ме из тренутне сесије"
#: logoutdialog.cpp:197
msgid "Logout from the current session."
msgstr "Излогуј ме из тренутне сесије."
#: logoutdialog.cpp:200
msgid "&restart the computer"
msgstr "&Рестартуј рачунар"
#: logoutdialog.cpp:203
#, fuzzy
msgid "Restart the computer."
msgstr "&Рестартуј рачунар"
#: logoutdialog.cpp:205
msgid "Restart the computer. You do not have privileges to do that."
msgstr ""
#: logoutdialog.cpp:210
msgid "&shut down the computer"
msgstr "&Угаси рачунар"
#: logoutdialog.cpp:213
#, fuzzy
msgid "Shut down the computer."
msgstr "&Угаси рачунар"
#: logoutdialog.cpp:215
msgid "Shut down the computer. You do not have privileges to do that."
msgstr ""
#: logoutdialog.cpp:224
msgid "&Cancel"
msgstr "&Одустани"
#: logoutdialog.cpp:228
msgid "Logout, restart or shut down the computer?"
msgstr "Излогуј ме, рестартуј или угаси рачунар?"
#: mainmenu.cpp:45
msgid "Welcome to the Equinox Desktop Environment."
msgstr "Добродошли у Иквинокс Десктоп Окружење."
#: mainmenu_scan.cpp:45
msgid "Open Directory.."
msgstr "Отвори директоријум..."
#: taskbutton.cpp:165
#, fuzzy
msgid " Close "
msgstr "Затвори мени"
#: taskbutton.cpp:167
msgid " Kill"
msgstr ""
#: taskbutton.cpp:172
msgid " Minimize"
msgstr ""
#: taskbutton.cpp:173
msgid " Restore"
msgstr ""
#: workpanel.cpp:253
#, c-format
msgid ""
"Received: %ld kB (%.1f kB/s)\n"
"Sent: %ld kB (%.1f kB/s)\n"
"Duration: %d min %d sec"
msgstr ""
"Дошло: %ld kB (%.1f kB/s)\n"
"Послато: %ld kB (%.1f kB/s)\n"
"Трајање: %d min %d sec"
#: workpanel.cpp:331
msgid "Workspace"
msgstr "Радна површина"
#: workpanel.cpp:465
msgid "Show desktop"
msgstr ""
#: workpanel.cpp:479
msgid "Workspaces"
msgstr "Радне површине"
#: workpanel.cpp:523
msgid "Settings"
msgstr "Подешавања"
#: workpanel.cpp:528
msgid "About EDE..."
msgstr "О ЕДЕ-у..."
#: workpanel.cpp:597
msgid "Volume control"
msgstr "Контрола звука"
#~ msgid "CPU Load: %3.2f %3.2f %3.2f, %d processes."
#~ msgstr "CPU Лоад: %3.2f %3.2f %3.2f, %d процеса."
#~ msgid "&Programs"
#~ msgstr "&Програми"
#~ msgid "&Favourites"
#~ msgstr "&Омиљени"
#~ msgid "F&ind"
#~ msgstr "&Тражи"
#~ msgid "&Help"
#~ msgstr "По&моћ"
#~ msgid "&About"
#~ msgstr "&О..."
#~ msgid "&Run..."
#~ msgstr "&Старт"
#~ msgid "&Panel"
#~ msgstr "П&анел"
#~ msgid "Edit panels menu"
#~ msgstr "Едитуј панел меније"
#~ msgid "Panel settings"
#~ msgstr "Панел подешавање"
#~ msgid "Control panel"
#~ msgstr "Контролни панел"
#~ msgid "Install new software"
#~ msgstr "Инсталирај нови софтвер"
#~ msgid "L&ock screen"
#~ msgstr "&Закључај екран"
#~ msgid "&Logout"
#~ msgstr "&Излогуј ме"
#~ msgid "Restart the computer. This action is only allowed to \"root\" user!"
#~ msgstr "Рестартуј рачунар. Ова акција је дозвољена само \"root\" кориснику!"
#~ msgid ""
#~ "Shut down the computer. This action is only allowed to \"root\" user!"
#~ msgstr "Угаси рачунар. Ова акција је дозвољена само \"root\" кориснику!"
#~ msgid "&User programs"
#~ msgstr "&Кориснички програми"
#~ msgid "&Browser"
#~ msgstr "&Браузер"

240
eworkpanel/logoutdialog.cpp Executable file
View File

@@ -0,0 +1,240 @@
// generated by Fast Light User Interface Designer (fluid) version 2,0003
// Work Panel for EDE is (C) Copyright 2000-2002 by Martin Pekar,
// this program is provided under the terms of GNU GPL v.2, see file COPYING for more information.
// Improvements by Vedran Ljubovic (c) 2005.
#include "logoutdialog.h"
#include <stdlib.h>
/*#include <efltk/Fl_Util.h>
#include <efltk/fl_ask.h>
#include <efltk/x.h> // X stuff
#include <signal.h>
#include <efltk/Fl_Image.h> // icons*/
#include <fltk/Util.h>
#include <fltk/ask.h>
#include <fltk/x.h> // X stuff
#include <signal.h>
#include <fltk/Image.h> // icons
// widgets
fltk::Window* windowLogoutDialog;
fltk::Round_Button* logoutRadioItemLogoutDialog;
fltk::Round_Button* restartRadioItemLogoutDialog;
fltk::Round_Button* shutdownRadioItemLogoutDialog;
// graphics
static fltk::Image penguin_pix((const char **)penguin_xpm);
// globals
bool dmAvailable;
char *xdm_fifo;
bool canShutdown;
bool sdForceNow;
bool sdTryNow;
// This function looks what a user can do and sets other
// global variables
void checkPermissions()
{
char* xdm_env = getenv("XDM_MANAGED");
if (strcmp(xdm_env,"") == 0)
dmAvailable = false;
else
dmAvailable = true;
// shutting down via XDM fifo
if (dmAvailable) {
// Fl_String_List xdm_env_list = Fl_String_List(xdm_env,",");
// xdm_fifo = xdm_env_list.item(0);
xdm_fifo = strtok(xdm_env, ",");
if (xdm_fifo[0] != '/') { // broken config
dmAvailable = false;
xdm_fifo = strdup("");
}
canShutdown = sdForceNow = sdTryNow = false;
char* token;
while (token = strtok(NULL, ",") {
if (strcmp(token,"maysd") == 0) canShutdown = true;
if (strcmp(token,"fn") == 0) sdForceNow = true;
if (strcmp(token,"tn") == 0) sdTryNow = true;
}
}
// the old way
if (!dmAvailable) {
// shutdown cmd with no params shouldn't do anything...
if (fltk::start_child_process("shutdown") == 127)
canShutdown = false;
}
}
// Logout using XDM messaging
void newLogoutFunction() {
if ((logoutRadioItemLogoutDialog->value()==0) &&
(restartRadioItemLogoutDialog->value()==0) &&
(shutdownRadioItemLogoutDialog->value() == 0))
// this shoudn't happen...
return;
if (restartRadioItemLogoutDialog->value()==1)
{
if (!canShutdown) {
fltk::alert (_("You are not allowed to restart !"));
return;
}
FILE *fd = fopen(xdm_fifo, "w");
char* method;
if (sdForceNow)
method = strdup("shutdown\treboot\tforcenow\n");
else if (sdTryNow)
method = strdup("shutdown\treboot\ttrynow\n");
else
method = strdup("shutdown\treboot\tschedule\n");
fputs (method, fd);
fclose (fd);
}
if (shutdownRadioItemLogoutDialog->value() == 1)
{
if (!canShutdown) {
fltk::alert (_("You are not allowed to shutdown !"));
return;
}
FILE *fd = fopen(xdm_fifo, "w");
char* method;
if (sdForceNow)
method = strdup("shutdown\thalt\tforcenow\n");
else if (sdTryNow)
method = strdup("shutdown\thalt\ttrynow\n");
else
method = strdup("shutdown\thalt\tschedule\n");
fputs ((char *)method, fd);
fclose (fd);
}
XCloseDisplay(fltk::display);
//XSetCloseDownMode(fl_display, DestroyAll);
XKillClient(fltk::display, AllTemporary);
//XUngrabServer(fl_display);
//fl_close_display();
exit(0);
}
// "brute force" logout function
// (in case XDM is not available)
void oldLogoutFunction() {
if (logoutRadioItemLogoutDialog->value()==1)
{
XCloseDisplay(fltk::display);
//XSetCloseDownMode(fl_display, DestroyAll);
XKillClient(fltk::display, AllTemporary);
//XUngrabServer(fl_display);
//fl_close_display();
exit(0);
}
if (restartRadioItemLogoutDialog->value()==1)
{
if(fltk::start_child_process( "shutdown -r now" ) != 0)
fltk::alert("You are not alowed to reboot !");
}
if (shutdownRadioItemLogoutDialog->value() == 1)
{
if(fltk::start_child_process( "shutdown -h now" ) != 0)
fltk::alert("You are not alowed to shutdown !");
}
}
// Determine logout type
void LogoutFunction(fltk::Widget *, void *) {
if (dmAvailable)
newLogoutFunction();
else
oldLogoutFunction();
}
// Main logout UI and control
static void cb_Cancel(fltk::Button*, void*) {
windowLogoutDialog->hide();
}
void LogoutDialog(fltk::Widget*, void *) {
// first see what options are available
checkPermissions();
// draw GUI
fltk::Window* w;
{
fltk::Window* o = windowLogoutDialog = new fltk::Window(171, 160, 330, 190, _("Logout"));
w = o;
{
fltk::Group* o = new fltk::Group(5, 12, 55, 45);
o->image(penguin_pix);
o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
o->end();
}
{
fltk::Round_Button* o = logoutRadioItemLogoutDialog = new fltk::Round_Button(80, 67, 225, 20, _("&logout from the current session"));
o->type(fltk::Round_Button::RADIO);
o->value(1);
o->tooltip(_("Logout from the current session."));
}
{
fltk::Round_Button* o = restartRadioItemLogoutDialog = new fltk::Round_Button(80, 88, 225, 20, _("&restart the computer"));
o->type(fltk::Round_Button::RADIO);
if (canShutdown)
o->tooltip(_("Restart the computer."));
else {
o->tooltip(_("Restart the computer. You do not have privileges to do that."));
o->deactivate();
}
}
{
fltk::Round_Button* o = shutdownRadioItemLogoutDialog = new fltk::Round_Button(80, 110, 225, 20, _("&shut down the computer"));
o->type(fltk::Round_Button::RADIO);
if (canShutdown)
o->tooltip(_("Shut down the computer."));
else {
o->tooltip(_("Shut down the computer. You do not have privileges to do that."));
o->deactivate();
}
}
{
fltk::Button* o = new fltk::Button(85, 157, 80, 25, _("&OK"));
o->callback((fltk::Callback*)LogoutFunction);
}
{
fltk::Button* o = new fltk::Button(170, 157, 80, 25, _("&Cancel"));
o->callback((fltk::Callback*)cb_Cancel);
}
{
fltk::Box* o = new fltk::Box(65, 7, 260, 63, _("Logout, restart or shut down the computer?"));
o->label_size(18);
o->align(132|fltk::ALIGN_INSIDE);
}
new fltk::Divider(60, 130, 210, 20, "");
o->x( Fl::info().w/2 - (o->w()/2) );
o->y( (Fl::info().h/2) - (o->h()/2) );
o->set_modal();
o->end();
}
windowLogoutDialog->end();
windowLogoutDialog->show();
}

76
eworkpanel/logoutdialog.fld Executable file
View File

@@ -0,0 +1,76 @@
# data file for the FLTK User Interface Designer (FLUID)
version 2,0003
images_dir ./
i18n
header_name {.h}
code_name {.cpp}
gridx 5
gridy 5
snap 3
decl {// Work Panel for EDE is (C) Copyright 2000-2002 by Martin Pekar, this program is provided under the terms of GNU GPL v.2, see file COPYING for more information.} {}
decl {\#include <stdlib.h>} {}
decl {\#include <efltk/Fl_Locale.h>} {}
decl {\#include <efltk/Fl_Util.h>} {}
Function {LogoutFunction(Fl_Widget *, void *)} {selected return_type void
} {
code {if (logoutRadioItemLogoutDialog->value()==1) {
exit(0);
}
if (restartRadioItemLogoutDialog->value()==1)
fl_start_child_process( "shutdown -r now" );
if (shutdownRadioItemLogoutDialog->value() == 1)
fl_start_child_process( "shutdown -h now" );} {}
}
Function {LogoutDialog(Fl_Widget*, void *)} {return_type void
} {
Fl_Window windowLogoutDialog {
label Logout open
xywh {171 160 330 190} set_xy hide
extra_code {o->x( Fl::info().w/2 - (o->w()/2) );
o->y( (Fl::info().h/2) - (o->h()/2) );} modal
} {
Fl_Group {} {open
xywh {5 12 55 45} align 16 image {icons/penguin.xpm}
} {}
Fl_Round_Button logoutRadioItemLogoutDialog {
label {&logout from the current session}
tooltip {Logout from the current session.}
xywh {80 67 225 20} type RADIO value 1
}
Fl_Round_Button restartRadioItemLogoutDialog {
label {&restart the computer}
tooltip {Restart the computer. This action is only allowed to "root" user!}
xywh {80 88 225 20} type RADIO
}
Fl_Round_Button shutdownRadioItemLogoutDialog {
label {&shut down the computer}
tooltip {Shut down the computer. This action is only allowed to "root" user!}
xywh {80 110 225 20} type RADIO
}
Fl_Button {} {
label {&OK}
callback LogoutFunction
private xywh {85 157 80 25}
}
Fl_Button {} {
label {&Cancel}
callback {windowLogoutDialog->hide();}
private xywh {170 157 80 25}
}
Fl_Box {} {
label {Logout, restart or shut down the computer?}
private xywh {65 7 260 63} align 148 label_size 18
}
Fl_Divider {} {
label label
xywh {60 130 210 20}
}
}
code {windowLogoutDialog->end();
windowLogoutDialog->show();} {}
}

40
eworkpanel/logoutdialog.h Executable file
View File

@@ -0,0 +1,40 @@
// generated by Fast Light User Interface Designer (fluid) version 2,0003
#ifndef logoutdialog_h
#define logoutdialog_h
/*#include <efltk/Fl.h>
#include <efltk/Fl_Locale.h>
#include <efltk/Fl_Window.h>
#include <efltk/Fl_Group.h>
#include <efltk/Fl_Round_Button.h>
#include <efltk/Fl_Button.h>
#include <efltk/Fl_Box.h>
#include <efltk/Fl_Divider.h>*/
#include <fltk/Fl.h>
#include "NLS.h"
#include <fltk/Window.h>
#include <fltk/Group.h>
#include <fltk/Round_Button.h>
#include <fltk/Button.h>
#include <fltk/Box.h>
#include <fltk/Divider.h>
#include "icons/penguin.xpm"
// which of these can be safely removed? what should be extern and
// what shouldn't?
extern fltk::Window* windowLogoutDialog;
extern fltk::Round_Button* logoutRadioItemLogoutDialog;
extern fltk::Round_Button* restartRadioItemLogoutDialog;
extern fltk::Round_Button* shutdownRadioItemLogoutDialog;
void LogoutFunction(fltk::Widget *, void *);
extern void LogoutFunction(fltk::Button*, void*);
void LogoutDialog(fltk::Widget*, void *);
#endif

481
eworkpanel/mainmenu.cpp Executable file
View File

@@ -0,0 +1,481 @@
#include "mainmenu.h"
#include "menu.h"
#include <edeconf.h>
#include <unistd.h>
#include <pwd.h>
#include <locale.h>
#include <icons/ede-small.xpm>
#include <icons/find.xpm>
#include <icons/run.xpm>
#include <icons/programs.xpm>
fltk::Pixmap ede_pix((const char **)ede_small2_xpm);
fltk::Pixmap programs_pix((const char **)programs_xpm);
fltk::Pixmap find_pix((const char **)find_xpm);
fltk::Pixmap run_pix((const char **)run_xpm);
// strdupcat() - it's cool to strcat with implied realloc
// -- NOTE: due to use of realloc *always* use strdupcat return value:
// dest = strdupcat(dest,src);
// and *never* use it like:
// strdupcat(dest,src);
char *strdupcat(char *dest, const char *src)
{
if (!dest) {
dest=(char*)malloc(strlen(src));
} else {
dest=(char*)realloc (dest, strlen(dest)+strlen(src)+1);
}
strcat(dest,src);
return dest;
}
///////////////////////////
extern EDE_Config pGlobalConfig;
MainMenu::MainMenu()
: fltk::Menu_Button(0,0,0,0, "Start")
{
layout_align(fltk::ALIGN_LEFT);
label_font(label_font()->bold());
label_size(label_size()+2);
m_modified = 0;
e_image = 0;
m_open = false;
bool showusername;
pGlobalConfig.get("Panel", "ShowUsernameOnMenu", showusername, false);
struct passwd *PWD;
/* Search for an entry with a matching user ID. */
PWD = getpwuid(getuid());
if(showusername && PWD && PWD->pw_name && *PWD->pw_name) {
label(PWD->pw_name);
} else {
label("EDE");
}
tooltip(_("Welcome to the Equinox Desktop Environment."));
}
MainMenu::~MainMenu()
{
if(e_image)
delete e_image;
}
int MainMenu::calculate_height() const
{
fltk::Style *s = fltk::Style::find("Menu");
int menuheight = s->box->dh();
for(int n=0; n<children(); n++)
{
fltk::Widget *i = child(n);
if(!i) break;
if(!i->visible()) continue;
fltk::font(i->label_font(), i->label_size());
menuheight += i->height()+s->leading;
}
return menuheight;
}
void MainMenu::draw()
{
fltk::Boxtype box = this->box();
fltk::Flags flags;
fltk::Color color = this->color();
fltk::Color lcolor = label_color();
if (!active_r())
{
flags = fltk::INACTIVE;
}
else if (belowmouse()) {
flags = fltk::HIGHLIGHT;
color = fltk::lighter(color);
lcolor = fltk::lighter(label_color());
if(!color) color = this->color();
if(!lcolor) color = this->label_color();
}
else if (m_open) {
flags = fltk::HIGHLIGHT|fltk::VALUE;
color = fltk::lighter(color);
lcolor = fltk::lighter(label_color());
if(!color) color = this->color();
if(!lcolor) color = this->label_color();
} else {
flags = 0;
}
box->draw(0, 0, this->w(), this->h(), color, flags);
int X=0, Y=0, W=w(), H=h();
box->inset(X,Y,W,H);
if(image()) {
int imY = (h()/2)-(image()->height()/2);
image()->draw(6, imY, image()->width(), image()->height(), flags);
X+=image()->width()+6;
} else {
X += 4;
W -= 4;
}
fltk::font(label_font(), label_size());
label_type()->draw(label(), X, Y, W-X, H, lcolor, flags|fltk::ALIGN_LEFT);
}
void MainMenu::layout()
{
fltk::font(label_font(), label_size());
int W = int(fltk::width(label())) + 12;
int H = h();
int im_size = H-6;
if(!e_image || (e_image && e_image->height()!=im_size)) {
if(e_image) delete e_image;
if(ede_pix.height()==im_size) {
e_image=0;
image(ede_pix);
}
else {
e_image = ede_pix.scale(im_size, im_size);
image(e_image);
}
}
if(image()) W+=image()->width();
w(W);
fltk::Menu_Button::layout();
}
void MainMenu::clear_favourites()
{
static char* favourites;
if(!favourites || strcmp(favourites,"")==0) {
favourites = strdupcat(favourites,fltk::homedir());
favourites = strdupcat(favourites,"/.ede/favourites/");
if(!fltk::file_exists(favourites)) {
mkdir( favourites, 0777 );
}
}
dirent **files;
int pNumFiles = fltk::filename_list(favourites, &files);
if (pNumFiles > 10)
{
for (int i=0; i<(pNumFiles-10); i++) {
if (strcmp(files[i]->d_name, ".") != 0 && strcmp(files[i]->d_name, "..") != 0 ) {
char* filename = strdup(favourites);
filename = strdupcat(filename,files[i]->d_name);
unlink(filename);
free(filename);
}
}
}
for(int i = 0; i < pNumFiles; i++)
free(files[i]);
if(pNumFiles && files)
free(files);
}
/*
%f a single file name, even if multiple files are selected.
The system reading the Desktop Entry should recognize that
the program in question cannot handle multiple file arguments,
and it should should probably spawn and execute multiple copies
of a program for each selected file if the program is not
able to handle additional file arguments. If files are not on
the local file system (i.e. HTTP or FTP locations), the files will
be copied to the local file system and %f will be expanded to point
at the temporary file. Used for programs that do not understand URL syntax.
%F a list of files. Use for apps that can open several local files at once.
%u a single URL.
%U a list of URLs.
%d the directory of the file to open.
%D a list of directories
%n a single filename (without path)
%N a list of filenames (without path)
%i the icon associated with the desktop entry
%m the mini-icon associated with the desktop entry
%c the comment associated with the desktop entry
%k the name of the desktop file
%v the name of the Device entry in the desktop file
*/
// This function is now implemented in elauncher
void MainMenu::resolve_program(char* cmd)
{
char pRun[FL_PATH_MAX];
snprintf(pRun, sizeof(pRun)-1, "elauncher \"%s\"", cmd);
fltk::start_child_process(pRun, false);
}
fltk::Image *MainMenu::find_image(const char* icon) const
{
char* iconpath = strdup(fltk::file_expand(icon));
fltk::Image *im=0;
if(fltk::file_exists(iconpath))
im = fltk::Image::read(iconpath);
if(!im) {
free(iconpath);
iconpath = strdup(PREFIX"/share/ede/icons/16x16/");
iconpath = strdupcat(icon);
im = fltk::Image::read(iconpath);
}
free(iconpath);
if(im && (im->width()!=16 || im->height()!=16)) {
fltk::Image *scaled = im->scale(16, 16);
if(scaled) {
delete im;
im = scaled;
}
}
return im;
}
/*
g->dir(PREFIX"/share/ede/programs");
i->exec("ehelpbook "PREFIX"/share/ede/doc/index.html");
*/
enum {
ITEM_NONE = 0,
ITEM_EXEC,
ITEM_APPDIR,
ITEM_SUBDIR,
ITEM_FILEBROWSER,
ITEM_DIVIDER
};
int str_to_type(char* str)
{
if(strcmp(str,"Exec")==0) return ITEM_EXEC;
else if(strcmp(str,"AppDir")==0) return ITEM_APPDIR;
else if(strcmp(str,"SubDir")==0) return ITEM_SUBDIR;
else if(strcmp(str,"FileBrowser")==0) return ITEM_FILEBROWSER;
else if(strcmp(str,"Divider")==0) return ITEM_DIVIDER;
return ITEM_NONE;
}
bool is_group_item(int t) { return (t==ITEM_APPDIR || t==ITEM_SUBDIR || t==ITEM_FILEBROWSER); }
char* MainMenu::get_item_name(Fl_XmlNode *node)
{
char* name = strdup("");
for(int n=0; n<node->children(); n++) {
fltk::XmlNode *np = node->child(n);
if(np->is_element() && np->name()=="Name") {
char* lang = strdup(np->get_attribute("Lang"));
if(strcmp(lang,"")==0 && (strlen(name)==0)) {
free(name);
name=strdup("");
np->text(name);
} else if(strcmp(lang,locale())==0) {
free(name);
name=strdup("");
np->text(name);
break;
}
}
}
return name;
}
char* MainMenu::get_item_dir(Fl_XmlNode *node)
{
char* dir = strdup(node->get_attribute("Dir"));
if(strcmp(dir,"$DEFAULT_PROGRAMS_DIR")==0) {
free(dir);
dir = strdup(PREFIX"/share/ede/programs");
}
return fltk::file_expand(dir);
}
// THIS MUST BE CHANGED ASAP!
#include "logoutdialog.h"
#include "aboutdialog.h"
void MainMenu::set_exec(EItem *i, const char* exec)
{
if(strcmp(exec,"$LOGOUT")==0)
i->callback((fltk::Callback*)LogoutDialog);
else if(strcmp(exec,"$ABOUT")==0)
i->callback((fltk::Callback *)AboutDialog);
else
i->exec(exec);
}
void MainMenu::build_menu_item(fltk::XmlNode *node)
{
if(!node) return;
int type = str_to_type(node->get_attribute("Type"));
if(type==ITEM_NONE) return;
fltk::Widget *w=0;
EItemGroup *g=0;
EItem *i=0;
switch(type) {
case ITEM_EXEC:
i = new EItem(this);
i->callback((fltk::Callback*)cb_exec_item);
set_exec(i, node->get_attribute("Exec"));
i->image(run_pix);
w = (fltk::Widget *)i;
break;
case ITEM_APPDIR:
g = new EItemGroup(this, APP_GROUP);
g->image(programs_pix);
g->dir(get_item_dir(node));
break;
case ITEM_SUBDIR:
g = new EItemGroup(this, APP_GROUP);
g->image(programs_pix);
break;
case ITEM_FILEBROWSER:
g = new EItemGroup(this, BROWSER_GROUP);
g->dir(get_item_dir(node));
g->image(find_pix);
break;
case ITEM_DIVIDER:
w = (fltk::Widget *)new fltk::Menu_Divider();
break;
}
if(g) {
g->begin();
w = (fltk::Widget*)g;
}
fltk::Image *im=0;
if(node->has_attribute("Icon")) {
im = find_image(node->get_attribute("Icon"));
} else {
char* im_path = strdup(node->get_attribute("Exec"));
im_path = strdupcat(im_path,".png");
im = find_image(im_path);
}
if(im) w->image(im);
char* label = strdup(get_item_name(node));
w->label(label);
for(int n=0; n<node->children(); n++) {
fltk::XmlNode *np = node->child(n);
if((np->is_element() || np->is_leaf()) && np->name()=="Item")
build_menu_item(np);
}
if(w->is_group())
((fltk::Group*)w)->end();
}
void MainMenu::init_entries()
{
// Update locale
m_locale = setlocale(LC_ALL, NULL);
int pos = m_locale.rpos('_');
if(pos>0) m_locale.sub_delete(pos, m_locale.length()-pos);
if(m_locale=="C" || m_locale=="POSIX") m_locale.clear();
const char *file = find_config_file("ede_mainmenu.xml", true);
struct stat s;
if(lstat(file, &s) == 0) {
if(!m_modified) m_modified = s.st_mtime;
if(m_modified != s.st_mtime) {
//file has changed..
m_modified = s.st_mtime;
clear();
}
}
if(children()>0) return;
FILE *fp = fopen(file, "r");
if(!fp) {
fltk::warning("Menu not found, creating default..");
try {
fltk::Buffer buf;
buf.append(default_menu, strlen(default_menu));
buf.save_file(file);
} catch(fltk::Exception &e) {
fltk::warning(e.text());
}
fp = fopen(file, "r");
if(!fp) fltk::fatal("Cannot write default menu.");
}
fltk::XmlLocator locator;
fltk::XmlDoc *doc=0;
if(fp) {
try {
doc = fltk::XmlParser::create_dom(fp, &locator, false);
} catch(fltk::XmlException &exp) {
char* error = strdup(exp.text());
error = strdupcat(error,"\n\n");
error = strdupcat(error,fltk::XmlLocator::error_line(file, *exp.locator()));
error = strdupcat(error,"\n");
fltk::warning(error);
}
}
if(!doc) {
// One more try!
try {
fltk::Buffer buf;
buf.append(default_menu, strlen(default_menu));
doc = fltk::XmlParser::create_dom(buf.data(), buf.bytes(), &locator, false);
} catch(fltk::Exception &e) {
fltk::fatal("Cannot open menu! [%s]", e.text().c_str());
}
}
if(doc) {
begin();
fltk::XmlNode *node = doc->root_node();
if(node) {
for(int n=0; n<node->children(); n++) {
fltk::XmlNode *np = node->child(n);
if((np->is_element() || np->is_leaf()) && np->name()=="Item")
build_menu_item(np);
}
}
end();
}
}
int MainMenu::popup(int X, int Y, int W, int H)
{
if(fltk::event_button()==1) {
m_open = true;
init_entries();
int ret = fltk::Menu_::popup(X, Y-calculate_height()-h()-1, W, H);
clear();
m_open = false;
return ret;
}
return 0;
}

73
eworkpanel/mainmenu.h Executable file
View File

@@ -0,0 +1,73 @@
#ifndef _MAINMENU_H_
#define _MAINMENU_H_
/*#include <efltk/xml/Fl_Xml.h>
#include <efltk/Fl_Menu_Button.h>
#include <efltk/Fl_Config.h>
#include <efltk/Fl_Divider.h>
#include <efltk/Fl_WM.h>
#include <efltk/Fl_Pixmap.h>
#include <efltk/filename.h>
#include <efltk/fl_draw.h>
#include <efltk/fl_ask.h>*/
#include <efltk/xml/Fl_Xml.h>
#include <fltk/Menu_Button.h>
#include "EDE_Config.h"
#include <fltk/Divider.h>
#include <fltk/WM.h>
#include <fltk/Pixmap.h>
#include <fltk/filename.h>
#include <fltk/draw.h>
#include <fltk/ask.h>
#include <sys/stat.h>
#include "item.h"
class MainMenu : public fltk::Menu_Button
{
public:
MainMenu();
~MainMenu();
int popup(int X, int Y, int W, int H);
void draw();
void layout();
void init_entries();
char* get_item_dir(fltk::XmlNode *node);
char* get_item_name(fltk::XmlNode *node);
void set_exec(EItem *i, const char* exec);
void build_menu_item(fltk::XmlNode *node);
int calculate_height() const;
fltk::Image *find_image(const char* icon) const;
void scan_programitems(const char *path);
void scan_filebrowser(const char* path);
const char* locale() const { return m_locale; }
static void resolve_program(char* cmd);
static void clear_favourites();
bool is_open() { return m_open; }
private:
static inline void cb_exec_item(EItem *i, void *d) { i->menu()->resolve_program(i->exec()); }
fltk::Image *e_image;
char* m_locale;
long m_modified;
bool m_open;
};
#endif

227
eworkpanel/mainmenu_scan.cpp Executable file
View File

@@ -0,0 +1,227 @@
#include "mainmenu.h"
#include "item.h"
#include <icons/file.xpm>
fltk::Pixmap file_pix(file_xpm);
extern fltk::Pixmap programs_pix;
extern fltk::Pixmap run_pix;
static void cb_file_item(EItem *item, void *)
{
char* pFavouriteFile = strdup(fltk::homedir());
pFavouriteFile = strdupcat(pFavouriteFile"/.ede/favourites/");
pFavouriteFile = strdupcat(pFavouriteFile,fltk::file_filename(item->filename()));
EDE_Config pItemConfig(item->filename(), true, false);
char* cmd;
if(!pItemConfig.get("Desktop Entry", "Exec", cmd, ""))
{
MainMenu::clear_favourites();
symlink(item->filename(), pFavouriteFile);
MainMenu::resolve_program(cmd);
}
free(pFavouriteFile);
}
static void cb_open_dir(fltk::Widget *w, void *)
{
EItemGroup *g = (EItemGroup *)w->parent();
EDE_Config conf(fltk::find_config_file("ede.conf", false));
char* term;
conf.get("Terminal", "Terminal", term, 0);
if(term.empty())
term = "xterm";
char* cmd = strdup("cd ");
cmd = strdupcat(cmd,g->dir());
cmd = strdupcat("; ");
cmd = strdupcat(term);
fltk::start_child_process(cmd, false);
free(term);
free(cmd);
}
void MainMenu::scan_filebrowser(const char* path)
{
EItem *i = new EItem(this, _("Open Directory.."));
i->callback(cb_open_dir);
i->image(run_pix);
new fltk::Menu_Divider();
EItemGroup *mNewGroup=0;
struct dirent **files;
int count = fltk::filename_list(path, &files);
int n;
for(n=0; n<count; n++)
{
if( !strcmp(files[n]->d_name, ".") || !strcmp(files[n]->d_name, "..") || !strcmp(files[n]->d_name, "CVS") )
{
free((char*)files[n]);
files[n] = 0;
continue;
}
char* filename = strdup(path);
filename = strdupcat(filename,"/");
filename = strdupcat(filename,files[n]->d_name);
if(fltk::is_dir(filename)) {
mNewGroup = new EItemGroup(this, BROWSER_GROUP);
mNewGroup->label(files[n]->d_name);
mNewGroup->image(programs_pix);
mNewGroup->dir(filename);
mNewGroup->end();
if(access(filename, R_OK)) {
mNewGroup->label_color(fltk::inactive(FL_RED));
mNewGroup->access(false);
}
free((char*)files[n]);
files[n] = 0;
}
free(filename);
}
for(n=0; n<count; n++)
{
if(!files[n]) continue;
if( strcmp(files[n]->d_name, ".") && strcmp(files[n]->d_name, ".."))
{
char* filename = strdup(path);
filename = strdupcat(filename, "/");
filename = strdupcat(files[n]->d_name);
EItem *mNewItem = new EItem(this);
mNewItem->type(EItem::FILE);
mNewItem->image(file_pix);
mNewItem->copy_label(files[n]->d_name);
if(access(filename, R_OK)) {
mNewItem->label_color(fl_inactive(FL_RED));
}
free(filename);
}
free((char*)files[n]);
}
if(count>0 && files) free((char**)files);
}
void MainMenu::scan_programitems(const char *path)
{
EItemGroup *mNewGroup;
char* NameEntry;
bool added = false;
char* localizedName;
if(strlen(locale())>0)
sprintf(localizedName,"Name[%s]", locale());
else
localizedName = strdup("Name");
struct dirent **files;
int count = fltk::filename_list(path, &files);
int n;
for(n=0; n<count; n++)
{
if( strcmp(files[n]->d_name, ".") && strcmp(files[n]->d_name, "..") && strcmp(files[n]->d_name, "CVS") )
{
char* filename = strdup(path);
filename = strdupcat(filename,"/");
filename = strdupcat(filename,files[n]->d_name);
if(fltk::is_dir(filename))
{
added=true;
mNewGroup = new EItemGroup(this, APP_GROUP);
mNewGroup->image(programs_pix);
mNewGroup->dir(filename);
char* locale_file = strdup(filename);
locale_file = strdupcat(locale_file,"/.directory");
EDE_Config pLocConfig(locale_file, true, false);
pLocConfig.set_section("Desktop Entry");
if(!pLocConfig.read(localizedName, NameEntry, "")) {
// Localized name
mNewGroup->label(NameEntry);
} else {
if(!pLocConfig.read("Name", NameEntry, "")) {
// Default name
mNewGroup->label(NameEntry);
} else {
// Fall back to directory name
mNewGroup->label(files[n]->d_name);
}
}
mNewGroup->end();
free(files[n]);
files[n] = 0;
free(locale_file);
}
free(filename);
}
}
for(n=0; n<count; n++)
{
if(!files[n]) continue;
if( strcmp(files[n]->d_name, ".") && strcmp(files[n]->d_name, "..") && strstr(files[n]->d_name, ".desktop"))
{
char* filename=strdup(path);
filename = strdupcat(filename,"/");
filename = strdupcat(filename,files[n]->d_name);
// we check first for localised names...
EDE_Config ItemConfig(filename, true, false);
ItemConfig.set_section("Desktop Entry");
bool noDisplay = false;
ItemConfig.read("NoDisplay", noDisplay);
if(noDisplay) continue;
if(ItemConfig.read(localizedName, NameEntry, "")) {
ItemConfig.read("Name", NameEntry, "");
}
if(!ItemConfig.error() && !NameEntry.empty())
{
added=true;
EItem *mNewItem = new EItem(this);
mNewItem->type(EItem::FILE);
mNewItem->label(NameEntry);
mNewItem->filename(filename);
mNewItem->callback((fltk::Callback *)cb_file_item, 0);
if(!ItemConfig.read("Icon", NameEntry, ""))
mNewItem->image(find_image(NameEntry));
if(!mNewItem->image())
mNewItem->image(file_pix);
if(!ItemConfig.read("Exec", NameEntry, ""))
mNewItem->exec(NameEntry);
}
free(filename);
}
if(files[n]) free(files[n]);
}
if(count>0 && files) free(files);
if(!added)
Fl_Divider *mDivider = new Fl_Divider();
free(localizedName);
free(NameEntry);
}

57
eworkpanel/menu.h Executable file
View File

@@ -0,0 +1,57 @@
#include <edeconf.h>
static const char default_menu[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n\
<Menu>\n\
<!--\n\
<Item Type=\"Exec\" Icon=\"~/xfte.png\" Exec=\"xfte\">\n\
<Name>xFTE editor</Name>\n\
<Name Lang=\"fi\">xFTE editori</Name>\n\
</Item>\n\
<Item Type=\"Divider\"/>\n\
-->\n\
<Item Type=\"AppDir\" Dir=\"$DEFAULT_PROGRAMS_DIR\">\n\
<Name>Programs</Name>\n\
</Item>\n\
<Item Type=\"AppDir\" Dir=\"~/.ede/programs\">\n\
<Name>User Programs</Name>\n\
</Item>\n\
<Item Type=\"Divider\"/>\n\
<Item Type=\"AppDir\" Dir=\"~/.ede/favourites\">\n\
<Name>Favourites</Name>\n\
</Item>\n\
<Item Type=\"Exec\" Icon=\"efinder.png\" Exec=\"efinder\">\n\
<Name>Find</Name>\n\
</Item>\n\
<Item Type=\"Exec\" Icon=\"ehelpbook.png\" Exec=\"file:"PREFIX"/share/ede/doc/index.html\">\n\
<Name>Help</Name>\n\
</Item>\n\
<Item Type=\"Exec\" Icon=\"about.png\" Exec=\"$ABOUT\">\n\
<Name>About</Name>\n\
</Item>\n\
<Item Type=\"Exec\" Icon=\"erun.png\" Exec=\"elauncher\">\n\
<Name>Run</Name>\n\
</Item>\n\
<Item Type=\"Divider\"/>\n\
<Item Type=\"FileBrowser\" Dir=\"/\">\n\
<Name>Quick Browser</Name>\n\
</Item>\n\
<Item Type=\"SubDir\">\n\
<Name>Panel</Name>\n\
<Item Type=\"Exec\" Icon=\"econtrol.png\" Exec=\"econtrol\">\n\
<Name>Control Panel</Name>\n\
</Item>\n\
<Item Type=\"Exec\" Icon=\"emenueditor.png\" Exec=\"emenueditor\">\n\
<Name>Menu Editor</Name>\n\
</Item>\n\
<Item Type=\"Exec\" Icon=\"synaptic.png\" Exec=\"einstaller\">\n\
<Name>Install New Software</Name>\n\
</Item>\n\
</Item>\n\
<Item Type=\"Divider\"/>\n\
<Item Type=\"Exec\" Icon=\"lock.png\" Exec=\"xlock\">\n\
<Name>Lock</Name>\n\
</Item>\n\
<Item Type=\"Exec\" Icon=\"logout.png\" Exec=\"$LOGOUT\">\n\
<Name>Logout</Name>\n\
</Item>\n\
</Menu>\n";

166
eworkpanel/panelbutton.cpp Executable file
View File

@@ -0,0 +1,166 @@
// Copyright (c) 2000. - 2005. EDE Authors
// This program is licenced under terms of the
// GNU General Public Licence version 2 or newer.
// See COPYING for details.
#include <stdio.h>
/*#include <efltk/Fl.h>
#include <efltk/Fl_Menu_Button.h>
#include <efltk/fl_draw.h>
#include <efltk/Fl_Group.h>
#include <efltk/Fl_Item.h>*/
#include <fltk/Fl.h>
#include <fltk/Menu_Button.h>
#include <fltk/draw.h>
#include <fltk/Group.h>
#include <fltk/Item.h>
#include "panelbutton.h"
extern fltk::Widget* fl_did_clipping;
// class PanelMenu
// This is a standard eworkpanel applet class. It is a button that pops
// up menu when pressed. Typical use is workspace switcher.
PanelMenu::PanelMenu(int x, int y, int w, int h, fltk::Boxtype up_c, fltk::Boxtype down_c, const char *label)
: fltk::Menu_Button(x, y, w, h, label)
{
m_open = false;
Height = 0;
up = up_c;
down = down_c;
anim_speed(2);
anim_flags(BOTTOM_TO_TOP);
accept_focus(false);
}
// This function is modified from Fl_Menu_Button
void PanelMenu::draw()
{
fltk::Boxtype box = up;
fltk::Flags flags;
fltk::Color color;
if (!active_r()) {
// Button is disabled
flags = fltk::INACTIVE;
color = this->color();
} else if (m_open) {
// Menu is open, make the button pushed and highlighted
flags = fltk::HIGHLIGHT;
color = highlight_color();
if (!color) color = this->color();
box = down;
} else if (belowmouse()) {
// Menu is not open, but button is below mouse - highlight
flags = fltk::HIGHLIGHT;
color = highlight_color();
if (!color) color = this->color();
} else {
// Plain
flags = 0;
color = this->color();
}
if(!box->fills_rectangle()) {
fltk::push_clip(0, 0, this->w(), this->h());
parent()->draw_group_box();
fltk::pop_clip();
}
box->draw(0, 0, this->w(), this->h(), color, flags);
int x,y,w,h;
x = y = 0;
w = this->w(); h = this->h();
box->inset(x,y,w,h);
draw_inside_label(x,y,w,h,flags);
}
// Used to properly redraw menu
void PanelMenu::calculate_height()
{
fltk::Style *s = fltk::Style::find("Menu");
Height = s->box->dh();
for(int n=0; n<children(); n++)
{
fltk::Widget *i = child(n);
if(!i) break;
if(!i->visible()) continue;
fltk::font(i->label_font(), i->label_size());
Height += i->height()+s->leading;
}
}
// Popup the menu. Global property m_open is useful to detect
// if the menu is visible, e.g. to disable autohiding panel.
int PanelMenu::popup()
{
m_open = true;
redraw(); // push down button
calculate_height();
int retval = fltk::Menu_::popup(0, 0-Height);//, w(), h());
m_open = false;
redraw();
return retval;
}
// class PanelButton
// A simplified case of PanelMenu - by Vedran
// Used e.g. by show desktop button
PanelButton::PanelButton(int x, int y, int w, int h, fltk::Boxtype up_c, fltk::Boxtype down_c, const char *label)
: fltk::Button(x, y, w, h, label)
{
// Height = 0;
up = up_c;
down = down_c;
accept_focus(false);
}
void PanelButton::draw()
{
fltk::Boxtype box = up;
fltk::Flags flags;
fltk::Color color;
if (belowmouse())
{
// Highlight button when below mouse
flags = fltk::HIGHLIGHT;
color = highlight_color();
if (!color) color = this->color();
// box = down;
} else {
flags = 0;
color = this->color();
}
if (value()) box=down; // Push down button when pressed
if(!box->fills_rectangle()) {
fltk::push_clip(0, 0, this->w(), this->h());
parent()->draw_group_box();
fltk::pop_clip();
}
box->draw(0, 0, this->w(), this->h(), color, flags);
int x,y,w,h;
x = y = 0;
w = this->w(); h = this->h();
box->inset(x,y,w,h);
draw_inside_label(x,y,w,h,flags);
}

58
eworkpanel/panelbutton.h Executable file
View File

@@ -0,0 +1,58 @@
// Copyright (c) 2000. - 2005. EDE Authors
// This program is licenced under terms of the
// GNU General Public Licence version 2 or newer.
// See COPYING for details.
#ifndef panelbutton_h
#define panelbutton_h
/*#include <efltk/Fl.h>
#include <efltk/Fl_Window.h>
#include <efltk/x.h>
#include <efltk/Fl_Menu_Button.h>
#include <efltk/Fl_Button.h>
#include <efltk/Fl_Item_Group.h>
#include <efltk/Fl_Item.h>*/
#include <fltk/Fl.h>
#include <fltk/Window.h>
#include <fltk/x.h>
#include <fltk/Menu_Button.h>
#include <fltk/Button.h>
#include <fltk/Item_Group.h>
#include <fltk/Item.h>
class PanelMenu : public fltk::Menu_Button
{
public:
PanelMenu(int, int, int, int, fltk::Boxtype, fltk::Boxtype, const char *l=0);
void calculate_height();
virtual void draw();
virtual int popup();
virtual void preferred_size(int &w, int &h) const { w=this->w(); }
bool is_open() { return m_open; }
private:
int Height;
fltk::Boxtype up, down;
bool m_open;
};
class PanelButton : public fltk::Button
{
public:
PanelButton(int, int, int, int, fltk::Boxtype, fltk::Boxtype, const char *l=0);
virtual void draw();
virtual void preferred_size(int &w, int &h) const { w=this->w(); }
private:
int Height;
fltk::Boxtype up, down;
};
#endif

463
eworkpanel/taskbutton.cpp Executable file
View File

@@ -0,0 +1,463 @@
#include "taskbutton.h"
#include <stdlib.h>
#include <stdio.h>
/*#include <efltk/fl_draw.h>
#include <efltk/Fl_Image.h>
#include <efltk/Fl.h>
#include <efltk/Fl_Config.h>
#include <efltk/Fl_Box.h>
#include <efltk/Fl_Value_Input.h>
#include <efltk/Fl_Divider.h>*/
#include <fltk/draw.h>
#include <fltk/Image.h>
#include <fltk/Fl.h>
#include "EDE_Config.h"
#include <fltk/Box.h>
#include <fltk/Value_Input.h>
#include <fltk/Divider.h>
#include "../edewm/Windowmanager.h"
fltk::Menu_ *TaskButton::menu = 0;
TaskButton *TaskButton::pushed = 0;
int calculate_height(fltk::Menu_ *m)
{
fltk::Style *s = fltk::Style::find("Menu");
int Height = s->box->dh();
for(int n=0; n<m->children(); n++)
{
fltk::Widget *i = m->child(n);
if(!i) break;
if(!i->visible()) continue;
fltk::font(i->label_font(), i->label_size());
Height += i->height()+s->leading;
}
return Height;
}
void task_button_cb(TaskButton *b, Window w)
{
if(fltk::event_button()==fltk::RIGHT_MOUSE) {
TaskButton::pushed = b;
TaskButton::menu->color(b->color());
TaskButton::menu->popup(fltk::event_x(), fltk::event_y()-calculate_height(TaskButton::menu));
} else {
if(TaskBar::active==w) {
XIconifyWindow(fltk::display, w, fltk::screen);
XSync(fltk::display, True);
TaskBar::active = 0;
} else {
Fl_WM::set_active_window(w);
}
}
}
#define CLOSE 1
#define KILL 2
#define MIN 3
//#define MAX 4
#define SET_SIZE 5
#define RESTORE 6
void menu_cb(fltk::Menu_ *menu, void *)
{
// try to read information how much window can be maximized
EDE_Config wm_config(find_config_file("wmanager.conf", true));
//pGlobalConfig.get("Panel", "RunHistory", historyString,"");
Window win = TaskButton::pushed->argument();
int ID = menu->item()->argument();
int x, y, width, height, title_height;
wm_config.get("TitleBar", "Height",title_height);
switch(ID) {
case CLOSE:
if(Fl_WM::close_window(win))
break;
// Fallback to kill..
case KILL:
XKillClient(fl_display, win);
break;
case MIN:
XIconifyWindow(fltk::display, win, fltk::screen);
XSync(fltk::display, True);
TaskBar::active = 0;
break;
/*case MAX:
// This will come in next version
Fl_WM::get_workarea(x, y, width, height);
// y koord. poveca za title_height
y = y + title_height;
XMoveResizeWindow(fl_display, win, x, y, width, height);
XSync(fl_display, True);
break;*/
/*
case SET_SIZE:
{
Fl_Window *win = new Fl_Window(300, 110, _("Set Size"));
win->begin();
Fl_Box *b = new Fl_Box(_("Set size to window:"), 20);
b->label_font(b->label_font()->bold());
//b = new Fl_Box(menu_frame->label(), 20); //here goes title of window
Fl_Group *g = new Fl_Group("", 23);
Fl_Value_Input *w_width = new Fl_Value_Input(_("Width:"), 70, FL_ALIGN_LEFT, 60);
w_width->step(1);
Fl_Value_Input *w_height = new Fl_Value_Input(_("Height:"), 70, FL_ALIGN_LEFT, 60);
w_height->step(1);
g->end();
Fl_Divider *div = new Fl_Divider(10, 15);
div->layout_align(FL_ALIGN_TOP);
g = new Fl_Group("", 50, FL_ALIGN_CLIENT);
//Fl_Button *but = ok_button = new Fl_Button(40,0,100,20, _("&OK"));
//but->callback(real_set_size_cb);
but = new Fl_Button(155,0,100,20, _("&Cancel"));
//but->callback(close_set_size_cb);
g->end();
win->end();
//w_width->value(menu_frame->w());
//w_height->value(menu_frame->h());
//ok_button->user_data(menu_frame);
//win->callback(close_set_size_cb);
win->show();
}
break;*/
case RESTORE:
Fl_WM::set_active_window(win);
break;
}
fltk::redraw();
}
TaskButton::TaskButton(Window win) : fltk::Button(0,0,0,0)
{
layout_align(fltk::ALIGN_LEFT);
callback((fltk::Callback1*)task_button_cb, win);
if(!menu) {
fltk::Group *saved = fltk::Group::current();
fltk::Group::current(0);
menu = new fltk::Menu_();
menu->callback((fltk::Callback*)menu_cb);
//Fl_Widget* add(const char*, int shortcut, Fl_Callback*, void* = 0, int = 0);
menu->add(_(" Close "), 0, 0, (void*)CLOSE, fltk::MENU_DIVIDER);
new fltk::Divider(10, 15);
menu->add(_(" Kill"), 0, 0, (void*)KILL, fltk::MENU_DIVIDER);
new fltk::Divider(10, 15);
//Comes in next version
//menu->add(" Maximize", 0, 0, (void*)MAX);
menu->add(_(" Minimize"), 0, 0, (void*)MIN);
menu->add(_(" Restore"), 0, 0, (void*)RESTORE);
//menu->add(" Set size", 0, 0, (void*)SET_SIZE, FL_MENU_DIVIDER);
//-----
fltk::Group::current(saved);
}
}
/////////////////////////
// Task bar /////////////
/////////////////////////
#include "icons/tux.xpm"
static fltk::Image default_icon(tux_xpm);
// Forward declaration
static int GetState(Window w);
Window TaskBar::active = 0;
bool TaskBar::variable_width = true;
TaskBar::TaskBar()
: fltk::Group(0,0,0,0)
{
m_max_taskwidth = 150;
layout_align(fltk::ALIGN_CLIENT);
layout_spacing(2);
EDE_Config pConfig(find_config_file("ede.conf", true));
pConfig.get("Panel", "VariableWidthTaskbar",variable_width,true);
update();
end();
}
void TaskBar::layout()
{
if(!children()) return;
int maxW = w()-layout_spacing()*2;
int avgW = maxW / children();
int n;
int buttonsW = layout_spacing()*2;
for(n=0; n<children(); n++) {
int W = child(n)->width(), tmph;
if(TaskBar::variable_width) {
child(n)->preferred_size(W, tmph);
W += 10;
} else
W = avgW;
if(W > m_max_taskwidth) W = m_max_taskwidth;
child(n)->w(W);
buttonsW += W+layout_spacing();
}
float scale = 0.0f;
if(buttonsW > maxW)
scale = (float)maxW / (float)buttonsW;
int X=layout_spacing();
for(n=0; n<children(); n++) {
fltk::Widget *widget = child(n);
int W = widget->w();
if(scale>0.0f)
W = (int)((float)W * scale);
widget->resize(X, 0, W, h());
X += widget->w()+layout_spacing();
}
fltk::Widget::layout();
}
void TaskBar::update()
{
Fl_WM::clear_handled();
int n;
// Delete all icons:
for(n=0; n<children(); n++)
{
fltk::Image *i = child(n)->image();
if(i!=&default_icon)
delete i;
}
clear();
Window *wins=0;
int num_windows = Fl_WM::get_windows_mapping(wins);
if(num_windows<=0)
return;
fltk::Int_List winlist;
int current_workspace = Fl_WM::get_current_workspace();
for(n=0; n<num_windows; n++) {
if(current_workspace == Fl_WM::get_window_desktop(wins[n]) && GetState(wins[n])>0)
winlist.append(wins[n]);
}
if(winlist.size()>0) {
for(n=0; n<(int)winlist.size(); n++) {
add_new_task(winlist[n]);
}
}
delete []wins;
relayout();
redraw();
parent()->redraw();
}
void TaskBar::update_active(Window active)
{
for(int n=0; n<children(); n++)
{
fltk::Widget *w = child(n);
Window win = w->argument();
if(GetState(win) == IconicState)
w->label_color(fltk::inactive(fltk::BLACK));
else
w->label_color(fltk::Button::default_style->label_color);
if(active==win) {
TaskBar::active = win;
w->set_value();
w->color(fltk::lighter(fltk::Button::default_style->color));
w->highlight_color(fltk::lighter(fltk::Button::default_style->color));
} else {
w->clear_value();
w->color(fltk::Button::default_style->color);
w->highlight_color(fltk::Button::default_style->highlight_color);
}
}
redraw();
}
void TaskBar::update_name(Window win)
{
for(int n=0; n<children(); n++)
{
fltk::Widget *w = child(n);
Window window = w->argument();
if(window==win) {
char *name = 0;
bool ret = Fl_WM::get_window_icontitle(win, name);
if(!ret || !name) ret = Fl_WM::get_window_title(win, name);
if(ret && name) {
w->label(name);
w->tooltip(name);
free(name);
} else {
w->label("...");
w->tooltip("...");
}
// Update icon also..
fltk::Image *icon = w->image();
if(icon!=&default_icon) delete icon;
if(Fl_WM::get_window_icon(win, icon, 16, 16))
w->image(icon);
else
w->image(default_icon);
w->redraw();
break;
}
}
redraw();
}
void TaskBar::minimize_all()
{
Window *wins=0;
int num_windows = Fl_WM::get_windows_mapping(wins);
int current_workspace = Fl_WM::get_current_workspace();
for(int n=0; n<num_windows; n++) {
if(current_workspace == Fl_WM::get_window_desktop(wins[n]) && GetState(wins[n])>0)
XIconifyWindow(fltk::display, wins[n], fltk::screen);
}
XSync(fl_display, True);
active = 0;
}
void TaskBar::add_new_task(Window w)
{
// Add to Fl_WM module handled windows.
Fl_WM::handle_window(w);
TaskButton *b;
char *name = 0;
fltk::Image *icon = 0;
if (!w) return;
begin();
b = new TaskButton(w);
bool ret = Fl_WM::get_window_icontitle(w, name);
if(!ret || !name) ret = Fl_WM::get_window_title(w, name);
if(ret && name) {
b->label(name);
b->tooltip(name);
free(name);
} else {
b->label("...");
b->tooltip("...");
}
if(Fl_WM::get_window_icon(w, icon, 16, 16)) {
b->image(icon);
} else {
b->image(default_icon);
}
b->accept_focus(false);
b->align(fltk::ALIGN_LEFT | fltk::ALIGN_INSIDE | fltk::ALIGN_CLIP);
if(Fl_WM::get_active_window()==w) {
b->value(1);
active = w;
}
if(GetState(w) == IconicState)
b->label_color(fltk::inactive(fltk::BLACK));
end();
}
//////////////////////////
static void* getProperty(Window w, Atom a, Atom type, unsigned long *np, int *ret)
{
Atom realType;
int format;
unsigned long n, extra;
int status;
uchar *prop=0;
status = XGetWindowProperty(fltk::display, w, a, 0L, 0x7fffffff,
False, type, &realType,
&format, &n, &extra, (uchar**)&prop);
if(ret) *ret = status;
if (status != Success) return 0;
if (!prop) { return 0; }
if (!n) { XFree(prop); return 0; }
if (np) *np = n;
return prop;
}
static int getIntProperty(Window w, Atom a, Atom type, int deflt, int *ret)
{
void* prop = getProperty(w, a, type, 0, ret);
if(!prop) return deflt;
int r = int(*(long*)prop);
XFree(prop);
return r;
}
// 0 ERROR
// Otherwise state
static int GetState(Window w)
{
static Atom _XA_WM_STATE = 0;
if(!_XA_WM_STATE) _XA_WM_STATE = XInternAtom(fltk::display, "WM_STATE", False);
int ret=0;
int state = getIntProperty(w, _XA_WM_STATE, _XA_WM_STATE, 0, &ret);
if(ret!=Success) return 0;
return state;
}

55
eworkpanel/taskbutton.h Executable file
View File

@@ -0,0 +1,55 @@
#ifndef _TASKBUTTON_H_
#define _TASKBUTTON_H_
/*#include <efltk/Fl_Button.h>
#include <efltk/Fl_Menu_.h>
#include <efltk/Fl_WM.h>*/
#include <fltk/Button.h>
#include <fltk/Menu_.h>
#include <fltk/WM.h>
class TaskBar;
// One task in taskabr
class TaskButton : public fltk::Button
{
public:
// TashBar is needed for this pointer, so we can call update()
TaskButton(Window w);
// Menu stuff
static fltk::Menu_ *menu;
static TaskButton *pushed;
};
/////////////////////////////////////
class TaskBar : public fltk::Group
{
public:
TaskBar();
// Active window ID
static Window active;
//Are buttons variable width
static bool variable_width;
void layout();
void update();
void update_name(Window win);
void update_active(Window active);
int max_taskwidth() const { return m_max_taskwidth; }
void minimize_all();
private:
void add_new_task(Window w);
int m_max_taskwidth;
};
#endif

664
eworkpanel/workpanel.cpp Executable file
View File

@@ -0,0 +1,664 @@
// Copyright (c) 2000. - 2005. EDE Authors
// This program is licenced under terms of the
// GNU General Public Licence version 2 or newer.
// See COPYING for details.
#include "workpanel.h"
#include "aboutdialog.h"
#include "panelbutton.h"
#include "taskbutton.h"
#include "cpumonitor.h"
#include "dock.h"
#include "mainmenu.h"
#include "keyboardchooser.h"
/*#include <efltk/Fl_WM.h>
#include <efltk/Fl_String.h>
#include <efltk/Fl_Pack.h>
#include <efltk/Fl_Divider.h>
#include <efltk/Fl_Input_Browser.h>*/
#include <fltk/WM.h>
#include <fltk/String.h>
#include <fltk/Pack.h>
#include <fltk/Divider.h>
#include <fltk/Input_Browser.h>
#include "item.h"
#include <errno.h>
static fltk::Image desktop_pix((const char **)desktop_xpm);
static fltk::Image sound_pix((const char **)sound_xpm);
static fltk::Image run_pix((const char **)run_xpm);
static fltk::Image showdesktop_pix((const char **)showdesktop_xpm);
class Fl_Update_Window : public fltk::Window
{
public:
Fl_Update_Window(int, int, int, int, char*);
void setAutoHide(int a) { autoHide = a; }
int handle(int event);
int autoHide;
int initX, initY, initW, initH;
};
Fl_Update_Window *mPanelWindow;
fltk::Button *mClockBox;
fltk::Group *mModemLeds;
fltk::Box *mLedIn, *mLedOut;
fltk::Input_Browser *runBrowser;
PanelMenu *mProgramsMenu;
PanelMenu *mWorkspace;
MainMenu *mSystemMenu;
KeyboardChooser *mKbdSelect;
Dock *dock;
TaskBar *tasks;
EDE_Config pGlobalConfig(find_config_file("ede.conf", true));
void updateStats(void *);
/////////////////////////////////////////////////////////////////////////////
Fl_Update_Window::Fl_Update_Window(int X, int Y, int W, int H, char *label=0)
: fltk::Window(X, Y, W, H, label)
{
autoHide = 0;
initX = X;
initY = Y;
initW = W;
initH = H;
}
int Fl_Update_Window::handle(int event)
{
switch (event) {
case fltk::SHOW: {
int ret = fltk::Window::handle(FL_SHOW);
int is_shown = shown();
if(is_shown && !autoHide)
Fl_WM::set_window_strut(fltk::xid(mPanelWindow), 0, 0, 0, h());
if(is_shown && autoHide)
position(initX, initY);
return ret;
}
case fltk::ENTER:
if(!autoHide) {
position(initX, initY);
if(shown()) Fl_WM::set_window_strut(fltk::xid(mPanelWindow), 0, 0, 0, h());
}
else
position(initX, initY);
take_focus();
return 1;
case FL_LEAVE:
if(autoHide && fltk::event() == fltk::LEAVE) {
position(initX, initY+h()-2);
if(shown()) Fl_WM::set_window_strut(fltk::xid(mPanelWindow), 0, 0, 0, 2);
}
throw_focus();
return 1;
}
return fltk::Window::handle(event);
}
void setWorkspace(fltk::Button *, void *w)
{
Fl_WM::set_current_workspace((int) w);
}
void restoreRunBrowser() {
// Read the history of commands in runBrowser on start
runBrowser->clear();
char* historyString;
pGlobalConfig.get("Panel", "RunHistory", historyString,"");
char* token = strtok(historyString,"|");
do {
runBrowser->add(token);
} while (token = strtok(NULL, "|"));
}
bool showseconds = true;
void clockRefresh(void *)
{
mClockBox->label(fltk::Date_Time::Now().time_string().sub_str(0, 5));
strncpy(fltk::Date_Time::datePartsOrder, _("MDY"), 3);
char* pClockTooltip = strdup(Fl_Date_Time::Now().day_name());
pClockToolTip = strdupcat(pClockToolTip, ", ");
pClockTooltip = strdupcat(pClockToolTip, Fl_Date_Time::Now().date_string());
pClockToolTip = strdupcat(pClockToolTip, ", ");
pClockToolTip = strdupcat(Fl_Date_Time::Now().time_string());
mClockBox->tooltip(pClockTooltip);
mClockBox->redraw();
fltk::add_timeout(1.0, clockRefresh);
free(pClockToolTip);
}
void runUtility(fltk::Widget *, char *pCommand)
{
char cmd[256];
snprintf (cmd, sizeof(cmd)-1, "elauncher %s", pCommand);
fltk::start_child_process(cmd, false);
}
void updateSetup()
{
//printf("updateSetup()\n");
struct stat s;
// Check if configuration needs to be updated
if(!stat(pGlobalConfig.filename(), &s)) {
static long last_modified = 0;
long now = s.st_mtime;
if(last_modified>0 && last_modified==now) {
// Return if not modified
return;
}
// Store last modified time
last_modified = s.st_mtime;
}
pGlobalConfig.read_file(false);
if(pGlobalConfig.error()) {
fprintf(stderr, "[EWorkPanel Error]: %s\n", pGlobalConfig.strerror());
return;
}
bool auto_hide = false;
static bool hiden = false;
static bool last_state = false;
static bool on_start = true;
bool runbrowser;
pGlobalConfig.get("Panel", "AutoHide", auto_hide, false);
if (on_start) {
last_state = auto_hide;
pGlobalConfig.get("Panel", "RunBrowser", runbrowser, true);
if (runbrowser) { restoreRunBrowser() ; }
}
bool old_hiden = hiden;
if (auto_hide) {
mPanelWindow->setAutoHide(1);
hiden = true;
} else {
mPanelWindow->setAutoHide(0);
hiden = false;
}
if(old_hiden!=hiden || on_start) {
if(!hiden) {
mPanelWindow->position(mPanelWindow->initX, mPanelWindow->initY);
if(mPanelWindow->shown()) Fl_WM::set_window_strut(fltk::xid(mPanelWindow), 0, 0, 0, mPanelWindow->h());
} else {
mPanelWindow->position(mPanelWindow->initX, mPanelWindow->initY+mPanelWindow->h()-4);
if(mPanelWindow->shown()) Fl_WM::set_window_strut(fltk::xid(mPanelWindow), 0, 0, 0, 4);
}
}
on_start = false;
}
void updateStats(void *)
{
char pLogBuffer[1024];
static int log_len;
static struct timeval last_time;
static long last_rx=0; static long last_tx=0; static long connect_time=0;
char *ptr; int fd; char buf[1024];
long rx = -1; long tx = -1;
float spi = 0.0; float spo = 0.0;
static bool modleds = false;
int len = -1;
fd = open("/proc/net/dev", O_RDONLY);
if(fd > 0) {
len = read(fd, buf, 1023);
close(fd);
if(len>0) {
buf[len] = '\0';
ptr = strstr( buf, "ppp0" );
}
}
if(fd==-1 || len < 0 || ptr == NULL)
{
if (modleds) {
dock->remove_from_tray(mModemLeds);
modleds = false;
}
last_rx=0; last_tx=0; connect_time=0;
}
else
{
long dt; int ct; struct timeval tv;
gettimeofday(&tv, NULL);
dt = (tv.tv_sec - last_time.tv_sec) * 1000;
dt += (tv.tv_usec - last_time.tv_usec) / 1000;
if (dt > 0) {
sscanf(ptr, "%*[^:]:%ld %*d %*d %*d %*d %*d %*d %*d %ld", &rx, &tx);
spi = (rx - last_rx) / dt;
spi = spi / 1024.0 * 1000.0;
spo = (tx - last_tx) / dt;
spo = spo / 1024.0 * 1000.0;
if ( connect_time == 0 )
connect_time = tv.tv_sec;
ct = (int)(tv.tv_sec - connect_time);
snprintf(pLogBuffer, 1024,
_("Received: %ld kB (%.1f kB/s)\n"
"Sent: %ld kB (%.1f kB/s)\n"
"Duration: %d min %d sec"),
rx / 1024, spi, tx / 1024, spo, ct / 60, ct % 60 );
last_rx = rx;
last_tx = tx;
last_time.tv_sec = tv.tv_sec;
last_time.tv_usec = tv.tv_usec;
log_len = 0;
if ((int)(spi) > 0)
{
mLedIn->color( (Fl_Color)2 );
mLedIn->redraw();
}
else
{
mLedIn->color( (Fl_Color)968701184 );
mLedIn->redraw();
}
if ( (int)(spo) > 0 ) {
mLedOut->color( (Fl_Color)2 );
mLedOut->redraw();
} else {
mLedOut->color( (Fl_Color)968701184 );
mLedOut->redraw();
}
mModemLeds->tooltip(pLogBuffer);
}
if (!modleds)
{
dock->add_to_tray(mModemLeds);
modleds = true;
}
}
updateSetup();
fltk::repeat_timeout(1.0f, updateStats);
}
// Start utility, like "time/date" or "volume"
void startUtility(fltk::Button *, void *pName)
{
char* value;
pGlobalConfig.get("Panel", pName, value, "");
if(!pGlobalConfig.error() && strlen(value)>0) {
char* value2 = strdup("elauncher \"");
value2 = strdupcat(value2,value);
value2 = strdupcat(value2,"\"");
fltk::start_child_process(value2, false);
free(value2);
}
free(value);
}
void updateWorkspaces(fltk::Widget*,void*)
{
bool showapplet;
pGlobalConfig.get("Panel", "Workspaces", showapplet, true);
if (!showapplet) { return; }
mWorkspace->clear();
mWorkspace->begin();
char **names=0;
int count = Fl_WM::get_workspace_count();
int names_count = Fl_WM::get_workspace_names(names);
int current = Fl_WM::get_current_workspace();
for(int n=0; n<count; n++) {
fltk::Item *i = new fltk::Item();
i->callback( (fltk::Callback *) setWorkspace, (void*)n);
i->type(fltk::Item::RADIO);
if(n<names_count && names[n]) {
i->label(names[n]);
delete []names[n];
} else {
char* tmp;
sprintf(tmp,"%s %d", _("Workspace") ,n+1);
i->label(tmp);
free(tmp);
}
if(current==n) i->set_value();
}
if(names) delete []names;
mWorkspace->end();
}
void FL_WM_handler(fltk::Widget *w, void *d)
{
if(fltk::WM::action()==fltk::WM::WINDOW_NAME || fltk::WM::action()==fltk::WM::WINDOW_ICONNAME) {
tasks->update_name(fltk::WM::window());
}
if(fltk::WM::action()==fltk::WM::WINDOW_ACTIVE) {
tasks->update_active(fltk::WM::get_active_window());
}
else if(fltk::WM::action() >= fltk::WM::WINDOW_LIST && fltk::WM::action() <= fltk::WM::WINDOW_DESKTOP) {
tasks->update();
}
else if(fltk::WM::action()>0 && fltk::WM::action()<fltk::WM::DESKTOP_WORKAREA) {
updateWorkspaces(w, d);
tasks->update();
}
}
#define DEBUG
void terminationHandler(int signum)
{
#ifndef DEBUG
// to crash the whole X session can make people worried so try it
// to save anymore...
execlp("eworkpanel", "eworkpanel", 0);
#else
fprintf(stderr, "\n\nEWorkPanel has just crashed! Please report bug to efltk-bugs@fltk.net\n\n");
abort();
#endif
}
void cb_run_app(Fl_Input *i, void*)
{
char* exec = strdup(i->value());
if (strcmp(exec,"")==0 || strcmp(exec," ")==0)
return;
char* exec2 = strdup("elauncher \"");
exec2 = strdupcat(exec2,exec);
exec2 = strdupcat(exec2,"\"");
fltk::start_child_process(exec, false);
fltk::Input_Browser *ib = (fltk::Input_Browser *)i->parent();
if (!ib->find(i->value())) {
ib->add(i->value());
int c = 0;
if (ib->children() > 15) c = ib->children() - 15;
char* history;
for (; c < ib->children()-1; c++) {
history = strdupcat(ib->child(c)->label());
history = strdupcat("|");
}
history = strdupcat(ib->child(ib->children()-1)->label());
pGlobalConfig.set("Panel", "RunHistory", history);
pGlobalConfig.flush();
}
i->value("");
}
void cb_run_app2(fltk::Input_Browser *i, void*) { cb_run_app(i->input(), 0); }
void cb_showdesktop(fltk::Button *) {
// spagetti code - workpanel.cpp needs to be cleaned up of extraneous code
tasks->minimize_all();
}
int main(int argc, char **argv)
{
signal(SIGCHLD, SIG_IGN);
signal(SIGSEGV, terminationHandler);
// fl_init_locale_support("eworkpanel", PREFIX"/share/locale");
fltk::init_images_lib();
int X=0,Y=0,W=Fl::w(),H=Fl::h();
int substract;
// Get current workarea
Fl_WM::get_workarea(X,Y,W,H);
//printf("Free area: %d %d %d %d\n", X,Y,W,H);
// We expect that other docks are moving away from panel :)
mPanelWindow = new Fl_Update_Window(X, Y+H-30, W, 30, "Workpanel");
mPanelWindow->layout_spacing(0);
// Panel is type DOCK
mPanelWindow->window_type(Fl_WM::DOCK);
mPanelWindow->setAutoHide(0);
// Read config
bool doShowDesktop;
pGlobalConfig.get("Panel", "ShowDesktop", doShowDesktop, false);
bool doWorkspaces;
pGlobalConfig.get("Panel", "Workspaces", doWorkspaces, true);
bool doRunBrowser;
pGlobalConfig.get("Panel", "RunBrowser", doRunBrowser, true);
bool doSoundMixer;
pGlobalConfig.get("Panel", "SoundMixer", doSoundMixer, true);
bool doCpuMonitor;
pGlobalConfig.get("Panel", "CPUMonitor", doCpuMonitor, true);
// Group that holds everything..
fltk::Group *g = new fltk::Group(0,0,0,0);
g->box(fltk::DIV_UP_BOX);
g->layout_spacing(2);
g->layout_align(fltk::ALIGN_CLIENT);
g->begin();
mSystemMenu = new MainMenu();
fltk::VertDivider *v = new fltk::VertDivider(0, 0, 5, 18, "");
v->layout_align(fltk::ALIGN_LEFT);
substract = 5;
if ((doShowDesktop) || (doWorkspaces)) {
//this is ugly:
int size;
if ((doShowDesktop) && (doWorkspaces)) { size=48; } else { size=24; }
fltk::Group *g2 = new fltk::Group(0,0,size,22);
g2->box(fltk::FLAT_BOX);
g2->layout_spacing(0);
g2->layout_align(fltk::ALIGN_LEFT);
// Show desktop button
if (doShowDesktop) {
PanelButton *mShowDesktop;
mShowDesktop = new PanelButton(0, 0, 24, 22, fltk::NO_BOX, fltk::DOWN_BOX, "ShowDesktop");
mShowDesktop->layout_align(fltk::ALIGN_LEFT);
mShowDesktop->label_type(fltk::NO_LABEL);
mShowDesktop->align(fltk::ALIGN_INSIDE|fltk::ALIGN_CENTER);
mShowDesktop->image(showdesktop_pix);
mShowDesktop->tooltip(_("Show desktop"));
mShowDesktop->callback( (fltk::Callback*)cb_showdesktop);
mShowDesktop->show();
substract += 26;
}
// Workspaces panel
if (doWorkspaces) {
mWorkspace = new PanelMenu(0, 0, 24, 22, fltk::NO_BOX, fltk::DOWN_BOX, "WSMenu");
mWorkspace->layout_align(fltk::ALIGN_LEFT);
mWorkspace->label_type(fltk::NO_LABEL);
mWorkspace->align(fltk::ALIGN_INSIDE|fltk::ALIGN_CENTER);
mWorkspace->image(desktop_pix);
mWorkspace->tooltip(_("Workspaces"));
mWorkspace->end();
substract += 26;
}
g2->end();
g2->show();
g2->resizable();
v = new fltk::VertDivider(0, 0, 5, 18, "");
v->layout_align(fltk::ALIGN_LEFT);
substract += 5;
}
// Run browser
if (doRunBrowser) {
runBrowser = new fltk::Input_Browser("",100,fltk::ALIGN_LEFT,30);
//runBrowser->image(run_pix);
//runBrowser->box(FL_THIN_DOWN_BOX);
// Added _ALWAYS so callback is in case:
// 1) select old command from input browser
// 2) press enter to execute. (this won't work w/o _ALWAYS)
// runBrowser->input()->when(FL_WHEN_ENTER_KEY_ALWAYS | FL_WHEN_RELEASE_ALWAYS);
// Vedran: HOWEVER, with _ALWAYS cb_run_app will be called way
// too many times, causing fork-attack
runBrowser->input()->when(fltk::WHEN_ENTER_KEY);
runBrowser->input()->callback((fltk::Callback*)cb_run_app);
runBrowser->callback((fltk::Callback*)cb_run_app2);
v = new fltk::VertDivider(0, 0, 5, 18, "");
v->layout_align(fltk::ALIGN_LEFT);
substract += 105;
}
// Popup menu for the whole taskbar
fltk::Menu_Button *mPopupPanelProp = new fltk::Menu_Button( 0, 0, W, 28 );
mPopupPanelProp->type( fltk::Menu_Button::POPUP3 );
mPopupPanelProp->anim_flags(fltk::Menu_::LEFT_TO_RIGHT);
mPopupPanelProp->anim_speed(0.8);
mPopupPanelProp->begin();
fltk::Item *mPanelSettings = new fltk::Item(_("Settings"));
mPanelSettings->x_offset(12);
mPanelSettings->callback( (fltk::Callback*)runUtility, (void*)"epanelconf" );
new fltk::Divider(10, 5);
fltk::Item *mAboutItem = new fltk::Item(_("About EDE..."));
mAboutItem->x_offset(12);
mAboutItem->callback( (fltk::Callback *)AboutDialog );
mPopupPanelProp->end();
// Subgroup to properly align everything
/* Fl_Group *subgroup;
{
subgroup = new Fl_Group(0, 0, W-substract, 18);
subgroup->box(FL_FLAT_BOX);
subgroup->layout_align(FL_ALIGN_RIGHT);
subgroup->show();
subgroup->begin(); */
// Taskbar...
tasks = new TaskBar();
dock = new Dock();
v = new fltk::VertDivider(0, 0, 5, 18, "");
v->layout_align(fltk::ALIGN_RIGHT);
/* subgroup->end();
}*/
{
// MODEM
mModemLeds = new fltk::Group(0, 0, 25, 18);
mModemLeds->box(fltk::FLAT_BOX);
mModemLeds->hide();
mLedIn = new fltk::Box(2, 5, 10, 10);
mLedIn->box( fltk::OVAL_BOX );
mLedIn->color( (fltk::Color)968701184);
mLedOut = new fltk::Box(12, 5, 10, 10);
mLedOut->box( fltk::OVAL_BOX);
mLedOut->color( (fltk::Color)968701184);
mModemLeds->end();
}
{
// KEYBOARD SELECT
mKbdSelect = new KeyboardChooser(0, 0, 20, 18, fltk::NO_BOX, fltk::DOWN_BOX, "us");
mKbdSelect->hide();
mKbdSelect->anim_speed(4);
mKbdSelect->label_font(mKbdSelect->label_font()->bold());
mKbdSelect->highlight_color(mKbdSelect->selection_color());
mKbdSelect->highlight_label_color( mKbdSelect->selection_text_color());
}
{
// CLOCK
mClockBox = new fltk::Button(0, 0, 50, 20);
mClockBox->align(fltk::ALIGN_INSIDE|fltk::ALIGN_LEFT);
mClockBox->hide();
mClockBox->box(fltk::FLAT_BOX);
mClockBox->callback( (Fl_Callback*)startUtility, (void*)"Time and date");
}
dock->add_to_tray(mClockBox);
dock->add_to_tray(mKbdSelect);
// SOUND applet
if (doSoundMixer) {
fltk::Button *mSoundMixer;
mSoundMixer = new fltk::Button(0, 0, 20, 18);
mSoundMixer->hide();
mSoundMixer->box(fltk::NO_BOX);
mSoundMixer->focus_box(fltk::NO_BOX);
mSoundMixer->image(sound_pix);
mSoundMixer->tooltip(_("Volume control"));
mSoundMixer->align(fltk::ALIGN_INSIDE);
mSoundMixer->callback( (fltk::Callback*)startUtility, (void*)"Volume Control" );
dock->add_to_tray(mSoundMixer);
}
// CPU monitor
if (doCpuMonitor) {
CPUMonitor *cpumon;
cpumon = new CPUMonitor();
cpumon->hide();
dock->add_to_tray(cpumon);
}
fltk::focus(mSystemMenu);
mPanelWindow->end();
mPanelWindow->show(argc, argv);
Fl_WM::callback(FL_WM_handler, 0, Fl_WM::DESKTOP_COUNT |
Fl_WM::DESKTOP_NAMES |
Fl_WM::DESKTOP_CHANGED|
Fl_WM::WINDOW_LIST|
Fl_WM::WINDOW_DESKTOP|
Fl_WM::WINDOW_ACTIVE|
Fl_WM::WINDOW_NAME|
Fl_WM::WINDOW_ICONNAME);
updateWorkspaces(0,0);
fltk::add_timeout(0, clockRefresh);
fltk::add_timeout(0, updateStats);
while(mPanelWindow->shown())
fltk::wait();
}

114
eworkpanel/workpanel.h Executable file
View File

@@ -0,0 +1,114 @@
// Equinox Desktop Environment - main panel
// Copyright (C) 2000-2002 Martin Pekar
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef workpanel_h
#define workpanel_h
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
#include <stddef.h>
#include <dirent.h>
#include <unistd.h>
#include <pwd.h>
#include <sys/time.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <dirent.h>
/*#include <efltk/Fl.h>
#include <efltk/Fl_Window.h>
#include <efltk/x.h>
#include <efltk/Fl_Menu_Button.h>
#include <efltk/Fl_Item_Group.h>
#include <efltk/Fl_ProgressBar.h>
#include <efltk/Fl_Item.h>
#include <efltk/filename.h>
#include <efltk/Fl_Dial.h>
#include <efltk/Fl_Pack.h>
#include <efltk/Fl_Box.h>
#include <efltk/Fl_Divider.h>
#include <efltk/Fl_Image.h>
#include <efltk/Fl_Button.h>
#include <efltk/Fl_Radio_Button.h>
#include <efltk/Fl_Color_Chooser.h>
#include <efltk/Fl_Menu_Bar.h>
#include <efltk/Fl_Button.h>
#include <efltk/Fl_Input.h>
#include <efltk/Fl_Output.h>
#include <efltk/fl_ask.h>
#include <efltk/Fl_Tabs.h>
#include <efltk/Fl_Scroll.h>
#include <efltk/Fl_Shaped_Window.h>
#include <efltk/Fl_Overlay_Window.h>
#include <efltk/Fl_FileBrowser.h>
#include <efltk/Fl_Font.h>
#include <efltk/Fl_Config.h>
#include <efltk/Fl_Util.h>
#include <efltk/Fl_Image.h>
#include <efltk/Fl_Images.h>
#include <efltk/Fl_Locale.h>*/
#include <fltk/Fl.h>
#include <fltk/Window.h>
#include <fltk/x.h>
#include <fltk/Menu_Button.h>
#include <fltk/Item_Group.h>
#include <fltk/ProgressBar.h>
#include <fltk/Item.h>
#include <fltk/filename.h>
#include <fltk/Dial.h>
#include <fltk/Pack.h>
#include <fltk/Box.h>
#include <fltk/Divider.h>
#include <fltk/Image.h>
#include <fltk/Button.h>
#include <fltk/Radio_Button.h>
#include <fltk/Color_Chooser.h>
#include <fltk/Menu_Bar.h>
#include <fltk/Button.h>
#include <fltk/Input.h>
#include <fltk/Output.h>
#include <fltk/ask.h>
#include <fltk/Tabs.h>
#include <fltk/Scroll.h>
#include <fltk/Shaped_Window.h>
#include <fltk/Overlay_Window.h>
#include <fltk/FileBrowser.h>
#include <fltk/Font.h>
#include "EDE_Config.h"
#include <fltk/Util.h>
#include <fltk/Image.h>
#include <fltk/Images.h>
#include "NLS.h"
#include "icons/sound.xpm"
#include "icons/desktop.xpm"
#include "icons/run.xpm"
#include "icons/showdesktop.xpm"
#endif