Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
instead of the add-on hack it was.
This also fixes a lot of problems with saving of config.
|
|
when saving/loading to/from string representation.
This is needed for the next commit.
|
|
for resources which need to work with localised strings.
|
|
Loading of an init file with the new manager works ok. Saving and restarting is still not
completed.
This touches many files because i removed the alternative name of resources. Unlike Xrm, lua does
not have native support for alt names. It should be fairly easy to add them, but I think that is
unnecessary and would be confusing.
|
|
names
|
|
- comment out automatic upgrading of init file as we don't have that yet and it was causing
problems
- rename default init file to ~/.fluxbox/init2 to reflect the change of syntax
- comment out exception handling blocks in main(): it is easier to debug when the program
terminates when an unhandled exception occurs
|
|
|
|
|
|
|
|
this reduces typing and it makes more sense in lua, since there the resources are implemented as
hierarchical tables and the topmost table has to be handled a bit specially.
|
|
|
|
|
|
|
|
|
|
by outsourcing the conversion from string/lua to the specific type (and back) to a separate
class. This change touches a lot of files because the interface of FbTk::Resource changed
slightly. However, the changes are minor.
|
|
for various values of X.
|
|
I added a new class, LResourceManager, which should handle loading and saving of resources like
the old ResourceManager, only it does that with the help of lua. I moved the common features of
the two managers (interface + a few functions) to a common base class ResourceManager_base. I
augmented the Resource_base class with two new functions (setFromLua and pushToLua) which are
used by the lua RM instead of getString and setFromString.
Parts of the new RM are written in lua. To avoid loading scripts from a file at runtime I decided
to link compiled lua code straight into the executable. For this purpose I created a small script
which converts a binary file into a declaration of a C array of bytes.
|
|
function
|
|
|
|
|
|
parameter
|
|
|
|
It's impossible to do this without C++0x features (we need std::exception_ptr).
|
|
See how variadic templates are good. They enabled me to write those four functions as one.
|
|
It was pretty underused anyway. I was just lazy to write a proper destructor.
|
|
|
|
std::function is superior, but not supported on old compilers
|
|
Added some polish around them and, to mark this special occasion, moved them out of the SigImpl
namespace.
PS: This partially reverts commit 0775350fee345e37fb59835dda4d85664346b606, since I had to
reintroduce ReturnType template parameter, because it will be used in lua. But Signal classes
remain without the ReturnType, because I still cannot imagine how would it be used.
|
|
copied from conky (http://conky.sf.net) and relicensed. Since I am the person who wrote it in
the first place there should not be a problem with licence conversion.
|
|
|
|
|
|
and remove a an "almost" copy constructor (almost, because it takes a non-const reference
parameter) which was useless.
|
|
Prior to this patch, TextDialog did not handle parentrelative labels;
borrowing code from OSDWindow, now TextDialog properly handles this.
Eventually, I plan to combine the good parts of TextDialog and OSDWindow
into OSDWindow, and then let TextDialog derive from OSDWindow... but for
now, here's the band-aid fix for the issue without the refactorization.
|
|
TextDialog windows (such as 'set title', or 'edit clock format') now
properly render their titlebar to match the current style. Previously,
the titlebar font settings were controlled by window.font.*, and this
became apparent because window.font.effect needed to be set to put
'halo' on the titlebar of these TextDialogs. However,
window.font.effect controls the effect on the text within the editbox on
these as well, having these set in the same location is far from
desirable. Specifically because the TextDialog essentially emulates the
titlebar of other windows. So, after this change, window.font.effect
still controls the text in the editbox, but the titlebar area is themed
as the titlebars of other windows.
Text justification of titlebar and border width, is now respected in
TextDialog. Also, previously the edit box was sized in an odd way; one
which left part of the window actually undrawn (so you'd get artifacts
from whatever happened to be on the screen in that position when it
opened); this has been addressed.
TextDialogs, rather than going to the center of the entire desktop, now
center on the _current head_, which prevents the awful positioning where
half of the window is on one screen and half is on another.
Lastly, when hovering your mouse over the iconbar button for a window
with a title that's too wide to fit on the button, a tooltip is
displayed. This tooltip themes itself to match the button, however it
wasn't using the theme properly (similarly to how TextDialog was)... and
as such, also wasn't using the proper font effects. This has been
addressed just as it was for the TextDialog.
|
|
previously, the tracker disconnected itself only when the caller passed withTracker = true to the
leave() function. However, the default value was for the parameter was false.
Non disconnecting from signal when stopping tracking creates very dangerous situation because the
signal still holds a pointer to the tracker. This resulted in a segfault when exiting fluxbox,
because the tracker (FluxboxWindow) got destroyed before the signal (BScreen::focusedWindowSig),
and the signal was using an invalid pointer when it tried to disconnect itself from the tracker.
Instead of setting withTracker to true by default or changing all invocations of leave(), I
decided to make the tracker disconnect itself unconditionally because I could not find a use case
for the opposite behaviour.
PS: This message is in fact longer than the actual commit.
|
|
this marks the completion of the transition to FbTk::Signal
|
|
|
|
|
|
|
|
Also, I spotted a potential bug in the code. I marked the place with XXX. Someone should take a
look at that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|