From 0c8e41bd3726878bc0efe84c8049bc699948ae90 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Tue, 22 May 2007 14:53:17 +0000 Subject: [PATCH] Imported new eiconman --- eiconman/DesktopConfig.cpp | 197 +++++ eiconman/DesktopConfig.h | 54 ++ eiconman/DesktopIcon.cpp | 313 ++++++++ eiconman/DesktopIcon.h | 76 ++ eiconman/Jamfile | 16 - eiconman/Makefile | 22 - eiconman/Utils.cpp | 175 +++++ eiconman/Utils.h | 24 + eiconman/edeskconf.cpp | 159 ---- eiconman/edeskconf.fl | 163 ---- eiconman/edeskconf.fld | 143 ---- eiconman/edeskconf.h | 45 -- eiconman/edeskicon.cpp | 594 --------------- eiconman/edeskicon.h | 109 --- eiconman/eiconman.conf | 33 + eiconman/eiconman.cpp | 1373 +++++++++++++++------------------- eiconman/eiconman.h | 185 +++-- eiconman/fl/deskconf.fl | 87 +++ eiconman/icons/clean.xpm | 20 - eiconman/icons/monitor.xpm | 174 ----- eiconman/locale/hu.po | 209 ------ eiconman/locale/id.po | 258 ------- eiconman/locale/messages.pot | 218 ------ eiconman/locale/ru.po | 259 ------- eiconman/locale/sk.po | 258 ------- eiconman/locale/sr.po | 249 ------ eiconman/propdialog.cpp | 146 ---- eiconman/propdialog.fl | 126 ---- eiconman/propdialog.fld | 115 --- eiconman/propdialog.h | 24 - 30 files changed, 1648 insertions(+), 4176 deletions(-) create mode 100644 eiconman/DesktopConfig.cpp create mode 100644 eiconman/DesktopConfig.h create mode 100644 eiconman/DesktopIcon.cpp create mode 100644 eiconman/DesktopIcon.h delete mode 100644 eiconman/Jamfile delete mode 100644 eiconman/Makefile create mode 100644 eiconman/Utils.cpp create mode 100644 eiconman/Utils.h delete mode 100644 eiconman/edeskconf.cpp delete mode 100644 eiconman/edeskconf.fl delete mode 100644 eiconman/edeskconf.fld delete mode 100644 eiconman/edeskconf.h delete mode 100644 eiconman/edeskicon.cpp delete mode 100644 eiconman/edeskicon.h create mode 100644 eiconman/eiconman.conf create mode 100644 eiconman/fl/deskconf.fl delete mode 100644 eiconman/icons/clean.xpm delete mode 100644 eiconman/icons/monitor.xpm delete mode 100644 eiconman/locale/hu.po delete mode 100644 eiconman/locale/id.po delete mode 100644 eiconman/locale/messages.pot delete mode 100644 eiconman/locale/ru.po delete mode 100644 eiconman/locale/sk.po delete mode 100644 eiconman/locale/sr.po delete mode 100644 eiconman/propdialog.cpp delete mode 100644 eiconman/propdialog.fl delete mode 100644 eiconman/propdialog.fld delete mode 100644 eiconman/propdialog.h diff --git a/eiconman/DesktopConfig.cpp b/eiconman/DesktopConfig.cpp new file mode 100644 index 0000000..38c4e29 --- /dev/null +++ b/eiconman/DesktopConfig.cpp @@ -0,0 +1,197 @@ +/* + * $Id$ + * + * Eiconman, desktop and icon manager + * Part of Equinox Desktop Environment (EDE). + * Copyright (c) 2000-2007 EDE Authors. + * + * This program is licensed under terms of the + * GNU General Public License version 2 or newer. + * See COPYING for details. + */ + +#include "DesktopConfig.h" +#include "Utils.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include // strdup +#include // free + +#define MAX_DESKTOPS 32 + +void close_cb(fltk::Widget*, void* w) { + DesktopConfig* dc = (DesktopConfig*)w; + + EDEBUG("ws: %i\n", net_get_workspace_count()); + EDEBUG("cd: %i\n", net_get_current_desktop()); + dc->hide(); +} + +void wp_use_cb(fltk::Widget*, void* w) { + DesktopConfig* dc = (DesktopConfig*)w; + dc->disable_wp(); +} + +void color_box_cb(fltk::Widget*, void* w) { + DesktopConfig* dc = (DesktopConfig*)w; + + fltk::Color col = dc->bkg_color(); + if(fltk::color_chooser(_("Background color"), col)) + dc->set_color(col); +} + +void img_browse_cb(fltk::Widget*, void* w) { + DesktopConfig* dc = (DesktopConfig*)w; + + const char* f = fltk::file_chooser(_("Choose image"), "Image files (*.{jpg,png,xpm})", 0); + if(f) + dc->set_preview_image(f); +}; + +PreviewBox::PreviewBox(int x, int y, int w, int h, const char* l) : fltk::InvisibleBox(x,y,w,h) +{ +} + +PreviewBox::~PreviewBox() +{ +} + +void PreviewBox::draw(void) { + draw_box(); + + if(image()) { + fltk::Rectangle ir(0,0,w(),h()); + box()->inset(ir); + fltk::Image* im = (fltk::Image*)image(); + im->draw(ir); + } + + /* + if(image()) { + fltk::Image* im = (fltk::Image*)image(); + fltk::drawimage(im->buffer(), im->buffer_pixeltype(), fltk::Rectangle(im->width(), im->height())); + }*/ +} + +DesktopConfig::DesktopConfig() : fltk::Window(540, 265, _("Background settings")) { + + begin(); + // monitor + fltk::InvisibleBox* m1 = new fltk::InvisibleBox(75, 175, 100, 15); + m1->box(fltk::BORDER_BOX); + fltk::InvisibleBox* m2 = new fltk::InvisibleBox(20, 20, 210, 160); + m2->box(fltk::THIN_UP_BOX); + + preview = new PreviewBox(30, 30, 190, 140); + preview->box(fltk::DOWN_BOX); + preview->color(56); + + fltk::InvisibleBox* m4 = new fltk::InvisibleBox(50, 185, 145, 15); + m4->box(fltk::THIN_UP_BOX); + + // fetch workspace names + fltk::Choice* ws_names = new fltk::Choice(310, 20, 220, 25, _("Desktop:")); + ws_names->begin(); + + new fltk::Item(_("All desktops")); + + //char* names[MAX_DESKTOPS]; + char** names; + int nsz = net_get_workspace_names(names); + EDEBUG("nsz: %i\n", nsz); + + if(nsz > 0) { + for(int i = 0; i < nsz; i++) { + fltk::Item* item = new fltk::Item(); + item->copy_label(names[i]); + //free(names[i]); + } + + XFreeStringList(names); + } + ws_names->end(); + + // rest + use_wp = new fltk::CheckButton(310, 60, 20, 20, _("Use wallpaper")); + use_wp->align(fltk::ALIGN_RIGHT); + use_wp->callback(wp_use_cb, this); + use_wp->value(1); + + img_path = new fltk::Input(310, 95, 190, 25, _("Image:")); + img_browse = new fltk::Button(505, 95, 25, 25, "..."); + img_browse->callback(img_browse_cb, this); + + img_choice = new fltk::Choice(310, 130, 220, 25, _("Mode:")); + img_choice->begin(); + new fltk::Item(_("Normal")); + new fltk::Item(_("Center")); + new fltk::Item(_("Stretch")); + new fltk::Item(_("Aspect stretch")); + new fltk::Item(_("Tile")); + img_choice->end(); + + color_box = new fltk::Button(310, 175, 25, 25, _("Background color")); + color_box->color((fltk::Color)0x3ca700); + color_box->align(fltk::ALIGN_RIGHT); + color_box->callback(color_box_cb, this); + + new fltk::Button(250, 230, 90, 25, _("&OK")); + new fltk::Button(345, 230, 90, 25, _("&Apply")); + fltk::Button* close = new fltk::Button(440, 230, 90, 25, _("&Cancel")); + close->callback(close_cb, this); + end(); +} + +DesktopConfig::~DesktopConfig() +{ +} + +void DesktopConfig::run(void) { + if(!shown()) + show(); + + while(visible()) + fltk::wait(); +} + +void DesktopConfig::disable_wp(void) { + if(!use_wp->value()) { + img_path->deactivate(); + img_browse->deactivate(); + img_choice->deactivate(); + } else { + img_path->activate(); + img_browse->activate(); + img_choice->activate(); + } +} + +void DesktopConfig::set_preview_color(unsigned int c) { + preview->color(c); + preview->redraw(); +} + +void DesktopConfig::set_color(unsigned int c) { + color_box->color(c); + color_box->redraw(); + + set_preview_color(c); +} + +void DesktopConfig::set_preview_image(const char* path) { + EASSERT(path != NULL); + + wp_path = path; + + preview->image(fltk::SharedImage::get(wp_path.c_str())); + preview->redraw(); + img_path->value(wp_path.c_str()); +} diff --git a/eiconman/DesktopConfig.h b/eiconman/DesktopConfig.h new file mode 100644 index 0000000..29c1ef0 --- /dev/null +++ b/eiconman/DesktopConfig.h @@ -0,0 +1,54 @@ +/* + * $Id$ + * + * Eiconman, desktop and icon manager + * Part of Equinox Desktop Environment (EDE). + * Copyright (c) 2000-2007 EDE Authors. + * + * This program is licensed under terms of the + * GNU General Public License version 2 or newer. + * See COPYING for details. + */ + +#ifndef __DESKTOPCONFIG_H__ +#define __DESKTOPCONFIG_H__ + +#include +#include +#include +#include +#include +#include +#include + +class PreviewBox : public fltk::InvisibleBox { + public: + PreviewBox(int x, int y, int w, int h, const char* l = 0); + ~PreviewBox(); + virtual void draw(void); +}; + +class DesktopConfig : public fltk::Window { + private: + fltk::Input* img_path; + fltk::Button* img_browse; + fltk::Choice* img_choice; + fltk::CheckButton* use_wp; + PreviewBox* preview; + fltk::Button* color_box; + + edelib::String wp_path; + + public: + DesktopConfig(); + ~DesktopConfig(); + + void run(void); + void disable_wp(void); + void set_preview_color(unsigned int c); + void set_preview_image(const char* path); + void set_color(unsigned int c); + unsigned int bkg_color(void) { return color_box->color(); } +}; + +#endif diff --git a/eiconman/DesktopIcon.cpp b/eiconman/DesktopIcon.cpp new file mode 100644 index 0000000..84461f7 --- /dev/null +++ b/eiconman/DesktopIcon.cpp @@ -0,0 +1,313 @@ +/* + * $Id$ + * + * Eiconman, desktop and icon manager + * Part of Equinox Desktop Environment (EDE). + * Copyright (c) 2000-2007 EDE Authors. + * + * This program is licensed under terms of the + * GNU General Public License version 2 or newer. + * See COPYING for details. + */ + +#include "DesktopIcon.h" +#include "eiconman.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include // Pixmap + +// fuck ! +#define Window XWindow + #include +#undef Window + +// default icon size +#define ICONSIZE 48 + +// spaces around box in case of large/small icons +#define OFFSET_W 16 +#define OFFSET_H 16 + +#if 0 +inline int calc_pitch(int bytespp, int width) { + if(!bytespp || !width) + return 0; + int p = bytespp * width; + return ((p + 3) & ~3); // word aligning +} +#endif + +DesktopIcon::DesktopIcon(GlobalIconSettings* gisett, IconSettings* isett, int icon_type) : + fltk::Widget(isett->x, isett->y, ICONSIZE, ICONSIZE), settings(NULL) +{ + EASSERT(gisett != NULL); EASSERT(isett != NULL); + + type = icon_type; + + lwidth = lheight = 0; + focus = false; + micon = false; + + image_w = image_h = ICONSIZE; + + /* + * GlobalIconSettings is shared from desktop so we only + * reference it. On other hand IconSettings is not shared + * and we must construct a copy from given parameter + */ + globals = gisett; + + settings = new IconSettings; + settings->name = isett->name; + settings->cmd = isett->cmd; + settings->icon = isett->icon; + + // x,y are not needed since x(), y() are filled with it + + label(settings->name.c_str()); + + if(!settings->icon.empty()) { + const char* nn = settings->icon.c_str(); + + edelib::IconSizes isize = edelib::ICON_SIZE_MEDIUM; + edelib::String ipath = edelib::IconTheme::get(nn, isize); + + /* + * Resize box according to size from IconSizes. + * + * Here is avoided image()->measure() since looks like + * that function messes up icon's alpha blending if is widget + * resizes (but not icon). This is a bug in fltk. + */ + if(isize >= ICONSIZE) { + image_w = isize; + image_h = isize; + + resize(image_w + OFFSET_W, image_h + OFFSET_H); + } + + nn = ipath.c_str(); + image(fltk::SharedImage::get(nn)); + } + + EDEBUG(ESTRLOC ": Got label: %s\n", label()); + EDEBUG(ESTRLOC ": Got image: %s\n", settings->icon.c_str()); + EDEBUG(ESTRLOC ": Got x/y : %i %i\n", x(), y()); + + align(fltk::ALIGN_WRAP); + update_label_size(); + + pmenu = new fltk::PopupMenu(0, 0, 100, 100); + pmenu->begin(); + if(type == ICON_TRASH) { + edelib::Item* it = new edelib::Item(_("&Open")); + it->offset_x(12, 12); + it = new edelib::Item(_("&Properties")); + it->offset_x(12, 12); + new fltk::Divider(); + it = new edelib::Item(_("&Empty")); + it->offset_x(12, 12); + } else { + edelib::Item* it = new edelib::Item(_("&Open")); + it->offset_x(12, 12); + it = new edelib::Item(_("&Rename")); + it->offset_x(12, 12); + it = new edelib::Item(_("&Delete")); + it->offset_x(12, 12); + new fltk::Divider(); + it = new edelib::Item(_("&Properties")); + it->offset_x(12, 12); + } + pmenu->end(); + pmenu->type(fltk::PopupMenu::POPUP3); +} + +DesktopIcon::~DesktopIcon() +{ + if(settings) { + EDEBUG(ESTRLOC ": IconSettings clearing from ~DesktopIcon()\n"); + delete settings; + } + + if(micon) + delete micon; +} + +void DesktopIcon::update_label_size(void) { + lwidth = globals->label_maxwidth; + lheight= 0; + + // FIXME: really needed ??? + fltk::setfont(labelfont(), labelsize()); + + //fltk::measure(label(), lwidth, lheight, fltk::ALIGN_WRAP); + fltk::measure(label(), lwidth, lheight, flags()); + + lwidth += 8; + lheight += 4; +} + +void DesktopIcon::drag(int x, int y, bool apply) { + if(!micon) { + micon = new MovableIcon(this); + micon->show(); + } + + EASSERT(micon != NULL); + + micon->position(x, y); + + if(apply) { + position(micon->x(), micon->y()); + delete micon; + micon = 0; + } +} + +// Used only in Desktop::move_selection +int DesktopIcon::drag_icon_x(void) { + if(!micon) + return x(); + else + return micon->x(); +} + +// Used only in Desktop::move_selection +int DesktopIcon::drag_icon_y(void) { + if(!micon) + return y(); + else + return micon->y(); +} + +void DesktopIcon::draw(void) { + if(image()) { + fltk::Image* ii = (fltk::Image*)image(); + int ix = (w()/2) - (ii->w()/2); + /* + * Make sure to pickup image's w() and h() since if fltk is compiled + * with Xrender it will be scaled to rectangle's w()/h(). + * + * On other hand, if fltk is _not_ compiled with Xrender, + * scaling will not be done. + * Yuck ! + */ + fltk::Rectangle ir(ix, 5, ii->w(), ii->h()); + ii->draw(ir); + } + + if(globals->label_draw) { + int X = w()-(w()/2)-(lwidth/2); + int Y = h()+2; + + if(!globals->label_transparent) { + fltk::setcolor(globals->label_background); + fltk::fillrect(X, Y, lwidth, lheight); + } + + Rectangle r(X, Y, lwidth, lheight); + + fltk::setcolor(globals->label_foreground); + drawtext(label(), r, flags()); + + if(is_focused()) { + /* + * draw focused box on our way so later + * this can be used to draw customised boxes + */ + fltk::line_style(fltk::DOT); + + fltk::push_matrix(); + + //fltk::setcolor(fltk::WHITE); + fltk::setcolor(globals->label_foreground); + fltk::addvertex(X,Y); + fltk::addvertex(X+lwidth,Y); + fltk::addvertex(X+lwidth,Y+lheight); + fltk::addvertex(X,Y+lheight); + fltk::addvertex(X,Y); + fltk::strokepath(); + + fltk::pop_matrix(); + + // revert to default line style + fltk::line_style(0); + } + } +} + +int DesktopIcon::handle(int event) { + //EDEBUG("Event %i on child\n", event); + + switch(event) { + case fltk::ENTER: + EDEBUG(ESTRLOC ": ENTER\n"); + return 1; + case fltk::LEAVE: + EDEBUG(ESTRLOC ": LEAVE\n"); + return 1; + /* + * We have to handle fltk::MOVE too, if + * want to get only once fltk::ENTER when + * entered or fltk::LEAVE when leaved. + */ + case fltk::MOVE: + return 1; + case fltk::PUSH: + if(fltk::event_button() == 3) + pmenu->popup(); + return 1; + case fltk::RELEASE: + if(fltk::event_clicks() > 0) + EDEBUG(ESTRLOC ": EXECUTE: %s\n", settings->cmd.c_str()); + return 1; + + case fltk::FOCUS: + case fltk::UNFOCUS: + return 1; + } + + return fltk::Widget::handle(event); +} + +MovableIcon::MovableIcon(DesktopIcon* ic) : fltk::Window(ic->x(), ic->y(), ic->w(), ic->h()), icon(ic) { + EASSERT(icon != NULL); + + set_override(); + create(); + + + fltk::Image* img = icon->icon_image(); + if(img) + image(img); + +/* + * Disabled until icon -> icon mask conversion be finished + */ + +#if 0 + if(img) { +#ifdef SHAPE + Pixmap mask = create_pixmap_mask(img->width(), img->height()); + XShapeCombineMask(fltk::xdisplay, fltk::xid(this), ShapeBounding, 0, 0, mask, ShapeSet); +#else + image(img); +#endif + } +#endif +} + +MovableIcon::~MovableIcon() +{ +} + diff --git a/eiconman/DesktopIcon.h b/eiconman/DesktopIcon.h new file mode 100644 index 0000000..c5a5dd0 --- /dev/null +++ b/eiconman/DesktopIcon.h @@ -0,0 +1,76 @@ +/* + * $Id$ + * + * Eiconman, desktop and icon manager + * Part of Equinox Desktop Environment (EDE). + * Copyright (c) 2000-2007 EDE Authors. + * + * This program is licensed under terms of the + * GNU General Public License version 2 or newer. + * See COPYING for details. + */ + +#ifndef __DESKTOPICON_H__ +#define __DESKTOPICON_H__ + +#include +#include +#include +#include + +#define ICON_NORMAL 1 +#define ICON_TRASH 2 + +class GlobalIconSettings; +class IconSettings; +class MovableIcon; + +class DesktopIcon : public fltk::Widget { + private: + IconSettings* settings; + const GlobalIconSettings* globals; + + int type; + int lwidth; + int lheight; + bool focus; + + // pseudosizes (nor real icon sizes) + int image_w; + int image_h; + + fltk::PopupMenu* pmenu; + MovableIcon* micon; + + void update_label_size(void); + + public: + DesktopIcon(GlobalIconSettings* gisett, IconSettings* isett, int icon_type = NORMAL); + ~DesktopIcon(); + virtual void draw(void); + virtual int handle(int event); + void drag(int x, int y, bool apply); + int drag_icon_x(void); + int drag_icon_y(void); + + /* + * Here is implemented localy focus schema avoiding + * messy fltk one. Focus/unfocus is handled from Desktop. + */ + void do_focus(void) { focus = true; } + void do_unfocus(void) { focus = false; } + bool is_focused(void) { return focus; } + + fltk::Image* icon_image(void) { return (fltk::Image*)image(); } +}; + +class MovableIcon : public fltk::Window { + private: + DesktopIcon* icon; + + public: + MovableIcon(DesktopIcon* i); + ~MovableIcon(); +}; + +#endif diff --git a/eiconman/Jamfile b/eiconman/Jamfile deleted file mode 100644 index 7e2e783..0000000 --- a/eiconman/Jamfile +++ /dev/null @@ -1,16 +0,0 @@ -# -# $Id$ -# -# Part of Equinox Desktop Environment (EDE). -# Copyright (c) 2000-2007 EDE Authors. -# -# This program is licenced under terms of the -# GNU General Public Licence version 2 or newer. -# See COPYING for details. - -SubDir TOP eiconman ; - -SOURCE = eiconman.cpp edeskicon.cpp propdialog.cpp edeskconf.cpp ; - -MakeEfltkProgram eiconman : $(SOURCE) ; -ExtractStrings locale : $(SOURCE) ; diff --git a/eiconman/Makefile b/eiconman/Makefile deleted file mode 100644 index 9783f58..0000000 --- a/eiconman/Makefile +++ /dev/null @@ -1,22 +0,0 @@ - -CPPFILES = eiconman.cpp edeskicon.cpp propdialog.cpp edeskconf.cpp ../edelib2/EDE_Config.cpp ../edelib2/EDE_Run.cpp ../edelib2/pty.cpp ../edelib2/process.cpp -TARGET = eiconman - -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 - diff --git a/eiconman/Utils.cpp b/eiconman/Utils.cpp new file mode 100644 index 0000000..8c6b9af --- /dev/null +++ b/eiconman/Utils.cpp @@ -0,0 +1,175 @@ +/* + * $Id$ + * + * Eiconman, desktop and icon manager + * Part of Equinox Desktop Environment (EDE). + * Copyright (c) 2000-2007 EDE Authors. + * + * This program is licensed under terms of the + * GNU General Public License version 2 or newer. + * See COPYING for details. + */ + +#include "Utils.h" +#include // CARD32 +#include +#include + +Atom NET_WORKAREA = 0; +Atom NET_WM_WINDOW_TYPE = 0; +Atom NET_WM_WINDOW_TYPE_DESKTOP = 0; +Atom NET_NUMBER_OF_DESKTOPS = 0; +Atom NET_CURRENT_DESKTOP = 0; +Atom NET_DESKTOP_NAMES = 0; + +bool net_get_workarea(int& x, int& y, int& w, int &h) { + Atom real; + + if(!NET_WORKAREA) + NET_WORKAREA= XInternAtom(fltk::xdisplay, "_NET_WORKAREA", 1); + + int format; + unsigned long n, extra; + unsigned char* prop; + x = y = w = h = 0; + + int status = XGetWindowProperty(fltk::xdisplay, RootWindow(fltk::xdisplay, fltk::xscreen), + NET_WORKAREA, 0L, 0x7fffffff, False, XA_CARDINAL, &real, &format, &n, &extra, (unsigned char**)&prop); + + if(status != Success) + return false; + + CARD32* val = (CARD32*)prop; + if(val) { + x = val[0]; + y = val[1]; + w = val[2]; + h = val[3]; + + XFree((char*)val); + return true; + } + + return false; +} + +void net_make_me_desktop(fltk::Window* w) { + if(!NET_WM_WINDOW_TYPE) + NET_WM_WINDOW_TYPE = XInternAtom(fltk::xdisplay, "_NET_WM_WINDOW_TYPE", False); + + if(!NET_WM_WINDOW_TYPE_DESKTOP) + NET_WM_WINDOW_TYPE_DESKTOP= XInternAtom(fltk::xdisplay, "_NET_WM_WINDOW_TYPE_DESKTOP", False); + + /* + * xid() will return zero if window is not shown; + * make sure it is shown + */ + EASSERT(fltk::xid(w)); + + /* + * Reminder for me (others possible): + * note '&NET_WM_WINDOW_TYPE_DESKTOP' conversion, since gcc will not report warning/error + * if placed 'NET_WM_WINDOW_TYPE_DESKTOP' only. + * + * I lost two hours messing with this ! (gdb is unusefull in X world) + */ + XChangeProperty(fltk::xdisplay, fltk::xid(w), NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, + (unsigned char*)&NET_WM_WINDOW_TYPE_DESKTOP, sizeof(Atom)); +} + +int net_get_workspace_count(void) { + if(!NET_NUMBER_OF_DESKTOPS) + NET_NUMBER_OF_DESKTOPS = XInternAtom(fltk::xdisplay, "_NET_NUMBER_OF_DESKTOPS", False); + + Atom real; + int format; + unsigned long n, extra; + unsigned char* prop; + + int status = XGetWindowProperty(fltk::xdisplay, RootWindow(fltk::xdisplay, fltk::xscreen), + NET_NUMBER_OF_DESKTOPS, 0L, 0x7fffffff, False, XA_CARDINAL, &real, &format, &n, &extra, + (unsigned char**)&prop); + + if(status != Success && !prop) + return -1; + + int ns = int(*(long*)prop); + XFree(prop); + return ns; +} + +// desktops are starting from 0 +int net_get_current_desktop(void) { + if(!NET_CURRENT_DESKTOP) + NET_CURRENT_DESKTOP = XInternAtom(fltk::xdisplay, "_NET_CURRENT_DESKTOP", False); + Atom real; + int format; + unsigned long n, extra; + unsigned char* prop; + + int status = XGetWindowProperty(fltk::xdisplay, RootWindow(fltk::xdisplay, fltk::xscreen), + NET_CURRENT_DESKTOP, 0L, 0x7fffffff, False, XA_CARDINAL, &real, &format, &n, &extra, (unsigned char**)&prop); + + if(status != Success && !prop) + return -1; + + int ns = int(*(long*)prop); + XFree(prop); + return ns; +} + +// call on this XFreeStringList(names) +int net_get_workspace_names(char**& names) { + if(!NET_DESKTOP_NAMES) + NET_DESKTOP_NAMES = XInternAtom(fltk::xdisplay, "_NET_DESKTOP_NAMES", False); + + // FIXME: add _NET_SUPPORTING_WM_CHECK and _NET_SUPPORTED ??? + XTextProperty wnames; + XGetTextProperty(fltk::xdisplay, RootWindow(fltk::xdisplay, fltk::xscreen), &wnames, NET_DESKTOP_NAMES); + + // if wm does not understainds _NET_DESKTOP_NAMES this is not set + if(!wnames.nitems || !wnames.value) + return 0; + + int nsz; + + if(!XTextPropertyToStringList(&wnames, &names, &nsz)) { + XFree(wnames.value); + return 0; + } + + //XFreeStringList(names); + XFree(wnames.value); + return nsz; +} + +#if 0 +int net_get_workspace_names(char** names) { + Atom nd = XInternAtom(fltk::xdisplay, "_NET_DESKTOP_NAMES", False); + Atom utf8_str = XInternAtom(fltk::xdisplay, "UTF8_STRING", False); + Atom real; + int format; + unsigned long n, extra; + unsigned char* prop; + + int status = XGetWindowProperty(fltk::xdisplay, RootWindow(fltk::xdisplay, fltk::xscreen), + nd, 0L, 0x7fffffff, False, utf8_str, &real, &format, &n, &extra, (unsigned char**)&prop); + + if(status != Success && !prop) + return 0; + + int alloc = 0; + if(real == utf8_str && format == 8) { + const char* p = (const char*)prop; + for(int i = 0, s = 0; i < n && alloc < MAX_DESKTOPS; i++, alloc++) { + if(p[i] == '\0') { + EDEBUG("%c ", p[i]); + names[alloc] = strndup((p + s), i - s + 1); + s = i + 1; + } + } + } + + return alloc; +} +#endif diff --git a/eiconman/Utils.h b/eiconman/Utils.h new file mode 100644 index 0000000..e2b1c17 --- /dev/null +++ b/eiconman/Utils.h @@ -0,0 +1,24 @@ +/* + * $Id$ + * + * Eiconman, desktop and icon manager + * Part of Equinox Desktop Environment (EDE). + * Copyright (c) 2000-2007 EDE Authors. + * + * This program is licensed under terms of the + * GNU General Public License version 2 or newer. + * See COPYING for details. + */ + +#ifndef __UTILS_H__ +#define __UTILS_H__ + +#include + +int net_get_workspace_count(void); +int net_get_current_desktop(void); +bool net_get_workarea(int& x, int& y, int& w, int &h); +void net_make_me_desktop(fltk::Window* w); +int net_get_workspace_names(char**& names); + +#endif diff --git a/eiconman/edeskconf.cpp b/eiconman/edeskconf.cpp deleted file mode 100644 index 2dbb540..0000000 --- a/eiconman/edeskconf.cpp +++ /dev/null @@ -1,159 +0,0 @@ -// generated by Fast Light User Interface Designer (fluid) version 2.0100 - -#include "edeskconf.h" -/* - * $Id$ - * - * Desktop icons manager - * Part of Equinox Desktop Environment (EDE). - * Copyright (c) 2000-2006 EDE Authors. - * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. - * See COPYING for details. - */ -//#include -//#include -//#include -//#include -//#include -//#include -#include "eiconman.h" - -fltk::Window *bg_prop_window=(fltk::Window *)0; - -fltk::InvisibleBox *mini_image_box=(fltk::InvisibleBox *)0; - -fltk::LightButton *color_button=(fltk::LightButton *)0; - -fltk::CheckButton *use_button=(fltk::CheckButton *)0; - -fltk::Group *bg_image_group=(fltk::Group *)0; - -fltk::Input *image_input=(fltk::Input *)0; - -static fltk::Button *browse_button=(fltk::Button *)0; - -fltk::ValueSlider *opacity_slider=(fltk::ValueSlider *)0; - -fltk::Choice *mode_choice=(fltk::Choice *)0; - -static void cb_Cancel(fltk::Button*, void*) { - bg_prop_window->do_callback(); -} - -void make_desktop_properties() { - fltk::Window* w; - {fltk::Window* o = bg_prop_window = new fltk::Window(560, 270, "Background settings"); - w = o; - o->callback((fltk::Callback*)bg_prop_cb); - ((fltk::Window*)(o))->hotspot(o); - o->begin(); - {fltk::Group* o = new fltk::Group(10, 20, 265, 209, "Background"); - o->box(fltk::BORDER_FRAME); - o->color((fltk::Color)0xe6e7e600); - o->textcolor((fltk::Color)0xaaadaa00); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT); - o->begin(); - {fltk::InvisibleBox* o = new fltk::InvisibleBox(1, 1, 263, 207); - o->box(fltk::BORDER_FRAME); - o->color((fltk::Color)0xe6e7e600); - o->textcolor((fltk::Color)0xdcdedc00); - } - {fltk::Group* o = new fltk::Group(35, 16, 230, 159); - o->begin(); - {fltk::InvisibleBox* o = new fltk::InvisibleBox(65, 129, 60, 7); - o->box(fltk::BORDER_BOX); - } - {fltk::InvisibleBox* o = new fltk::InvisibleBox(5, 0, 180, 131); - o->box(fltk::THIN_UP_BOX); - } - {fltk::InvisibleBox* o = new fltk::InvisibleBox(47, 134, 94, 12); - o->box(fltk::THIN_UP_BOX); - } - {fltk::InvisibleBox* o = new fltk::InvisibleBox(159, 121, 15, 6); - o->box(fltk::THIN_UP_BOX); - } - {fltk::InvisibleBox* o = new fltk::InvisibleBox(152, 121, 2, 5); - o->set_vertical(); - o->box(fltk::FLAT_BOX); - o->color((fltk::Color)2); - } - {fltk::InvisibleBox* o = new fltk::InvisibleBox(15, 9, 160, 110); - o->box(fltk::THIN_DOWN_BOX); - } - {fltk::InvisibleBox* o = mini_image_box = new fltk::InvisibleBox(16, 10, 158, 108); - o->box(fltk::FLAT_BOX); - o->buttonbox(fltk::FLAT_BOX); - o->color((fltk::Color)32); - o->highlight_color((fltk::Color)32); - o->align(fltk::ALIGN_CENTER); - } - o->end(); - } - {fltk::LightButton* o = color_button = new fltk::LightButton(169, 175, 85, 25, "C&olor..."); - o->type(0); - o->box(fltk::THIN_UP_BOX); - o->set_flag(fltk::VALUE); - o->callback((fltk::Callback*)bg_image_color); - } - o->end(); - } - {fltk::CheckButton* o = use_button = new fltk::CheckButton(285, 20, 265, 20, "Use wallpaper"); - o->set_flag(fltk::VALUE); - o->callback((fltk::Callback*)bg_image_use); - } - new fltk::Divider("label"); - {fltk::Group* o = bg_image_group = new fltk::Group(285, 50, 265, 175); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT); - o->begin(); - {fltk::Input* o = image_input = new fltk::Input(20, 15, 240, 23, "Image:"); - o->callback((fltk::Callback*)bg_image_input); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT); - o->when(fltk::WHEN_ENTER_KEY); - } - {fltk::Button* o = browse_button = new fltk::Button(180, 48, 80, 23, "&Browse..."); - o->callback((fltk::Callback*)bg_image_browse); - } - {fltk::ValueSlider* o = opacity_slider = new fltk::ValueSlider(65, 83, 195, 18, "Opacity:"); - o->maximum(255); - o->step(1.01); - o->slider_size(10); - o->callback((fltk::Callback*)bg_image_opacity); - o->align(fltk::ALIGN_LEFT); - o->when(fltk::WHEN_RELEASE); - o->step(1); - } - {fltk::Choice* o = mode_choice = new fltk::Choice(65, 112, 195, 23, "Mode:"); - o->callback((fltk::Callback*)bg_image_mode); - o->begin(); - {fltk::Item* o = new fltk::Item("Center"); - o->user_data((void*)(0)); - } - {fltk::Item* o = new fltk::Item("Stretch"); - o->user_data((void*)(1)); - } - {fltk::Item* o = new fltk::Item("Stretch (aspect)"); - o->user_data((void*)(2)); - } - {fltk::Item* o = new fltk::Item("Tiled"); - o->deactivate(); - } - o->end(); - } - o->end(); - } - new fltk::Divider("label"); - {fltk::Button* o = new fltk::Button(290, 240, 80, 25, "&OK"); - o->callback((fltk::Callback*)bg_ok); - } - {fltk::Button* o = new fltk::Button(380, 240, 80, 25, "&Apply"); - o->callback((fltk::Callback*)bg_apply); - } - {fltk::Button* o = new fltk::Button(470, 240, 80, 25, "&Cancel"); - o->callback((fltk::Callback*)cb_Cancel); - } - o->end(); - o->resizable(o); - } -} diff --git a/eiconman/edeskconf.fl b/eiconman/edeskconf.fl deleted file mode 100644 index e0110a3..0000000 --- a/eiconman/edeskconf.fl +++ /dev/null @@ -1,163 +0,0 @@ -# data file for the FLTK User Interface Designer (FLUID) -version 2.0100 -images_dir ./ -header_name {.h} -code_name {.cpp} -gridx 5 -gridy 5 -snap 3 -decl {/* - * $Id$ - * - * Desktop icons manager - * Part of Equinox Desktop Environment (EDE). - * Copyright (c) 2000-2006 EDE Authors. - * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. - * See COPYING for details. - */} {selected -} - -decl {/* - * $Id$ - * - * Desktop icons manager - * Part of Equinox Desktop Environment (EDE). - * Copyright (c) 2000-2006 EDE Authors. - * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. - * See COPYING for details. - */} {public -} - -decl {//\#include } {} - -decl {//\#include } {} - -decl {//\#include } {} - -decl {//\#include } {} - -decl {//\#include } {} - -decl {//\#include } {} - -decl {\#include "eiconman.h"} {} - -Function {make_desktop_properties()} {open return_type void -} { - {fltk::Window} bg_prop_window { - label {Background settings} - callback bg_prop_cb open - xywh {402 211 560 270} resizable hotspot visible - } { - {fltk::Group} {} { - label Background open - xywh {10 20 265 209} align 5 box BORDER_FRAME color 0xe6e7e600 textcolor 0xaaadaa00 - } { - {fltk::InvisibleBox} {} { - xywh {1 1 263 207} box BORDER_FRAME color 0xe6e7e600 textcolor 0xdcdedc00 - } - {fltk::Group} {} {open - xywh {35 16 230 159} - } { - {fltk::InvisibleBox} {} { - xywh {65 129 60 7} box BORDER_BOX - } - {fltk::InvisibleBox} {} { - xywh {5 0 180 131} box THIN_UP_BOX - } - {fltk::InvisibleBox} {} { - xywh {47 134 94 12} box THIN_UP_BOX - } - {fltk::InvisibleBox} {} { - xywh {159 121 15 6} box THIN_UP_BOX - } - {fltk::InvisibleBox} {} { - xywh {152 121 2 5} box FLAT_BOX color 2 - } - {fltk::InvisibleBox} {} { - xywh {15 9 160 110} box THIN_DOWN_BOX - } - {fltk::InvisibleBox} mini_image_box { - xywh {16 10 158 108} align 16 box FLAT_BOX buttonbox FLAT_BOX color 32 highlight_color 32 - } - } - {fltk::LightButton} color_button { - label {C&olor...} - callback bg_image_color - xywh {169 175 85 25} type Normal box THIN_UP_BOX value 1 - } - } - {fltk::CheckButton} use_button { - label {Use wallpaper} - callback bg_image_use - xywh {285 20 265 20} value 1 - } - {fltk::Divider} {} { - label label - } - {fltk::Group} bg_image_group {open - xywh {285 50 265 175} align 5 - } { - {fltk::Input} image_input { - label {Image:} - callback bg_image_input - xywh {20 15 240 23} align 5 when ENTER_KEY - } - {fltk::Button} browse_button { - label {&Browse...} - callback bg_image_browse - private xywh {180 48 80 23} - } - {fltk::ValueSlider} opacity_slider { - label {Opacity:} - callback bg_image_opacity - xywh {65 83 195 18} align 4 when RELEASE maximum 255 step 1.01 slider_size 10 - extra_code {o->step(1);} - } - {fltk::Choice} mode_choice { - label {Mode:} - callback bg_image_mode open - xywh {65 112 195 23} - } { - {fltk::Item} {} { - label Center - user_data 0 - } - {fltk::Item} {} { - label Stretch - user_data 1 - } - {fltk::Item} {} { - label {Stretch (aspect)} - user_data 2 - } - {fltk::Item} {} { - label Tiled - deactivate - } - } - } - {fltk::Divider} {} { - label label - } - {fltk::Button} {} { - label {&OK} - callback bg_ok - private xywh {290 240 80 25} - } - {fltk::Button} {} { - label {&Apply} - callback bg_apply - private xywh {380 240 80 25} - } - {fltk::Button} {} { - label {&Cancel} - callback {bg_prop_window->do_callback();} - private xywh {470 240 80 25} - } - } -} diff --git a/eiconman/edeskconf.fld b/eiconman/edeskconf.fld deleted file mode 100644 index 052042c..0000000 --- a/eiconman/edeskconf.fld +++ /dev/null @@ -1,143 +0,0 @@ -# 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 {// Desktop background configuration 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 } {} - -decl {\#include } {} - -decl {\#include } {} - -decl {\#include } {} - -decl {\#include } {} - -decl {\#include } {} - -decl {\#include "eiconman.h"} {} - -Function {make_desktop_properties()} {open return_type void -} { - Fl_Window bg_prop_window { - label {Background settings} - callback bg_prop_cb open - xywh {389 23 560 270} hotspot visible - } { - Fl_Group {} { - label Background open - xywh {10 20 265 205} align 5 box BORDER_FRAME color 39 - } { - Fl_Box {} { - xywh {1 1 263 203} box BORDER_FRAME color 47 - } - Fl_Group {} {open - xywh {20 8 230 157} - } { - Fl_Box {} { - xywh {85 135 60 7} box BORDER_BOX - } - Fl_Box {} { - xywh {25 6 180 131} box THIN_UP_BOX - } - Fl_Box {} { - xywh {67 140 94 12} box THIN_UP_BOX - } - Fl_Box {} { - xywh {179 127 15 6} box THIN_UP_BOX - } - Fl_Box {} { - xywh {172 127 2 5} box FLAT_BOX color 2 - } - Fl_Box {} { - xywh {35 15 160 110} box THIN_DOWN_BOX - } - Fl_Box mini_image_box { - xywh {36 16 158 108} align 16 box FLAT_BOX button_box FLAT_BOX color 32 highlight_color 32 - } - } - Fl_Light_Button color_button { - label {C&olor...} - callback bg_image_color selected - xywh {170 170 85 25} type Normal box THIN_UP_BOX value 1 - } - } - Fl_Check_Button use_button { - label {Use wallpaper} - callback bg_image_use - xywh {285 20 265 20} value 1 - } - Fl_Divider {} { - label label - xywh {290 40 255 10} - } - Fl_Group bg_image_group {open - xywh {285 50 265 175} align 5 - } { - Fl_Input image_input { - label {Image:} - callback bg_image_input - xywh {15 17 240 23} align 5 when ENTER_KEY - } - Fl_Button browse_button { - label {&Browse...} - callback bg_image_browse - private xywh {175 50 80 23} - } - Fl_Value_Slider opacity_slider { - label {Opacity:} - callback bg_image_opacity - xywh {60 85 195 18} type HORIZONTAL align 4 when RELEASE maximum 255 step 1.01 slider_size 10 - extra_code {o->step(1);} - } - Fl_Choice mode_choice { - label {Mode:} - callback bg_image_mode open - xywh {60 114 195 23} - } { - Fl_Item {} { - label Center - user_data 0 - } - Fl_Item {} { - label Stretch - user_data 1 - } - Fl_Item {} { - label {Stretch (aspect)} - user_data 2 - } - Fl_Item {} { - label Tiled - deactivate - } - } - } - Fl_Divider {} { - label label - xywh {5 225 550 15} - } - Fl_Button {} { - label {&OK} - callback bg_ok - private xywh {290 240 80 25} - } - Fl_Button {} { - label {&Apply} - callback bg_apply - private xywh {380 240 80 25} - } - Fl_Button {} { - label {&Cancel} - callback {bg_prop_window->do_callback();} - private xywh {470 240 80 25} - } - } - code {bg_prop_window->end();} {} -} diff --git a/eiconman/edeskconf.h b/eiconman/edeskconf.h deleted file mode 100644 index 12a7a2a..0000000 --- a/eiconman/edeskconf.h +++ /dev/null @@ -1,45 +0,0 @@ -// generated by Fast Light User Interface Designer (fluid) version 2.0100 - -#ifndef edeskconf_h -#define edeskconf_h -/* - * $Id$ - * - * Desktop icons manager - * Part of Equinox Desktop Environment (EDE). - * Copyright (c) 2000-2006 EDE Authors. - * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. - * See COPYING for details. - */ -#include -extern void bg_prop_cb(fltk::Window*, void*); -extern fltk::Window* bg_prop_window; -#include -#include -extern fltk::InvisibleBox* mini_image_box; -#include -extern void bg_image_color(fltk::LightButton*, void*); -extern fltk::LightButton* color_button; -#include -extern void bg_image_use(fltk::CheckButton*, void*); -extern fltk::CheckButton* use_button; -#include -extern fltk::Group* bg_image_group; -#include -extern void bg_image_input(fltk::Input*, void*); -extern fltk::Input* image_input; -#include -extern void bg_image_browse(fltk::Button*, void*); -#include -extern void bg_image_opacity(fltk::ValueSlider*, void*); -extern fltk::ValueSlider* opacity_slider; -#include -extern void bg_image_mode(fltk::Choice*, void*); -extern fltk::Choice* mode_choice; -#include -extern void bg_ok(fltk::Button*, void*); -extern void bg_apply(fltk::Button*, void*); -void make_desktop_properties(); -#endif diff --git a/eiconman/edeskicon.cpp b/eiconman/edeskicon.cpp deleted file mode 100644 index 7153324..0000000 --- a/eiconman/edeskicon.cpp +++ /dev/null @@ -1,594 +0,0 @@ -/* - * $Id$ - * - * Desktop icons manager - * Part of Equinox Desktop Environment (EDE). - * Copyright (c) 2000-2006 EDE Authors. - * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. - * See COPYING for details. - */ - -#include "edeskicon.h" -#include "propdialog.h" -#include "eiconman.h" -#include "../edeconf.h" - -//#include - -//#include -//#include - -#define ICONSIZE 48 - -//Fl_Menu_Button *popup; -Icon *menu_item=0; - -extern Desktop *desktop; - -void menu_cb(fltk::Widget *w, long a) -{ - if(menu_item) { - switch(a) { - case 1: - Icon::cb_execute((fltk::Item*)w, menu_item); - break; - case 3: - delete_icon(w, menu_item); - break; - case 4: - property_dialog(w, menu_item, false); - break; - } - } -} - -char* get_localized_string() -{ - const char* locale = setlocale(LC_MESSAGES, NULL); -// int pos = locale.rpos('_'); -// if(pos>0) locale.sub_delete(pos, locale.length()-pos); - if(strlen(locale)==0 || strcmp(locale,"C")==0 || strcmp(locale,"POSIX")==0) - return strdup("Name"); - else { - char localName[128]; - sprintf(localName,"Name[%s]", locale); - return strdup(localName); - } -} - -char* get_localized_name(EDE_Config &iconConfig) -{ - char icon_name[128]; //wchar ? - char *tmp = get_localized_string(); - if(iconConfig.get("Desktop Entry", tmp, icon_name)) { - iconConfig.get("Desktop Entry", "Name", icon_name, "None"); - } - free(tmp); - return strdup(icon_name); -} - -Icon::Icon(char *icon_config) : fltk::Widget(0, 0, ICONSIZE, ICONSIZE) -{ - if(!popup) { - popup = new fltk::PopupMenu(0, 0, 0, 0); - if(popup->parent()) - popup->parent()->remove(popup); - popup->parent(0); - popup->type(fltk::PopupMenu::POPUP3); - popup->begin(); - - fltk::Item *open_item = new fltk::Item(_("&Open")); - open_item->callback(menu_cb, 1); - //open_item->x_offset(12); - - fltk::Item *delete_item = new fltk::Item(_("&Delete")); - delete_item->callback(menu_cb, 3); - //delete_item->x_offset(12); - - new fltk::Divider(); - - fltk::Item *property_item = new fltk::Item(_("&Properties")); - property_item->callback(menu_cb, 4); - //property_item->x_offset(12); - - popup->end(); - } - - cfg = new EDE_Config(icon_config); - - icon_im = 0; - micon = 0; - - cfg->set_section("Desktop Entry"); - cfg->read("X", x_position, 100); - cfg->read("Y", y_position, 100); - position(x_position, y_position); - -// label_font(FL_HELVETICA); - label(icon_name); - align(fltk::ALIGN_BOTTOM|fltk::ALIGN_WRAP); - tooltip(icon_name); - box(fltk::NO_BOX); - - update_all(); - desktop->begin(); -} - -Icon::~Icon() -{ - if (icon_im) delete icon_im; - if (cfg) delete cfg; -} - -void Icon::cb_execute_i() -{ - EDE_Config &iconfig = *cfg; - iconfig.set_section("Desktop Entry"); - - char *cmd=0; - if(!iconfig.read("Exec", cmd, 0) && cmd) - { - char pRun[256]; - char browser[256]; - EDE_Config pGlobalConfig(EDE_Config::find_config_file("ede.conf", 0)); - pGlobalConfig.get("Web", "Browser", browser, 0, sizeof(browser)); - if(pGlobalConfig.error() && !browser) { - strncpy(browser, "netscape", sizeof(browser)); - } - - char *location = cmd; - char *prefix = strstr(location, ":"); - if(prefix) // it is internet resource - { - *prefix = '\0'; - if (!strcasecmp(location, "http") || !strcasecmp(location, "ftp") || !strcasecmp(location, "file")) - { snprintf(pRun, sizeof(pRun)-1, "%s %s &", browser, cmd); - } - else if (!strcasecmp(location, "gg")) - { snprintf(pRun, sizeof(pRun)-1, "%s http://www.google.com/search?q=\"%s\" &", browser, ++prefix); - } - else if (!strcasecmp(location, "leo")) - { snprintf(pRun, sizeof(pRun)-1, "%s http://dict.leo.org/?search=\"%s\" &", browser, ++prefix); - } - else if (!strcasecmp(location, "av")) - { snprintf(pRun, sizeof(pRun)-1, "%s http://www.altavista.com/sites/search/web?q=\"%s\" &", browser, ++prefix); - } - else { - snprintf(pRun, sizeof(pRun)-1, "%s %s &", browser, cmd); - } - } - else // local executable - { snprintf(pRun, sizeof(pRun)-1, "%s &", cmd); - } - run_program(pRun); - - free((char*)cmd); - } -} - -int Icon::handle(int e) -{ - static int bx, by; - static int x_icon, y_icon; - static int X, Y; - static bool button1 = false; - int dx, dy; - - - if (e==fltk::PUSH) { - button1 = (fltk::event_button()==1); - } - - // Left mouse button - if(button1) { - switch(e) { - case fltk::DRAG: - - if(!micon) { - micon = new MovableIcon(this); - micon->show(); - } - - dx = ((fltk::event_x_root()-bx)/label_gridspacing) * label_gridspacing; - dy = ((fltk::event_y_root()-by)/label_gridspacing) * label_gridspacing; - X=x_icon+dx; - Y=y_icon+dy; - - if(Xx()) X=desktop->x(); - if(Yy()) Y=desktop->y(); - if(X+w()>desktop->x()+desktop->w()) X=desktop->x()+desktop->w()-w(); - if(Y+h()>desktop->y()+desktop->h()) Y=desktop->y()+desktop->h()-h(); - - micon->position(X, Y); - - return 1; - - case fltk::RELEASE: - - // This happens only when there was no drag - if(fltk::event_is_click()) { - if (one_click_exec) - cb_execute_i(); - return 1; - } - - // We will update config only on FL_RELEASE, when - // dragging is over - if(micon) { - delete micon; - micon = 0; - } - - position(X-desktop->x(), Y-desktop->y()); - desktop->redraw(); - - cfg->set_section("Desktop Entry"); - cfg->write("X", x()); - cfg->write("Y", y()); - cfg->flush(); - - return 1; - - case fltk::PUSH: - - take_focus(); - - bx = (fltk::event_x_root()/label_gridspacing)*label_gridspacing; - by = (fltk::event_y_root()/label_gridspacing)*label_gridspacing; - x_icon = ((desktop->x()+x())/label_gridspacing)*label_gridspacing; - y_icon = ((desktop->y()+y())/label_gridspacing)*label_gridspacing; - - // Double click - if ((!one_click_exec) && (Fl::event_clicks() > 0)) { - fltk::event_clicks(0); - cb_execute_i(); - } - - desktop->redraw(); - - return 1; - } - } - - switch (e) { - case fltk::SHORTCUT: - case fltk::KEY: - if(fltk::event_key()==fltk::Enter||fltk::event_key()==fltk::Space) { - cb_execute_i(); - } - break; - - case fltk::FOCUS: - case fltk::ENTER: - return 1; - - case fltk::PUSH: - take_focus(); - desktop->redraw(); - if(fltk::event_button()==3) { - menu_item = this; - popup->popup(); - menu_item = 0; - return 1; - } - break; - - default: - break; - } - - return fltk::Widget::handle(e); -} - -void Icon::draw() -{ - fltk::Flags f=0; - fltk::Image *im = icon_im; - if(focused()) { - f=fltk::SELECTED; - } - - if(im) - im->draw(0, 0, w(), h(),f); - else { - fltk::color(fltk::RED); - fltk::rect(0,0,w(),h()); - fltk::color(fltk::BLACK); - fltk::rectf(1,1,w()-2,h()-2); - fltk::color(fltk::WHITE); - fltk::font(label_font()->bold(), 10); - fltk::draw("NO ICON FOUND!", 1, 1, w()-2, h()-2, fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_WRAP); - } - - int X = w()-(w()/2)-(lwidth/2); - int Y = h()+2; - - if(!label_trans) { - fltk::color(label_background); - fltk::rectf(X,Y,lwidth,lheight); - } - - if(focused()) { - focus_box()->draw(X, Y, lwidth, lheight, color(), 0); - } - - fltk::font(label_font(), label_size()); - - // A little shadow, from Dejan's request :) - // SUCKS! - /*fl_color(fl_darker(label_color())); - fl_draw(label(), X-1, Y+1, lwidth, lheight, flags()); - fl_draw(label(), X, Y+1, lwidth, lheight, flags()); - */ - - fltk::color(label_color()); - fltk::draw(label(), X, Y, lwidth, lheight, flags()); -} - -void Icon::update_icon() -{ - if(icon_im) delete icon_im; - - char path[fltk::PATH_MAX]; - snprintf(path,fltk::PATH_MAX,PREFIX"/share/ede/icons/48x48/%s",icon_file); - - if(!fltk::file_exists(path)) strncpy(path, icon_file, fltk::PATH_MAX); - - if(fltk::file_exists(path)) - { - icon_im = fltk::Image::read(path, 0); - } else { - icon_im = 0; - } - - if(!icon_im) { - icon_im = fltk::Image::read(PREFIX"/share/ede/icons/48x48/folder.png", 0); - } - - if(icon_im) { - if(icon_im->width()!=48 || icon_im->height()!=48) { - fltk::Image *old = icon_im; - icon_im = old->scale(48,48); - delete old; - } - icon_im->mask_type(MASK_ALPHA); - icon_im->threshold(128); - } -} - -void Icon::layout() -{ - if(layout_damage()&fltk::LAYOUT_XYWH && icon_im) - { -#if 0 - // Alpha blends image to bg! - // This sucks, cause if icon overlaps another, it will - // draw bg top of overlapped icon... - if(icon_im->format()->Amask) - { - if(desktop->bg_image) { - int pitch = icon_im->pitch(); - - uint8 *data = new uint8[h()*pitch]; - - int X=x(),Y=y(),W=w(),H=h(); - if(X<0) X=0; - if(Y<0) Y=0; - if(X+W>desktop->w()) X=desktop->w()-W; - if(Y+H>desktop->h()) Y=desktop->h()-H; - - Fl_Rect r(X,Y,W,H); - Fl_Rect r2(0,0,W,H); - Fl_Renderer::blit(desktop->bg_image->data(), &r, desktop->bg_image->format(), desktop->bg_image->pitch(), - data, &r2, icon_im->format(), pitch, 0); - - if(im) delete im; - im = new Fl_Image(W, H, icon_im->format(), data); - - // Blit image data to our bg_image - Fl_Renderer::alpha_blit(icon_im->data(), &r2, icon_im->format(), icon_im->pitch(), - im->data(), &r2, im->format(), im->pitch(), - 0); - } else { - //blend to color - im = icon_im->back_blend(desktop->bg_color); - } - } - else -#endif - { - if(icon_im) { - icon_im->mask_type(MASK_ALPHA); - icon_im->threshold(128); - } - } - } - - fltk::Widget::layout(); -} - -void Icon::update_all() -{ - EDE_Config &iconConfig = *cfg; - iconConfig.read_file(false); - iconConfig.set_section("Desktop Entry"); - - // Icon Label: - icon_name = get_localized_name(iconConfig); - tooltip(icon_name); - label(icon_name); - - label_color(label_foreground); - label_size(label_fontsize); - - lwidth = label_maxwidth; // This is a bit strange, but otherwise we get mysterious crashes... - lheight= 0; - fltk::font(label_font(), label_size()); - fltk::measure(icon_name, lwidth, lheight, fltk::ALIGN_WRAP); - lwidth += 4; // height+= 4; - - // Icon file: - iconConfig.read("Icon", icon_file, "folder.png"); - - update_icon(); - - redraw(); - //desktop->redraw(); -} - -void save_icon(Icon *i_window) -{ - if(i_name->size()==0) { - fltk::alert(_("Name of the icon must be filled.")); - } - else - { - const char *icon_file = i_filename->value(); - const char *icons_path = PREFIX"/share/ede/icons/48x48"; - if(!strncmp(icons_path, i_filename->value(), strlen(icons_path))) { - // Only relative path, if icon in default location - icon_file = fltk::filename_name(i_filename->value()); - } - - EDE_Config i_config(i_link->value()); - i_config.set_section("Desktop Entry"); - - i_config.write(get_localized_string(), i_name->value()); - i_config.write("Name", i_name->value()); // fallback - i_config.write("Exec", i_location->value()); - i_config.write("Icon", icon_file); - i_config.flush(); - i_window->update_all(); - } -} - -void delete_icon(Fl_Widget*, Icon *icon) -{ - if (fltk::ask(_("Delete this icon?"))) - { - icon->hide(); - char fname[fltk::PATH_MAX]; - strncpy(fname, icon->get_cfg()->filename(), fltk::PATH_MAX); - delete icon; - if(remove(fname) < 0) - fltk::alert(_("Remove of the icon %s failed. You probably do not have write access to this file."), fname); - } -} - -int create_new_icon() -{ - int ix=fltk::event_x_root(); - int iy=fltk::event_y_root(); - Icon *icon=0; - const char *i = fltk::input(_("Enter the name of the new icon:"), "The Gimp"); - if (i) - { - char config[fltk::PATH_MAX]; - snprintf(config, sizeof(config)-1, "%s/.ede/desktop/%s.desktop", getenv("HOME"), i); - - if(!fltk::file_exists(config)) - { - EDE_Config cfg(config); - cfg.set_section("Desktop Entry"); - cfg.write("Icon", "no icon"); - cfg.write("X", ix); - cfg.write("Y", iy); - cfg.write(get_localized_string(), i); - cfg.write("Exec", "Executable Here"); - //const char *u = fl_input(_("Enter the program name or the location to open:"), "gimp"); - cfg.flush(); - - desktop->begin(); - icon = new Icon(config); - desktop->end(); - } - else { - fltk::alert(_("The icon with the same name already exists.")); - } - } - if(icon) { - property_dialog(0, icon, true); - icon->position(ix,iy); - icon->show(); - - desktop->redraw(); - desktop->relayout(); - } - return 0; -} - -void update_iconeditdialog(Icon *i) -{ - i_link->value(i->get_cfg()->filename()); - - EDE_Config &i_config = *i->get_cfg(); - - char* val; - i_config.set_section("Desktop Entry"); - - val = get_localized_name(i_config); - if(strlen(val)>0) { - i_name->value(val); - } - - if(!i_config.read("Exec", val, 0)) { - i_location->value(val); - } - - if(!i_config.read("Icon", val, 0)) { - i_filename->value(val); - } -} - -void update_property_dialog(Icon *i) -{ - char* val; - - EDE_Config i_config(i->get_cfg()->filename()); - i_config.set_section("Desktop Entry"); - - val = get_localized_name(i_config); - if(!val.empty()) { - pr_name->label(val); - } - - if(!i_config.read("Exec", val, 0)) { - pr_exec->label(val); - } - -/* TODO - Fl_FileAttr *attr = fl_file_attr(i->get_cfg()->filename()); - if(attr) - { - char size[32]; - snprintf(size, 32, _("%d bytes, %s"), (int) attr->size, attr->time); - pr_size->label(size); - delete attr; - }*/ - - pr_icon->image(i->icon_im); -} - -MovableIcon::MovableIcon(Icon *i) -: fltk::Window(desktop->x()+i->x(), desktop->y()+i->y(), i->w(), i->h()) -{ - icon = i; - set_override(); - create(); - - fltk::Image *im = i->icon_im; - if(im) - { - Pixmap mask = im->create_mask(im->width(), im->height()); - XShapeCombineMask(fltk::xdisplay, fltk::xid(this), ShapeBounding, 0, 0, mask, ShapeSet); - - align(fltk::ALIGN_INSIDE); - image(im); - } -} - -MovableIcon::~MovableIcon() -{ -} diff --git a/eiconman/edeskicon.h b/eiconman/edeskicon.h deleted file mode 100644 index 816db37..0000000 --- a/eiconman/edeskicon.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * $Id$ - * - * Desktop icons manager - * Part of Equinox Desktop Environment (EDE). - * Copyright (c) 2000-2006 EDE Authors. - * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. - * See COPYING for details. - */ - -#ifndef edeskicon_h -#define edeskicon_h - -#include -#include -#include -#include -#include - -/*#include -#include -#include -#include -#include -#include -#include */ -#include //#include -//#include -#include //#include -/*#include -#include */ -#include //#include -//#include -#include "../edelib2/EDE_Config.h" //#include -#include //#include -#include "../edelib2/NLS.h" //#include - -//#include -#include -#include -#include - -class MovableIcon; - -class Icon : public fltk::Widget -{ -public: - Icon(char *icon_config); - ~Icon(); - - virtual void draw(); - virtual void layout(); - virtual int handle(int e); - - EDE_Config *get_cfg() const { return cfg; } - - void update_icon(); - void update_all(); - - fltk::Image *icon_im; - - int lwidth, lheight; - - void cb_execute_i(); - static inline void cb_execute(fltk::Item *, void *d) { ((Icon*)d)->cb_execute_i(); } - -protected: - EDE_Config *cfg; - MovableIcon *micon; - - char* icon_file; - char* icon_name; - - int x_position; - int y_position; -}; - -class MovableIcon : public fltk::Window -{ - Icon *icon; -public: - MovableIcon(Icon *i); - ~MovableIcon(); -}; - -/////////////////////////////////////// - -extern int label_background; -extern int label_foreground; -extern int label_fontsize; -extern int label_maxwidth; -extern int label_gridspacing; -extern bool one_click_exec; - -extern void read_icons_configuration(); -extern void save_icon(Icon *); -extern void delete_icon(fltk::Widget*, Icon *); -extern int create_new_icon(); - -extern void update_iconeditdialog(Icon *); -extern void update_property_dialog(Icon *); - -extern char* get_localized_string(); -extern char* get_localized_name(EDE_Config &iconConfig); - -#endif - diff --git a/eiconman/eiconman.conf b/eiconman/eiconman.conf new file mode 100644 index 0000000..6e46bf1 --- /dev/null +++ b/eiconman/eiconman.conf @@ -0,0 +1,33 @@ + +# general settings for desktop +[Desktop] + Color=35 + WallpaperUse=1 + Wallpaper=/home/sanel/blentavo/EDE/art/wallpaper.png + +# general settings for icons on desktop +[Icons] + Label Foreground=7 + Gridspacing=10 + OneClickExec=0 + Label Transparent=0 + Label Background=216 + AutoArrange=0 + Label Maxwidth=55 + Label Fontsize=10 + +# positions of each icon on desktop (if icon is visible) + + + +[Home.desktop] + X=13 + Y=8 + +[System.desktop] + X=12 + Y=212 + +[trash.desktop] + X=15 + Y=106 diff --git a/eiconman/eiconman.cpp b/eiconman/eiconman.cpp index e048e0c..e299d99 100644 --- a/eiconman/eiconman.cpp +++ b/eiconman/eiconman.cpp @@ -1,837 +1,660 @@ /* * $Id$ * - * Desktop icons manager + * Eiconman, desktop and icon manager * Part of Equinox Desktop Environment (EDE). - * Copyright (c) 2000-2006 EDE Authors. + * Copyright (c) 2000-2007 EDE Authors. * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. + * This program is licensed under terms of the + * GNU General Public License version 2 or newer. * See COPYING for details. */ #include "eiconman.h" -#include "edeskconf.h" -#include "edeskicon.h" +#include "DesktopIcon.h" +#include "DesktopConfig.h" +#include "Utils.h" -/*#include -#include -#include -#include */ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include #include +#include +#include -#include "../edeconf.h" +#include +#include // CARD32 -int label_background = 46848; -int label_foreground = fltk::WHITE; -int label_fontsize = 12; -int label_maxwidth = 75; -int label_gridspacing = 16; -bool label_trans = false; -bool one_click_exec = 0; -bool auto_arr = false; +#include // rand, srand +#include // time -Desktop *desktop = 0; -void scanIcons(char *path) -{ -/* Fl_Directory_DS dds; - dds.directory(path); - dds.open(); +/* + * NOTE: DO NOT set 'using namespace fltk' here + * since fltk::Window will collide with Window from X11 + * resulting compilation errors. + * + * This is why I hate this namespace shit ! + */ - while(!dds.eof()) - { - Fl_String name(dds["Name"].get_string()); - Fl_String filename(dds.directory() + name); +#define CONFIG_NAME "eiconman.conf" - dds.next(); +#define SELECTION_SINGLE (fltk::event_button() == 1) +#define SELECTION_MULTI (fltk::event_button() == 1 && \ + (fltk::get_key_state(fltk::LeftShiftKey) ||\ + fltk::get_key_state(fltk::RightShiftKey))) - if(access(filename, R_OK)!=0) continue; +bool running = true; - if(fl_file_match(name, "*.desktop")) { - Icon *desktopIcon = new Icon(filename); - desktopIcon->show(); - } - }*/ -// Rewrite using fltk::filename_list - dirent **files; - int num_files = fltk::filename_list(path, &files); // no sort needed because icons have coordinates +inline unsigned int random_pos(int max) { + return (rand() % max); +} - if (num_files <= 0) - return; +inline void dpy_sizes(int& width, int& height) { + fltk::open_display(); + width = DisplayWidth(fltk::xdisplay, fltk::xscreen); + height = DisplayHeight(fltk::xdisplay, fltk::xscreen); +} - for (int i = 0; i < num_files; i++) { - char filename[256]; //fltk::PATH_MAX - expected unqualified-id before numeric constant (?!?!) - snprintf(filename,256,"%s/%s",path,files[i]->d_name); - if (access(filename, R_OK)!=0) continue; - if (fltk::filename_match(files[i]->d_name, "*.desktop")) { - Icon *desktopIcon = new Icon(filename); - desktopIcon->show(); +void exit_signal(int signum) { + EDEBUG(ESTRLOC ": Exiting (got signal %d)\n", signum); + running = false; +} + +/* + * It is used to notify desktop when _NET_CURRENT_DESKTOP is triggered. + * FIXME: _NET_WORKAREA is nice thing that could set here too :) + * + * FIXME: XInternAtom should be placed somewhere else + */ +int desktop_xmessage_handler(int e, fltk::Window*) { + Atom nd = XInternAtom(fltk::xdisplay, "_NET_CURRENT_DESKTOP", False); + + if(fltk::xevent.type == PropertyNotify) { + if(fltk::xevent.xproperty.atom == nd) { + EDEBUG(ESTRLOC ": Desktop changed !!!\n"); + return 1; } } + + return 0; } -void readIconsConfiguration() -{ - EDE_Config globalConfig(EDE_Config::find_config_file("ede.conf", 0), true, false); - - globalConfig.set_section("IconManager"); - globalConfig.read("Label Background", label_background, 46848); - globalConfig.read("Label Transparent", label_trans, false); - globalConfig.read("Label Foreground", label_foreground, fltk::WHITE); - globalConfig.read("Label Fontsize", label_fontsize, 12); - globalConfig.read("Label Maxwidth", label_maxwidth, 75); - globalConfig.read("Gridspacing", label_gridspacing, 16); - globalConfig.read("OneClickExec", one_click_exec, 0); - globalConfig.read("AutoArrange", auto_arr, false); +void background_cb(fltk::Widget*, void*) { + DesktopConfig dc; + dc.run(); } -void cb_update_workarea(fltk::Widget *, void *arg) +Desktop::Desktop() : fltk::Window(0, 0, 100, 100, "") { - ((Desktop*)arg)->update_workarea(); -} + moving = false; -void refresh(fltk::Widget *, void *arg) -{ - desktop->update_icons(); -} + selection_box_x_start = selection_box_y_start = 0; + selection_box_x = selection_box_y = 0; + selection_box_show = false; -void icons_properties(fltk::Widget *, void *arg) -{ - run_program("eiconsconf",false); -} + // fallback if update_workarea() fails + int dw, dh; + dpy_sizes(dw, dh); + resize(dw, dh); -void desktop_properties(fltk::Widget *, void *arg); + update_workarea(); + read_config(); -Desktop::Desktop() - : fltk::DoubleBufferWindow(0, 0, w(), h(), "EIconMan") -{ - //Fl_WM::callback(cb_update_workarea, this, Fl_WM::DESKTOP_WORKAREA); + color(bg_color); - wpaper = 0; - bg_color = fltk::BLUE; - bg_opacity = 255; - bg_mode = 0; + begin(); - //window_type(Fl_WM::DESKTOP); + pmenu = new fltk::PopupMenu(0, 0, 450, 50); + pmenu->begin(); + edelib::Item* it = new edelib::Item(_("&New desktop item")); + it->offset_x(12, 12); + new fltk::Divider(); + it = new edelib::Item(_("&Line up vertical")); + it->offset_x(12, 12); + it = new edelib::Item(_("&Line up horizontal")); + it->offset_x(12, 12); + it = new edelib::Item(_("&Arrange by name")); + it->offset_x(12, 12); + new fltk::Divider(); + it = new edelib::Item(_("&Icon settings")); + it->offset_x(12, 12); - popup = new fltk::PopupMenu(0, 0, 0, 0); - popup->type(fltk::PopupMenu::POPUP3); - popup->begin(); + edelib::Item* itbg = new edelib::Item(_("&Background settings")); + itbg->offset_x(12, 12); + itbg->callback(background_cb); + pmenu->end(); + pmenu->type(fltk::PopupMenu::POPUP3); - fltk::Item *icon; - - icon = new fltk::Item(_("&New desktop item")); - icon->callback((fltk::Callback*)create_new_icon, 0); - //icon->x_offset(18); - - icon = new fltk::Item(_("&Refresh")); - icon->callback((fltk::Callback*)refresh, 0); - //icon->x_offset(18); - - new fltk::Divider(); - - icon = new fltk::Item(_("&Icons Settings ")); - icon->callback((fltk::Callback*)icons_properties, (void*) this); - //icon->x_offset(18); - - icon = new fltk::Item(_("&Background Settings")); - icon->callback((fltk::Callback*)desktop_properties, (void*) this); - //icon->x_offset(18); - - - popup->end(); - - end(); - show(); + end(); } Desktop::~Desktop() { - if(wpaper) delete wpaper; + EDEBUG(ESTRLOC ": Desktop::~Desktop()\n"); + + /* + * icons member deleting is not needed, since add_icon will + * append to icons and to fltk::Group array. Desktop at the end + * will cleanup fltk::Group array. + */ + icons.clear(); } -void Desktop::update_workarea() -{ - int X=0,Y=0,W=w(),H=h(); - // Get current workarea - //Fl_WM::get_workarea(X,Y,W,H); - - resize(X,Y,W,H); - layout(); - if(auto_arr) auto_arrange(); +void Desktop::default_gisett(void) { + // TODO } -void Desktop::update_icons() -{ - for(int n=0; nupdate_all(); - } - if(auto_arr) - auto_arrange(); - - fltk::flush(); +void Desktop::update_workarea(void) { + int X,Y,W,H; + if(net_get_workarea(X, Y, W, H)) + resize(X,Y,W,H); } -void Desktop::auto_arrange() -{ - int X=label_maxwidth/5+10; - int Y=10; - int H=h(); - for(int n=0; nposition(X, Y); - Y += i->h() + i->lheight + label_gridspacing + 10; - if((Y-10)>=H) { - Y=10; - X+=label_maxwidth; - again = true; - } - } while(again); - } - relayout(); - redraw(); -} - -int create_new_dnd_icon(int x, int y, char *filename) //create icon from dnd data -{ - if (filename) - { - char config[256]; //fltk::PATH_MAX - expected unqualified-id before numeric constant (?!?!) - const char *name = fltk::filename_name(filename); - snprintf(config, sizeof(config)-1, "%s/.ede/desktop/%s.desktop", getenv("HOME"), name); - - if (!fltk::filename_exist((char*)config)) - { - char val[256]; //fltk::PATH_MAX - expected unqualified-id before numeric constant (?!?!) - EDE_Config checkconf(filename, true, false); - - if(!checkconf.get("Desktop Entry", "Exec", val, 0, sizeof(val))) - { - EDE_Config cfg(config); - cfg.set_section("Desktop Entry"); - - checkconf.get("Desktop Entry", "Icon", val, "no icon", sizeof(val)); - cfg.write("Icon", val); - cfg.write("X", x); - cfg.write("Y", y); - cfg.write(get_localized_string(), get_localized_name(checkconf)); - - checkconf.get("Desktop Entry", "Exec", val, filename, sizeof(val)); - cfg.write("Exec", val); - cfg.flush(); - } - else - { - EDE_Config cfg(config); - cfg.set_section("Desktop Entry"); - cfg.write("Icon", "no icon"); - cfg.write("X", x); - cfg.write("Y", y); - cfg.write(get_localized_string(), name); - cfg.write("Exec", filename); - cfg.flush(); - } - desktop->begin(); - Icon *icon = new Icon((char*)config); - icon->show(); - desktop->end(); - desktop->redraw(); +void Desktop::read_config(void) { + edelib::Config conf; + if(!conf.load(CONFIG_NAME)) { + EDEBUG(ESTRLOC ": Can't load %s, using default...\n", CONFIG_NAME); + return; } - else - { - fltk::alert(_("The icon with the same name already exists.")); - } - } - return 0; + + /* + * TODO: + * Add IconArea[X,Y,W,H] so icons can live + * inside that area only (aka margins). + */ + + // read Desktop section + conf.get("Desktop", "Color", bg_color, fltk::BLUE); + conf.get("Desktop", "WallpaperUse", wp_use, false); + if(wp_use) { + char wp_path[1024]; + conf.get("Desktop", "Wallpaper", wp_path, sizeof(wp_path)); + EDEBUG(ESTRLOC ": Wallpaper %s\n", wp_path); + } + + // read Icons section + conf.get("Icons", "Label Background", gisett.label_background, 46848); + conf.get("Icons", "Label Foreground", gisett.label_foreground, fltk::WHITE); + conf.get("Icons", "Label Fontsize", gisett.label_fontsize, 12); + conf.get("Icons", "Label Maxwidth", gisett.label_maxwidth, 75); + conf.get("Icons", "Label Transparent",gisett.label_transparent, false); + conf.get("Icons", "Label Visible", gisett.label_draw, true); + conf.get("Icons", "Gridspacing", gisett.gridspacing, 16); + conf.get("Icons", "OneClickExec", gisett.one_click_exec, false); + conf.get("Icons", "AutoArrange", gisett.auto_arr, true); + + /* + * Now try to load icons, first looking inside ~/Desktop directory + * then inside config since config could contain removed entries + * from $HOME/Desktop + * + * FIXME: dir_exists() can't handle '~/Desktop' ??? + */ + //load_icons("/home/sanel/Desktop", conf); + edelib::String dd = edelib::dir_home(); + dd += "/Desktop"; + load_icons(dd.c_str(), conf); + +#if 0 + EDEBUG("----------------------------------------------------------\n"); + EDEBUG("d Color : %i\n", bg_color); + EDEBUG("d WallpaperUse: %i\n", wp_use); + EDEBUG("i label bkg : %i\n", gisett.label_background); + EDEBUG("i label fg : %i\n", gisett.label_foreground); + EDEBUG("i label fsize : %i\n", gisett.label_fontsize); + EDEBUG("i label maxw : %i\n", gisett.label_maxwidth); + EDEBUG("i label trans : %i\n", gisett.label_transparent); + EDEBUG("i label vis : %i\n", gisett.label_draw); + EDEBUG("i gridspace : %i\n", gisett.gridspacing); + EDEBUG("i oneclick : %i\n", gisett.one_click_exec); + EDEBUG("i auto_arr : %i\n", gisett.auto_arr); +#endif } -int Desktop::handle(int event) -{ - if (event == fltk::KEY) - { - const int numchildren = children(); - int previous = focus_index()>0?focus_index():0; - int i; +void Desktop::load_icons(const char* path, edelib::Config& conf) { + EASSERT(path != NULL); - if (fltk::focus()==this || fltk::focus() && !contains(fltk::focus())) return 0; - int key = navigation_key(); - if(key) - for (i = previous;;) { - if (key == fltk::LeftKey || key == fltk::UpKey) - { - if (i) --i; - else - { - if (parent()) return false; - i = numchildren-1; - } - } - else - { - ++i; - if (i >= numchildren) - { - if (parent()) return false; - i = 0; - } - } - if (i == previous) break; - if (key == fltk::DownKey || key == fltk::UpKey) - { - // for up/down, the widgets have to overlap horizontally: - fltk::Widget* o = child(i); - fltk::Widget* p = child(previous); - if (o->x() >= p->x()+p->w() || o->x()+o->w() <= p->x()) continue; - } - if (child(i)->take_focus()) { - redraw(); - return true; - } - } + if(!edelib::dir_exists(path)) { + EDEBUG(ESTRLOC ": %s does not exists\n", path); + return; + } - return 1; - } + edelib::vector lst; - int ret = fltk::DoubleBufferWindow::handle(event); + // list without full path, so we can use name as entry in config file + if(!dir_list(path, lst)) { + EDEBUG(ESTRLOC ": Can't read %s\n", path); + return; + } - switch(event) - { - case fltk::PUSH: - if(fltk::event_button()==3) { - popup->fltk::Menu::popup(fltk::Rectangle(fltk::event_x_root(), fltk::event_y_root())); - } - break; - case fltk::FOCUS: - case fltk::UNFOCUS: - return 1; + const char* name = NULL; + int icon_x = 0; + int icon_y = 0; + edelib::String full_path; + full_path.reserve(256); + + for(unsigned int i = 0; i < lst.size(); i++) { + name = lst[i].c_str(); + + if(edelib::str_ends(name, ".desktop")) { + + full_path = path; + full_path += '/'; + full_path += name; + + IconSettings is; + int icon_type; + + if(read_desktop_file(full_path.c_str(), is, icon_type)) { + + // store dekstop name for key in saving positions + is.desktop_name = name; + + // random_pos() is used if X/Y keys are not found + conf.get(name, "X", icon_x, random_pos(w() - 10)); + conf.get(name, "Y", icon_y, random_pos(h() - 10)); + + EDEBUG(ESTRLOC ": %s found with: %i %i\n", name, icon_x, icon_y); + is.x = icon_x; + is.y = icon_y; + + DesktopIcon* dic = new DesktopIcon(&gisett, &is, icon_type); + add_icon(dic); + } else + EDEBUG(ESTRLOC ": Skipped %s section\n", name); + } + } +} + +// reads .desktop file content +bool Desktop::read_desktop_file(const char* path, IconSettings& is, int& icon_type) { + EASSERT(path != NULL); + + if(!edelib::file_exists(path)) { + EDEBUG(ESTRLOC ": %s don't exists\n"); + return false; + } + + edelib::Config dconf; + if(!dconf.load(path)) { + EDEBUG(ESTRLOC ": Can't read %s\n", path); + return false; + } + + char buff[128]; + int buffsz = sizeof(buff); + + /* + * First check for 'EmptyIcon' key since via it is determined + * is icon trash type or not (in case of trash, 'Icon' key is used for full trash). + * FIXME: any other way to check for trash icons ??? + */ + if(dconf.get("Desktop Entry", "EmptyIcon", buff, buffsz)) { + icon_type = ICON_TRASH; + is.icon = buff; + } + + if(dconf.error() == edelib::CONF_ERR_SECTION) { + EDEBUG(ESTRLOC ": %s is not valid .desktop file\n"); + return false; + } + + dconf.get("Desktop Entry", "Icon", buff, buffsz); + + if(icon_type == ICON_TRASH) + is.icon2 = buff; + else { + is.icon = buff; + icon_type = ICON_NORMAL; + } + + EDEBUG(ESTRLOC ": Icon is: %s\n", is.icon.c_str()); + + char name[256]; + // FIXME: UTF-8 safety + if(dconf.get_localized("Desktop Entry", "Name", name, sizeof(name))) { + EDEBUG(ESTRLOC ": Name is: %s\n", name); + is.name = name; + } + + /* + * Specs (desktop entry file) said that Type=Link means there must + * be somewhere URL key. My thoughts is that in this case Exec key + * should be ignored, even if exists. Then I will follow my thoughts. + */ + if(!dconf.get("Desktop Entry", "Type", buff, buffsz)) { + EDEBUG(ESTRLOC ": Missing mandatory Type key\n"); + return false; + } + + if(strncmp(buff, "Link", 4) == 0) { + is.cmd_is_url = true; + if(!dconf.get("Desktop Entry", "URL", buff, buffsz)) { + EDEBUG(ESTRLOC ": Missing expected URL key\n"); + return false; + } + is.cmd = buff; + } else if(strncmp(buff, "Application", 11) == 0) { + is.cmd_is_url = false; + if(!dconf.get("Desktop Entry", "Exec", buff, buffsz)) { + EDEBUG(ESTRLOC ": Missing expected Exec key\n"); + return false; + } + is.cmd = buff; + } else if(strncmp(buff, "Directory", 11) == 0) { + EDEBUG(ESTRLOC ": Type = Directory is not implemented yet\n"); + return false; + } else { + EDEBUG(ESTRLOC ": Unknown %s type, ignoring...\n", buff); + return false; + } + + return true; +} + +void Desktop::save_config(void) { + // TODO +} + +void Desktop::add_icon(DesktopIcon* ic) { + EASSERT(ic != NULL); + + icons.push_back(ic); + add(ic); +} + +void Desktop::move_selection(int x, int y, bool apply) { + unsigned int sz = selectionbuff.size(); + if(sz == 0) + return; + + int prev_x, prev_y, tmp_x, tmp_y; + + for(unsigned int i = 0; i < sz; i++) { + prev_x = selectionbuff[i]->drag_icon_x(); + prev_y = selectionbuff[i]->drag_icon_y(); + + tmp_x = x - selection_x; + tmp_y = y - selection_y; + + selectionbuff[i]->drag(prev_x+tmp_x, prev_y+tmp_y, apply); + + // very slow if is not checked + if(apply == true) + selectionbuff[i]->redraw(); + } + + selection_x = x; + selection_y = y; +} + +void Desktop::unfocus_all(void) { + unsigned int sz = icons.size(); + + for(unsigned int i = 0; i < sz; i++) { + if(icons[i]->is_focused()) { + icons[i]->do_unfocus(); + icons[i]->redraw(); + } + } + + redraw(); +} + +bool Desktop::in_selection(const DesktopIcon* ic) { + unsigned int sz = selectionbuff.size(); + + for(unsigned int i = 0; i < sz; i++) { + if(ic == selectionbuff[i]) + return true; + } + + return false; +} + +void Desktop::select(DesktopIcon* ic) { + EASSERT(ic != NULL); + + if(in_selection(ic)) + return; + + selectionbuff.push_back(ic); + + if(!ic->is_focused()) { + ic->do_focus(); + ic->redraw(); + redraw(); + } +} + +void Desktop::select_only(DesktopIcon* ic) { + EASSERT(ic != NULL); + + unfocus_all(); + + selectionbuff.clear(); + selectionbuff.push_back(ic); + + ic->do_focus(); + ic->redraw(); + + redraw(); +} + +void Desktop::draw(void) { + if(damage() & fltk::DAMAGE_ALL) { + fltk::Window::draw(); + fltk::overlay_clear(); + } + + if(damage() & (fltk::DAMAGE_ALL|fltk::DAMAGE_VALUE)) { + if(selection_box_show) { + fltk::Rectangle selrect(selection_box_x_start, selection_box_y_start, selection_box_x, selection_box_y); + fltk::overlay_rect(selrect.x(), selrect.y(), selrect.w(), selrect.h()); + + /*dd + fltk::line_style(fltk::DOT); + + fltk::push_matrix(); + fltk::setcolor(gisett.label_foreground); + fltk::addvertex(selrect.x(),selrect.y()); + fltk::addvertex(selrect.x() + selrect.w(), selrect.y()); + //fltk::addvertex(X+lwidth,Y+lheight); + fltk::addvertex(selrect.x() + selrect.w(), selrect.y() + selrect.h()); + fltk::addvertex(selrect.x(), selrect.y() + selrect.h()); + fltk::addvertex(selection_box_x_start,selection_box_y_start); + fltk::addvertex(selrect.x(),selrect.y()); + fltk::strokepath(); + + fltk::pop_matrix(); + + // revert to default line style + fltk::line_style(0); + */ + } + } +} + +int Desktop::handle(int event) { + switch(event) { + case fltk::PUSH: { + /* + * First check where we clicked. If we do it on desktop + * unfocus any possible focused childs, and handle + * specific clicks. Otherwise, do rest for childs. + */ + fltk::Widget* clicked = fltk::belowmouse(); + EDEBUG(ESTRLOC ": %i\n", fltk::event_button()); + + if(clicked == this) { + unfocus_all(); + EDEBUG(ESTRLOC ": DESKTOP CLICK !!!\n"); + + if(!selectionbuff.empty()) + selectionbuff.clear(); + + if(fltk::event_button() == 3) + pmenu->popup(); + + // track position so moving can be deduced + if(fltk::event_button() == 1) { + selection_box_x_start = fltk::event_x_root(); + selection_box_y_start = fltk::event_y_root(); + } + + return 1; + } + // from here, all events are managed for icons + DesktopIcon* tmp_icon = (DesktopIcon*)clicked; + + /* + * do no use assertion on this, since + * fltk::belowmouse() can miss our icon + */ + if(!tmp_icon) + return 1; + + if(SELECTION_MULTI) { + fltk::event_is_click(0); + select(tmp_icon); + return 1; + } else if (SELECTION_SINGLE) { + + if(!in_selection(tmp_icon)) + select_only(tmp_icon); + + } else if (fltk::event_button() == 3) + select_only(tmp_icon); + + /* + * Let child handle the rest. + * Also prevent click on other mouse buttons during move. + */ + if(!moving) + tmp_icon->handle(fltk::PUSH); + + selection_x = fltk::event_x_root(); + selection_y = fltk::event_y_root(); + EDEBUG(ESTRLOC ": fltk::PUSH from desktop\n"); - case fltk::DND_ENTER: - return 1; - case fltk::DND_DRAG: - //cursor((fltk::Cursor*)26, 70, 96); - cursor((fltk::Cursor*)26); // FIXME - colors - //cursor(fltk::CURSOR_MOVE, 70, 96); - case fltk::DND_RELEASE: -// cursor(fltk::CURSOR_DEFAULT, fltk::BLACK, fltk::WHITE); - cursor(fltk::CURSOR_DEFAULT); // FIXME - colors - return 1; - case fltk::PASTE: - create_new_dnd_icon(fltk::event_x_root(), fltk::event_y_root(), (char*)fltk::event_text()); - return 1; - - default: - break; - } + return 1; + } - return ret; + case fltk::DRAG: + moving = true; + + if(!selectionbuff.empty()) { + EDEBUG(ESTRLOC ": DRAG icon from desktop\n"); + move_selection(fltk::event_x_root(), fltk::event_y_root(), false); + } else { + EDEBUG(ESTRLOC ": DRAG from desktop\n"); + + selection_box_x = fltk::event_x_root() - selection_box_x_start; + selection_box_y = fltk::event_y_root() - selection_box_y_start; + + // moving is started + if(selection_box_x != 0 || selection_box_y != 0) { + selection_box_show = true; + redraw(fltk::DAMAGE_VALUE); + } + } + + return 1; + + case fltk::RELEASE: + EDEBUG(ESTRLOC ": RELEASE from desktop\n"); + EDEBUG(ESTRLOC ": clicks: %i\n", fltk::event_is_click()); + + if(selection_box_show) { + selection_box_show = false; + selection_box_x = selection_box_y = selection_box_x_start = selection_box_y_start = 0; + redraw(fltk::DAMAGE_ALL); + return 1; + } + + if(!selectionbuff.empty() && moving) { + EDEBUG(ESTRLOC ": CLEARING BUFFER\n"); + move_selection(fltk::event_x_root(), fltk::event_y_root(), true); + } + + /* + * Do not send fltk::RELEASE during move + * + * TODO: should be alowed fltk::RELEASE to multiple icons? (aka. run + * command for all selected icons ? + * + * TODO: or to make something like selectionbuff[0]->execute() + * so icon execute whatever it have ? + */ + if(selectionbuff.size() == 1 && !moving) + selectionbuff[0]->handle(fltk::RELEASE); + + moving = false; + return 1; + + + case fltk::FOCUS: + case fltk::UNFOCUS: + return 1; + + default: + break; + } + + return fltk::Window::handle(event); } -static int iconChangeHandler(int e) -{ -/* if(!e && fltk::xevent.type==ClientMessage && fltk::xevent.xclient.message_type==FLTKChangeSettings) - { - readIconsConfiguration(); - desktop->update_icons(); - return 1; - } - return 0;*/ +/* + * This function is executed before desktop is actually showed + * but after is internally created so net_make_me_desktop() specific code can + * be executed correctly. + * + * Calling net_make_me_desktop() after show() will confuse many wm's which will + * in turn partialy register us as desktop type. + */ +void Desktop::create(void) { + fltk::Window::create(); + net_make_me_desktop(this); } -void Desktop::draw() -{ - int numchildren = children(); +int main() { + signal(SIGTERM, exit_signal); + signal(SIGKILL, exit_signal); + signal(SIGINT, exit_signal); - if(wpaper) { - wpaper->draw(fltk::Rectangle(0,0,w(),h())); - } else { - fltk::color(bg_color); - fltk::fillrect(0,0,w(),h()); - } + srand(time(NULL)); - int n; - for(n = numchildren; n--;) { - fltk::Widget &w = *child(n); - if(!fltk::not_clipped(fltk::Rectangle(w.x(), w.y(), w.w(), w.h()))) - continue; - fltk::push_matrix(); - fltk::translate(w.x(), w.y()); - w.set_damage(fltk::DAMAGE_ALL|fltk::DAMAGE_EXPOSE); - w.draw(); - w.set_damage(0); - fltk::pop_matrix(); - } -} - -WPaper *make_image(fltk::Color bg_color, fltk::SharedImage *im, int w, int h, int mode, uchar opacity); - -void Desktop::update_bg() -{ - //Fl_Renderer::system_init(); - - if (wpaper) { - delete wpaper; - wpaper=0; - } - - EDE_Config globalConfig(EDE_Config::find_config_file("ede.conf", 0), true, false); - globalConfig.set_section("Desktop"); -// globalConfig.read("Color", bg_color, (fltk::Color)fltk::darker(fltk::BLUE)); - globalConfig.read("Color", bg_color, fltk::BLUE); - globalConfig.read("Opacity", bg_opacity, 255); - globalConfig.read("Mode", bg_mode, 0); - globalConfig.read("Use", bg_use, 1); - - fltk::SharedImage *im=0; - - if(!globalConfig.read("Wallpaper", bg_filename, 0)) { - if(bg_use) { - im = fltk::SharedImage::get(bg_filename); -// if (im) im->system_convert(); - } - } else { - free(bg_filename); - bg_filename=0; - } - - if(im) { - wpaper = make_image(bg_color, im, w(), h(), bg_mode, bg_opacity); - delete im; - } - redraw(); -} - -#include - -static bool running = true; - -void exit_signal(int signum) -{ - printf("Exiting (got signal %d)\n", signum); - running = false; -} - -int main(int argc, char ** argv) -{ - signal(SIGTERM, exit_signal); - signal(SIGKILL, exit_signal); - signal(SIGINT, exit_signal); - -// fl_init_locale_support("eiconman", PREFIX"/share/locale"); - //fl_init_images_lib(); - - desktop = new Desktop(); - desktop->begin(); - - char homedir[256]; //fltk::PATH_MAX - expected unqualified-id before numeric constant (?!?!) - snprintf(homedir,256,"%s/.ede/desktop/",getenv("HOME")); - if(fltk::filename_isdir(homedir)) { - scanIcons(homedir); - } - - desktop->end(); - desktop->show(); - - readIconsConfiguration(); - - desktop->update_workarea(); - desktop->update_bg(); - desktop->update_icons(); - - //fltk::add_handler(iconChangeHandler); FIXME - - while(running) fltk::wait(); - - delete desktop; - - return 0; -} - -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// - -//WPaper::WPaper(int W, int H, Fl_PixelFormat *fmt) -//: Fl_Image(W,H,fmt,0) -WPaper::WPaper(int W, int H) -: fltk::SharedImage() -{ - w(W); - h(H); -// FIXME weird stuff... -// no_screen(true); -// state_effect(false); -} - -WPaper::~WPaper() -{ -// if(id) { -// fltk::delete_offscreen((Pixmap)id); -// id=0; -// } -// clear(); -} - -void WPaper::_draw(int dx, int dy, int dw, int dh, - int sx, int sy, int sw, int sh, - fltk::Flags f) -{ -// if(!id) fltk::Image::_draw(dx,dy,dw,dh,sx,sy,sw,sh,f); -// if(id && m_data) { -// delete m_data; -// m_data=0; -// } -// if(id) { -// // convert to Xlib coordinates: -// fltk::transform(dx,dy); -// fltk::copy_offscreen(dx,dy,dw,dh,(Pixmap)id,0,0); -// } -} - -WPaper *make_image(fltk::Color bg_color, - fltk::SharedImage *im, - int w, int h, - int mode, - uchar opacity=255) -{ - // secret box render function from Fl_Image :) - //extern uint8 *render_box(int w, int h, int bitspp, uint color, fltk::Colormap *pal, uint8 *buffer); - - //Fl_PixelFormat fmt = Fl_Renderer::system_format(); - //WPaper *bg_image = new WPaper(w, h, Fl_Renderer::system_format()); - WPaper *bg_image = new WPaper(w, h); - - int iw=im->width(), ih=im->height(); - int ix=0, iy=0; - int xoff=0, yoff=0; - fltk::SharedImage *newim = im; - - switch(mode) { - //CENTER - case 0: { - ix=(w/2)-(iw/2); - iy=(h/2)-(ih/2); - if(ix<0) xoff=-ix; if(iy<0) yoff=-iy; - if(ix<0) ix=0; if(iy<0) iy=0; - } - break; - - //STRECH - case 1: { - ix=0, iy=0, iw=w, ih=h; - if(w!=im->width()||h!=im->height()) { - newim = im->scale(w,h); - } - } - break; - - //STRETCH ASPECT - case 2: { - int pbw = w, pbh = h; - iw = pbw; - ih = iw * im->height() / im->width(); - if(ih > pbh) { - ih = pbh; - iw = ih * im->width() / im->height(); - } - ix=(w/2)-(iw/2), iy=(h/2)-(ih/2); - if(ix<0) ix=0; if(iy<0) iy=0; - if(iw>w) iw=w; if(ih>h) ih=h; - if(iw!=im->width()||ih!=im->height()) { - newim = im->scale(iw,ih); - } - } - break; - } - - // This could be an option, opacity - newim->format()->alpha = opacity; - - if( (iwformat()->alpha!=255) { - // If image doesnt fill the whole screen, or opacity < 255 - // fill image first with bg color. - //render_box(w, h, fmt->bitspp, bg_color, fmt->palette, bg_image->data()); - } - - if(iw>w) iw=w; if(ih>h) ih=h; - fltk::Rectangle r(xoff, yoff, iw, ih); - fltk::Rectangle r2(ix,iy, iw, ih); - - if(newim->format()->alpha>0) { - // Blit image data to our bg_image - bg_image->check_map(newim->format()); - //fltk::Renderer::alpha_blit(newim->data(), &r, newim->format(), newim->pitch(), - // bg_image->data(), &r2, bg_image->format(), bg_image->pitch(), - // 0); - } - - if(newim!=im) - delete newim; - - return bg_image; -} - -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// - -static bool shown = false, changed=false; -static WPaper *mini_wpaper=0; -static fltk::SharedImage *mini_image=0; -static int mode=0; -static bool use=true; -static uchar opacity=0; -static fltk::Color color=0; -static char* filename; - -void desktop_properties(fltk::Widget *, void *arg) -{ - if(!shown) { - make_desktop_properties(); - shown = true; - } - - mode = desktop->bg_mode; - color = desktop->bg_color; - opacity = desktop->bg_opacity; - use = desktop->bg_use; - filename = desktop->bg_filename; - - if(bg_prop_window->visible()) { - bg_prop_window->show(); - return; - } - - if(mini_image) { delete mini_image; mini_image=0; } - if(mini_wpaper){ delete mini_wpaper; mini_wpaper=0;} - - color_button->selection_color(color); - mini_image_box->color(color); - opacity_slider->value(opacity); - mode_choice->value(mode); - use_button->value(use); - image_input->value(filename); - - if(!desktop->bg_filename.empty()) - { - fltk::SharedImage *im = fltk::SharedImage::read(desktop->bg_filename); - if(im) { - im->system_convert(); - float scalew = (float)mini_image_box->w()/(float)desktop->w(); - float scaleh = (float)mini_image_box->h()/(float)desktop->h(); - mini_image = im->scale(int(im->width()*scalew), int(im->height()*scaleh)); - delete im; - } - } - - if(mini_image) { - mini_wpaper = make_image(color, mini_image, - mini_image_box->w(), mini_image_box->h(), - mode, opacity); - mini_image_box->image(mini_wpaper); - } else - mini_image_box->image(0); - - if(use) - bg_image_group->activate(); - else { - bg_image_group->deactivate(); - mini_image_box->image(0); - } - - bg_prop_window->show(); -} - -void bg_image_use(fltk::CheckButton *w, void *d) -{ - changed=true; - use = (bool)w->value(); - if(w->value()) { - bg_image_group->activate(); - mini_image_box->image(mini_wpaper); - } else { - bg_image_group->deactivate(); - mini_image_box->image(0); - } - - bg_image_group->redraw(); - mini_image_box->redraw(); -} - -void bg_image_mode(fltk::Choice *w, void *d) -{ - changed=true; - mode = w->value(); - if(mini_wpaper) delete mini_wpaper; - if(mini_image) { - mini_wpaper = make_image(color, mini_image, - mini_image_box->w(), mini_image_box->h(), - mode, opacity); - mini_image_box->image(mini_wpaper); - } else { - mini_image_box->image(0); - } - mini_image_box->redraw(); -} - -void bg_image_input(fltk::Input *w, void *d) -{ - changed=true; - -// Fl_String val(w->value()); -// filename = fl_file_expand(val); - filename = strdup(w->value()); - - if(mini_wpaper) { delete mini_wpaper; mini_wpaper=0; } - if(mini_image) { delete mini_image; mini_image=0; } - - fltk::SharedImage *im = fltk::SharedImage::read(filename); - if(im) { - im->system_convert(); - float scalew = (float)mini_image_box->w()/(float)desktop->w(); - float scaleh = (float)mini_image_box->h()/(float)desktop->h(); - mini_image = im->scale(int(im->width()*scalew), int(im->height()*scaleh)); - delete im; - } - - if(mini_image) { - mini_wpaper = make_image(color, mini_image, - mini_image_box->w(), mini_image_box->h(), - mode, opacity); - mini_image_box->image(mini_wpaper); - } else { - mini_image_box->image(0); - } - - image_input->value(filename); - image_input->redraw(); - mini_image_box->redraw(); -} - -void bg_image_opacity(fltk::ValueSlider *w, void *d) -{ - changed=true; - opacity = (uchar)w->value(); - - if(mini_wpaper) delete mini_wpaper; - if(mini_image) { - mini_wpaper = make_image(color, mini_image, - mini_image_box->w(), mini_image_box->h(), - mode, opacity); - mini_image_box->image(mini_wpaper); - } else { - mini_image_box->image(0); - } - mini_image_box->redraw(); -} - -void bg_image_browse(fltk::Button *w, void *d) -{ - changed=true; - fc_initial_preview = true; - const char *f=fltk::file_chooser(image_input->value(), - _("All Files, *," - "Png Images, *.png," - "Xpm Images, *.xpm," - "Jpeg Images, *.{jpg|jpeg}," - "Gif Images, *.gif," - "Bmp Images, *.bmp"), - _("Choose wallpaper:") - ); - - if(f) { - if(mini_wpaper) { delete mini_wpaper; mini_wpaper=0; } - if(mini_image) { delete mini_image; mini_image=0; } - - filename = f; - - fltk::SharedImage *im = fltk::SharedImage::read(f); - if(im) { - im->system_convert(); - float scalew = (float)mini_image_box->w()/(float)desktop->w(); - float scaleh = (float)mini_image_box->h()/(float)desktop->h(); - mini_image = im->scale(int(im->width()*scalew), int(im->height()*scaleh)); - delete im; - } - - if(mini_image) { - mini_wpaper = make_image(color, mini_image, - mini_image_box->w(), mini_image_box->h(), - mode, opacity); - mini_image_box->image(mini_wpaper); - } else - mini_image_box->image(0); - - image_input->value(filename); - image_input->redraw(); - mini_image_box->redraw(); - delete []f; - } -} - -void bg_image_color(fltk::LightButton *w, void *d) -{ - changed=true; - fltk::Color nc = color; - if(!fltk::color_chooser(_("Choose color"), nc)) - return; - - color = nc; - - mini_image_box->color(nc); - color_button->selection_color(color); - - if(mini_wpaper) delete mini_wpaper; - if(mini_image) { - mini_wpaper = make_image(color, mini_image, - mini_image_box->w(), mini_image_box->h(), - mode, opacity); - mini_image_box->image(mini_wpaper); - } else { - mini_image_box->image(0); - } - mini_image_box->redraw(); -} - -void bg_prop_cb(fltk::Window *w, void *d) -{ - if(mini_wpaper) { delete mini_wpaper; mini_wpaper=0; } - if(mini_image) { delete mini_image; mini_image=0; } - w->hide(); - - shown = false; - delete w; -} - -void bg_apply(fltk::Button *w, void *d) -{ - if(changed) { - EDE_Config globalConfig(EDE_Config::find_config_file("ede.conf", 1), true, true); - globalConfig.set_section("Desktop"); - globalConfig.write("Color", color); - globalConfig.write("Opacity", int(opacity)); - globalConfig.write("Wallpaper", filename); - globalConfig.write("Mode", mode); - globalConfig.write("Use", use); - globalConfig.flush(); - - desktop->update_bg(); - } - changed=false; -} - -void bg_ok(fltk::Button *w, void *d) -{ - bg_apply(w,d); - bg_prop_window->destroy(); + // TODO: init_locale_support() + + //edelib::IconTheme::init("crystalsvg"); + edelib::IconTheme::init("edeneu"); + + fltk::register_images(); + + Desktop *desktop = new Desktop(); + desktop->show(); + + /* + * XSelectInput will redirect PropertyNotify messages, which + * we are listen for + */ + XSelectInput(fltk::xdisplay, RootWindow(fltk::xdisplay, fltk::xscreen), PropertyChangeMask | StructureNotifyMask ); + fltk::add_event_handler(desktop_xmessage_handler); + + while(running) + fltk::wait(); + + delete desktop; + return 0; } diff --git a/eiconman/eiconman.h b/eiconman/eiconman.h index 57c4757..ec6c8d7 100644 --- a/eiconman/eiconman.h +++ b/eiconman/eiconman.h @@ -1,111 +1,108 @@ /* * $Id$ * - * Desktop icons manager + * Eiconman, desktop and icon manager * Part of Equinox Desktop Environment (EDE). - * Copyright (c) 2000-2006 EDE Authors. + * Copyright (c) 2000-2007 EDE Authors. * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. + * This program is licensed under terms of the + * GNU General Public License version 2 or newer. * See COPYING for details. */ -#ifndef EICONMAN_H -#define EICONMAN_H +#ifndef __EICONMAN_H__ +#define __EICONMAN_H__ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include //#include -#include //#include -//#include -#include //#include -/*#include -#include -#include -#include -#include -#include */ -#include //#include -/*#include -#include */ -#include //#include -/*#include -#include -#include -#include -#include -#include -#include -#include -#include */ -#include // for PATH_MAX -#include -//#include -#include -#include -#include -#include "../edelib2/NLS.h" //#include -#include "../edelib2/EDE_Run.h" //#include - -class WPaper; - -class Desktop : public fltk::DoubleBufferWindow -{ -public: - Desktop(); - ~Desktop(); - - virtual int handle(int); - virtual void hide() {} - - virtual void draw(); - - void update_bg(); - void update_icons(); - void update_workarea(); - - void auto_arrange(); - - WPaper *wpaper; //Generated image - fltk::Color bg_color; - bool bg_use; - int bg_opacity, bg_mode; - char* bg_filename; - - fltk::PopupMenu *popup; +// settings realted to specific desktop view +struct DesktopSettings { + bool wp_use; + int color; + edelib::String wallpaper; }; -class WPaper : public fltk::SharedImage -{ -public: - WPaper(int W, int H); -// WPaper(int W, int H, Fl_PixelFormat *fmt); - ~WPaper(); - - void _draw(int dx, int dy, int dw, int dh, - int sx, int sy, int sw, int sh, - fltk::Flags f); - +struct GlobalIconSettings { + int label_background; + int label_foreground; + int label_fontsize; + int label_maxwidth; + int gridspacing; + bool label_transparent; + bool label_draw; + bool one_click_exec; + bool auto_arr; + bool same_size; }; -extern Desktop *desktop; +// settings related to .desktop files +struct IconSettings { + int x, y; -extern int label_background; -extern int label_foreground; -extern int label_fontsize; -extern bool label_trans; -extern int label_maxwidth; -extern int label_gridspacing; -extern bool one_click_exec; + bool cmd_is_url; // interpret cmd as url, like system:/,trash:/,$HOME + + edelib::String name; + edelib::String cmd; + edelib::String icon; + edelib::String icon2; // for stateable icons, like trash (empty/full) + edelib::String desktop_name; // name used as key when storing positions +}; + + +class DesktopIcon; + +class Desktop : public fltk::Window { + private: + int desktops_num; + int bg_color; + bool wp_use; + + bool moving; + int selection_x; + int selection_y; + + int selection_box_x_start; + int selection_box_y_start; + int selection_box_x; + int selection_box_y; + bool selection_box_show; + + //DesktopSettings* dsett; + + GlobalIconSettings gisett; + IconSettings isett; + + edelib::vector icons; + edelib::vector selectionbuff; + + fltk::PopupMenu* pmenu; + + void default_gisett(void); + void load_icons(const char* path, edelib::Config& conf); + bool read_desktop_file(const char* path, IconSettings& is, int& icon_type); + + void add_icon(DesktopIcon* ic); + void unfocus_all(void); + + void select(DesktopIcon* ic); + void select_only(DesktopIcon* ic); + bool in_selection(const DesktopIcon* ic); + + void move_selection(int x, int y, bool apply); + + public: + Desktop(); + ~Desktop(); + void update_workarea(void); + void read_config(void); + void save_config(void); + void create(void); + virtual void draw(void); + virtual int handle(int event); +}; #endif diff --git a/eiconman/fl/deskconf.fl b/eiconman/fl/deskconf.fl new file mode 100644 index 0000000..136bf79 --- /dev/null +++ b/eiconman/fl/deskconf.fl @@ -0,0 +1,87 @@ +# data file for the FLTK User Interface Designer (FLUID) +version 2.1000 +images_dir fltk::Choice +header_name {.h} +code_name {.cxx} +gridx 5 +gridy 5 +snap 1 +Function {} {open selected +} { + {fltk::Window} {} {open + xywh {363 251 540 260} resizable visible + } { + {fltk::InvisibleBox} {} { + xywh {75 173 100 15} box BORDER_BOX + } + {fltk::InvisibleBox} {} { + xywh {20 20 210 158} box THIN_UP_BOX + } + {fltk::InvisibleBox} {} { + xywh {30 30 190 138} box DOWN_BOX color 56 + } + {fltk::InvisibleBox} {} { + xywh {50 183 145 14} box THIN_UP_BOX + } + {fltk::Choice} {} { + label {Desktop:} open + xywh {310 20 220 25} + } {} + {fltk::CheckButton} {} { + label {Use wallpaper} + xywh {310 60 20 19} align 8 + } + {fltk::Input} {} { + label {Image:} + xywh {310 94 190 25} + } + {fltk::Button} {} { + label {...} + xywh {505 94 25 25} + } + {fltk::Choice} {} { + label {Mode:} open + xywh {310 129 220 24} + } {} + {fltk::Button} {} { + label {Background color} + xywh {310 173 25 24} align 8 color 0x3ca700 + } + {fltk::Button} {} { + label {&OK} + xywh {250 227 90 25} + } + {fltk::Button} {} { + label {&Apply} + xywh {345 227 90 25} + } + {fltk::Button} {} { + label {&Cancel} + xywh {440 227 90 25} + } + {fltk::Group} {} {open + xywh {20 210 210 40} + } { + {fltk::InvisibleBox} {} { + xywh {15 5 35 30} box THIN_DOWN_BOX color 0xffff0000 + } + {fltk::Button} {} { + label {@<} + xywh {0 5 10 30} box FLAT_BOX + } + {fltk::Button} {} { + label {@>} + xywh {200 5 10 30} box FLAT_BOX + } + {fltk::InvisibleBox} {} { + xywh {55 5 35 30} box THIN_DOWN_BOX color 0x49a47d00 + } + {fltk::InvisibleBox} {} { + xywh {95 5 35 30} box THIN_DOWN_BOX color 0x3a488800 + } + {fltk::InvisibleBox} {} { + xywh {135 5 35 30} box THIN_DOWN_BOX color 0x808b3f00 + } + } + } +} diff --git a/eiconman/icons/clean.xpm b/eiconman/icons/clean.xpm deleted file mode 100644 index 8999d5e..0000000 --- a/eiconman/icons/clean.xpm +++ /dev/null @@ -1,20 +0,0 @@ -/* XPM */ -static char * clean_xpm[] = { -"24 16 1 1", -" c None", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/eiconman/icons/monitor.xpm b/eiconman/icons/monitor.xpm deleted file mode 100644 index bdef8e4..0000000 --- a/eiconman/icons/monitor.xpm +++ /dev/null @@ -1,174 +0,0 @@ -/* XPM */ -static char * monitor_xpm[] = { -"180 160 11 1", -" c None", -". c #FFFFFF", -"+ c #C5C6C5", -"@ c #CDC2CD", -"# c #C5C2C5", -"$ c #CDC6CD", -"% c #626162", -"& c #9CB2B4", -"* c #526573", -"= c #39FF31", -"- c #39FA31", -" ............................................................................................................................................................................... ", -" ................................................................................................................................................................................. ", -" ...+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$.%%", -" ..+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+%%", -" ..+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+%%", -" ..$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#+%%", -" ..+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+%%", -" ..+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+@+%%", -" ..$#+#+@+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#+#+%%", -" ..+#+@+#+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%.+@+#$#+#%%", -" ..+@+#+#$#% .+#+#+@+#%%", -" ..$#+#$#+#% .$#$#+#$#%%", -" ..+#+@+#+#% .+#+#$#+#%%", -" ..+@+#+#$#% .$#+@+#+#%%", -" ..$#+#+@+#% .+#$#+#$#%%", -" ..+#+@+#+#% .$#+#+#+#%%", -" ..+@+#+#+#% .+#+#$#+#%%", -" ..$#+#$#$#% .+@+#+@+#%%", -" ..+#+@+#+#% .$#+@+#+@%%", -" ..+@+#+#+#% .+#+#+@+#%%", -" ..$#+#+@+@% .+@+#+#+#%%", -" ..+#+@+#+#% .+#+@+#$#%%", -" ..+@+#+@+#% .$#+#$#+#%%", -" ..$#+#$#+#% .+#$#+#+#%%", -" ..+#+@+#+#% .+@+#+@+#%%", -" ..+@+#+#$#% .+#+#$#+#%%", -" ..$#+#+@+#% .$#+#+#$#%%", -" ..+#+@+#+#% .+#$#+@+#%%", -" ..+@+#+#+#% .$#+#$#+#%%", -" ..$#+#$#$#% .+#$#+#+#%%", -" ..+#+@+#+#% .+@+#+#$#%%", -" ..+@+#+#+#% .$#+#+@+#%%", -" ..$#+#+@+@% .+#+@+#+#%%", -" ..+#+@+#+#% .+#$#+#+#%%", -" ..+@+#+@+#% .+@+#+#$#%%", -" ..$#+#$#+#% .$#+#+@+#%%", -" ..+#+@+#+#% .+#+@+#+#%%", -" ..+@+#+#$#% .+@+#+#+#%%", -" ..$#+#+@+#% .$#+#$#$#%%", -" ..+#+@+#+#% .+#+@+#+#%%", -" ..+@+#+#+#% .+#$#+#+#%%", -" ..$#+#$#$#% .$#+#+#$#%%", -" ..+#+@+#+#% .+#+#$#+#%%", -" ..+@+#+#$#% .+@+#+#+#%%", -" ..$#+#+@+#% .$#+@+#$#%%", -" ..+#+@+#+#% .+#+#+@+#%%", -" ..+@+#+#+#% .+@+#+#+#%%", -" ..$#+#$#$#% .$#+#$#+#%%", -" ..+#+@+#+#% .+#+@+#+#%%", -" ..+@+#+#$#% .+@+#+#$#%%", -" ..$#+#+@+#% .$#+#$#+#%%", -" ..+#+@+#+#% .+#+@+#+#%%", -" ..+@+#+#+#% .+@+#+#$#%%", -" ..$#+#$#$#% .$#+#+@+#%%", -" ..+#+@+#+#% .+#+@+#+#%%", -" ..+@+#+#$#% .+@+#+#+#%%", -" ..$#+#+@+#% .+#+#$#$#%%", -" ..+#+@+#+#% .$#+@+#+#%%", -" ..+@+#+#+#% .+#$#+#+#%%", -" ..$#+#$#$#% .+@+#+#$#%%", -" ..+#+@+#+#% .$#+#+@+#%%", -" ..+@+#+#$#% .+#+#$#+#%%", -" ..$#+#+@+#% .+@+#+#+#%%", -" ..+#+@+#+#% .+#+@+#+#%%", -" ..+@+#+#+#% .$#+#+@+#%%", -" ..$#+#$#$#% .+#$#+#$#%%", -" ..+#+@+#+#% .+@+#$#+#%%", -" ..+@+#+#$#% .$#+#+#+#%%", -" ..$#+#+@+#% .+#+#$#$#%%", -" ..+#+@+#+#% .+#$#+#+#%%", -" ..+@+#+#+#% .$#+#+#$#%%", -" ..$#+#$#$#% .+#+@+#+#%%", -" ..+#+@+#+#% .$#+#$#+#%%", -" ..+@+#+#$#% .+#$#+#$#%%", -" ..$#+#+@+#% .+@+#+@+#%%", -" ..+#+@+#+#% .$#+#$#+#%%", -" ..+@+#+#+#% .+#+@+#+#%%", -" ..$#+#$#$#% .+@+#+#+#%%", -" ..+#+@+#+#% .+#+#+@+#%%", -" ..+@+#+#$#% .$#+@+#+@%%", -" ..$#+#+@+#% .+#$#+#$#%%", -" ..+#+@+#+#% .$#+#+@+#%%", -" ..+@+#+#+#% .+#+@+#+#%%", -" ..$#+#$#$#% .+@+#+#+#%%", -" ..+#+@+#+#% .+#+#$#$#%%", -" ..+@+#+#$#% .$#+@+#+#%%", -" ..$#+#+@+#% .+#$#+#+#%%", -" ..+#+@+#+#% .+@+#+#$#%%", -" ..+@+#+#+#% .+#+#+@+#%%", -" ..$#+#$#$#% .$#+#$#+#%%", -" ..+#+@+#+#% .+#$#+#+#%%", -" ..+@+#+#$#% .$#+#+#$#%%", -" ..$#+#+@+#% .+#+@+#+#%%", -" ..+#+@+#+#% .+@+#+@+#%%", -" ..+@+#+#+#% .$#+#$#+#%%", -" ..$#+#$#$#% .+#+@+#+#%%", -" ..+#+@+#+#% .+#$#+#$#%%", -" ..+@+#+#$#% .+@+#+#+#%%", -" ..$#+#+@+#% .$#+#+#$#%%", -" ..+#+@+#+#% .+#+@+#+#%%", -" ..+@+#+#+#% .+#$#+@+#%%", -" ..$#+#$#$#% .+@+#+#+#%%", -" ..+#+@+#+#% .$#+#+@+#%%", -" ..+@+#+#$#% .+#+@+#+@%%", -" ..$#+#+@+#% .+#$#+#$#%%", -" ..+#+@+#+#% .+@+#+@+#%%", -" ..+@+#+#+#% .$#+#+#+#%%", -" ..$#+#$#$#% .+#+@+#+#%%", -" ..+#+@+#+#% .+@+#+@+#%%", -" ..+@+#+#$#% .+#+@+#+@%%", -" ..$#+#+@+#% .$#+#+@+#%%", -" ..+#+@+#+#% .+#$#+#+#%%", -" ..+@+#+#+#% .$#+#$#+#%%", -" ..$#+#$#$#% .+#+@+#$#%%", -" ..+#+@+#+#% .+@+#+#+#%%", -" ..+@+#+#$#% .$#+#$#+#%%", -" ..$#+#+@+#% .+#+@+#+#%%", -" ..+#+@+#+#% .+#$#+#$#%%", -" ..+@+#+#+#% .+@+#+#+#%%", -" ..$#+#$#$#% &.$#+#+@+#%%", -" ..+#+@+#+#% *.+#+@+#+#%%", -" ..+@+#+#$#%..............................................................................................................................................................+#$#+#$#%%", -" ..$#+#+@+#+#$#$#$#+@+@+@+#$#$#$#$#+@+@+#$#$#$#+@+@+#$#+@+#$#$#+@+@+#$#$#+@+@+#$#$#+@+@+@+@+@+#$#$#$#+#$#+@+@+@+#+@+@+@+#$#$#$#$#$#$#$#+@+@+#+@+@+#+@+@+@+#$#$#+@+@+#$#$#+@+#+#$#+%%", -" ..+#+@+#+#$#+#+#+#$#+#+#+@+#+#+#+#$#+#+@+#+#+#$#+#+#+@+#+@+#+#$#+#+@+#+#$#+#+@+#+#$#+#+#+#+#+@+#+#+#$#+#$#+#+#+@+#+#+#+@+#+#+#+#+#+#+#$#+#+@+#+#+@+#+#+#+@+#+#$#+#+@+#+#$#+#+@+#+%%", -" ..+@+#+#+@+#+@+#$#+#+@+#$#+#$#+@+#+#+#$#+#$#+@+#+#$#+#+@+#+#$#+#+@+#+#$#+#+@+#+#$#+#+#$#+@+#$#+#+@+#+#$#+#+@+#$#+#$#+@+#+#$#+#$#+@+#$#+#+@+#+@+#+#+@+#$#+#+#$#+#+#$#+#+@+#+#$#+#+%%", -" ..$#+#$#+#+#$#+#+#+@+#+@+#+#+#$#+@+#$#+#+@+#+#+#$#+#$#+#+#+@+#+#$#+#+@+#+#$#+#+@+#+@+#+#$#+#+#+@+#+@+#+#+@+#+@+#+@+#+#+#$#+#$#+#$#+#+#+@+#+#$#+#$#+#+@+#$#+#+#+@+#+#+@+#+#$#+#+#+%%", -" ..+#+@+#$#+@+#+@+#$#+#$#+#+@+#+#+#+@+#+#$#+#$#+#+#$#+#$#+@+#+#$#+#+@+#+#$#+#+@+#+#$#+@+#+#+@+#+#+#$#+@+#$#+#$#+#+#+#$#+@+#+@+#+@+#+@+#$#+#$#+#+@+#$#+#+#+#$#+@+#+@+#+#+#+@+#+#$#+%%", -" ..+@+#+#+#$#+#+#+@+#+#+#+@+#+@+#+@+#+#$#+#+@+#+@+#+#+@+#+#+#+@+#+#$#+#+@+#+#$#+#+@+#+#+@+#$#+#$#+@+#+#+@+#+#+#+@+#$#+#$#+#+#+#$#+#+#+@+#+#+#+@+#+#+#$#+#$#+#$#+#$#+#$#+@+#+#$#+#$%%", -" ..$#+#$#+#+#+@+#$#+#+@+#+#+#$#+@+#+#+@+#+#$#+#$#+@+#$#+#$#+@+#+#$#+#+@+#+#$#+#+@+#+#+@+#+@+#+@+#+#+#+@+#+#$#+#$#+#+#+@+#+#$#+#+#+@+#$#+#+@+#$#+#$#+#+#$#+#$#+#+@+#+@+#+#+#+@+#+@+%%", -" ..+#+@+#+@+#+#$#+#+@+#+@+#$#+#+#+#$#+#+#$#+#+@+#+#+@+#+#+#$#+#+@+#+#$#+#+@+#+#$#+#+@+#+#$#+#+#+#$#+@+#+#+@+#+@+#+@+#$#+#+@+#+@+#+#$#+#+@+#+@+#+#+#$#+@+#+@+#+#$#+#+#+#$#+@+#+#$#+%%", -" ..%#$#+#$#+#$#+#+#$#+#$#+#+#+@+#+@+#$#+#+#+#$#+#+#$#+#+@+#+#+@+#+#$#+#+@+#+#$#+#+@+#+#$#+#+@+#$#+#+#+#$#+#+@+#+#$#+#+#+@+#+#$#+#$#+#+#$#+#$#+#+@+#+@+#+#$#+#+@+#+#$#+@+#+#+#$#+#%%%", -" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ", -" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ", -" ..+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#%% ", -" ..+#+#...........%#+#+...........%#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#=-+#+.............%#+%% ", -" ..+@+#.$#+@+#$#+#%#$#+.$#+@+#$#+#%#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+#=-+#+.$#+@+#$#+@+#%#+%% ", -" ..+#+@.+#$#+#+#$#%#+#$.+#$#+#+#$#%#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#=-+#$.+#$#+#+#$#+#%#+%% ", -" ..$#+#.+@+#+@+#+#%@+#+.+@+#+@+#+#%@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#=-+#+.+@+#+@+#+#+#%@+%% ", -" ..+#$#.%%%%%%%%%%%#+@+.%%%%%%%%%%%#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#=-+@+.$#+#+#+@+#$#%#+%% ", -" ..$#+#$#+#+#+#+#+#+#+#$#+#+#+#+#+#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#+#+#+#.%%%%%%%%%%%%%#+%% ", -" ..+#+@+#+#+#+#$#+#$#+@+#+#+#+#$#+#$#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#$#+#+#+#+#+#+#+#+#%% ", -" ..%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ", -" .%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ", -" ..+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#%% ", -" ..+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#%% ", -" ..+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#%% ", -" ..+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#%% ", -" .............................................................................................. ", -" .............................................................................................% ", -" ..+@+#$#+@+#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#%% ", -" ..+#+@+#+#+@+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#%% ", -" ..$#+#+#$#+#+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#%% ", -" ..+#$#+@+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#+#$#+#%% ", -" ..$#+#$#+#+#$#+@+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+#%% ", -" ..+#+@+#+#+@+#+#+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#+@+#$#%% ", -" ..$#+#+#$#+#+@+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#%% ", -" ..+#$#+#+#$#+#$#+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#%% ", -" ..$#+#$#+@+#$#+#$#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+@+#+#+#%% ", -" ..%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ", -" .%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "}; diff --git a/eiconman/locale/hu.po b/eiconman/locale/hu.po deleted file mode 100644 index 85de808..0000000 --- a/eiconman/locale/hu.po +++ /dev/null @@ -1,209 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: 2005-02-10 14:35+0100\n" -"Last-Translator: Nemeth Otto \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: edeskconf.cpp:38 -msgid "Background settings" -msgstr "Háttér beállítások" - -#: edeskconf.cpp:42 -msgid "Background" -msgstr "Háttér" - -#: edeskconf.cpp:79 -msgid "C&olor..." -msgstr "S&zín..." - -#: edeskconf.cpp:87 -msgid "Use wallpaper" -msgstr "Háttérkép használata" - -#: edeskconf.cpp:91 -#: edeskconf.cpp:130 -msgid "label" -msgstr "címke" - -#: edeskconf.cpp:94 -msgid "Image:" -msgstr "Kép:" - -#: edeskconf.cpp:99 -msgid "&Browse..." -msgstr "&Tallóz" - -#: edeskconf.cpp:102 -msgid "Opacity:" -msgstr "Áttetsző:" - -#: edeskconf.cpp:112 -msgid "Mode:" -msgstr "Mód:" - -#: edeskconf.cpp:114 -msgid "Center" -msgstr "Középen" - -#: edeskconf.cpp:117 -msgid "Stretch" -msgstr "Nyújtás" - -#: edeskconf.cpp:120 -msgid "Stretch (aspect)" -msgstr "Nyújtás (aránymegtartás)" - -#: edeskconf.cpp:123 -msgid "Tiled" -msgstr "Mozaik" - -#: edeskconf.cpp:131 -msgid "&OK" -msgstr "&OK" - -#: edeskconf.cpp:134 -#: propdialog.cpp:113 -msgid "&Apply" -msgstr "&Alkalmaz" - -#: edeskconf.cpp:137 -msgid "&Cancel" -msgstr "Mégs&em" - -#: edeskicon.cpp:86 -msgid "&Open" -msgstr "Me&gnyitás" - -#: edeskicon.cpp:90 -msgid "&Delete" -msgstr "Tö&rlés" - -#: edeskicon.cpp:96 -msgid "&Properties" -msgstr "&Tulajdonságok" - -#: edeskicon.cpp:442 -msgid "Name of the icon must be filled." -msgstr "Az ikon nevét meg kell adni." - -#: edeskicon.cpp:467 -msgid "Delete this icon?" -msgstr "Letöröljem ezt az ikont?" - -#: edeskicon.cpp:473 -#, c-format -msgid "Remove of the icon %s failed. You probably do not have write access to this file." -msgstr "Az ikon törlése sikertelen: %s . Feltehetően nincs hozzá írási jogosultságod." - -#: edeskicon.cpp:482 -msgid "Enter the name of the new icon:" -msgstr "Mi legyen az ikon neve ?" - -#: edeskicon.cpp:505 -#: eiconman.cpp:241 -msgid "The icon with the same name already exists." -msgstr "Létezik már ikon ilyen néven." - -#: edeskicon.cpp:562 -#, c-format -msgid "%d bytes, %s" -msgstr "%d bájt, %s" - -#: eiconman.cpp:112 -msgid "&New desktop item" -msgstr "Új iko&n" - -#: eiconman.cpp:116 -msgid "&Refresh" -msgstr "F&rissítés" - -#: eiconman.cpp:122 -msgid "&Icons Settings " -msgstr "I&kon beállítások" - -#: eiconman.cpp:126 -msgid "&Background Settings" -msgstr "Há&ttér beállítások" - -#: eiconman.cpp:718 -msgid "All Files, *,Png Images, *.png,Xpm Images, *.xpm,Jpeg Images, *.{jpg|jpeg},Gif Images, *.gif,Bmp Images, *.bmp" -msgstr "Minden fájl, *,Png kép, *.png,Xpm kép, *.xpm,Jpeg kép, *.{jpg|jpeg},Gif kép, *.gif,Bmp kép, *.bmp" - -#: eiconman.cpp:724 -msgid "Choose wallpaper:" -msgstr "Háttérkép kiválasztása..." - -#: eiconman.cpp:761 -msgid "Choose color" -msgstr "Szín kiválasztása" - -#: propdialog.cpp:31 -msgid "Executables (*.*), *, All files (*.*), *" -msgstr "Futtatható fájlok (*.*), *, Minden fájl (*.*), *" - -#: propdialog.cpp:32 -msgid "Open location..." -msgstr "Fájl kiválasztása..." - -#: propdialog.cpp:39 -msgid "Png images (*.png), *.png, Jpeg Images (*.jpeg), *.{jpeg|jpg}, Bmp Files (*.bmp), *.bmp, Gif Files (*.gif), *.gif, Xpm Files (*.xpm), *.xpm, All files (*.*), *" -msgstr "Png kép (*.png), *.png, Jpeg kép (*.jpeg), *.{jpeg|jpg}, Bmp kép (*.bmp), *.bmp, Gif kép (*.gif), *.gif, Xpm kép (*.xpm), *.xpm, Minden fájl (*.*), *" - -#: propdialog.cpp:40 -msgid "Icon file selection" -msgstr "Ikonfájl kiválasztása..." - -#: propdialog.cpp:62 -msgid "Icon properties" -msgstr "Ikon tulajdonságok" - -#: propdialog.cpp:65 -msgid "Icon" -msgstr "Ikon" - -#: propdialog.cpp:69 -msgid "Name:" -msgstr "Név:" - -#: propdialog.cpp:72 -msgid "Size:" -msgstr "Méret:" - -#: propdialog.cpp:75 -msgid "Command:" -msgstr "Parancs:" - -#: propdialog.cpp:90 -msgid "Settings" -msgstr "Beállítások" - -#: propdialog.cpp:92 -msgid "Link file:" -msgstr "Link fájl:" - -#: propdialog.cpp:96 -msgid "Icon name:" -msgstr "Ikon név:" - -#: propdialog.cpp:99 -msgid "Location to open:" -msgstr "Futtatandó alkalmazás:" - -#: propdialog.cpp:102 -#: propdialog.cpp:109 -msgid "..." -msgstr "..." - -#: propdialog.cpp:106 -msgid "Icon filename:" -msgstr "Ikonfájl:" - -#: propdialog.cpp:120 -msgid "&Close" -msgstr "&Bezár" - diff --git a/eiconman/locale/id.po b/eiconman/locale/id.po deleted file mode 100644 index e596bc1..0000000 --- a/eiconman/locale/id.po +++ /dev/null @@ -1,258 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: eiconman 1.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-02-04 12:27+0100\n" -"PO-Revision-Date: 202-11-29 14:43+0700\n" -"Last-Translator: Bambang Purnomosidi D. P. \n" -"Language-Team: id \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-2\n" -"Content-Transfer-Encoding: 8bit\n" - -#: edeskconf.cpp:38 -msgid "Background settings" -msgstr "Seting latar belakang" - -#: edeskconf.cpp:42 -msgid "Background" -msgstr "Latar belakang" - -#: edeskconf.cpp:79 -msgid "C&olor..." -msgstr "&Warna..." - -#: edeskconf.cpp:87 -msgid "Use wallpaper" -msgstr "Gunakan wallpaper" - -#: edeskconf.cpp:91 edeskconf.cpp:130 -msgid "label" -msgstr "" - -#: edeskconf.cpp:94 -msgid "Image:" -msgstr "Citra:" - -#: edeskconf.cpp:99 -msgid "&Browse..." -msgstr "&Browse..." - -#: edeskconf.cpp:102 -msgid "Opacity:" -msgstr "Opasitas:" - -#: edeskconf.cpp:112 -msgid "Mode:" -msgstr "Mode:" - -#: edeskconf.cpp:114 -msgid "Center" -msgstr "Tengah" - -#: edeskconf.cpp:117 -msgid "Stretch" -msgstr "Stretch" - -#: edeskconf.cpp:120 -msgid "Stretch (aspect)" -msgstr "Stretch (aspek)" - -#: edeskconf.cpp:123 -msgid "Tiled" -msgstr "Tiled" - -#: edeskconf.cpp:131 -msgid "&OK" -msgstr "&OK" - -#: edeskconf.cpp:134 propdialog.cpp:113 -msgid "&Apply" -msgstr "&Terapkan" - -#: edeskconf.cpp:137 -msgid "&Cancel" -msgstr "&Batal" - -#: edeskicon.cpp:86 -msgid "&Open" -msgstr "&Buka" - -#: edeskicon.cpp:90 -msgid "&Delete" -msgstr "&Hapus" - -#: edeskicon.cpp:96 -msgid "&Properties" -msgstr "&Properti" - -#: edeskicon.cpp:442 -msgid "Name of the icon must be filled." -msgstr "Nama ikon harus diisi." - -#: edeskicon.cpp:467 -msgid "Delete this icon?" -msgstr "Hapus ikon ini?" - -#: edeskicon.cpp:473 -#, c-format -msgid "" -"Remove of the icon %s failed. You probably do not have write access to this " -"file." -msgstr "" -"Penghapusan ikon %s gagal. Anda mungkin tidak mempunyai hak tulis terhadap " -"file ini" - -#: edeskicon.cpp:482 -msgid "Enter the name of the new icon:" -msgstr "Masukkan nama ikon baru:" - -#: edeskicon.cpp:505 eiconman.cpp:241 -msgid "The icon with the same name already exists." -msgstr "Ikon dengan nama sama telah ada." - -#: edeskicon.cpp:562 -#, fuzzy, c-format -msgid "%d bytes, %s" -msgstr "%d byte" - -#: eiconman.cpp:112 -msgid "&New desktop item" -msgstr "&Item desktop baru" - -#: eiconman.cpp:116 -msgid "&Refresh" -msgstr "&Refresh" - -#: eiconman.cpp:122 -#, fuzzy -msgid "&Icons Settings " -msgstr "Seting" - -#: eiconman.cpp:126 -#, fuzzy -msgid "&Background Settings" -msgstr "Seting latar belakang" - -#: eiconman.cpp:718 -#, fuzzy -msgid "" -"All Files, *,Png Images, *.png,Xpm Images, *.xpm,Jpeg Images, *.{jpg|jpeg}," -"Gif Images, *.gif,Bmp Images, *.bmp" -msgstr "" -"Citra Png, *.png,Citra Xpm, *.xpm,Citra Jpeg, *.{jpg|jpeg},Citra Gif, *.gif," -"Citra Bmp, *.bmp,Pilih wallpaper:" - -#: eiconman.cpp:724 -#, fuzzy -msgid "Choose wallpaper:" -msgstr "Gunakan wallpaper" - -#: eiconman.cpp:761 -msgid "Choose color" -msgstr "Pilih warna" - -#: propdialog.cpp:31 -msgid "Executables (*.*), *, All files (*.*), *" -msgstr "Dapat dieksekusi (*.*), *, Semua file (*.*), *" - -#: propdialog.cpp:32 -msgid "Open location..." -msgstr "Buka lokasi..." - -#: propdialog.cpp:39 -msgid "" -"Png images (*.png), *.png, Jpeg Images (*.jpeg), *.{jpeg|jpg}, Bmp Files (*." -"bmp), *.bmp, Gif Files (*.gif), *.gif, Xpm Files (*.xpm), *.xpm, All files " -"(*.*), *" -msgstr "" - -#: propdialog.cpp:40 -msgid "Icon file selection" -msgstr "Pemilihan file ikon" - -#: propdialog.cpp:62 -msgid "Icon properties" -msgstr "Properti ikon" - -#: propdialog.cpp:65 -msgid "Icon" -msgstr "Ikon" - -#: propdialog.cpp:69 -msgid "Name:" -msgstr "Nama:" - -#: propdialog.cpp:72 -msgid "Size:" -msgstr "Ukuran:" - -#: propdialog.cpp:75 -msgid "Command:" -msgstr "Perintah:" - -#: propdialog.cpp:90 -msgid "Settings" -msgstr "Seting" - -#: propdialog.cpp:92 -msgid "Link file:" -msgstr "Link file:" - -#: propdialog.cpp:96 -msgid "Icon name:" -msgstr "Nama ikon:" - -#: propdialog.cpp:99 -msgid "Location to open:" -msgstr "Lokasi untuk dibuka:" - -#: propdialog.cpp:102 propdialog.cpp:109 -msgid "..." -msgstr "" - -#: propdialog.cpp:106 -msgid "Icon filename:" -msgstr "Nama file ikon:" - -#: propdialog.cpp:120 -msgid "&Close" -msgstr "&Tutup" - -#~ msgid "&Edit" -#~ msgstr "&Edit" - -#~ msgid "Enter the program name or the location to open:" -#~ msgstr "Masukkan nama program atau lokasi untuk dibuka:" - -#~ msgid "Background color selection..." -#~ msgstr "Pemilihan warna latar belakang..." - -#~ msgid "Image selection..." -#~ msgstr "Pemilihan citra" - -#~ msgid "Wallpaper" -#~ msgstr "Wallpaper" - -#~ msgid "" -#~ "Images (*.png; *.jpg; *.gif; *.bmp), *.{png|jpg|gif|bmp}, All files (*." -#~ "*), *" -#~ msgstr "" -#~ "Citra (*.png; *.jpg; *.gif; *.bmp), *.{png|jpg|gif|bmp}, Semua file (*." -#~ "*), *" - -#~ msgid "Icons (*.png), *.png, All files (*.*), *" -#~ msgstr "Ikon (*.png), *.png, Semua file (*.*), *" - -#~ msgid "None" -#~ msgstr "Tidak ada" - -#~ msgid "&Bg Properties" -#~ msgstr "Properti &Bg" - -#~ msgid "All Files, *" -#~ msgstr "Semua file, *" diff --git a/eiconman/locale/messages.pot b/eiconman/locale/messages.pot deleted file mode 100644 index 0c3a976..0000000 --- a/eiconman/locale/messages.pot +++ /dev/null @@ -1,218 +0,0 @@ -# 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 , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-02-04 12:27+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: edeskconf.cpp:38 -msgid "Background settings" -msgstr "" - -#: edeskconf.cpp:42 -msgid "Background" -msgstr "" - -#: edeskconf.cpp:79 -msgid "C&olor..." -msgstr "" - -#: edeskconf.cpp:87 -msgid "Use wallpaper" -msgstr "" - -#: edeskconf.cpp:91 edeskconf.cpp:130 -msgid "label" -msgstr "" - -#: edeskconf.cpp:94 -msgid "Image:" -msgstr "" - -#: edeskconf.cpp:99 -msgid "&Browse..." -msgstr "" - -#: edeskconf.cpp:102 -msgid "Opacity:" -msgstr "" - -#: edeskconf.cpp:112 -msgid "Mode:" -msgstr "" - -#: edeskconf.cpp:114 -msgid "Center" -msgstr "" - -#: edeskconf.cpp:117 -msgid "Stretch" -msgstr "" - -#: edeskconf.cpp:120 -msgid "Stretch (aspect)" -msgstr "" - -#: edeskconf.cpp:123 -msgid "Tiled" -msgstr "" - -#: edeskconf.cpp:131 -msgid "&OK" -msgstr "" - -#: edeskconf.cpp:134 propdialog.cpp:113 -msgid "&Apply" -msgstr "" - -#: edeskconf.cpp:137 -msgid "&Cancel" -msgstr "" - -#: edeskicon.cpp:86 -msgid "&Open" -msgstr "" - -#: edeskicon.cpp:90 -msgid "&Delete" -msgstr "" - -#: edeskicon.cpp:96 -msgid "&Properties" -msgstr "" - -#: edeskicon.cpp:442 -msgid "Name of the icon must be filled." -msgstr "" - -#: edeskicon.cpp:467 -msgid "Delete this icon?" -msgstr "" - -#: edeskicon.cpp:473 -#, c-format -msgid "" -"Remove of the icon %s failed. You probably do not have write access to this " -"file." -msgstr "" - -#: edeskicon.cpp:482 -msgid "Enter the name of the new icon:" -msgstr "" - -#: edeskicon.cpp:505 eiconman.cpp:241 -msgid "The icon with the same name already exists." -msgstr "" - -#: edeskicon.cpp:562 -#, c-format -msgid "%d bytes, %s" -msgstr "" - -#: eiconman.cpp:112 -msgid "&New desktop item" -msgstr "" - -#: eiconman.cpp:116 -msgid "&Refresh" -msgstr "" - -#: eiconman.cpp:122 -msgid "&Icons Settings " -msgstr "" - -#: eiconman.cpp:126 -msgid "&Background Settings" -msgstr "" - -#: eiconman.cpp:718 -msgid "" -"All Files, *,Png Images, *.png,Xpm Images, *.xpm,Jpeg Images, *.{jpg|jpeg}," -"Gif Images, *.gif,Bmp Images, *.bmp" -msgstr "" - -#: eiconman.cpp:724 -msgid "Choose wallpaper:" -msgstr "" - -#: eiconman.cpp:761 -msgid "Choose color" -msgstr "" - -#: propdialog.cpp:31 -msgid "Executables (*.*), *, All files (*.*), *" -msgstr "" - -#: propdialog.cpp:32 -msgid "Open location..." -msgstr "" - -#: propdialog.cpp:39 -msgid "" -"Png images (*.png), *.png, Jpeg Images (*.jpeg), *.{jpeg|jpg}, Bmp Files (*." -"bmp), *.bmp, Gif Files (*.gif), *.gif, Xpm Files (*.xpm), *.xpm, All files " -"(*.*), *" -msgstr "" - -#: propdialog.cpp:40 -msgid "Icon file selection" -msgstr "" - -#: propdialog.cpp:62 -msgid "Icon properties" -msgstr "" - -#: propdialog.cpp:65 -msgid "Icon" -msgstr "" - -#: propdialog.cpp:69 -msgid "Name:" -msgstr "" - -#: propdialog.cpp:72 -msgid "Size:" -msgstr "" - -#: propdialog.cpp:75 -msgid "Command:" -msgstr "" - -#: propdialog.cpp:90 -msgid "Settings" -msgstr "" - -#: propdialog.cpp:92 -msgid "Link file:" -msgstr "" - -#: propdialog.cpp:96 -msgid "Icon name:" -msgstr "" - -#: propdialog.cpp:99 -msgid "Location to open:" -msgstr "" - -#: propdialog.cpp:102 propdialog.cpp:109 -msgid "..." -msgstr "" - -#: propdialog.cpp:106 -msgid "Icon filename:" -msgstr "" - -#: propdialog.cpp:120 -msgid "&Close" -msgstr "" diff --git a/eiconman/locale/ru.po b/eiconman/locale/ru.po deleted file mode 100644 index 93ca9d0..0000000 --- a/eiconman/locale/ru.po +++ /dev/null @@ -1,259 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-02-04 12:27+0100\n" -"PO-Revision-Date: 2002-11-28 HO:MI+ZONE\n" -"Last-Translator: aabbvv \n" -"Language-Team: RUSSIAN \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=koi8-r\n" -"Content-Transfer-Encoding: 8bit\n" - -#: edeskconf.cpp:38 -msgid "Background settings" -msgstr " " - -#: edeskconf.cpp:42 -msgid "Background" -msgstr "" - -#: edeskconf.cpp:79 -msgid "C&olor..." -msgstr "..." - -#: edeskconf.cpp:87 -msgid "Use wallpaper" -msgstr " " - -#: edeskconf.cpp:91 edeskconf.cpp:130 -msgid "label" -msgstr "" - -#: edeskconf.cpp:94 -msgid "Image:" -msgstr ":" - -#: edeskconf.cpp:99 -msgid "&Browse..." -msgstr "..." - -#: edeskconf.cpp:102 -msgid "Opacity:" -msgstr ":" - -#: edeskconf.cpp:112 -msgid "Mode:" -msgstr ":" - -#: edeskconf.cpp:114 -msgid "Center" -msgstr "" - -#: edeskconf.cpp:117 -msgid "Stretch" -msgstr "" - -#: edeskconf.cpp:120 -msgid "Stretch (aspect)" -msgstr " ()" - -#: edeskconf.cpp:123 -msgid "Tiled" -msgstr "" - -#: edeskconf.cpp:131 -msgid "&OK" -msgstr "&OK" - -#: edeskconf.cpp:134 propdialog.cpp:113 -msgid "&Apply" -msgstr "" - -#: edeskconf.cpp:137 -msgid "&Cancel" -msgstr "" - -#: edeskicon.cpp:86 -msgid "&Open" -msgstr "" - -#: edeskicon.cpp:90 -msgid "&Delete" -msgstr "" - -#: edeskicon.cpp:96 -msgid "&Properties" -msgstr "" - -#: edeskicon.cpp:442 -msgid "Name of the icon must be filled." -msgstr " ." - -#: edeskicon.cpp:467 -msgid "Delete this icon?" -msgstr " ?" - -#: edeskicon.cpp:473 -#, c-format -msgid "" -"Remove of the icon %s failed. You probably do not have write access to this " -"file." -msgstr "" -" %s. " -" ." - -#: edeskicon.cpp:482 -msgid "Enter the name of the new icon:" -msgstr " :" - -#: edeskicon.cpp:505 eiconman.cpp:241 -msgid "The icon with the same name already exists." -msgstr " ." - -#: edeskicon.cpp:562 -#, fuzzy, c-format -msgid "%d bytes, %s" -msgstr "%d " - -#: eiconman.cpp:112 -msgid "&New desktop item" -msgstr " " - -#: eiconman.cpp:116 -msgid "&Refresh" -msgstr "" - -#: eiconman.cpp:122 -#, fuzzy -msgid "&Icons Settings " -msgstr "" - -#: eiconman.cpp:126 -#, fuzzy -msgid "&Background Settings" -msgstr " " - -#: eiconman.cpp:718 -#, fuzzy -msgid "" -"All Files, *,Png Images, *.png,Xpm Images, *.xpm,Jpeg Images, *.{jpg|jpeg}," -"Gif Images, *.gif,Bmp Images, *.bmp" -msgstr "" -" Png, *.png, Xpm, *.xpm, Jpeg, *.{jpg|jpeg}," -" Gif, *.gif, Bmp, *.bmp, :" - -#: eiconman.cpp:724 -#, fuzzy -msgid "Choose wallpaper:" -msgstr " " - -#: eiconman.cpp:761 -msgid "Choose color" -msgstr " " - -#: propdialog.cpp:31 -msgid "Executables (*.*), *, All files (*.*), *" -msgstr " (*.*), *, (*.*), *" - -#: propdialog.cpp:32 -msgid "Open location..." -msgstr " ..." - -#: propdialog.cpp:39 -msgid "" -"Png images (*.png), *.png, Jpeg Images (*.jpeg), *.{jpeg|jpg}, Bmp Files (*." -"bmp), *.bmp, Gif Files (*.gif), *.gif, Xpm Files (*.xpm), *.xpm, All files " -"(*.*), *" -msgstr "" - -#: propdialog.cpp:40 -msgid "Icon file selection" -msgstr " " - -#: propdialog.cpp:62 -msgid "Icon properties" -msgstr " " - -#: propdialog.cpp:65 -msgid "Icon" -msgstr "" - -#: propdialog.cpp:69 -msgid "Name:" -msgstr ":" - -#: propdialog.cpp:72 -msgid "Size:" -msgstr ":" - -#: propdialog.cpp:75 -msgid "Command:" -msgstr ":" - -#: propdialog.cpp:90 -msgid "Settings" -msgstr "" - -#: propdialog.cpp:92 -msgid "Link file:" -msgstr ":" - -#: propdialog.cpp:96 -msgid "Icon name:" -msgstr " :" - -#: propdialog.cpp:99 -msgid "Location to open:" -msgstr " :" - -#: propdialog.cpp:102 propdialog.cpp:109 -msgid "..." -msgstr "" - -#: propdialog.cpp:106 -msgid "Icon filename:" -msgstr ":" - -#: propdialog.cpp:120 -msgid "&Close" -msgstr "" - -#~ msgid "&Edit" -#~ msgstr "" - -#~ msgid "Enter the program name or the location to open:" -#~ msgstr " :" - -#~ msgid "Background color selection..." -#~ msgstr " ..." - -#~ msgid "Image selection..." -#~ msgstr " ..." - -#~ msgid "Wallpaper" -#~ msgstr "" - -#~ msgid "" -#~ "Images (*.png; *.jpg; *.gif; *.bmp), *.{png|jpg|gif|bmp}, All files (*." -#~ "*), *" -#~ msgstr "" -#~ " (*.png; *.jpg; *.gif; *.bmp), *.{png|jpg|gif|bmp}, " -#~ "(*.*), *" - -#~ msgid "Icons (*.png), *.png, All files (*.*), *" -#~ msgstr " (*.png), *.png, (*.*), *" - -#~ msgid "None" -#~ msgstr "" - -#~ msgid "&Bg Properties" -#~ msgstr " " - -#~ msgid "All Files, *" -#~ msgstr " , *" diff --git a/eiconman/locale/sk.po b/eiconman/locale/sk.po deleted file mode 100644 index 34adce7..0000000 --- a/eiconman/locale/sk.po +++ /dev/null @@ -1,258 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: eiconman 1.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-02-04 12:27+0100\n" -"PO-Revision-Date: 2002-04-21 14:50+0200\n" -"Last-Translator: Martin Pekar \n" -"Language-Team: Slovak \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: edeskconf.cpp:38 -msgid "Background settings" -msgstr "Nastavenie pozadia" - -#: edeskconf.cpp:42 -msgid "Background" -msgstr "Pozadie" - -#: edeskconf.cpp:79 -msgid "C&olor..." -msgstr "F&arba..." - -#: edeskconf.cpp:87 -msgid "Use wallpaper" -msgstr "Použiť tapetu" - -#: edeskconf.cpp:91 edeskconf.cpp:130 -msgid "label" -msgstr "" - -#: edeskconf.cpp:94 -msgid "Image:" -msgstr "Obrázok:" - -#: edeskconf.cpp:99 -msgid "&Browse..." -msgstr "&Zvoliť..." - -#: edeskconf.cpp:102 -msgid "Opacity:" -msgstr "Kontrast:" - -#: edeskconf.cpp:112 -msgid "Mode:" -msgstr "Mód:" - -#: edeskconf.cpp:114 -msgid "Center" -msgstr "Centrovať" - -#: edeskconf.cpp:117 -msgid "Stretch" -msgstr "Roztiahnuť" - -#: edeskconf.cpp:120 -msgid "Stretch (aspect)" -msgstr "Roztiahnuť (aspekt)" - -#: edeskconf.cpp:123 -msgid "Tiled" -msgstr "Dláždiť" - -#: edeskconf.cpp:131 -msgid "&OK" -msgstr "&OK" - -#: edeskconf.cpp:134 propdialog.cpp:113 -msgid "&Apply" -msgstr "&Použiť" - -#: edeskconf.cpp:137 -msgid "&Cancel" -msgstr "&Zrušiť" - -#: edeskicon.cpp:86 -msgid "&Open" -msgstr "&Otvoriť" - -#: edeskicon.cpp:90 -msgid "&Delete" -msgstr "&Zmazať" - -#: edeskicon.cpp:96 -msgid "&Properties" -msgstr "&Vlastnosti" - -#: edeskicon.cpp:442 -msgid "Name of the icon must be filled." -msgstr "Názov ikony musí byť vyplnení." - -#: edeskicon.cpp:467 -msgid "Delete this icon?" -msgstr "Zmazať túto ikonu?" - -#: edeskicon.cpp:473 -#, c-format -msgid "" -"Remove of the icon %s failed. You probably do not have write access to this " -"file." -msgstr "" -"Zmazanie ikony %s zlyhalo. Pravdepodobne namáte prístup na zapisovanie k " -"tomutosúboru." - -#: edeskicon.cpp:482 -msgid "Enter the name of the new icon:" -msgstr "Zadajte názov novej ikony:" - -#: edeskicon.cpp:505 eiconman.cpp:241 -msgid "The icon with the same name already exists." -msgstr "Ikona s tým istým menom už existuje." - -#: edeskicon.cpp:562 -#, fuzzy, c-format -msgid "%d bytes, %s" -msgstr "%d bajtov" - -#: eiconman.cpp:112 -msgid "&New desktop item" -msgstr "&Nová položka plochy" - -#: eiconman.cpp:116 -msgid "&Refresh" -msgstr "&Obnoviť" - -#: eiconman.cpp:122 -#, fuzzy -msgid "&Icons Settings " -msgstr "Nastavenia" - -#: eiconman.cpp:126 -#, fuzzy -msgid "&Background Settings" -msgstr "Nastavenie pozadia" - -#: eiconman.cpp:718 -#, fuzzy -msgid "" -"All Files, *,Png Images, *.png,Xpm Images, *.xpm,Jpeg Images, *.{jpg|jpeg}," -"Gif Images, *.gif,Bmp Images, *.bmp" -msgstr "" -"Png obrázky, *.png,Xpm obrázky, *.xpm,Jpeg obrázky, *.{jpg|jpeg},Gif " -"obrázky, *.gif,Bmp obrázky, *.bmp,Zvoliť tapetu:" - -#: eiconman.cpp:724 -#, fuzzy -msgid "Choose wallpaper:" -msgstr "Použiť tapetu" - -#: eiconman.cpp:761 -msgid "Choose color" -msgstr "Zvoliť farbu" - -#: propdialog.cpp:31 -msgid "Executables (*.*), *, All files (*.*), *" -msgstr "Spustiteľné (*.*), *, Všetky súbory (*.*), *" - -#: propdialog.cpp:32 -msgid "Open location..." -msgstr "Otvoriť umiestnenie..." - -#: propdialog.cpp:39 -msgid "" -"Png images (*.png), *.png, Jpeg Images (*.jpeg), *.{jpeg|jpg}, Bmp Files (*." -"bmp), *.bmp, Gif Files (*.gif), *.gif, Xpm Files (*.xpm), *.xpm, All files " -"(*.*), *" -msgstr "" - -#: propdialog.cpp:40 -msgid "Icon file selection" -msgstr "Výber súboru s ikonou" - -#: propdialog.cpp:62 -msgid "Icon properties" -msgstr "Vlastnosti ikony" - -#: propdialog.cpp:65 -msgid "Icon" -msgstr "Ikona" - -#: propdialog.cpp:69 -msgid "Name:" -msgstr "Názov:" - -#: propdialog.cpp:72 -msgid "Size:" -msgstr "Rozmer:" - -#: propdialog.cpp:75 -msgid "Command:" -msgstr "Príkaz:" - -#: propdialog.cpp:90 -msgid "Settings" -msgstr "Nastavenia" - -#: propdialog.cpp:92 -msgid "Link file:" -msgstr "Súbor linky:" - -#: propdialog.cpp:96 -msgid "Icon name:" -msgstr "Názov ikony:" - -#: propdialog.cpp:99 -msgid "Location to open:" -msgstr "Otvoriť umiestnenie:" - -#: propdialog.cpp:102 propdialog.cpp:109 -msgid "..." -msgstr "" - -#: propdialog.cpp:106 -msgid "Icon filename:" -msgstr "Súbor ikony:" - -#: propdialog.cpp:120 -msgid "&Close" -msgstr "&Zavrieť" - -#~ msgid "&Edit" -#~ msgstr "&Editovať" - -#~ msgid "Enter the program name or the location to open:" -#~ msgstr "Zadajte názov programu alebo umiestnenie, ktoré chcete otvoriť:" - -#~ msgid "Background color selection..." -#~ msgstr "Výber farby pozadia..." - -#~ msgid "Image selection..." -#~ msgstr "Výber obrázka..." - -#~ msgid "Wallpaper" -#~ msgstr "Tapeta" - -#~ msgid "" -#~ "Images (*.png; *.jpg; *.gif; *.bmp), *.{png|jpg|gif|bmp}, All files (*." -#~ "*), *" -#~ msgstr "" -#~ "Obrázky (*.png; *.jpg; *.gif; *.bmp), *.{png|jpg|gif|bmp}, Všetky súbory " -#~ "(*.*), *" - -#~ msgid "Icons (*.png), *.png, All files (*.*), *" -#~ msgstr "Ikony (*.png), *.png, Všetky súbory (*.*), *" - -#~ msgid "None" -#~ msgstr "Žiadny" - -#~ msgid "&Bg Properties" -#~ msgstr "&Nastavenie pozadia" - -#~ msgid "All Files, *" -#~ msgstr "Všetky súbory, *" diff --git a/eiconman/locale/sr.po b/eiconman/locale/sr.po deleted file mode 100644 index 537c32a..0000000 --- a/eiconman/locale/sr.po +++ /dev/null @@ -1,249 +0,0 @@ -# EICONMAN - Prevod na srpski jezik -# Copyright (C) 2002 EDE Team -# Dejan Lekic Dejan Lekic , 2002. -# -msgid "" -msgstr "" -"Project-Id-Version: EICONMAN 0.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-02-04 12:27+0100\n" -"PO-Revision-Date: 2002-11-21 08:43+0100\n" -"Last-Translator: Dejan Lekic \n" -"Language-Team: LINUKS.org T.T. \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: edeskconf.cpp:38 -msgid "Background settings" -msgstr "Особине позадине" - -#: edeskconf.cpp:42 -msgid "Background" -msgstr "Позадина" - -#: edeskconf.cpp:79 -msgid "C&olor..." -msgstr "&Боја..." - -#: edeskconf.cpp:87 -#, fuzzy -msgid "Use wallpaper" -msgstr "Позадинска слика" - -#: edeskconf.cpp:91 edeskconf.cpp:130 -msgid "label" -msgstr "" - -#: edeskconf.cpp:94 -msgid "Image:" -msgstr "Слика:" - -#: edeskconf.cpp:99 -msgid "&Browse..." -msgstr "&Траћи..." - -#: edeskconf.cpp:102 -msgid "Opacity:" -msgstr "Провидност:" - -#: edeskconf.cpp:112 -msgid "Mode:" -msgstr "" - -#: edeskconf.cpp:114 -msgid "Center" -msgstr "" - -#: edeskconf.cpp:117 -msgid "Stretch" -msgstr "" - -#: edeskconf.cpp:120 -msgid "Stretch (aspect)" -msgstr "" - -#: edeskconf.cpp:123 -msgid "Tiled" -msgstr "" - -#: edeskconf.cpp:131 -msgid "&OK" -msgstr "&ОК" - -#: edeskconf.cpp:134 propdialog.cpp:113 -msgid "&Apply" -msgstr "&Примени" - -#: edeskconf.cpp:137 -msgid "&Cancel" -msgstr "О&дустани" - -#: edeskicon.cpp:86 -msgid "&Open" -msgstr "&Отвори" - -#: edeskicon.cpp:90 -msgid "&Delete" -msgstr "О&бриши" - -#: edeskicon.cpp:96 -msgid "&Properties" -msgstr "&Вредности" - -#: edeskicon.cpp:442 -msgid "Name of the icon must be filled." -msgstr "Назив иконе мора бити испуњен." - -#: edeskicon.cpp:467 -msgid "Delete this icon?" -msgstr "Обрисати ову икону?" - -#: edeskicon.cpp:473 -#, c-format -msgid "" -"Remove of the icon %s failed. You probably do not have write access to this " -"file." -msgstr "" -"Брисање иконе %s није успело. Вероватно немате право уписа у овај фајл." - -#: edeskicon.cpp:482 -msgid "Enter the name of the new icon:" -msgstr "Унесите име нове иконе:" - -#: edeskicon.cpp:505 eiconman.cpp:241 -msgid "The icon with the same name already exists." -msgstr "Икона са истим именом већ постоји." - -#: edeskicon.cpp:562 -#, fuzzy, c-format -msgid "%d bytes, %s" -msgstr "%d бајтова" - -#: eiconman.cpp:112 -msgid "&New desktop item" -msgstr "&Нова ставка на десктоп-у" - -#: eiconman.cpp:116 -msgid "&Refresh" -msgstr "О&свежи" - -#: eiconman.cpp:122 -#, fuzzy -msgid "&Icons Settings " -msgstr "Вредности" - -#: eiconman.cpp:126 -#, fuzzy -msgid "&Background Settings" -msgstr "Особине позадине" - -#: eiconman.cpp:718 -msgid "" -"All Files, *,Png Images, *.png,Xpm Images, *.xpm,Jpeg Images, *.{jpg|jpeg}," -"Gif Images, *.gif,Bmp Images, *.bmp" -msgstr "" - -#: eiconman.cpp:724 -#, fuzzy -msgid "Choose wallpaper:" -msgstr "Позадинска слика" - -#: eiconman.cpp:761 -msgid "Choose color" -msgstr "" - -#: propdialog.cpp:31 -msgid "Executables (*.*), *, All files (*.*), *" -msgstr "Извршни фајлови (*.*), *, Сви фајлови (*.*), *" - -#: propdialog.cpp:32 -msgid "Open location..." -msgstr "Отвори локацију..." - -#: propdialog.cpp:39 -msgid "" -"Png images (*.png), *.png, Jpeg Images (*.jpeg), *.{jpeg|jpg}, Bmp Files (*." -"bmp), *.bmp, Gif Files (*.gif), *.gif, Xpm Files (*.xpm), *.xpm, All files " -"(*.*), *" -msgstr "" - -#: propdialog.cpp:40 -msgid "Icon file selection" -msgstr "Селекција икон-фајла" - -#: propdialog.cpp:62 -msgid "Icon properties" -msgstr "Особине иконе" - -#: propdialog.cpp:65 -msgid "Icon" -msgstr "Икона" - -#: propdialog.cpp:69 -msgid "Name:" -msgstr "Назив:" - -#: propdialog.cpp:72 -msgid "Size:" -msgstr "Величина:" - -#: propdialog.cpp:75 -msgid "Command:" -msgstr "Команда:" - -#: propdialog.cpp:90 -msgid "Settings" -msgstr "Вредности" - -#: propdialog.cpp:92 -msgid "Link file:" -msgstr "Линк фајл:" - -#: propdialog.cpp:96 -msgid "Icon name:" -msgstr "Назив иконе:" - -#: propdialog.cpp:99 -msgid "Location to open:" -msgstr "Локација за отварање:" - -#: propdialog.cpp:102 propdialog.cpp:109 -msgid "..." -msgstr "" - -#: propdialog.cpp:106 -msgid "Icon filename:" -msgstr "Назив фајла-иконе:" - -#: propdialog.cpp:120 -msgid "&Close" -msgstr "&Затвори" - -#~ msgid "&Edit" -#~ msgstr "&Едитуј" - -#~ msgid "Enter the program name or the location to open:" -#~ msgstr "Унесите име програма или локацију за отварање:" - -#~ msgid "Background color selection..." -#~ msgstr "Селекција боје позадине..." - -#~ msgid "Image selection..." -#~ msgstr "Селекција слике..." - -#~ msgid "" -#~ "Images (*.png; *.jpg; *.gif; *.bmp), *.{png|jpg|gif|bmp}, All files (*." -#~ "*), *" -#~ msgstr "" -#~ "Слике (*.png; *.jpg; *.gif; *.bmp), *.{png|jpg|gif|bmp}, Сви фајлови (*." -#~ "*), *" - -#~ msgid "Icons (*.png), *.png, All files (*.*), *" -#~ msgstr "Иконе (*.png), *.png, Сви фајлови (*.*), *" - -#~ msgid "None" -#~ msgstr "Ништа" - -#~ msgid "&Bg Properties" -#~ msgstr "Особ&ине позадине" diff --git a/eiconman/propdialog.cpp b/eiconman/propdialog.cpp deleted file mode 100644 index f4250a9..0000000 --- a/eiconman/propdialog.cpp +++ /dev/null @@ -1,146 +0,0 @@ -// generated by Fast Light User Interface Designer (fluid) version 2.1000 - -#include "propdialog.h" -/* - * $Id$ - * - * Desktop icons manager - * Part of Equinox Desktop Environment (EDE). - * Copyright (c) 2000-2006 EDE Authors. - * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. - * See COPYING for details. - */ -#include -#include "edeskicon.h" -static Icon *ds_icon; - -fltk::Window *i_propertieswindow=(fltk::Window *)0; - -fltk::Group *i_icontab=(fltk::Group *)0; - -fltk::InvisibleBox *pr_icon=(fltk::InvisibleBox *)0; - -fltk::InvisibleBox *pr_name=(fltk::InvisibleBox *)0; - -fltk::InvisibleBox *pr_size=(fltk::InvisibleBox *)0; - -fltk::InvisibleBox *pr_exec=(fltk::InvisibleBox *)0; - -fltk::Group *i_settingstab=(fltk::Group *)0; - -fltk::Output *i_link=(fltk::Output *)0; - -fltk::Input *i_name=(fltk::Input *)0; - -fltk::Input *i_location=(fltk::Input *)0; - -static void cb_(fltk::Button*, void*) { - char *file_types = _("Executables (*.*), *, All files (*.*), *"); - const char *f = fltk::file_chooser(_("Open location..."), file_types, i_location->value()); - if (f) i_location->value(f); -} - -fltk::Input *i_filename=(fltk::Input *)0; - -static void cb_1(fltk::Button*, void*) { - char *file_types = _("Png images (*.png), *.png, Jpeg Images (*.jpeg), *.{jpeg|jpg}, Bmp Files (*.bmp), *.bmp, Gif Files (*.gif), *.gif, Xpm Files (*.xpm), *.xpm, All files (*.*), *"); - const char *f = fltk::file_chooser(_("Icon file selection"), file_types, PREFIX"/share/ede/icons/48x48/"); - if (f) i_filename->value(f); -} - -static void cb_Apply(fltk::Button*, void*) { - save_icon(ds_icon); -} - -static void cb_Close(fltk::Button*, void*) { - i_propertieswindow->hide(); -} - -void property_dialog(fltk::Widget *, Icon *icon, bool show_settings) { - fltk::Window* w; - if(i_propertieswindow) { - update_property_dialog(icon); - update_iconeditdialog(icon); - ds_icon=icon; - if(show_settings) { i_icontab->hide(); i_settingstab->show(); } - i_propertieswindow->exec(); - return; - } - {fltk::Window* o = i_propertieswindow = new fltk::Window(295, 310, "Icon properties"); - w = o; - o->set_vertical(); - o->begin(); - {fltk::TabGroup* o = new fltk::TabGroup(5, 5, 285, 270); - o->begin(); - {fltk::Group* o = i_icontab = new fltk::Group(0, 25, 285, 240, "Icon"); - o->hide(); - o->begin(); - {fltk::InvisibleBox* o = pr_icon = new fltk::InvisibleBox(10, 10, 60, 55); - o->box(fltk::THIN_DOWN_BOX); - } - {fltk::InvisibleBox* o = new fltk::InvisibleBox(10, 80, 65, 38, "Name:"); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_CENTER|fltk::ALIGN_WRAP); - } - {fltk::InvisibleBox* o = new fltk::InvisibleBox(10, 125, 65, 33, "Size:"); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_CENTER|fltk::ALIGN_WRAP); - } - {fltk::InvisibleBox* o = new fltk::InvisibleBox(10, 175, 65, 65, "Command:"); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_CENTER|fltk::ALIGN_WRAP); - } - {fltk::InvisibleBox* o = pr_name = new fltk::InvisibleBox(75, 78, 200, 40); - o->labelsize(20); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_CENTER|fltk::ALIGN_CLIP|fltk::ALIGN_WRAP); - } - {fltk::InvisibleBox* o = pr_size = new fltk::InvisibleBox(80, 123, 195, 35); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_CENTER|fltk::ALIGN_CLIP|fltk::ALIGN_WRAP); - } - {fltk::InvisibleBox* o = pr_exec = new fltk::InvisibleBox(80, 175, 195, 63); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_CENTER|fltk::ALIGN_CLIP|fltk::ALIGN_WRAP); - } - o->end(); - } - {fltk::Group* o = i_settingstab = new fltk::Group(0, 25, 285, 240, "Settings"); - o->begin(); - {fltk::Output* o = i_link = new fltk::Output(10, 20, 265, 22, "Link file:"); - o->color((fltk::Color)0xffffff00); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT); - } - {fltk::Input* o = i_name = new fltk::Input(10, 77, 265, 22, "Icon name:"); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_WRAP); - } - {fltk::Input* o = i_location = new fltk::Input(10, 117, 215, 22, "Location to open:"); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_WRAP); - } - {fltk::Button* o = new fltk::Button(230, 117, 45, 22, "..."); - o->labeltype(fltk::ENGRAVED_LABEL); - o->callback((fltk::Callback*)cb_); - } - {fltk::Input* o = i_filename = new fltk::Input(10, 162, 215, 22, "Icon filename:"); - o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_WRAP); - } - {fltk::Button* o = new fltk::Button(230, 162, 45, 22, "..."); - o->labeltype(fltk::ENGRAVED_LABEL); - o->callback((fltk::Callback*)cb_1); - } - {fltk::Button* o = new fltk::Button(210, 215, 65, 25, "&Apply"); - o->callback((fltk::Callback*)cb_Apply); - } - o->end(); - } - o->end(); - } - {fltk::Button* o = new fltk::Button(200, 280, 90, 25, "&Close"); - o->callback((fltk::Callback*)cb_Close); - } - o->end(); - o->resizable(o); - } - update_property_dialog(icon); - update_iconeditdialog(icon); - ds_icon=icon; - i_propertieswindow->end(); - if(show_settings) { i_icontab->hide(); i_settingstab->show(); } - i_propertieswindow->exec(); -} diff --git a/eiconman/propdialog.fl b/eiconman/propdialog.fl deleted file mode 100644 index ad2ac53..0000000 --- a/eiconman/propdialog.fl +++ /dev/null @@ -1,126 +0,0 @@ -# data file for the FLTK User Interface Designer (FLUID) -version 2.1000 -images_dir ./ -header_name {.h} -code_name {.cpp} -gridx 5 -gridy 5 -snap 3 -decl {/* - * $Id$ - * - * Desktop icons manager - * Part of Equinox Desktop Environment (EDE). - * Copyright (c) 2000-2006 EDE Authors. - * - * This program is licenced under terms of the - * GNU General Public Licence version 2 or newer. - * See COPYING for details. - */} {} - -decl {\#include } {} - -decl {\#include "edeskicon.h"} {} - -decl {Icon *ds_icon;} {} - -Function {property_dialog(fltk::Widget *, Icon *icon, bool show_settings)} {open return_type void -} { - code {if(i_propertieswindow) { - update_property_dialog(icon); - update_iconeditdialog(icon); - ds_icon=icon; - if(show_settings) { i_icontab->hide(); i_settingstab->show(); } - i_propertieswindow->exec(); - return; -}} {} - {fltk::Window} i_propertieswindow { - label {Icon properties} open - xywh {477 160 295 310} resizable visible - } { - {fltk::TabGroup} {} {open - xywh {5 5 285 270} - } { - {fltk::Group} i_icontab { - label Icon open - xywh {0 25 285 240} hide - } { - {fltk::InvisibleBox} pr_icon { - xywh {10 10 60 55} box THIN_DOWN_BOX - } - {fltk::InvisibleBox} {} { - label {Name:} - xywh {10 80 65 38} align 149 - } - {fltk::InvisibleBox} {} { - label {Size:} - xywh {10 125 65 33} align 149 - } - {fltk::InvisibleBox} {} { - label {Command:} - xywh {10 175 65 65} align 149 - } - {fltk::InvisibleBox} pr_name { - xywh {75 78 200 40} align 213 labelsize 20 - } - {fltk::InvisibleBox} pr_size { - xywh {80 123 195 35} align 213 - } - {fltk::InvisibleBox} pr_exec { - xywh {80 175 195 63} align 213 - } - } - {fltk::Group} i_settingstab { - label Settings open - xywh {0 25 285 240} - } { - {fltk::Output} i_link { - label {Link file:} selected - xywh {10 20 265 22} align 5 color 0xffffff00 - } - {fltk::Input} i_name { - label {Icon name:} - xywh {10 77 265 22} align 133 - } - {fltk::Input} i_location { - label {Location to open:} - xywh {10 117 215 22} align 133 - } - {fltk::Button} {} { - label {...} - callback {char *file_types = _("Executables (*.*), *, All files (*.*), *"); -const char *f = fltk::file_chooser(_("Open location..."), file_types, i_location->value()); -if (f) i_location->value(f);} - private xywh {230 117 45 22} labeltype ENGRAVED_LABEL - } - {fltk::Input} i_filename { - label {Icon filename:} - xywh {10 162 215 22} align 133 - } - {fltk::Button} {} { - label {...} - callback {char *file_types = _("Png images (*.png), *.png, Jpeg Images (*.jpeg), *.{jpeg|jpg}, Bmp Files (*.bmp), *.bmp, Gif Files (*.gif), *.gif, Xpm Files (*.xpm), *.xpm, All files (*.*), *"); -const char *f = fltk::file_chooser(_("Icon file selection"), file_types, PREFIX"/share/ede/icons/48x48/"); -if (f) i_filename->value(f);} - private xywh {230 162 45 22} labeltype ENGRAVED_LABEL - } - {fltk::Button} {} { - label {&Apply} - callback {save_icon(ds_icon);} - xywh {210 215 65 25} - } - } - } - {fltk::Button} {} { - label {&Close} - callback {i_propertieswindow->hide();} - xywh {200 280 90 25} - } - } - code {update_property_dialog(icon); -update_iconeditdialog(icon); -ds_icon=icon; -i_propertieswindow->end(); -if(show_settings) { i_icontab->hide(); i_settingstab->show(); } -i_propertieswindow->exec();} {} -} diff --git a/eiconman/propdialog.fld b/eiconman/propdialog.fld deleted file mode 100644 index 38d0384..0000000 --- a/eiconman/propdialog.fld +++ /dev/null @@ -1,115 +0,0 @@ -# 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 {\#include "edeskicon.h"} {} - -decl {Icon *ds_icon;} {selected -} - -Function {property_dialog(Fl_Widget *, Icon *icon, bool show_settings)} {open return_type void -} { - code {if(i_propertieswindow) { - update_property_dialog(icon); - update_iconeditdialog(icon); - ds_icon=icon; - if(show_settings) { i_icontab->hide(); i_settingstab->show(); } - i_propertieswindow->exec(); - return; -}} {} - Fl_Window i_propertieswindow { - label {Icon properties} open - xywh {132 75 295 310} - extra_code {\#include "edeskicon.h"} visible - } { - Fl_Tabs {} {open - xywh {5 5 285 270} - } { - Fl_Group i_icontab { - label Icon open - xywh {0 20 285 247} - } { - Fl_Box pr_icon { - xywh {10 10 60 55} box THIN_DOWN_BOX - } - Fl_Box {} { - label {Name:} - xywh {10 75 65 38} align 149 - } - Fl_Box {} { - label {Size:} - xywh {10 120 65 33} align 149 - } - Fl_Box {} { - label {Command:} - xywh {10 170 65 65} align 149 - } - Fl_Box pr_name { - xywh {75 73 200 40} align 213 label_size 20 - } - Fl_Box pr_size { - xywh {80 118 195 35} align 213 - } - Fl_Box pr_exec { - xywh {80 170 195 63} align 213 - } - } - Fl_Group i_settingstab { - label Settings open - xywh {0 20 285 250} hide - } { - Fl_Output i_link { - label {Link file:} - xywh {10 20 265 22} align 5 color 0xffffff00 - } - Fl_Input i_name { - label {Icon name:} - xywh {10 77 265 22} align 133 - } - Fl_Input i_location { - label {Location to open:} - xywh {10 117 215 22} align 133 - } - Fl_Button {} { - label {...} - callback {char *file_types = _("Executables (*.*), *, All files (*.*), *"); -const char *f = fl_select_file(i_location->value(), file_types, _("Open location...")); -if (f) i_location->value(f);} - private xywh {230 117 45 22} label_type ENGRAVED_LABEL - } - Fl_Input i_filename { - label {Icon filename:} - xywh {10 162 215 22} align 133 - } - Fl_Button {} { - label {...} - callback {char *file_types = _("Png images (*.png), *.png, Jpeg Images (*.jpeg), *.{jpeg|jpg}, Bmp Files (*.bmp), *.bmp, Gif Files (*.gif), *.gif, Xpm Files (*.xpm), *.xpm, All files (*.*), *"); -const char *f = fl_select_file(PREFIX"/share/ede/icons/48x48/", file_types, _("Icon file selection")); -if (f) i_filename->value(f);} - private xywh {230 162 45 22} label_type ENGRAVED_LABEL - } - Fl_Button {} { - label {&Apply} - callback {save_icon(ds_icon);} - xywh {210 215 65 25} - } - } - } - Fl_Button {} { - label {&Close} - callback {i_propertieswindow->hide();} - xywh {200 280 90 25} - } - } - code {update_property_dialog(icon); -update_iconeditdialog(icon); -ds_icon=icon; -i_propertieswindow->end(); -if(show_settings) { i_icontab->hide(); i_settingstab->show(); } -i_propertieswindow->exec();} {} -} diff --git a/eiconman/propdialog.h b/eiconman/propdialog.h deleted file mode 100644 index c768bfd..0000000 --- a/eiconman/propdialog.h +++ /dev/null @@ -1,24 +0,0 @@ -// generated by Fast Light User Interface Designer (fluid) version 2.1000 - -#ifndef propdialog_h -#define propdialog_h -#include -extern fltk::Window* i_propertieswindow; -#include -#include -extern fltk::Group* i_icontab; -#include -extern fltk::InvisibleBox* pr_icon; -extern fltk::InvisibleBox* pr_name; -extern fltk::InvisibleBox* pr_size; -extern fltk::InvisibleBox* pr_exec; -extern fltk::Group* i_settingstab; -#include -extern fltk::Output* i_link; -#include -extern fltk::Input* i_name; -extern fltk::Input* i_location; -#include -extern fltk::Input* i_filename; -void property_dialog(fltk::Widget *, Icon *icon, bool show_settings); -#endif