Cleanup too

This commit is contained in:
Sanel Zukan 2011-09-14 13:06:39 +00:00
parent 70eabeabe5
commit 2595111e43
16 changed files with 0 additions and 3655 deletions

View File

@ -1,357 +0,0 @@
/*
* $Id$
*
* Font chooser widget
* Part of Equinox Desktop Environment (EDE).
* Copyright (c) 2000-2006 EDE Authors.
*
* Based on:
* Font demo program for the Fast Light Tool Kit (FLTK).
* Copyright 1998-2006 by Bill Spitzak and others.
*
* This program is licenced under terms of the
* GNU General Public Licence version 2 or newer.
* See COPYING for details.
*/
#include "EDE_FontChooser.h"
#define MAXSIZE 64
static fltk::Window *form = (fltk::Window *)0;
static fltk::Widget* id_box;
// class for font preview window
class FontDisplay : public fltk::Widget {
void draw();
public:
fltk::Font* font;
unsigned size;
const char* encoding;
FontDisplay(fltk::Box* B, int X, int Y, int W, int H, const char* L = 0) :
fltk::Widget(X,Y,W,H,L) {box(B); font = 0; size = 14;}
};
void FontDisplay::draw() {
draw_box();
fltk::push_clip(2,2,w()-2,h()-2);
const char* saved_encoding = fltk::get_encoding();
fltk::set_encoding(encoding);
fltk::setfont(font, (float) size);
id_box->label(fltk::Font::current_name());
id_box->redraw();
fltk::setcolor(fltk::BLACK);
char buffer[32];
for (int Y = 1; Y < 8; Y++) {
for (int X = 0; X < 32; X++) buffer[X] = (32*Y+X);
fltk::drawtext(buffer, 32, 3, 3+(size+leading())*Y);
}
fltk::set_encoding(saved_encoding);
fltk::pop_clip();
}
// other variables
static FontDisplay *textobj;
static fltk::Browser *fontobj, *sizeobj, *encobj;
static fltk::Font** all_fonts; // list returned by fltk
static int numfonts=0;
static fltk::Group *button_group;
static fltk::CheckButton* bold_button, *italic_button;
static fltk::Button *ok_button, *cancel_button;
bool return_value = false;
// callback functions
// callback for list of fonts
void font_cb(fltk::Widget *, long)
{
int fn = fontobj->value();
//DEBUG
//printf("font: %d name: %s bigname: %s\n", fn, fonts[fn]->name(), fonts[fn]->system_name());
fltk::Font* f = all_fonts[fn];
// are bold and italic available?
if (f->bold() == f)
bold_button->deactivate();
else
bold_button->activate();
if (f->italic() == f)
italic_button->deactivate();
else
italic_button->activate();
if (bold_button->value()) f = f->bold();
if (italic_button->value()) f = f->italic();
textobj->font = f;
// Populate the encobj (browser for font encodings)
char saved[30];
if (textobj->encoding)
strncpy(saved, textobj->encoding, 29);
else
saved[0] = 0;
encobj->clear();
const char** encodings;
int ne = f->encodings(encodings);
int picked = -1;
int iso8859 = 0;
// On XFT encoding is always Unicode, so encodings() will return 0
if (ne==0)
{
encobj->add("Unicode");
encobj->deselect();
encobj->deactivate();
textobj->encoding=0;
}
else
{
encobj->activate();
for (int i = 0; i < ne; i++) {
encobj->add(encodings[i]);
if (!strcmp(encodings[i], saved)) picked = i;
if (!strcmp(encodings[i], fltk::get_encoding())) iso8859 = i;
}
if (picked < 0) picked = iso8859;
textobj->encoding = encodings[picked];
encobj->value(picked);
}
// Populate the sizeobj (browser for font sizes)
int pickedsize;
if (sizeobj->value() > 0) {
pickedsize = atoi(sizeobj->child(sizeobj->value())->label());
} else {
pickedsize = 14;
}
sizeobj->clear();
int *s;
int n = f->sizes(s);
if(!n) {
// no sizes (this only happens on X)
for (int i = 1; i<MAXSIZE; i++) {
char buf[20];
sprintf(buf,"%d",i);
sizeobj->add(buf);
}
sizeobj->value((int)fltk::getsize()-1); //pickedsize
textobj->size = (int)fltk::getsize();
// fl_font(f, pickedsize); lets fix this...
} else if (s[0] == 0) {
// many sizes;
int j = 1;
for (int i = 1; i<MAXSIZE || i<s[n-1]; i++) {
char buf[20];
sprintf(buf,"%d",i);
fltk::Widget *w = sizeobj->add(buf);
if (j < n && i==s[j]) {
w->labelfont(w->labelfont()->bold());
w->labelcolor(fltk::RED);
j++;
}
//if (j < n && i==s[j]) {sprintf(buf,"@b;%d",i); j++;}
}
sizeobj->value(pickedsize-1);
textobj->size = pickedsize;
} else {
// some sizes -- when is this used?
int w = 0;
for (int i = 0; i < n; i++) {
if (s[i]<=pickedsize) w = i;
char buf[20];
sprintf(buf,"%d",s[i]);
fltk::Widget *w = sizeobj->add(buf);
w->labelfont(w->labelfont()->bold());
//sprintf(buf,"@b;%d",s[i]);
}
sizeobj->value(w);
textobj->size = s[w];
}
encobj->redraw();
sizeobj->redraw();
textobj->redraw();
// encobj->relayout();
// sizeobj->relayout();
// textobj->relayout();
// id_box->label(textobj->font->system_name());
// id_box->redraw();
button_group->redraw(); // needed?
}
void encoding_cb(fltk::Widget *, long) {
if (encobj->children() < 2) return; // XFT
int i = encobj->value();
// textobj->encoding = encobj->text(i);
textobj->encoding = encobj->child(i)->label();
textobj->redraw();
id_box->redraw();
}
void size_cb(fltk::Widget *, long) {
int i = sizeobj->value();
//const char *c = sizeobj->text(i);
const char *c = sizeobj->child(i)->label();
while (*c < '0' || *c > '9') c++;
textobj->size = atoi(c);
textobj->redraw();
// id_box->redraw();
}
void return_cb(fltk::Widget *, long ret) {
return_value = ret;
form->hide();
}
// TODO: rewrite this in fluid...
void create_the_forms()
{
if(form) return;
form = new fltk::Window(550, 420, _("Select font..."));
form->set_double_buffer();
form->begin();
textobj = new FontDisplay(fltk::ENGRAVED_BOX,10,10,530,160);
textobj->clear_flag(fltk::ALIGN_MASK);
textobj->set_flag(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_INSIDE|fltk::ALIGN_CLIP);
id_box = new fltk::Widget(10, 172, 530, 15);
id_box->box(fltk::ENGRAVED_BOX);
id_box->labelsize(10);
id_box->set_flag(fltk::ALIGN_INSIDE|fltk::ALIGN_CLIP);
button_group = new fltk::Group(10, 190, 140, 20);
button_group->begin();
bold_button = new fltk::CheckButton(0, 0, 70, 20, "Bold");
bold_button->labelfont(bold_button->labelfont()->bold());
bold_button->callback(font_cb, 1);
italic_button = new fltk::CheckButton(70, 0, 70, 20, "Italic");
italic_button->labelfont(italic_button->labelfont()->italic());
italic_button->callback(font_cb, 1);
button_group->end();
fontobj = new fltk::Browser(10, 210, 280, 170);
fontobj->when(fltk::WHEN_CHANGED);
fontobj->callback(font_cb);
form->resizable(fontobj);
encobj = new fltk::Browser(300, 210, 100, 170);
encobj->when(fltk::WHEN_CHANGED);
encobj->callback(encoding_cb, 1);
sizeobj = new fltk::Browser(410, 210, 130, 170);
sizeobj->when(fltk::WHEN_CHANGED);
sizeobj->callback(size_cb);
ok_button = new fltk::Button(380, 390, 80, 25, _("&OK"));
ok_button->callback(return_cb, 1);
cancel_button = new fltk::Button(465, 390, 80, 25, _("&Cancel"));
cancel_button->callback(return_cb, 0);
form->end();
}
// search for largest <= selected size:
int find_best_size(fltk::Font* font, int selected)
{
int *allsizes;
int numsizes = font->sizes(allsizes);
// This is a bug in efltk
if (numsizes <= 1) return selected;
for (int i=1; i<numsizes; i++) {
if (allsizes[i] > selected)
return allsizes[i-1];
}
return allsizes[numsizes-1];
}
EDEFont font_chooser(EDEFont current_font)
{
EDEFont return_font;
create_the_forms();
if(!numfonts) numfonts = fltk::list_fonts(all_fonts);
// populate list of fonts
fontobj->clear();
for(int i = 0; i < numfonts; i++) {
fontobj->add(all_fonts[i]->name());
if (current_font.font && (strcasecmp(current_font.font->name(),all_fonts[i]->name())==0))
// it's a substring
fontobj->value(i);
}
/*char* currentname = strdup(current_font.font->name());
fsor(int i = 0; i < numfonts; i++) {
char* fontname = strdup(all_fonts[i]->name());
fontobj->add(fontname);
if (currentname.lower_case().pos(fontname.lower_case())==0) // it's a substring
fontobj->value(i);
}*/
// set bold, italic
/*if (currentname.pos(" bold italic") == currentname.length()-12) {
bold_button->value(true);
italic_button->value(true);
} else if (currentname.pos(" italic") == currentname.length()-7) {
italic_button->value(true);
} else if (currentname.pos(" bold") == currentname.length()-5) {
bold_button->value(true);
}*/
// populate other lists
textobj->encoding = current_font.encoding; // TODO: what if we're using XFT?
font_cb(fontobj,0);
for (int i=0; i < sizeobj->children(); i++) {
if (atoi(sizeobj->child(i)->label()) == current_font.size) {
sizeobj->value(i);
size_cb(sizeobj,0);
}
}
//
form->show();
form->exec();
// we have to construct a proper EDEFont to return
return_font.defined = false;
if (return_value)
{
return_font.font = fltk::font(fontobj->child(fontobj->value())->label()); //Style.h
if (bold_button->value()) return_font.font = return_font.font->bold();
if (italic_button->value()) return_font.font = return_font.font->italic();
int size = atoi(sizeobj->child(sizeobj->value())->label());
return_font.size = find_best_size(return_font.font, size);
// on XFT encoding is always Unicode, so this field can be blank
if (encobj->children() > 1)
return_font.encoding = strdup(encobj->child(encobj->value())->label());
else
return_font.encoding = 0;
return_font.defined = true;
}
return return_font;
}
//
// End of "$Id: efontdialog.cpp,v 1.3 2005/03/20 15:53:58 vljubovic Exp $".
//

View File

@ -1,51 +0,0 @@
/*
* $Id$
*
* Font chooser widget
* Part of Equinox Desktop Environment (EDE).
* Copyright (c) 2000-2006 EDE Authors.
*
* Based on:
* Font demo program for the Fast Light Tool Kit (FLTK).
* Copyright 1998-2006 by Bill Spitzak and others.
*
* This program is licenced under terms of the
* GNU General Public Licence version 2 or newer.
* See COPYING for details.
*/
#ifndef _EDE_FONTCHOOSER_H_
#define _EDE_FONTCHOOSER_H_
#include <fltk/run.h>
#include <fltk/Window.h>
#include <fltk/Browser.h>
#include <fltk/CheckButton.h>
#include <fltk/draw.h>
#include <fltk/Font.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*#include <efltk/Fl.h>
#include <efltk/Fl_Double_Window.h>
#include <efltk/Fl_Browser.h>
#include <efltk/Fl_String.h>
#include <efltk/Fl_Locale.h>
#include <efltk/Fl_Check_Button.h>
#include <efltk/fl_ask.h>
#include <efltk/fl_draw.h>
#include <efltk/Fl_Box.h>
#include <efltk/fl_utf8.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>*/
#include "ecolorutils.h"
EDEFont font_chooser(EDEFont);
#endif

View File

@ -1,19 +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 ecolorconf ;
SOURCE = ecolorconf.cpp
ecolorutils.cpp
EDE_FontChooser.cpp ;
MakeProgram ecolorconf : $(SOURCE) ;
ExtractStrings locale : $(SOURCE) ;

View File

@ -1,308 +0,0 @@
// generated by Fast Light User Interface Designer (fluid) version 2.0100
#include "ecolorconf.h"
/*
* $Id$
*
* Colors and fonts settings
* 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 "../edeconf.h"
#include <fltk/ColorChooser.h>
#include "ecolorutils.h"
fltk::Window *windowColorSettings=(fltk::Window *)0;
static void cb_windowColorSettings(fltk::Window*, void*) {
exit(0);
}
fltk::Button *colorBox=(fltk::Button *)0;
fltk::Button *labelColorBox=(fltk::Button *)0;
fltk::Button *selectionColorBox=(fltk::Button *)0;
fltk::Button *selectionTextColorBox=(fltk::Button *)0;
fltk::Button *highlightColorBox=(fltk::Button *)0;
fltk::Button *highlightLabelColorBox=(fltk::Button *)0;
fltk::Button *textColorBox=(fltk::Button *)0;
fltk::Button *backgroundBox=(fltk::Button *)0;
fltk::Button *textBackgroundBox=(fltk::Button *)0;
fltk::Button *tooltipBox=(fltk::Button *)0;
fltk::Button *tooltipTextColorButton=(fltk::Button *)0;
fltk::CheckButton *tooltipsEnableEffects=(fltk::CheckButton *)0;
fltk::CheckButton *tooltipsEnable=(fltk::CheckButton *)0;
fltk::Choice *tooltipsEffectType=(fltk::Choice *)0;
fltk::ValueInput *tooltipsDelay=(fltk::ValueInput *)0;
fltk::Button *setLabelFont=(fltk::Button *)0;
static void cb_setLabelFont(fltk::Button*, void*) {
labelfont_cb();
}
fltk::Button *setTextFont=(fltk::Button *)0;
static void cb_setTextFont(fltk::Button*, void*) {
textfont_cb();
}
fltk::InvisibleBox *labelFontInput=(fltk::InvisibleBox *)0;
fltk::InvisibleBox *textFontInput=(fltk::InvisibleBox *)0;
fltk::CheckButton *menusEnableEffects=(fltk::CheckButton *)0;
fltk::CheckButton *menusEnableSubwindowEffects=(fltk::CheckButton *)0;
fltk::Choice *menusEffectType=(fltk::Choice *)0;
fltk::ValueInput *menusSpeed=(fltk::ValueInput *)0;
fltk::ValueInput *menusDelay=(fltk::ValueInput *)0;
fltk::CheckButton *mdiAnimation=(fltk::CheckButton *)0;
fltk::CheckButton *mdiOpaqueAnimation=(fltk::CheckButton *)0;
fltk::CheckButton *imagesStateEffect=(fltk::CheckButton *)0;
static void cb_Save(fltk::Button*, void*) {
saveSchemeAs();
}
fltk::CheckButton *allApplyRadioButton=(fltk::CheckButton *)0;
fltk::InputBrowser *schemeListBox=(fltk::InputBrowser *)0;
static void cb_schemeListBox(fltk::InputBrowser*, void*) {
getSchemeColors();
}
static void cb_OK(fltk::Button*, void*) {
//windowColorSettings->hide();
saveActiveScheme();
applyColors();
saveEfltkConfig();
exit(0);
}
static void cb_Apply(fltk::Button*, void*) {
saveActiveScheme();
applyColors();
saveEfltkConfig();
}
static void cb_Cancel(fltk::Button*, void*) {
exit(0);
}
#include <fltk/run.h>
int main (int argc, char **argv) {
fltk::Window* w;
//fl_init_locale_support("ecolorconf", PREFIX"/share/locale");
{fltk::Window* o = windowColorSettings = new fltk::Window(330, 360, "Colors and fonts settings");
w = o;
o->set_vertical();
o->callback((fltk::Callback*)cb_windowColorSettings);
o->begin();
{fltk::TabGroup* o = new fltk::TabGroup(5, 5, 318, 200);
o->color((fltk::Color)0xfffffffe);
o->begin();
{fltk::Group* o = new fltk::Group(0, 25, 318, 175, "Default colors");
o->begin();
{fltk::Button* o = colorBox = new fltk::Button(90, 30, 65, 20, "Widgets");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
}
{fltk::Button* o = labelColorBox = new fltk::Button(15, 75, 65, 20, "Label");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
}
{fltk::Button* o = selectionColorBox = new fltk::Button(240, 120, 65, 20, "Sel. back.");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
}
{fltk::Button* o = selectionTextColorBox = new fltk::Button(165, 120, 65, 20, "Selection");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
}
{fltk::Button* o = highlightColorBox = new fltk::Button(165, 30, 65, 20, "Highlight");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
}
{fltk::Button* o = highlightLabelColorBox = new fltk::Button(165, 75, 65, 20, "Highlight");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
}
{fltk::Button* o = textColorBox = new fltk::Button(15, 120, 65, 20, "Text");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
}
{fltk::Button* o = backgroundBox = new fltk::Button(15, 30, 65, 20, "Background");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
}
{fltk::Button* o = textBackgroundBox = new fltk::Button(90, 120, 65, 20, "Background");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
}
o->end();
}
{fltk::Group* o = new fltk::Group(0, 26, 318, 169, "Tooltips");
o->hide();
o->begin();
{fltk::Button* o = tooltipBox = new fltk::Button(156, 44, 65, 20, "Tooltip color");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_WRAP);
}
{fltk::Button* o = tooltipTextColorButton = new fltk::Button(236, 44, 65, 20, "Tooltip text color");
o->buttonbox(fltk::DOWN_BOX);
o->callback((fltk::Callback*)ChangeBoxColor);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT|fltk::ALIGN_WRAP);
}
tooltipsEnableEffects = new fltk::CheckButton(10, 39, 145, 25, "Enable effects");
tooltipsEnable = new fltk::CheckButton(10, 14, 145, 25, "Enabled");
{fltk::Choice* o = tooltipsEffectType = new fltk::Choice(75, 80, 115, 23, "Effect type:");
o->align(fltk::ALIGN_CENTER);
o->begin();
new fltk::Item("None");
new fltk::Item("Animation");
new fltk::Item("Fading");
o->end();
}
tooltipsDelay = new fltk::ValueInput(75, 119, 50, 25, "Delay:");
o->end();
}
{fltk::Group* o = new fltk::Group(0, 26, 318, 169, "Fonts");
o->hide();
o->begin();
{fltk::Button* o = setLabelFont = new fltk::Button(275, 14, 30, 25, "...");
o->callback((fltk::Callback*)cb_setLabelFont);
}
{fltk::Button* o = setTextFont = new fltk::Button(275, 49, 30, 25, "...");
o->callback((fltk::Callback*)cb_setTextFont);
}
{fltk::InvisibleBox* o = labelFontInput = new fltk::InvisibleBox(75, 14, 190, 25, "label");
o->box(fltk::DOWN_BOX);
o->align(fltk::ALIGN_LEFT|fltk::ALIGN_INSIDE);
}
{fltk::InvisibleBox* o = textFontInput = new fltk::InvisibleBox(75, 50, 190, 24, "label");
o->box(fltk::DOWN_BOX);
o->align(fltk::ALIGN_LEFT|fltk::ALIGN_INSIDE);
}
{fltk::InvisibleBox* o = new fltk::InvisibleBox(15, 14, 65, 25, "Label font:");
o->align(fltk::ALIGN_RIGHT|fltk::ALIGN_INSIDE);
}
{fltk::InvisibleBox* o = new fltk::InvisibleBox(15, 49, 65, 25, "Text font:");
o->align(fltk::ALIGN_RIGHT|fltk::ALIGN_INSIDE);
}
o->end();
o->label(_(o->label()));
}
{fltk::Group* o = new fltk::Group(0, 26, 318, 174, "Menus");
o->hide();
o->begin();
menusEnableEffects = new fltk::CheckButton(10, 14, 305, 25, "Enable effects");
menusEnableSubwindowEffects = new fltk::CheckButton(10, 39, 305, 25, "Enable subwindow effects");
{fltk::Choice* o = menusEffectType = new fltk::Choice(75, 80, 115, 23, "Effect type:");
o->align(fltk::ALIGN_CENTER);
o->begin();
new fltk::Item("None");
new fltk::Item("Animation");
new fltk::Item("Fading");
o->end();
}
menusSpeed = new fltk::ValueInput(75, 119, 45, 25, "Speed:");
menusDelay = new fltk::ValueInput(211, 119, 50, 25, "Delay:");
o->end();
}
{fltk::Group* o = new fltk::Group(0, 26, 318, 174, "Others");
o->hide();
o->begin();
mdiAnimation = new fltk::CheckButton(11, 14, 300, 25, "Enable MDI animation");
mdiOpaqueAnimation = new fltk::CheckButton(11, 44, 300, 25, "MDI opaque animation");
imagesStateEffect = new fltk::CheckButton(11, 74, 300, 25, "Enable images state effect");
o->end();
}
o->end();
}
{fltk::Group* o = new fltk::Group(3, 210, 320, 110);
o->box(fltk::DOWN_BOX);
o->begin();
{fltk::Button* o = new fltk::Button(194, 25, 80, 25, "&Save as...");
o->callback((fltk::Callback*)cb_Save);
}
{fltk::CheckButton* o = allApplyRadioButton = new fltk::CheckButton(6, 65, 299, 25, "Ap&ply colors to all programs");
o->when(fltk::WHEN_CHANGED);
}
{fltk::InputBrowser* o = schemeListBox = new fltk::InputBrowser(9, 27, 175, 23, "Schemes:");
o->callback((fltk::Callback*)cb_schemeListBox);
o->align(fltk::ALIGN_TOP|fltk::ALIGN_LEFT);
o->when(fltk::WHEN_CHANGED);
o->type(1);
o->begin();
fillItems();
o->end();
}
o->end();
}
{fltk::Button* o = new fltk::Button(75, 328, 80, 25, "&OK");
o->callback((fltk::Callback*)cb_OK);
}
{fltk::Button* o = new fltk::Button(160, 328, 80, 25, "&Apply");
o->callback((fltk::Callback*)cb_Apply);
}
{fltk::Button* o = new fltk::Button(245, 328, 80, 25, "&Cancel");
o->callback((fltk::Callback*)cb_Cancel);
}
o->end();
o->resizable(o);
}
//updateFontAll();
loadEfltkConfig();
w->show(argc, argv);
return fltk::run();
}
void ChangeBoxColor(fltk::Button *box, void *) {
//Fl_Button *colorBox = box;
fltk::Color oldColor = box->color();
fltk::Color defColor = oldColor;
fltk::color_chooser(_("Choose color"), defColor);
if (defColor != oldColor)
{
box->color(defColor);
box->highlight_color(defColor);
box->redraw();
}
}

View File

@ -1,276 +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$
*
* Colors and fonts settings
* 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 "../edeconf.h"} {}
decl {\#include <fltk/ColorChooser.h>} {}
decl {\#include "ecolorutils.h"} {}
Function {} {open
} {
code {//fl_init_locale_support("ecolorconf", PREFIX"/share/locale");} {}
{fltk::Window} windowColorSettings {
label {Colors and fonts settings}
callback {exit(0);} open
xywh {507 139 330 360} resizable visible
} {
{fltk::TabGroup} {} {open
private xywh {5 5 318 200} color 0xfffffffe
} {
{fltk::Group} {} {
label {Default colors} open
xywh {0 25 318 175}
} {
{fltk::Button} colorBox {
label Widgets
callback ChangeBoxColor
xywh {90 30 65 20} align 5 buttonbox DOWN_BOX
}
{fltk::Button} labelColorBox {
label Label
callback ChangeBoxColor
xywh {15 75 65 20} align 5 buttonbox DOWN_BOX
}
{fltk::Button} selectionColorBox {
label {Sel. back.}
callback ChangeBoxColor
xywh {240 120 65 20} align 5 buttonbox DOWN_BOX
}
{fltk::Button} selectionTextColorBox {
label Selection
callback ChangeBoxColor
xywh {165 120 65 20} align 5 buttonbox DOWN_BOX
}
{fltk::Button} highlightColorBox {
label Highlight
callback ChangeBoxColor
xywh {165 30 65 20} align 5 buttonbox DOWN_BOX
}
{fltk::Button} highlightLabelColorBox {
label Highlight
callback ChangeBoxColor
xywh {165 75 65 20} align 5 buttonbox DOWN_BOX
}
{fltk::Button} textColorBox {
label Text
callback ChangeBoxColor
xywh {15 120 65 20} align 5 buttonbox DOWN_BOX
}
{fltk::Button} backgroundBox {
label Background
callback ChangeBoxColor
xywh {15 30 65 20} align 5 buttonbox DOWN_BOX
}
{fltk::Button} textBackgroundBox {
label Background
callback ChangeBoxColor
xywh {90 120 65 20} align 5 buttonbox DOWN_BOX
}
}
{fltk::Group} {} {
label Tooltips open
xywh {0 26 318 169} hide
} {
{fltk::Button} tooltipBox {
label {Tooltip color}
callback ChangeBoxColor
xywh {156 44 65 20} align 133 buttonbox DOWN_BOX
}
{fltk::Button} tooltipTextColorButton {
label {Tooltip text color}
callback ChangeBoxColor
xywh {236 44 65 20} align 133 buttonbox DOWN_BOX
}
{fltk::CheckButton} tooltipsEnableEffects {
label {Enable effects}
xywh {10 39 145 25}
}
{fltk::CheckButton} tooltipsEnable {
label Enabled
xywh {10 14 145 25}
}
{fltk::Choice} tooltipsEffectType {
label {Effect type:} open
xywh {75 80 115 23} align 0
} {
{fltk::Item} {} {
label None
}
{fltk::Item} {} {
label Animation
}
{fltk::Item} {} {
label Fading
}
}
{fltk::ValueInput} tooltipsDelay {
label {Delay:}
xywh {75 119 50 25}
}
}
{fltk::Group} {} {
label Fonts open
xywh {0 26 318 169} hide
extra_code {o->label(_(o->label()));}
} {
{fltk::Button} setLabelFont {
label {...}
callback {labelfont_cb();}
xywh {275 14 30 25}
}
{fltk::Button} setTextFont {
label {...}
callback {textfont_cb();}
xywh {275 49 30 25}
}
{fltk::InvisibleBox} labelFontInput {
label label
xywh {75 14 190 25} align 36 box DOWN_BOX
}
{fltk::InvisibleBox} textFontInput {
label label
xywh {75 50 190 24} align 36 box DOWN_BOX
}
{fltk::InvisibleBox} {} {
label {Label font:}
xywh {15 14 65 25} align 40
}
{fltk::InvisibleBox} {} {
label {Text font:}
xywh {15 49 65 25} align 40
}
}
{fltk::Group} {} {
label Menus open
xywh {0 26 318 174} hide
} {
{fltk::CheckButton} menusEnableEffects {
label {Enable effects}
xywh {10 14 305 25}
}
{fltk::CheckButton} menusEnableSubwindowEffects {
label {Enable subwindow effects}
xywh {10 39 305 25}
}
{fltk::Choice} menusEffectType {
label {Effect type:}
xywh {75 80 115 23} align 0
} {
{fltk::Item} {} {
label None
}
{fltk::Item} {} {
label Animation
}
{fltk::Item} {} {
label Fading
}
}
{fltk::ValueInput} menusSpeed {
label {Speed:}
xywh {75 119 45 25}
}
{fltk::ValueInput} menusDelay {
label {Delay:}
xywh {211 119 50 25}
}
}
{fltk::Group} {} {
label Others open
xywh {0 26 318 174} hide
} {
{fltk::CheckButton} mdiAnimation {
label {Enable MDI animation}
xywh {11 14 300 25}
}
{fltk::CheckButton} mdiOpaqueAnimation {
label {MDI opaque animation}
xywh {11 44 300 25}
}
{fltk::CheckButton} imagesStateEffect {
label {Enable images state effect}
xywh {11 74 300 25}
}
}
}
{fltk::Group} {} {open
xywh {3 210 320 110} box DOWN_BOX
} {
{fltk::Button} {} {
label {&Save as...}
callback {saveSchemeAs();}
private xywh {194 25 80 25}
}
{fltk::CheckButton} allApplyRadioButton {
label {Ap&ply colors to all programs}
xywh {6 65 299 25} when CHANGED
}
{fltk::Choice} schemeListBox {
label {Schemes:}
callback {getSchemeColors();} open selected
xywh {9 27 175 23} align 5 when CHANGED
extra_code {\#include <efltk/Fl_Input_Browser.h>
o->type(1);
o->begin();
fillItems();
o->end();}
class {fltk::InputBrowser}
} {}
}
{fltk::Button} {} {
label {&OK}
callback {//windowColorSettings->hide();
saveActiveScheme();
applyColors();
saveEfltkConfig();
exit(0);}
private xywh {75 328 80 25}
}
{fltk::Button} {} {
label {&Apply}
callback {saveActiveScheme();
applyColors();
saveEfltkConfig();}
private xywh {160 328 80 25}
}
{fltk::Button} {} {
label {&Cancel}
callback {exit(0);}
private xywh {245 328 80 25}
}
}
code {//updateFontAll();
loadEfltkConfig();} {}
}
Function {ChangeBoxColor(fltk::Button *box, void *)} {open return_type void
} {
code {//Fl_Button *colorBox = box;
fltk::Color oldColor = box->color();
fltk::Color defColor = oldColor;
fltk::color_chooser(_("Choose color"), defColor);
if (defColor != oldColor)
{
box->color(defColor);
box->highlight_color(defColor);
box->redraw();
}} {}
}

View File

@ -1,275 +0,0 @@
# data file for the eFLTK User Interface Designer (eFLUID)
version 2,0003
images_dir ./
i18n
header_name {.h}
code_name {.cpp}
gridx 5
gridy 5
snap 3
decl {// EControl applet for colors and fonts} {}
decl {// Copyright (c) 2000. - 2005. EDE Authors} {}
decl {// This program is licenced under terms of the} {}
decl {// GNU General Public Licence version 2 or newer.} {}
decl {// See COPYING for details} {}
decl {//} {}
decl {\#include <edeconf.h>} {}
decl {\#include <efltk/Fl_Color_Chooser.h>} {}
decl {\#include "ecolorutils.h"} {}
Function {} {open
} {
code {fl_init_locale_support("ecolorconf", PREFIX"/share/locale");} {}
Fl_Window windowColorSettings {
label {Colors and fonts settings}
callback {exit(0);} open
xywh {507 139 330 360} resizable visible
} {
Fl_Tabs {} {open
private xywh {3 5 320 195} color 0xfffffffe
} {
Fl_Group {} {
label {Default colors} open
xywh {1 24 318 170} align FL_ALIGN_TOP|FL_ALIGN_LEFT hide
} {
Fl_Button colorBox {
label Widgets
callback ChangeBoxColor
xywh {91 31 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Button labelColorBox {
label Label
callback ChangeBoxColor
xywh {16 76 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Button selectionColorBox {
label {Sel. back.}
callback ChangeBoxColor
xywh {241 121 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Button selectionTextColorBox {
label Selection
callback ChangeBoxColor
xywh {166 121 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Button highlightColorBox {
label Highlight
callback ChangeBoxColor
xywh {166 31 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Button highlightLabelColorBox {
label Highlight
callback ChangeBoxColor
xywh {166 76 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Button textColorBox {
label Text
callback ChangeBoxColor
xywh {16 121 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Button backgroundBox {
label Background
callback ChangeBoxColor
xywh {16 31 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Button textBackgroundBox {
label Background
callback ChangeBoxColor
xywh {91 121 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
}
Fl_Group {} {
label Tooltips open
xywh {1 24 318 170} align FL_ALIGN_TOP|FL_ALIGN_LEFT hide
} {
Fl_Button tooltipBox {
label {Tooltip color}
callback ChangeBoxColor
xywh {157 45 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Button tooltipTextColorButton {
label {Tooltip text color}
callback ChangeBoxColor
xywh {237 45 65 20} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Check_Button tooltipsEnableEffects {
label {Enable effects}
xywh {7 45 145 25}
}
Fl_Check_Button tooltipsEnable {
label Enabled
xywh {7 15 145 25}
}
Fl_Choice tooltipsEffectType {
label {Effect type:}
xywh {77 82 115 23} align FL_ALIGN_LEFT|FL_ALIGN_WRAP
} {
Fl_Item {} {
label None
}
Fl_Item {} {
label Animation
}
Fl_Item {} {
label Fading
}
}
Fl_Value_Input tooltipsDelay {
label {Delay:}
xywh {77 120 50 25}
}
}
Fl_Group {} {
label Fonts open
xywh {1 24 318 170} align FL_ALIGN_TOP|FL_ALIGN_LEFT
extra_code {o->label(_(o->label()));}
} {
Fl_Button setLabelFont {
label {...}
callback {labelfont_cb();}
xywh {276 16 30 25}
}
Fl_Button setTextFont {
label {...}
callback {textfont_cb();}
xywh {276 51 30 25}
}
Fl_Box labelFontInput {
label label
xywh {76 16 190 25} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Box textFontInput {
label label
xywh {76 52 190 24} align FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_WRAP box DOWN_BOX
}
Fl_Box {} {
label {Label font:}
xywh {11 16 65 25} align FL_ALIGN_RIGHT|FL_ALIGN_INSIDE
}
Fl_Box {} {
label {Text font:}
xywh {11 51 65 25} align FL_ALIGN_RIGHT|FL_ALIGN_INSIDE
}
}
Fl_Group {} {
label Menus open
xywh {1 24 318 170} hide
} {
Fl_Check_Button menusEnableEffects {
label {Enable effects}
xywh {7 5 305 25}
}
Fl_Check_Button menusEnableSubwindowEffects {
label {Enable subwindow effects}
xywh {7 30 305 25}
}
Fl_Choice menusEffectType {
label {Effect type:} open
xywh {77 60 115 23} align FL_ALIGN_LEFT|FL_ALIGN_WRAP
} {
Fl_Item {} {
label None
}
Fl_Item {} {
label Animation
}
Fl_Item {} {
label Fading
}
}
Fl_Value_Input menusSpeed {
label {Speed:}
xywh {77 95 45 25}
}
Fl_Value_Input menusDelay {
label {Delay:}
xywh {212 95 50 25}
}
}
Fl_Group {} {
label Others open
xywh {1 24 318 170} hide
} {
Fl_Check_Button mdiAnimation {
label {Enable MDI animation}
xywh {12 10 300 25}
}
Fl_Check_Button mdiOpaqueAnimation {
label {MDI opaque animation}
xywh {12 40 300 25}
}
Fl_Check_Button imagesStateEffect {
label {Enable images state effect}
xywh {12 70 300 25}
}
}
}
Fl_Group {} {open
xywh {3 210 320 100} box DOWN_BOX
} {
Fl_Button {} {
label {&Save as...}
callback {saveSchemeAs();}
private xywh {197 20 80 25}
}
Fl_Check_Button allApplyRadioButton {
label {Ap&ply colors to all programs}
xywh {9 60 299 25} align FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_WRAP when CHANGED
}
Fl_Choice schemeListBox {
label {Schemes:}
callback {getSchemeColors();} open
xywh {12 22 175 23} align FL_ALIGN_TOP|FL_ALIGN_LEFT when CHANGED
extra_code {\#include <efltk/Fl_Input_Browser.h>
o->type(1);
fillItems();}
class Fl_Input_Browser
} {}
}
Fl_Button {} {
label {&OK}
callback {//windowColorSettings->hide();
saveActiveScheme();
applyColors();
saveEfltkConfig();
exit(0);}
private xywh {75 328 80 25}
}
Fl_Button {} {
label {&Apply}
callback {saveActiveScheme();
applyColors();
saveEfltkConfig();}
private xywh {160 328 80 25}
}
Fl_Button {} {
label {&Cancel}
callback {exit(0);}
private xywh {245 328 80 25}
}
}
code {//updateFontAll();
loadEfltkConfig();} {}
}
Function {ChangeBoxColor(Fl_Button *box, void *)} {open return_type void
} {
code {Fl_Button *colorBox = box;
Fl_Color oldColor = colorBox->color();
Fl_Color defColor = oldColor;
fl_color_chooser(_("Choose color"), defColor);
if (defColor != oldColor)
{
colorBox->color(defColor);
colorBox->highlight_color(defColor);
colorBox->redraw();
}} {}
}

View File

@ -1,47 +0,0 @@
// generated by Fast Light User Interface Designer (fluid) version 2.0100
#ifndef ecolorconf_h
#define ecolorconf_h
#include <fltk/Window.h>
extern fltk::Window* windowColorSettings;
#include <fltk/TabGroup.h>
#include <fltk/Group.h>
#include <fltk/Button.h>
extern void ChangeBoxColor(fltk::Button*, void*);
extern fltk::Button* colorBox;
extern fltk::Button* labelColorBox;
extern fltk::Button* selectionColorBox;
extern fltk::Button* selectionTextColorBox;
extern fltk::Button* highlightColorBox;
extern fltk::Button* highlightLabelColorBox;
extern fltk::Button* textColorBox;
extern fltk::Button* backgroundBox;
extern fltk::Button* textBackgroundBox;
extern fltk::Button* tooltipBox;
extern fltk::Button* tooltipTextColorButton;
#include <fltk/CheckButton.h>
extern fltk::CheckButton* tooltipsEnableEffects;
extern fltk::CheckButton* tooltipsEnable;
#include <fltk/Choice.h>
extern fltk::Choice* tooltipsEffectType;
#include <fltk/Item.h>
#include <fltk/ValueInput.h>
extern fltk::ValueInput* tooltipsDelay;
extern fltk::Button* setLabelFont;
extern fltk::Button* setTextFont;
#include <fltk/InvisibleBox.h>
extern fltk::InvisibleBox* labelFontInput;
extern fltk::InvisibleBox* textFontInput;
extern fltk::CheckButton* menusEnableEffects;
extern fltk::CheckButton* menusEnableSubwindowEffects;
extern fltk::Choice* menusEffectType;
extern fltk::ValueInput* menusSpeed;
extern fltk::ValueInput* menusDelay;
extern fltk::CheckButton* mdiAnimation;
extern fltk::CheckButton* mdiOpaqueAnimation;
extern fltk::CheckButton* imagesStateEffect;
extern fltk::CheckButton* allApplyRadioButton;
#include <fltk/InputBrowser.h>
extern fltk::InputBrowser* schemeListBox;
void ChangeBoxColor(fltk::Button *box, void *);
#endif

View File

@ -1,701 +0,0 @@
/*
* $Id$
*
* Colors and fonts settings
* 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 <unistd.h>
#include <stdlib.h>
//#include <efltk/fl_draw.h>
#include <fltk/x.h> //#include <efltk/x.h>
#include "../edelib2/Run.h" //#include <efltk/Fl_Util.h>
//#include <efltk/Fl_String.h>
#include "ecolorutils.h"
#include "ecolorconf.h"
#include "EDE_FontChooser.h"
using namespace fltk;
using namespace edelib;
////////////////////////
// Useful functions from efltk
////////////////////////
char *my_get_homedir() {
char *path = new char[PATH_MAX];
const char *str1;
str1=getenv("HOME");
if (str1) {
memcpy(path, str1, strlen(str1)+1);
return path;
}
return 0;
}
////////////////////////
////////////////////////
// Useful functions that should be in fltk
////////////////////////
char *filename_noext(char *buf)
{
char *p=buf, *q=0;
while (*p++)
{
if (*p == '/') q = 0;
#if defined(_WIN32) || defined(__EMX__)
else if (*p == '\\') q = 0;
#endif
else if (*p == '.') q = p;
}
if (q) *q='\0';
return buf;
}
////////////////////////
EDEFont labelfont, textfont;
static void sendClientMessage(Window w, Atom a, long x)
{
// no worky
/* XEvent ev;
long mask;
memset(&ev, 0, sizeof(ev));
ev.xclient.type = ClientMessage;
ev.xclient.window = w;
ev.xclient.message_type = a;
ev.xclient.format = 32;
ev.xclient.data.l[0] = x;
ev.xclient.data.l[1] = CurrentTime;
mask = 0L;
if (w == RootWindow(fl_display, fl_screen))
mask = SubstructureRedirectMask;
XSendEvent(fl_display, w, False, mask, &ev);*/
}
void sendUpdateInfo(Atom what)
{
// no worky
/* unsigned int i, nrootwins;
Window dw1, dw2, *rootwins = 0;
int screen_count = ScreenCount(fl_display);
for (int s = 0; s < screen_count; s++) {
Window root = RootWindow(fl_display, s);
XQueryTree(fl_display, root, &dw1, &dw2, &rootwins, &nrootwins);
for (i = 0; i < nrootwins; i++) {
if (rootwins[i]!=RootWindow(fl_display, fl_screen)) {
sendClientMessage(rootwins[i], what, 0);
}
}
}*/
}
// Comment from before
/*
void updateSizes(Fl_Input_Browser *font_sizes)
{
int *sizes;
int cnt = fl_font()->sizes(sizes);
font_sizes->clear();
font_sizes->begin();
char tmp[8];
for(int n=0; n<cnt; n++)
{
snprintf(tmp, sizeof(tmp)-1, "%d", sizes[n]);
Fl_Item *i = new Fl_Item();
i->copy_label(tmp);
}
font_sizes->end();
}
void updateEncodings(Fl_Input_Browser *font_combo)
{
int encs;
const char **array;
encs = fl_font()->encodings(array);
fontEncoding->clear();
fontEncoding->begin();
for(int n=0; n<encs; n++)
{
new Fl_Item(array[n]);
}
fontEncoding->end();
}
void updateFontChange(Fl_Input_Browser *font_combo, Fl_Input_Browser *font_sizes)
{
//Fl_Font f = fl_find_font(font_combo->value());
Fl_Font f = fl_create_font(font_combo->value());
int s = (int)atoi(font_sizes->value());
if(!f) return;
fl_font(f,s);
updateSizes(font_sizes);
updateEncodings(font_combo);
}
void updateFontAll()
{
updateFontChange(labelFontInput, labelSize);
updateFontChange(textFontInput, textSize);
}*/
void apply_colors_apps(Color fg, Color bg, Color text, const char* font)
{
uchar r, g, b, r1, g1, b1, r2, g2, b2;
split_color(bg, r, g, b);
split_color(fg, r1, g1, b1);
split_color(text, r2, g2, b2);
char filePath[PATH_MAX];
snprintf(filePath,PATH_MAX,"%s/.Xdefaults",my_get_homedir());
char *backgroundTypes[34] =
{
"*XmList.background" , "*XmLGrid.background",
"Netscape*XmList.background" , "Netscape*XmLGrid.background",
"*text*background", "*list*background",
"*Text*background", "*List*background",
"*textBackground", "*XmTextField.background",
"*XmText.background", "Netscape*XmTextField.background",
"Netscape*XmText.background", "*background",
"*Background", "nscal*Background",
"*Menu*background", "OpenWindows*WindowColor",
"Window.Color.Background", "netscape*background",
"Netscape*background", ".netscape*background",
"Ddd*background", "Emacs*Background",
"Emacs*backgroundToolBarColor",//25
"*XmList.selectBackground" , "*XmLGrid.selectBackground",
"Netscape*XmList.selectBackground" , "Netscape*XmLGrid.selectBackground",
"*XmTextField.selectBackground", "*XmText.selectBackground",
"Netscape*XmTextField.selectBackground", "Netscape*XmText.selectBackground",
"*selectBackground" //34
};
FILE *colorFile = fopen(filePath, "w");
for (int i = 0 ; i < 34; i++)
{
fprintf(colorFile, "%s: #%02X%02X%02X\n", backgroundTypes[i],(short int) r, (short int) g, (short int) b);
}
fprintf(colorFile, "foreground: #%02X%02X%02X\n", r1, g1, b1);
fprintf(colorFile, "xterm*background: #FFFFFF\n"); //especialy for Xterm
fclose(colorFile);
char runString[PATH_MAX];
snprintf(runString,PATH_MAX,"xrdb -merge -all %s/.Xdefaults",my_get_homedir());
// if (fl_start_child_process(runString)==-1)
if (run_program(runString)>255)
alert("Error executing xrdb program.");
}
void apply_colors_gtk(Color fg,
Color bg,
Color selection,
Color selection_text,
Color tooltip,
Color tooltip_text,
Color text,
const char* font)
{
uchar r, g, b;
uchar text_r, text_g, text_b;
//, b1, r2, g2, b2;
uchar selection_r, selection_g, selection_b;
uchar selection_text_r, selection_text_g, selection_text_b;
uchar tooltip_r, tooltip_g, tooltip_b;
uchar tooltip_text_r, tooltip_text_g, tooltip_text_b;
split_color(bg, r, g, b);
split_color(fg, text_r, text_g, text_b);
split_color(selection, selection_r, selection_g, selection_b);
split_color(selection_text, selection_text_r, selection_text_g, selection_text_b);
split_color(tooltip, tooltip_r, tooltip_g, tooltip_b);
split_color(tooltip_text, tooltip_text_r, tooltip_text_g, tooltip_text_b);
// fl_get_color(text, r2, g2, b2);
char filePath[PATH_MAX];
snprintf(filePath,PATH_MAX,"%s/.gtkrc",my_get_homedir());
FILE *gtkFile = fopen(filePath, "w");
fprintf(gtkFile, "style \"default\" \n");
fprintf(gtkFile, "{\n");
fprintf(gtkFile, "fontset = \"%s\" \n", font);
fprintf(gtkFile, "bg[NORMAL] = \"#%02X%02X%02X\"\n", r, g, b);
fprintf(gtkFile, "fg[NORMAL] = \"#%02X%02X%02X\"\n", text_r, text_g, text_b);
fprintf(gtkFile, "bg[PRELIGHT] = \"#%02X%02X%02X\"\n", r, g, b);
fprintf(gtkFile, "fg[PRELIGHT] = \"#%02X%02X%02X\"\n", text_r, text_g, text_b);
fprintf(gtkFile, "bg[ACTIVE] = \"#%02X%02X%02X\"\n", r, g, b);
fprintf(gtkFile, "fg[ACTIVE] = \"#%02X%02X%02X\"\n", text_r, text_g, text_b);
fprintf(gtkFile, "bg[SELECTED] = \"#%02X%02X%02X\"\n", selection_r, selection_g, selection_b);
fprintf(gtkFile, "fg[SELECTED] = \"#%02X%02X%02X\"\n", selection_text_r, selection_text_g, selection_text_b);
fprintf(gtkFile, "}\n");
fprintf(gtkFile, "style \"menu\" \n");
fprintf(gtkFile, "{\n");
fprintf(gtkFile, "bg[PRELIGHT] = \"#%02X%02X%02X\"\n", selection_r, selection_g, selection_b);
fprintf(gtkFile, "fg[PRELIGHT] = \"#%02X%02X%02X\"\n", selection_text_r, selection_text_g, selection_text_b);
fprintf(gtkFile, "}\n");
fprintf(gtkFile, "style \"tooltip\" \n");
fprintf(gtkFile, "{\n");
fprintf(gtkFile, "bg[NORMAL] = \"#%02X%02X%02X\"\n", tooltip_r, tooltip_g, tooltip_b);
fprintf(gtkFile, "fg[NORMAL] = \"#%02X%02X%02X\"\n", tooltip_text_r, tooltip_text_g, tooltip_text_b);
fprintf(gtkFile, "}\n");
fprintf(gtkFile, "class \"*\" style \"default\"\n");
fprintf(gtkFile, "widget_class \"*Menu*\" style \"menu\" \n");
fprintf(gtkFile, "widget \"gtk-tooltips\" style \"tooltip\" \n");
fclose(gtkFile);
}
void apply_colors_qt(Color fg, Color bg, Color text, const char* font)
{
uchar r, g, b, r1, g1, b1, r2, g2, b2;
split_color(bg, r, g, b);
split_color(fg, r1, g1, b1);
split_color(text, r2, g2, b2);
char filePath[PATH_MAX];
snprintf(filePath,PATH_MAX,"%s/.qt/qtrc",my_get_homedir());
FILE *qtfile = fopen(filePath, "w");
fprintf(qtfile, "[General]\n");
fprintf(qtfile, "GUIEffects=none^e\n");
fprintf(qtfile, "style=Windows\n\n");
fprintf(qtfile, "[Palette]\n");
fprintf(qtfile, "active=#000000^e#%02x%02x%02x^e#ffffff^e#%02x%02x%02x^e#000000^e"
"#%02x%02x%02x^e#000000^e#ffffff^e#000000^e#ffffff^e#%02x%02x%02x^e#000000^e"
"#7783bd^e#ffffff^e#0000ff^e#ff00ff^e\n",
r,g,b, r,g,b, r,g,b, r,g,b);
fprintf(qtfile, "disabled=#808080^e#%02x%02x%02x^e#ffffff^e#f2f2f2^e#%02x%02x%02x^e"
"#b7b7b7^e#b7b7b7^e#ffffff^e#000000^e#ffffff^e#dcdcdc^e#000000^e"
"#000080^e#ffffff^e#0000ff^e#ff00ff^e\n",
r,g,b, r,g,b);
fprintf(qtfile, "inactive=#000000^e#%02x%02x%02x^e#ffffff^e#f2f2f2^e#%02x%02x%02x^e"
"#b7b7b7^e#000000^e#ffffff^e#000000^e#ffffff^e#dcdcdc^e"
"#000000^e#7783bd^e#ffffff^e#0000ff^e#ff00ff^e\n",
r,g,b, r,g,b);
fclose(qtfile);
}
void apply_colors_kde(Color fg, Color bg, Color text, const char* font)
{
uchar r, g, b, r1, g1, b1, r2, g2, b2;
split_color(bg, r, g, b);
split_color(fg, r1, g1, b1);
split_color(text, r2, g2, b2);
char filePath[PATH_MAX];
snprintf (filePath,PATH_MAX,"%s/.kderc",my_get_homedir());
FILE *kdefile = fopen(filePath, "w");
fprintf(kdefile, "[General]\n");
fprintf(kdefile, "background=%d,%d,%d\n", r, g, b);
fprintf(kdefile, "foreground=%d,%d,%d\n", r1, g1, b1);
fclose(kdefile);
}
void saveScheme(char *scheme)
{
char *keys[] =
{
"color", "label color", "selection color",
"selection text color", "highlight color", "text color",
"highlight label color",
};
Button *colorBoxes[7] =
{
colorBox, labelColorBox, selectionColorBox, selectionTextColorBox,
highlightColorBox, textColorBox, highlightLabelColorBox
};
// We can save new scheme even if there is no existing
// if (schemeListBox->size() > 1)
// {
if (colorBox->color() == labelColorBox->color())
{ alert(_("Color and label color are the same. Edit colors first."));
}
else
{
Config colorConfig(scheme); //save to "active".scheme
colorConfig.set_section("widgets/default");
for (int boxIndex=0; boxIndex<7; boxIndex++) {
colorConfig.write(keys[boxIndex], (int)colorBoxes[boxIndex]->color());
}
colorConfig.write("text background", (int)textBackgroundBox->color());
// we don't want to lose leading space...
char tr[128];
strncpy (tr, labelfont.font->system_name(), 128);
if (tr[0] == ' ') tr[0] = '_';
colorConfig.write("label font", tr);
strncpy (tr, textfont.font->system_name(), 128);
if (tr[0] == ' ') tr[0] = '_';
colorConfig.write("text font", tr);
colorConfig.write("label size", labelfont.size);
colorConfig.write("text size", textfont.size);
colorConfig.write("font encoding", textfont.encoding);
colorConfig.set_section("widgets/tooltip");
colorConfig.write("color", (int)tooltipBox->color());
colorConfig.write("label color", (int)tooltipTextColorButton->color());
colorConfig.set_section("global colors");
colorConfig.write("background", (int)backgroundBox->color());
}
// }
}
void saveActiveScheme()
{
char pathActive[PATH_MAX];
snprintf(pathActive,PATH_MAX,"%s/.ede/schemes/Active.scheme",my_get_homedir());
saveScheme(pathActive);
}
void saveSchemeAs()
{
const char *schemeName = input(_("Save scheme as:"), _("New scheme"));
if (schemeName)
{
char pathScheme[PATH_MAX];
//pathScheme.printf("%s/.ede/schemes/%s.scheme", fl_homedir().c_str(), schemeName);
snprintf(pathScheme, PATH_MAX, "%s/.ede/schemes/%s.scheme", my_get_homedir(), schemeName);
saveScheme(pathScheme);
schemeListBox->add(filename_noext(filename_name(pathScheme)));
}
}
void applyColors()
{
// sendUpdateInfo(FLTKChangeScheme);
if (allApplyRadioButton->value()==1)
{
apply_colors_apps(labelColorBox->color(), backgroundBox->color(),
textBackgroundBox->color(), labelFontInput->label());
apply_colors_gtk(labelColorBox->color(), backgroundBox->color(),
selectionColorBox->color(), selectionTextColorBox->color(),
tooltipBox->color(), tooltipTextColorButton->color(),
textBackgroundBox->color(), labelFontInput->label()
);
apply_colors_qt(labelColorBox->color(), backgroundBox->color(),
textBackgroundBox->color(), labelFontInput->label());
apply_colors_kde(labelColorBox->color(), backgroundBox->color(),
textBackgroundBox->color(), labelFontInput->label());
}
}
void fillItems()
{
char *file;
char path[PATH_MAX];
snprintf(path,PATH_MAX,"%s/.ede/schemes",my_get_homedir());
if (access(path,0)) { mkdir( path, 0777 ); }
dirent **files;
int count = filename_list(path, &files);
// We should always have an "active" scheme, even if directory is empty
// if (count > 0)
// {
new Item("Active");
schemeListBox->text("Active");
for(int n=0; n<count; n++)
{
file = files[n]->d_name;
if( strcmp(file, ".")!=0 && strcmp(file, "..")!=0)
{
char filename[PATH_MAX];
snprintf(filename,PATH_MAX,"%s/%s", path, file);
if (!filename_isdir(filename) &&
filename_match(file, "*.scheme") && strcmp(file, "Active.scheme")!=0)
{
new Item(strdup(filename_noext(filename_name(filename))));
}
}
free(files[n]);
}
free(files);
getSchemeColors(); //we apply first scheme - active.scheme
// }
}
void getSchemeColors()
{
// Hardcoded defaults are below, inside read() calls
char tr[128];
int ir = 0;
char *keys[] =
{
"color", "label color", "selection color",
"selection text color", "highlight color", "text color",
"highlight label color",
};
long keys_defaults[] =
{
7, 32, 796173568, 7, 49, 32, 32
};
Button *colorBoxes[7] =
{
colorBox, labelColorBox, selectionColorBox, selectionTextColorBox,
highlightColorBox, textColorBox, highlightLabelColorBox
};
// We always have at least "Active" on the list
// if (schemeListBox->size() > 1)
// {
Config *colorConfig;
const char *ai = schemeListBox->text();
if (strcmp(ai, "Active")==0)
{
char pathActive[PATH_MAX];
snprintf(pathActive, sizeof(pathActive)-1, "%s/.ede/schemes/Active.scheme", my_get_homedir());
colorConfig = new Config(pathActive);
} else {
char pathScheme[PATH_MAX];
snprintf(pathScheme, sizeof(pathScheme)-1, "%s/.ede/schemes/%s.scheme", my_get_homedir(), ai);
// However, sometimes a bogus entry is selected:
if (!filename_exist(pathScheme)) return;
colorConfig = new Config(pathScheme);
}
for(int boxIndex = 0; boxIndex < 7; boxIndex++)
{
colorConfig->set_section("widgets/default");
colorConfig->read(keys[boxIndex], ir, keys_defaults[boxIndex]);
colorBoxes[boxIndex]->color((Color)ir);
colorBoxes[boxIndex]->highlight_color((Color)ir);
}
colorConfig->set_section("widgets/tooltip");
colorConfig->read("color", ir, -16784896);
tooltipBox->color((Color)ir);
tooltipBox->highlight_color((Color)ir);
colorConfig->read("label color",ir, 32);
tooltipTextColorButton->color((Color)ir);
tooltipTextColorButton->highlight_color((Color)ir);
colorConfig->set_section("widgets/default");
colorConfig->read("text background", ir, 7);
textBackgroundBox->color((Color)ir);
textBackgroundBox->highlight_color((Color)ir);
char tmpencoding[PATH_MAX];
colorConfig->read("font encoding", tr, "iso8859-2", sizeof(tr)); strncpy(tmpencoding,tr,PATH_MAX);
colorConfig->read("label font", tr, fltk::HELVETICA->name(), sizeof(tr));
{
if (tr[0] == '_') tr[0] = ' '; // converted leading space
fltk::Font* thefont = font(tr); //Style.h
labelfont.font = thefont;
if (labelfont.encoding) free(labelfont.encoding);
labelfont.encoding = strdup(tmpencoding);
labelfont.defined = true;
colorConfig->read("label size", ir, 12);
labelfont.size = ir;
}
colorConfig->read("text font", tr, fltk::HELVETICA->name(), sizeof(tr));
{
if (tr[0] == '_') tr[0] = ' ';
fltk::Font* thefont = font(tr);
textfont.font = thefont;
if (textfont.encoding) free(textfont.encoding);
textfont.encoding = strdup(tmpencoding);
textfont.defined = true;
colorConfig->read("text size", ir, 12);
textfont.size = ir;
}
labelFontInput->label(font_nice_name(labelfont));
textFontInput->label(font_nice_name(textfont));
colorConfig->set_section("global colors");
colorConfig->read("background", ir, -673724416);
backgroundBox->color((Color)ir);
colorBox->parent()->parent()->redraw();
delete colorConfig;
// }
}
void loadEfltkConfig()
{
char *file = 0;
file = Config::find_file("efltk.conf", false, Config::USER);
if(!file) file = Config::find_file("efltk.conf", false, Config::SYSTEM);
Config cfg(file, true, false);
if(!cfg.error())
{
bool b_val;
float f_val;
int i_val;
// Read Fl_Image defaults:
cfg.get("Images", "State Effects", b_val, true);
imagesStateEffect->value(b_val);
// Read Fl_Menu_Window defaults:
cfg.get("Menus", "Effects", b_val, true);
menusEnableEffects->value(b_val);
cfg.get("Menus", "Subwindow Effect", b_val, true);
menusEnableSubwindowEffects->value(b_val);
cfg.get("Menus", "Effect Type", i_val, 1);
menusEffectType->value(i_val);
cfg.get("Menus", "Speed", f_val, 1.5f);
menusSpeed->value(f_val);
cfg.get("Menus", "Delay", f_val, 0.2f);
menusDelay->value(f_val);
// Read Fl_Tooltip defaults:
cfg.get("Tooltips", "Effects", b_val, true);
tooltipsEnableEffects->value(b_val);
cfg.get("Tooltips", "Effect Type", i_val, 2);
tooltipsEffectType->value(i_val);
cfg.get("Tooltips", "Enabled", b_val, true);
tooltipsEnable->value(b_val);
cfg.get("Tooltips", "Delay", f_val, 1.0f);
tooltipsDelay->value(f_val);
// Read Fl_MDI_Window defaults:
cfg.get("MDI", "Animate", b_val, true);
mdiAnimation->value(b_val);
cfg.get("MDI", "Opaque", b_val, false);
mdiOpaqueAnimation->value(b_val);
}
}
void saveEfltkConfig()
{
char *file = 0;
file = Config::find_file("efltk.conf", false, Config::USER);
if(!file) file = Config::find_file("efltk.conf", false, Config::SYSTEM);
Config cfg(file, true, true);
if(!cfg.error())
{
cfg.set("Images", "State Effects", imagesStateEffect->value());
cfg.set("Menus", "Effects", menusEnableEffects->value());
cfg.set("Menus", "Subwindow Effect", menusEnableSubwindowEffects->value());
cfg.set("Menus", "Effect Type", menusEffectType->value());
cfg.set("Menus", "Speed", (float)menusSpeed->value());
cfg.set("Menus", "Delay", (float)menusDelay->value());
cfg.set("Tooltips", "Effects", tooltipsEnableEffects->value());
cfg.set("Tooltips", "Effect Type", tooltipsEffectType->value());
cfg.set("Tooltips", "Enabled", tooltipsEnable->value());
cfg.set("Tooltips", "Delay", (float)tooltipsDelay->value());
cfg.set("MDI", "Animate", mdiAnimation->value());
cfg.set("MDI", "Opaque", mdiOpaqueAnimation->value());
// sendUpdateInfo(FLTKChangeSettings);
}
}
// FONT STUFF:
// returns nice name for a font
const char* font_nice_name(EDEFont font) {
if (!font.defined)
return "Unknown";
char nicename[PATH_MAX];
snprintf (nicename, PATH_MAX, "%s (%d)", font.font->name(), font.size);
// capitalize bold, italic
// nicename.sub_replace("bold","Bold");
// nicename.sub_replace("italic","Italic");
// nicename = nicename + " (";
// nicename = nicename + Fl_String(font.size);
// nicename = nicename + ")";
const char* n = strdup(nicename);
return n;
}
// callback for button to set label font
void labelfont_cb() {
EDEFont ret = font_chooser(labelfont);
if (ret.defined) {
labelfont = ret;
labelFontInput->label(font_nice_name(labelfont));
labelFontInput->redraw();
}
}
// callback for button to set label font
void textfont_cb() {
EDEFont ret = font_chooser(textfont);
if (ret.defined) {
textfont = ret;
textFontInput->label(font_nice_name(textfont));
textFontInput->redraw();
}
}

View File

@ -1,71 +0,0 @@
// Colors settings for EDE
// Copyright (C) 2000-2002 Martin Pekar
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef ecolorutils_h
#define ecolorutils_h
/*#include <efltk/Fl.h>
#include <efltk/Fl_Window.h>
#include <efltk/x.h>
#include <efltk/Fl_Menu_Button.h>
#include <efltk/Fl_Item_Group.h>*/
#include <fltk/Item.h> //#include <efltk/Fl_Item.h>
#include <fltk/filename.h> //#include <efltk/filename.h>
/*#include <efltk/Fl_Value_Output.h>
#include <efltk/Fl_Pack.h>
#include <efltk/Fl_Box.h>
#include <efltk/Fl_Divider.h>
#include <efltk/Fl_Image.h>
#include <efltk/Fl_Button.h>
#include <efltk/Fl_Radio_Button.h>
#include <efltk/Fl_Color_Chooser.h>
#include <efltk/Fl_Menu_Bar.h>*/
#include <fltk/Button.h> //#include <efltk/Fl_Button.h>
//#include <efltk/Fl_Input.h>
//#include <efltk/Fl_Output.h>
#include <fltk/ask.h> //#include <efltk/fl_ask.h>
//#include <efltk/Fl_Value_Input.h>
#include <fltk/Font.h> //#include <efltk/Fl_Font.h>
//#include <efltk/Fl_Input_Browser.h>
#include "../edelib2/Config.h" //#include <efltk/Fl_Config.h>
#include "../edelib2/NLS.h" //#include <efltk/Fl_Locale.h>
// this struct can hold slightly more information than Fl_Font
typedef struct {
fltk::Font* font;
char* encoding;
int size;
bool defined;
} EDEFont;
extern void updateFontAll();
extern void getSchemeColors();
extern void saveActiveScheme();
extern void saveSchemeAs();
extern void applyColors();
extern void fillItems();
extern void loadEfltkConfig();
extern void saveEfltkConfig();
// font stuff
const char* font_nice_name(EDEFont);
extern void labelfont_cb();
extern void textfont_cb();
#endif

View File

@ -1,315 +0,0 @@
//
// "$Id: edetheme.cpp,v 1.1.1.1 2005/03/04 15:45:45 karijes Exp $"
//
// Startup, scheme and theme handling code for the Fast Light
// Tool Kit (FLTK).
//
// Copyright 1998-1999 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
//
// The "scheme" theme. This reads an earlier design for configuring fltk,
// a text-based "scheme" file, which described exactly what to put into
// the style structures for each widget class. We rejected this design
// because it was apparent that all interesting themes were completely
// defined by plugin code and thus the only part that was being used was
// the "themes" line from the file.
// The scheme argument (set by Fl_Style::scheme() or by the -scheme
// switch when Fl::arg() is used) is used to choose the scheme file to
// read, by adding ".scheme" to the end. If not specified or null,
// "default" is used. There are some sample scheme files provided for
// your amusement, such as OldMotif.scheme.
//
// Modified for use with EDE by Martin Pekar 07/02/2002
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <stdlib.h>
#include <fltk/Fl.h>
#include <fltk/fl_load_plugin.h>
#include <fltk/Fl_Color.h>
#include <fltk/Fl_Font.h>
#include <fltk/Fl_Labeltype.h>
#include <fltk/Fl_Style.h>
#include <fltk/Fl_Widget.h>
#include <fltk/fl_draw.h>
#include <fltk/x.h>
#include <ede/FLE_Config.h>
#ifndef _WIN32
#include <unistd.h>
#else
#include <io.h>
#define access(a,b) _access(a,b)
#define R_OK 04
#endif
#ifndef PATH_MAX
#define PATH_MAX 128
#endif
static Fl_Color grok_color(FLE_Config* cf, const char *colstr)
{
char *val=0;
const char *p = colstr;
val = cf->read_string("aliases", colstr);
if(val) p = val;
char* q;
long l = strtoul(p, &q, 0);
if(!*q) return (Fl_Color)l;
//if(val) delete []val; //LEAK!!
return fl_rgb(p);
}
static Fl_Font grok_font(FLE_Config *cf, const char* fontstr)
{
char *val;
const char *p = fontstr;
val = cf->read_string("aliases", fontstr);
if(val) p = val;
char* q;
long l = strtoul(p, &q, 0);
if(!*q) return fl_fonts+l;
//if(val) delete []val; //LEAK!!
return fl_find_font(p);
}
////////////////////////////////////////////////////////////////
extern "C"
bool fltk_theme()
{
char temp[PATH_MAX];
/* const char* scheme = Fl_Style::scheme();
if (!scheme || !*scheme) scheme = "default";
char temp[PATH_MAX];
snprintf(temp, PATH_MAX, "%s.scheme", scheme);
char sfile_buf[PATH_MAX];*/
const char* sfile = fle_find_config_file("schemes/Active.scheme", 0);
if (!sfile) {
fprintf(stderr, "Cannot find default scheme \"%s\"\n", sfile);
return false;
}
static bool recurse=false;
if (recurse) {
fprintf(stderr, "%s recusively loaded scheme.theme\n", sfile);
return false;
}
//conf_clear_cache();
FLE_Config conf(sfile);
//if (!::getconf(sfile, "general/themes", temp, sizeof(temp)))
char *themefile = conf.read_string("general", "themes");
if(themefile && !conf.error())
{
recurse = true;
Fl_Theme f = Fl_Style::load_theme(themefile);
if(f) f();
else fprintf(stderr,"Unable to load %s theme\n", themefile);
recurse = false;
delete []themefile;
}
char *valstr;
Fl_Color col;
//if(!::getconf(sfile, "global colors/background", valstr, sizeof(valstr))) {
valstr = conf.read_string("global colors", "background");
if(valstr && !conf.error()) {
col = grok_color(&conf, valstr);
fl_background(fl_get_color(col));
delete []valstr;
}
static struct { const char* key; Fl_Color col; } colors[] = {
{ "DARK1", FL_DARK1 },
{ "DARK2", FL_DARK2 },
{ "DARK3", FL_DARK3 },
{ "LIGHT1", FL_LIGHT1 },
{ "LIGHT2", FL_LIGHT2 },
{ "LIGHT3", FL_LIGHT3 },
{ 0, 0 }
};
for (int i = 0; colors[i].key; i++) {
snprintf(temp, sizeof(temp)-1, "%s", colors[i].key);
//int res = ::getconf(sfile, temp, valstr, sizeof(valstr));
valstr = conf.read_string("global colors", temp);
int res = conf.error();
if(!res && valstr) {
col = grok_color(&conf, valstr);
fl_set_color(colors[i].col, col);
delete []valstr;
}
}
//conf_list section_list = 0, key_list = 0;
//conf_entry* cent;
SectionList *section_list;
Section *cent=0;
Fl_Font font;
Fl_Labeltype labeltype;
Fl_Boxtype boxtype;
//if(!getconf_sections(sfile, "widgets", &section_list))
section_list = conf.section_list("widgets");
if(section_list)
{
//for (cent = section_list; cent; cent = cent->next)
for(cent = section_list->first(); cent; cent=section_list->next())
{
//Fl_Style* style = Fl_Style::find(cent->key);
Fl_Style* style = Fl_Style::find(cent->name);
if(!style) continue;
conf.set_section(cent);
// box around widget
//if(!getconf_list(key_list, "box", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("box")) ) {
if ( (boxtype = Fl_Boxtype_::find(valstr)) ) style->box = boxtype;
delete []valstr;
}
// box around buttons within widget
//if (!getconf_list(key_list, "button box", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("button box")) ) {
if ( (boxtype = Fl_Boxtype_::find(valstr)) ) style->button_box = boxtype;
delete []valstr;
}
// color of widget background
//if (!getconf_list(key_list, "color", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("color")) ) {
style->color = grok_color(&conf, valstr);
delete []valstr;
}
// color of widget's label
//if (!getconf_list(key_list, "label color", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("label color")) ) {
style->label_color = grok_color(&conf, valstr);
delete []valstr;
}
// color of widget's background when widget is selected
//if (!getconf_list(key_list, "selection color", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("selection color" )) ) {
style->selection_color = grok_color(&conf, valstr);
delete []valstr;
}
// color of widget's text when text selected
// color of widget's label when widget selected
// color of widget's glyph when widget selected and no glyph box
//if (!getconf_list(key_list, "selection text color", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("selection text color")) ) {
style->selection_text_color = grok_color(&conf, valstr);
delete []valstr;
}
// color of widget's background when widget is highlighted
//if (!getconf_list(key_list, "highlight color", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("highlight color" ))) {
style->highlight_color = grok_color(&conf, valstr);
delete []valstr;
}
// color of widget's label when widget highlighted
// color of widget's glyph/text when widget highlighted and no text/glyph box
//if (!getconf_list(key_list, "highlight label color", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("highlight label color" ))) {
style->highlight_label_color = grok_color(&conf, valstr);
delete []valstr;
}
// color of text/glyph within widget
//if (!getconf_list(key_list, "text color", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("text color")) ) {
style->text_color = grok_color(&conf, valstr);
delete []valstr;
}
// font used for widget's label
//if (!getconf_list(key_list, "label font", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("label font")) ) {
if ( (font = grok_font(&conf, valstr)) ) style->label_font = font;
delete []valstr;
}
// font used for text within widget
//if (!getconf_list(key_list, "text font", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("text font" )) ) {
if ( (font = grok_font(&conf, valstr)) ) style->text_font = font;
delete []valstr;
}
// type of widget's label
//if (!getconf_list(key_list, "label type", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("label type" )) ) {
if ( (labeltype = Fl_Labeltype_::find(valstr)) ) style->label_type = labeltype;
delete []valstr;
}
// font size of widget's label
//if (!getconf_list(key_list, "label size", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("label size")) ) {
style->label_size = (int)strtol(valstr,0,0);
delete []valstr;
}
// font size of text within widget
//if (!getconf_list(key_list, "text size", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("text size")) ) {
style->text_size = (int)strtol(valstr,0,0);
delete []valstr;
}
// leading
//if (!getconf_list(key_list, "leading", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("leading")) ) {
style->leading = (int)strtol(valstr,0,0);
delete []valstr;
}
// font encoding
//if (!getconf_list(key_list, "font encoding", valstr, sizeof(valstr)))
if( (valstr=conf.read_string("font encoding")) ) {
fl_encoding(valstr);
//delete []valstr; //LEAK??
}
//conf_list_free(&key_list);
}
//conf_list_free(&section_list);
}
return true;
}
//
// End of "$Id: edetheme.cpp,v 1.1.1.1 2005/03/04 15:45:45 karijes Exp $".
//

View File

@ -1,208 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2005-02-09 11:21+0100\n"
"Last-Translator: Nemeth Otto <otto_nemeth@freemail.hu>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ecolorconf.cpp:131
msgid "Colors and fonts settings"
msgstr "Szín és font beállítások"
#: ecolorconf.cpp:136
msgid "Default colors"
msgstr "Színek"
#: ecolorconf.cpp:138
msgid "Color"
msgstr "Háttér szín"
#: ecolorconf.cpp:143
msgid "Label color"
msgstr "Felirat szín"
#: ecolorconf.cpp:148
msgid "Selection color"
msgstr "Kiválasztás háttere"
#: ecolorconf.cpp:153
msgid "Selection text color"
msgstr "Kiválasztott szöveg"
#: ecolorconf.cpp:158
msgid "Off color"
msgstr "Off szín"
#: ecolorconf.cpp:163
msgid "Highlight color"
msgstr "Kiemelés háttere"
#: ecolorconf.cpp:168
msgid "Highlight label color"
msgstr "Kiemelt szöveg"
#: ecolorconf.cpp:173
msgid "Text color"
msgstr "Szöveg szín"
#: ecolorconf.cpp:178
msgid "Background"
msgstr "Háttér"
#: ecolorconf.cpp:183
msgid "Text background"
msgstr "Szöveg háttér"
#: ecolorconf.cpp:190
msgid "Tooltips"
msgstr "Buborékok"
#: ecolorconf.cpp:193
msgid "Tooltip color"
msgstr "Buborékok színe"
#: ecolorconf.cpp:198
msgid "Tooltip text color"
msgstr "Buborék szövegszín"
#: ecolorconf.cpp:203
#: ecolorconf.cpp:252
msgid "Enable effects"
msgstr "Effektek"
#: ecolorconf.cpp:204
msgid "Enabled"
msgstr "Engedélyez"
#: ecolorconf.cpp:205
#: ecolorconf.cpp:254
msgid "Effect type:"
msgstr "Effekt típus:"
#: ecolorconf.cpp:207
#: ecolorconf.cpp:256
msgid "None"
msgstr "Egyik sem"
#: ecolorconf.cpp:208
#: ecolorconf.cpp:257
msgid "Animation"
msgstr "Animáció"
#: ecolorconf.cpp:209
#: ecolorconf.cpp:258
msgid "Fading"
msgstr "Fokozatos"
#: ecolorconf.cpp:212
#: ecolorconf.cpp:262
msgid "Delay:"
msgstr "Késleltetés:"
#: ecolorconf.cpp:215
msgid "Fonts"
msgstr "Betűtípusok"
#: ecolorconf.cpp:218
msgid "Label font:"
msgstr "Felirat font:"
#: ecolorconf.cpp:226
msgid "Text font:"
msgstr "Szöveg font:"
#: ecolorconf.cpp:233
msgid "Label size:"
msgstr "Felirat méret:"
#: ecolorconf.cpp:236
msgid "Text size:"
msgstr "Szöveg méret:"
#: ecolorconf.cpp:239
msgid "Encoding:"
msgstr "Kódolás:"
#: ecolorconf.cpp:241
#: ecolorconf.cpp:244
msgid "..."
msgstr "..."
#: ecolorconf.cpp:250
msgid "Menus"
msgstr "Menük"
#: ecolorconf.cpp:253
msgid "Enable subwindow effects"
msgstr "Almenü effektek"
#: ecolorconf.cpp:261
msgid "Speed:"
msgstr "Sebesség:"
#: ecolorconf.cpp:265
msgid "Others"
msgstr "Egyéb"
#: ecolorconf.cpp:267
msgid "Enable MDI animation"
msgstr "MDI animáció engedélyezése"
#: ecolorconf.cpp:268
msgid "MDI opaque animation"
msgstr "MDI opaque animation"
#: ecolorconf.cpp:269
msgid "Enable images state effect"
msgstr "Képállapot váltás"
#: ecolorconf.cpp:276
msgid "&Save as..."
msgstr "Menté&s..."
#: ecolorconf.cpp:279
msgid "Ap&ply colors to all programs"
msgstr "Színbeállítások &alkalmazása az összes programra"
#: ecolorconf.cpp:283
msgid "Schemes:"
msgstr "Témák:"
#: ecolorconf.cpp:293
#: efontdialog.cpp:226
msgid "&OK"
msgstr "&OK"
#: ecolorconf.cpp:296
msgid "&Apply"
msgstr "&Alkalmaz"
#: ecolorconf.cpp:299
#: efontdialog.cpp:229
msgid "&Cancel"
msgstr "Mégs&em"
#: ecolorconf.cpp:314
msgid "Choose color"
msgstr "Szín kiválasztása"
#: ecolorutils.cpp:306
msgid "Color and label color are the same. Edit colors first."
msgstr "A szín és felirat szín ugyanaz. Szerkeszd először a színeket."
#: ecolorutils.cpp:344
msgid "Save scheme as:"
msgstr "Téma mentése:"
#: ecolorutils.cpp:344
msgid "New scheme"
msgstr "Új téma"
#: efontdialog.cpp:200
msgid "Select font..."
msgstr "Betűtípus kiválasztása..."

View File

@ -1,203 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: ecolorconf 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-04 12:37+0100\n"
"PO-Revision-Date: 202-11-29 13:31+0700\n"
"Last-Translator: Bambang Purnomosidi D. P. <i-am-the-boss@bpdp.org>\n"
"Language-Team: id <i-am-the-boss@bpdp.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
#: ecolorconf.cpp:131
msgid "Colors and fonts settings"
msgstr "Seting warna dan font"
#: ecolorconf.cpp:136
msgid "Default colors"
msgstr "Warna default"
#: ecolorconf.cpp:138
msgid "Color"
msgstr "Warna"
#: ecolorconf.cpp:143
msgid "Label color"
msgstr "Warna label"
#: ecolorconf.cpp:148
msgid "Selection color"
msgstr "Warna pilihan"
#: ecolorconf.cpp:153
msgid "Selection text color"
msgstr "Warna teks pilihan"
#: ecolorconf.cpp:158
msgid "Off color"
msgstr "Warna off"
#: ecolorconf.cpp:163
msgid "Highlight color"
msgstr "Warna sorot"
#: ecolorconf.cpp:168
msgid "Highlight label color"
msgstr "Warna label sorot"
#: ecolorconf.cpp:173
msgid "Text color"
msgstr "Warna teks"
#: ecolorconf.cpp:178
msgid "Background"
msgstr "Latar belakang"
#: ecolorconf.cpp:183
msgid "Text background"
msgstr "Teks latar belakang"
#: ecolorconf.cpp:190
msgid "Tooltips"
msgstr "Tooltip"
#: ecolorconf.cpp:193
msgid "Tooltip color"
msgstr "Warna tooltip"
#: ecolorconf.cpp:198
msgid "Tooltip text color"
msgstr "Warna teks tooltip"
#: ecolorconf.cpp:203 ecolorconf.cpp:252
msgid "Enable effects"
msgstr "Aktifkan efek"
#: ecolorconf.cpp:204
msgid "Enabled"
msgstr "Aktifkan"
#: ecolorconf.cpp:205 ecolorconf.cpp:254
msgid "Effect type:"
msgstr "Tipe efek:"
#: ecolorconf.cpp:207 ecolorconf.cpp:256
msgid "None"
msgstr "Tidak ada"
#: ecolorconf.cpp:208 ecolorconf.cpp:257
msgid "Animation"
msgstr "Animasi"
#: ecolorconf.cpp:209 ecolorconf.cpp:258
msgid "Fading"
msgstr "Fading"
#: ecolorconf.cpp:212 ecolorconf.cpp:262
msgid "Delay:"
msgstr "Tunda:"
#: ecolorconf.cpp:215
msgid "Fonts"
msgstr "Font"
#: ecolorconf.cpp:218
msgid "Label font:"
msgstr "Font label:"
#: ecolorconf.cpp:226
msgid "Text font:"
msgstr "Font teks:"
#: ecolorconf.cpp:233
msgid "Label size:"
msgstr "Ukuran label:"
#: ecolorconf.cpp:236
msgid "Text size:"
msgstr "Ukuran teks:"
#: ecolorconf.cpp:239
msgid "Encoding:"
msgstr "Pengkodean:"
#: ecolorconf.cpp:241 ecolorconf.cpp:244
msgid "..."
msgstr ""
#: ecolorconf.cpp:250
msgid "Menus"
msgstr "Menu"
#: ecolorconf.cpp:253
msgid "Enable subwindow effects"
msgstr "Aktifkan efek subwindow"
#: ecolorconf.cpp:261
msgid "Speed:"
msgstr "Kecepatan:"
#: ecolorconf.cpp:265
msgid "Others"
msgstr "Lainnya"
#: ecolorconf.cpp:267
msgid "Enable MDI animation"
msgstr "Aktifkan animasi MDI"
#: ecolorconf.cpp:268
msgid "MDI opaque animation"
msgstr "Animasi opaque MDI"
#: ecolorconf.cpp:269
msgid "Enable images state effect"
msgstr "Aktifkan efek keadaan citra"
#: ecolorconf.cpp:276
msgid "&Save as..."
msgstr "&Simpan sebagai..."
#: ecolorconf.cpp:279
msgid "Ap&ply colors to all programs"
msgstr "Berlakukan warna ke semua &program"
#: ecolorconf.cpp:283
msgid "Schemes:"
msgstr "Skema:"
#: ecolorconf.cpp:293 efontdialog.cpp:226
msgid "&OK"
msgstr "&OK"
#: ecolorconf.cpp:296
msgid "&Apply"
msgstr "Berl&akukan"
#: ecolorconf.cpp:299 efontdialog.cpp:229
msgid "&Cancel"
msgstr "&Batal"
#: ecolorconf.cpp:314
msgid "Choose color"
msgstr "Pilih warna"
#: ecolorutils.cpp:306
msgid "Color and label color are the same. Edit colors first."
msgstr "Warna dan warna label sama. Edit warna lebih dulu."
#: ecolorutils.cpp:344
msgid "Save scheme as:"
msgstr "Simpan skema sebagai:"
#: ecolorutils.cpp:344
msgid "New scheme"
msgstr "Skema baru"
#: efontdialog.cpp:200
msgid "Select font..."
msgstr ""

View File

@ -1,205 +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 <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-04 12:37+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ecolorconf.cpp:131
msgid "Colors and fonts settings"
msgstr ""
#: ecolorconf.cpp:136
msgid "Default colors"
msgstr ""
#: ecolorconf.cpp:138
msgid "Color"
msgstr ""
#: ecolorconf.cpp:143
msgid "Label color"
msgstr ""
#: ecolorconf.cpp:148
msgid "Selection color"
msgstr ""
#: ecolorconf.cpp:153
msgid "Selection text color"
msgstr ""
#: ecolorconf.cpp:158
msgid "Off color"
msgstr ""
#: ecolorconf.cpp:163
msgid "Highlight color"
msgstr ""
#: ecolorconf.cpp:168
msgid "Highlight label color"
msgstr ""
#: ecolorconf.cpp:173
msgid "Text color"
msgstr ""
#: ecolorconf.cpp:178
msgid "Background"
msgstr ""
#: ecolorconf.cpp:183
msgid "Text background"
msgstr ""
#: ecolorconf.cpp:190
msgid "Tooltips"
msgstr ""
#: ecolorconf.cpp:193
msgid "Tooltip color"
msgstr ""
#: ecolorconf.cpp:198
msgid "Tooltip text color"
msgstr ""
#: ecolorconf.cpp:203 ecolorconf.cpp:252
msgid "Enable effects"
msgstr ""
#: ecolorconf.cpp:204
msgid "Enabled"
msgstr ""
#: ecolorconf.cpp:205 ecolorconf.cpp:254
msgid "Effect type:"
msgstr ""
#: ecolorconf.cpp:207 ecolorconf.cpp:256
msgid "None"
msgstr ""
#: ecolorconf.cpp:208 ecolorconf.cpp:257
msgid "Animation"
msgstr ""
#: ecolorconf.cpp:209 ecolorconf.cpp:258
msgid "Fading"
msgstr ""
#: ecolorconf.cpp:212 ecolorconf.cpp:262
msgid "Delay:"
msgstr ""
#: ecolorconf.cpp:215
msgid "Fonts"
msgstr ""
#: ecolorconf.cpp:218
msgid "Label font:"
msgstr ""
#: ecolorconf.cpp:226
msgid "Text font:"
msgstr ""
#: ecolorconf.cpp:233
msgid "Label size:"
msgstr ""
#: ecolorconf.cpp:236
msgid "Text size:"
msgstr ""
#: ecolorconf.cpp:239
msgid "Encoding:"
msgstr ""
#: ecolorconf.cpp:241 ecolorconf.cpp:244
msgid "..."
msgstr ""
#: ecolorconf.cpp:250
msgid "Menus"
msgstr ""
#: ecolorconf.cpp:253
msgid "Enable subwindow effects"
msgstr ""
#: ecolorconf.cpp:261
msgid "Speed:"
msgstr ""
#: ecolorconf.cpp:265
msgid "Others"
msgstr ""
#: ecolorconf.cpp:267
msgid "Enable MDI animation"
msgstr ""
#: ecolorconf.cpp:268
msgid "MDI opaque animation"
msgstr ""
#: ecolorconf.cpp:269
msgid "Enable images state effect"
msgstr ""
#: ecolorconf.cpp:276
msgid "&Save as..."
msgstr ""
#: ecolorconf.cpp:279
msgid "Ap&ply colors to all programs"
msgstr ""
#: ecolorconf.cpp:283
msgid "Schemes:"
msgstr ""
#: ecolorconf.cpp:293 efontdialog.cpp:226
msgid "&OK"
msgstr ""
#: ecolorconf.cpp:296
msgid "&Apply"
msgstr ""
#: ecolorconf.cpp:299 efontdialog.cpp:229
msgid "&Cancel"
msgstr ""
#: ecolorconf.cpp:314
msgid "Choose color"
msgstr ""
#: ecolorutils.cpp:306
msgid "Color and label color are the same. Edit colors first."
msgstr ""
#: ecolorutils.cpp:344
msgid "Save scheme as:"
msgstr ""
#: ecolorutils.cpp:344
msgid "New scheme"
msgstr ""
#: efontdialog.cpp:200
msgid "Select font..."
msgstr ""

View File

@ -1,204 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-04 12:37+0100\n"
"PO-Revision-Date: 2002-11-28 HO:MI+ZONE\n"
"Last-Translator: aabbvv <null@list.ru>\n"
"Language-Team: RUSSIAN <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=koi8-r\n"
"Content-Transfer-Encoding: 8bit\n"
#: ecolorconf.cpp:131
msgid "Colors and fonts settings"
msgstr "îÁÓÔÒÏÊËÁ Ã×ÅÔÁ É ÛÒÉÆÔÏ×"
#: ecolorconf.cpp:136
msgid "Default colors"
msgstr "ã×ÅÔÁ"
#: ecolorconf.cpp:138
msgid "Color"
msgstr "ã×ÅÔ"
#: ecolorconf.cpp:143
msgid "Label color"
msgstr "ã×ÅÔ ÎÁÄÐÉÓÉ"
#: ecolorconf.cpp:148
msgid "Selection color"
msgstr "ã×ÅÔ ×ÙÄÅÌÅÎÉÑ"
#: ecolorconf.cpp:153
msgid "Selection text color"
msgstr "ã×ÅÔ ×ÙÄÅÌÅÎÎÏÇÏ ÔÅËÓÔÁ"
#: ecolorconf.cpp:158
msgid "Off color"
msgstr "ïÔËÌÀÞÅÎÎÙÊ ÐÕÎËÔ"
#: ecolorconf.cpp:163
msgid "Highlight color"
msgstr "ðÏÄÓ×ÅÔËÁ"
#: ecolorconf.cpp:168
msgid "Highlight label color"
msgstr "ðÏÄÓ×ÅÞÅÎÎÙÊ ÛÒÉÆÔ"
#: ecolorconf.cpp:173
msgid "Text color"
msgstr "ã×ÅÔ ÔÅËÓÔÁ"
#: ecolorconf.cpp:178
msgid "Background"
msgstr "æÏÎ"
#: ecolorconf.cpp:183
msgid "Text background"
msgstr "æÏÎ ÔÅËÓÔÁ"
#: ecolorconf.cpp:190
msgid "Tooltips"
msgstr "ðÏÄÓËÁÚËÉ"
#: ecolorconf.cpp:193
msgid "Tooltip color"
msgstr "ã×ÅÔ ÐÏÄÓËÁÚÏË"
#: ecolorconf.cpp:198
msgid "Tooltip text color"
msgstr "ã×ÅÔ ÔÅËÓÔÁ ÐÏÄÓËÁÚÏË"
#: ecolorconf.cpp:203 ecolorconf.cpp:252
msgid "Enable effects"
msgstr "÷ËÌÀÞÉÔØ ÜÆÆÅËÔÙ"
#: ecolorconf.cpp:204
msgid "Enabled"
msgstr "÷ËÌÀÞÅÎÙ"
#: ecolorconf.cpp:205 ecolorconf.cpp:254
msgid "Effect type:"
msgstr "ôÉÐ ÜÆÆÅËÔÏ×"
#: ecolorconf.cpp:207 ecolorconf.cpp:256
msgid "None"
msgstr "îÅÔ"
#: ecolorconf.cpp:208 ecolorconf.cpp:257
msgid "Animation"
msgstr "áÎÉÍÁÃÉÑ"
#: ecolorconf.cpp:209 ecolorconf.cpp:258
msgid "Fading"
msgstr "ðÒÏÑ×ÌÅÎÉÅ"
#: ecolorconf.cpp:212 ecolorconf.cpp:262
msgid "Delay:"
msgstr "äÌÉÔÅÌØÎÏÓÔØ"
#: ecolorconf.cpp:215
msgid "Fonts"
msgstr "ûÒÉÆÔÙ"
#: ecolorconf.cpp:218
msgid "Label font:"
msgstr "ûÒÉÆÔ ÎÁÄÐÉÓÅÊ:"
#: ecolorconf.cpp:226
msgid "Text font:"
msgstr "ûÒÉÆÔ ÔÅËÓÔÁ:"
#: ecolorconf.cpp:233
msgid "Label size:"
msgstr "òÁÚÍÅÒ ÎÁÄÐÉÓÉ:"
#: ecolorconf.cpp:236
msgid "Text size:"
msgstr "òÁÚÍÅÒ ÔÅËÓÔÁ:"
#: ecolorconf.cpp:239
msgid "Encoding:"
msgstr "ëÏÄÉÒÏ×ËÁ:"
#: ecolorconf.cpp:241 ecolorconf.cpp:244
msgid "..."
msgstr ""
#: ecolorconf.cpp:250
msgid "Menus"
msgstr "íÅÎÀ"
#: ecolorconf.cpp:253
msgid "Enable subwindow effects"
msgstr "÷ËÌÀÞÉÔØ ÜÆÆÅËÔÙ ÐÏÄ-ÏËÏÎ"
#: ecolorconf.cpp:261
msgid "Speed:"
msgstr "óËÏÒÏÓÔØ:"
#: ecolorconf.cpp:265
msgid "Others"
msgstr "òÁÚÎÏÅ"
#: ecolorconf.cpp:267
msgid "Enable MDI animation"
msgstr "÷ËÌÀÞÉÔØ ÁÎÉÍÁÃÉÀ ÏËÏÎ-ÐÏÔÏÍËÏ×"
#: ecolorconf.cpp:268
msgid "MDI opaque animation"
msgstr "áÎÉÍÁÃÉÑ ÐÒÏÚÒÁÞÎÏÓÔÉ ÏËÏÎ-ÐÏÔÏÍËÏ×"
#: ecolorconf.cpp:269
msgid "Enable images state effect"
msgstr "÷ËÌÀÞÉÔØ ÜÆÆÅËÔÙ ÉÚÏÂÒÁÖÅÎÉÊ"
#: ecolorconf.cpp:276
msgid "&Save as..."
msgstr "óÏÈÒÁÎÉÔØ..."
#: ecolorconf.cpp:279
msgid "Ap&ply colors to all programs"
msgstr "ðÒÉÍÅÎÉÔØ Ã×ÅÔÁ ËÏ ×ÓÅÍ ÐÒÏÇÒÁÍÍÁÍ"
#: ecolorconf.cpp:283
msgid "Schemes:"
msgstr "óÈÅÍÙ:"
#: ecolorconf.cpp:293 efontdialog.cpp:226
msgid "&OK"
msgstr "&OK"
#: ecolorconf.cpp:296
msgid "&Apply"
msgstr "ðÒÉÍÅÎÉÔØ"
#: ecolorconf.cpp:299 efontdialog.cpp:229
msgid "&Cancel"
msgstr "ïÔÍÅÎÁ"
#: ecolorconf.cpp:314
msgid "Choose color"
msgstr "÷ÙÂÏÒ Ã×ÅÔÁ"
#: ecolorutils.cpp:306
msgid "Color and label color are the same. Edit colors first."
msgstr "ã×ÅÔÁ ÓÏ×ÐÁÄÁÀÔ, ÏÔÒÅÄÁËÔÉÒÕÊÔÅ ÉÈ"
#: ecolorutils.cpp:344
msgid "Save scheme as:"
msgstr "óÏÈÒÁÎÉÔØ ÓÈÅÍÕ ËÁË:"
#: ecolorutils.cpp:344
msgid "New scheme"
msgstr "îÏ×ÁÑ ÓÈÅÍÁ"
#: efontdialog.cpp:200
msgid "Select font..."
msgstr ""

View File

@ -1,212 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: ecolorconf 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-04 12:37+0100\n"
"PO-Revision-Date: 2002-04-21 14:50+0200\n"
"Last-Translator: Martin Pekar <cortex@nextra.sk>\n"
"Language-Team: Slovak <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ecolorconf.cpp:131
msgid "Colors and fonts settings"
msgstr "Nastavenie farieb a písiem"
#: ecolorconf.cpp:136
msgid "Default colors"
msgstr "Základné farby"
#: ecolorconf.cpp:138
msgid "Color"
msgstr "Farba"
#: ecolorconf.cpp:143
msgid "Label color"
msgstr "Farba menovky"
#: ecolorconf.cpp:148
msgid "Selection color"
msgstr "Farby výberu"
#: ecolorconf.cpp:153
msgid "Selection text color"
msgstr "Farba textu vo výbere"
#: ecolorconf.cpp:158
msgid "Off color"
msgstr "Farba vypnutia"
#: ecolorconf.cpp:163
msgid "Highlight color"
msgstr "Farba zvýraznenia"
#: ecolorconf.cpp:168
msgid "Highlight label color"
msgstr "Farba textu vo zvýraznení"
#: ecolorconf.cpp:173
msgid "Text color"
msgstr "Farba textu"
#: ecolorconf.cpp:178
msgid "Background"
msgstr "Pozadie"
#: ecolorconf.cpp:183
msgid "Text background"
msgstr "Farba pozadia textu"
#: ecolorconf.cpp:190
msgid "Tooltips"
msgstr "Bublinky"
#: ecolorconf.cpp:193
msgid "Tooltip color"
msgstr "Farba bublinky"
#: ecolorconf.cpp:198
msgid "Tooltip text color"
msgstr "Farba textu v bublinke"
#: ecolorconf.cpp:203 ecolorconf.cpp:252
msgid "Enable effects"
msgstr "Povoliť efekty"
#: ecolorconf.cpp:204
msgid "Enabled"
msgstr "Povolené"
#: ecolorconf.cpp:205 ecolorconf.cpp:254
msgid "Effect type:"
msgstr "Typ efektu:"
#: ecolorconf.cpp:207 ecolorconf.cpp:256
msgid "None"
msgstr "Žiadny"
#: ecolorconf.cpp:208 ecolorconf.cpp:257
msgid "Animation"
msgstr "Animácia"
#: ecolorconf.cpp:209 ecolorconf.cpp:258
msgid "Fading"
msgstr "Blednutie"
#: ecolorconf.cpp:212 ecolorconf.cpp:262
msgid "Delay:"
msgstr "Oneskorenie:"
#: ecolorconf.cpp:215
msgid "Fonts"
msgstr "Písma"
#: ecolorconf.cpp:218
msgid "Label font:"
msgstr "Písmo menovky:"
#: ecolorconf.cpp:226
msgid "Text font:"
msgstr "Písmo textu:"
#: ecolorconf.cpp:233
msgid "Label size:"
msgstr "Veľkosť menovky:"
#: ecolorconf.cpp:236
msgid "Text size:"
msgstr "Veľkosť textu"
#: ecolorconf.cpp:239
msgid "Encoding:"
msgstr "Kódovanie:"
#: ecolorconf.cpp:241 ecolorconf.cpp:244
msgid "..."
msgstr ""
#: ecolorconf.cpp:250
msgid "Menus"
msgstr "Ponuky"
#: ecolorconf.cpp:253
msgid "Enable subwindow effects"
msgstr "Použiť efekty na podokná"
#: ecolorconf.cpp:261
msgid "Speed:"
msgstr "Rýchlosť:"
#: ecolorconf.cpp:265
msgid "Others"
msgstr "Ostatné"
#: ecolorconf.cpp:267
msgid "Enable MDI animation"
msgstr "Povoliť MDI animáciu"
#: ecolorconf.cpp:268
msgid "MDI opaque animation"
msgstr "Obrysová animácia MDI"
#: ecolorconf.cpp:269
msgid "Enable images state effect"
msgstr "Použiť stavový efekt obrázkov"
#: ecolorconf.cpp:276
msgid "&Save as..."
msgstr "&Uložiť ako..."
#: ecolorconf.cpp:279
msgid "Ap&ply colors to all programs"
msgstr "Pou&žiť farby pre všetky programy"
#: ecolorconf.cpp:283
msgid "Schemes:"
msgstr "Schémy:"
#: ecolorconf.cpp:293 efontdialog.cpp:226
msgid "&OK"
msgstr "&OK"
#: ecolorconf.cpp:296
msgid "&Apply"
msgstr "&Použiť"
#: ecolorconf.cpp:299 efontdialog.cpp:229
msgid "&Cancel"
msgstr "&Zrušiť"
#: ecolorconf.cpp:314
msgid "Choose color"
msgstr "Zvoľte farbu"
#: ecolorutils.cpp:306
msgid "Color and label color are the same. Edit colors first."
msgstr ""
#: ecolorutils.cpp:344
msgid "Save scheme as:"
msgstr "Uložiť schému ako:"
#: ecolorutils.cpp:344
msgid "New scheme"
msgstr "Nová schéma"
#: efontdialog.cpp:200
msgid "Select font..."
msgstr ""
#~ msgid "Saves active scheme under new name."
#~ msgstr "Uloží aktívnu schému pod novým menom."
#~ msgid "Colors will be applied for all programs."
#~ msgstr "Farby budú aplikované na všetky programy."
#~ msgid "These schemes are available."
#~ msgstr "Tieto schémy sú dostupné."

View File

@ -1,203 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: ECOLORCONF 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-02-04 12:37+0100\n"
"PO-Revision-Date: 2002-11-27 04:15+0100\n"
"Last-Translator: Dejan Lekic <dejan@nu6.org>\n"
"Language-Team: LINUKS.org T.T. <i18n@linuks.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ecolorconf.cpp:131
msgid "Colors and fonts settings"
msgstr "Подешавање боја и фонтова"
#: ecolorconf.cpp:136
msgid "Default colors"
msgstr "Дифолт боје"
#: ecolorconf.cpp:138
msgid "Color"
msgstr "Боја"
#: ecolorconf.cpp:143
msgid "Label color"
msgstr "Боја наслова"
#: ecolorconf.cpp:148
msgid "Selection color"
msgstr "Боја селекције"
#: ecolorconf.cpp:153
msgid "Selection text color"
msgstr "Боја селектованог текста"
#: ecolorconf.cpp:158
msgid "Off color"
msgstr "Без боје"
#: ecolorconf.cpp:163
msgid "Highlight color"
msgstr "Боја означења"
#: ecolorconf.cpp:168
msgid "Highlight label color"
msgstr "Боја означеног текста"
#: ecolorconf.cpp:173
msgid "Text color"
msgstr "Боја текста"
#: ecolorconf.cpp:178
msgid "Background"
msgstr "Позадина"
#: ecolorconf.cpp:183
msgid "Text background"
msgstr "Позадина текста"
#: ecolorconf.cpp:190
msgid "Tooltips"
msgstr "Тултипси"
#: ecolorconf.cpp:193
msgid "Tooltip color"
msgstr "Боја тултипса"
#: ecolorconf.cpp:198
msgid "Tooltip text color"
msgstr "Боја текста тултипса"
#: ecolorconf.cpp:203 ecolorconf.cpp:252
msgid "Enable effects"
msgstr "Укључи ефекте"
#: ecolorconf.cpp:204
msgid "Enabled"
msgstr "Омогућен"
#: ecolorconf.cpp:205 ecolorconf.cpp:254
msgid "Effect type:"
msgstr "Тип ефекта:"
#: ecolorconf.cpp:207 ecolorconf.cpp:256
msgid "None"
msgstr "Никакав"
#: ecolorconf.cpp:208 ecolorconf.cpp:257
msgid "Animation"
msgstr "Анимација"
#: ecolorconf.cpp:209 ecolorconf.cpp:258
msgid "Fading"
msgstr "Фејдинг"
#: ecolorconf.cpp:212 ecolorconf.cpp:262
msgid "Delay:"
msgstr "Пауза:"
#: ecolorconf.cpp:215
msgid "Fonts"
msgstr "Фонтови"
#: ecolorconf.cpp:218
msgid "Label font:"
msgstr "Фонт наслова:"
#: ecolorconf.cpp:226
msgid "Text font:"
msgstr "Фонт текста:"
#: ecolorconf.cpp:233
msgid "Label size:"
msgstr "Величина наслова:"
#: ecolorconf.cpp:236
msgid "Text size:"
msgstr "Величина текста:"
#: ecolorconf.cpp:239
msgid "Encoding:"
msgstr "Енкодинг:"
#: ecolorconf.cpp:241 ecolorconf.cpp:244
msgid "..."
msgstr ""
#: ecolorconf.cpp:250
msgid "Menus"
msgstr "Менији"
#: ecolorconf.cpp:253
msgid "Enable subwindow effects"
msgstr "Укључи сабвиндов ефекте"
#: ecolorconf.cpp:261
msgid "Speed:"
msgstr "Брзина:"
#: ecolorconf.cpp:265
msgid "Others"
msgstr "Остали"
#: ecolorconf.cpp:267
msgid "Enable MDI animation"
msgstr "Укључи МДИ анимације"
#: ecolorconf.cpp:268
msgid "MDI opaque animation"
msgstr "МДИ провидна анимација"
#: ecolorconf.cpp:269
msgid "Enable images state effect"
msgstr "Укључи ефекат статичне слике"
#: ecolorconf.cpp:276
msgid "&Save as..."
msgstr "&Сними као..."
#: ecolorconf.cpp:279
msgid "Ap&ply colors to all programs"
msgstr "П&римени боје на све програме"
#: ecolorconf.cpp:283
msgid "Schemes:"
msgstr "Шеме:"
#: ecolorconf.cpp:293 efontdialog.cpp:226
msgid "&OK"
msgstr "&ОК"
#: ecolorconf.cpp:296
msgid "&Apply"
msgstr "&Примени"
#: ecolorconf.cpp:299 efontdialog.cpp:229
msgid "&Cancel"
msgstr "&Одустани"
#: ecolorconf.cpp:314
msgid "Choose color"
msgstr "Изабери боју"
#: ecolorutils.cpp:306
msgid "Color and label color are the same. Edit colors first."
msgstr "Боја и боја наслова су исте. Прво измените боје."
#: ecolorutils.cpp:344
msgid "Save scheme as:"
msgstr "Сними шему као:"
#: ecolorutils.cpp:344
msgid "New scheme"
msgstr "Нова шема"
#: efontdialog.cpp:200
msgid "Select font..."
msgstr ""