Commit graph

5797 commits

Author SHA1 Message Date
Pavel Labath
2073ae12a4 Convert FbWinFrame::frameExtentSig 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.
2011-05-10 13:00:46 +02:00
Pavel Labath
ff49160b12 Convert FluxboxWindow::hintSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
6a0280aa4d Convert FluxboxWindow::layerSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
e53d14e910 Convert FluxboxWindow::stateSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
ad0951ca53 Remove Observers from testSignal.cc 2011-05-10 13:00:46 +02:00
Pavel Labath
4f89009c9e Convert FluxboxWindow::workspaceSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
Pavel Labath
ae68b7f7cd Convert Focusable::orderSig,addSig,removeSig,resetSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
Pavel Labath
19ac8e40d8 Added FbTk::MemFunBind - a functor which binds all arguments of a function 2011-05-10 13:00:45 +02:00
Pavel Labath
6cfa087536 Make FbTk::MemFun[12] inherit from std::unary/binary_function
this way, they can be used as inputs to std::bind1st and friends
2011-05-10 13:00:45 +02:00
Pavel Labath
2024f258b6 Make FbTk::MemFun[0-3] use their ResultType parameter
previously they declared the parameter, but ignored the return value of the member function. I've
changed it so they pass the return value, if it is not void. MemFunSelectArg didn't have the
ReturnType template parameter, so I added it for consistency. Since I was already editing the, I
made all the operator()s const.
2011-05-10 13:00:45 +02:00
Pavel Labath
129bac1e0f Convert Focusable::dieSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
Pavel Labath
0775350fee Last round of simplification of Signal/Slot classes
- merged all the common stuff from 0,1,2,3 argument versions into one common base class
- removed ReturnType template parameter as it was instantiated with "void" everywhere and the
  current ignores the return value of the callbacks anyway
2011-05-10 13:00:45 +02:00
Pavel Labath
bef2039d2c Don't crash when a slot is deregistered in the middle of signal processing
this was possible (and used) with FbTk::Subject, but the implemetation of FbTk::Signal didn't
support it, which made it impossible to continue with conversion.
2011-05-10 13:00:45 +02:00
Pavel Labath
144d716a42 Simplify Slot.hh
Replace CallbackHolder, FunctorHolder and SlotHolder with a (smaller) set of polymorphic classes.
SignalHolder now stores a (smart) pointer to the class.
2011-05-10 13:00:45 +02:00
Pavel Labath
4b47675441 Make RefCount<> more sensible
the previous version of operator*() made no sense. E.g., it violated the invariant
(*ptr).foo <=> ptr->foo. The dereferencing operator now returns a reference to the pointed-to
object, rather than a pointer to it.

I also added a bool conversion operator, which can be used in testing the NULL-ness of the
pointer. Anyone wondering if that could be done in a simpler way is encouraged to read
<http://www.artima.com/cppsource/safebool.html>.

And, finally, I removed the mutable flag from the m_data member, since it does not need it.
2011-05-10 13:00:45 +02:00
Pavel Labath
fa15400cc2 Remove the Observer dependency from FbTk::Menu 2011-05-10 13:00:45 +02:00
Pavel Labath
f7d7dfd2a8 Convert FbTk::Theme::reconfigSig and friends to the new Signal system
I removed the const versions of reconfigSig() in the process since FbTk::Signal has no const
methods anyway.
2011-05-10 13:00:45 +02:00
Pavel Labath
54230c9a44 Simplify FbTk::Signal template classes a bit
basically, i just got rid of Signal[0-3] classes and moved their contents to the appropriate
specialization of FbTk::Signal

also, this fixes the
no matching function for call to 'MemFunIgnoreArgs(FbTk::Signal<void, FbTk::SigImpl::EmptyArg,
FbTk::SigImpl::EmptyArg, FbTk::SigImpl::EmptyArg>&, void (FbTk::SigImpl::Signal0<void>::*)())'
error i had in the following commit.
2011-05-10 13:00:44 +02:00
Pavel Labath
d5bd23e41a Fix make install failure with some autotools versions
apparently, some versions of autotools don't know about $(builddir) variable. I replaced it with
".".
2011-05-09 19:51:11 +02:00
nacitar sevaht
1dacf57d20 Can check CARDINAL properties in CLIENT PATTERNS
Introduces a new member function, FbWindow::cardinalProperty()

This change also changes other code that previously used
FbWindow::property() to do the same thing as the new function; this
reduces code duplication.

There are still some bits of code (Ewmh.cc, extractNetWmIcon()) that use
FbWindow::property() to retrieve XA_CARDINAL values, but as the new
method is designed for getting a _single_ property, and that code uses
FbWindow::property() to retrieve the number of values present, and then
grab all of them; it's a different use case.  I opted to not try to make
cardinalProperty() into some monolithic all-purpose cardinal method;
FbWindow::property() works just fine for that.

This change also adds an optional (default=NULL) boolean to
FbWindow::textProperty and friends that allows the caller to determine
whether or not a value was actually retrieved.  This was necessary for
integrating FbWindow::cardinalProperty with the codebase, and it seemed
to fit with FbWindow::textProperty as well.  Prior to this change, if
you got a return value of "", you wouldn't know if you successfully
retrieved the value which happened to be blank, or if you failed to
retrieve the value.  Now, you can pass the address of a boolean if you
so choose in order to differentiate these situations; the same applies
to the new FbWindow::cardinalProperty().
2011-05-08 07:48:03 +02:00
nacitar sevaht
2f166eb4ae fluxbox-remote now properly returns exit status
The previous check relied upon the (undocumented) return value of
XChangeProperty to determine the exit status; at least, on my gentoo system,
the function seems to return 1 even when it fails to change the property
due to contrived, and invalid, parameters.  However, setting an error
handler allows proper detection of this case.  So, now the return status
properly indicates whether or not the property was changed (but not
whether fluxbox liked the command!).
2011-05-08 07:47:02 +02:00
Pavel Labath
de2cca8988 Include src/tests in the distribution tarball
and add a configure option for building them (default: off).
This patch fixes an error when configuring the tarball, where configure complained it cannot find
src/tests/Makefile.in.
2011-05-07 12:39:04 +02:00
Pavel Labath
127ec08ae6 Fix "comparison between signed and unsigned" warning 2011-05-04 20:33:07 +02:00
Pavel Labath
7618494341 Add backup and vim swap files to .gitignore 2011-05-04 20:32:43 +02:00
Pavel Labath
55ee0b72a3 Woops, forgot to add the file. 2011-04-27 14:17:07 +02:00
Pavel Labath
38b678e4cb Make sure `make distcheck' is successful
- added rmdir commands to uninstall rules of all Makefiles under data/styles
- added \n at the end of files which had none
2011-04-27 12:10:12 +02:00
Mathias Gumz
be90145227 bugfix: do not warp workspaces with only one workspace 2011-04-25 11:33:20 +02:00
Pavel Labath
86c9b100f3 Fix VPATH builds 2011-04-18 08:50:44 +02:00
Pavel Labath
8b6943ab1c Fix a couple of "comparison between signed and unsigned" warnings 2011-04-15 21:36:04 +02:00
David Coppa
1237f83207 fixed typo in 'MerleyKay' style, closes #3286430 2011-04-14 15:10:28 +02:00
David Coppa
870d4d02ee bugfix: use 'unsigned long' to feed XChangeProperty, closes #3285968
old code crashed on sparc64, pid_t seems to be 32bit on that platform.
2011-04-14 15:08:02 +02:00
skizzhg
fbf5ce8b30 Changed fbsetbg's tips to the new behaviour. 2011-04-11 17:46:26 +02:00
Pavel Labath
a83cedf37e Fix a pair of warnings reported by clang 2011-04-11 08:37:58 +02:00
Pavel Labath
91958279d3 Menu.cc: send debug output to cerr, make the output more sensible 2011-04-11 08:31:52 +02:00
Gediminas Liktaras
b1d70e2c92 bugfix: return 'height' if container is rotated vertically, closes #3195728
iconbar.iconWidth property was ignored due this bug.
2011-04-03 13:20:35 +02:00
Pavel Labath
40f8c35084 Fix assorted typos in manpages 2011-04-03 10:57:43 +02:00
slakmagik
906166f42d make XMESSAGE a variable and use it consistently
Previously, gxmessage was getting substituted in one place and not
another.
2011-03-29 08:44:51 +02:00
slakmagik
a8583b79ae avoid trailing spaces between app and closing }
Add a few lines of code to prevent a few spaces in some menu output.
'{$app $options}' would expand to '{app }' if no options were set.

Also, while scattered throughout, in this particular spot the
unnecessary braces around some of the variables (and not around some
others) and inside flux's braces could be very visually confusing and
lead to editing errors, so removed those.
2011-03-29 08:44:51 +02:00
slakmagik
0fbb2cb73c separate functions and main code
Transpose one function from main to the rest of the functions and one
block from the top of the script to the top of main. Add an 'End
functions' comment.
2011-03-29 08:44:51 +02:00
slakmagik
2034e5ef44 add the configuration file equivalent of '-in' 2011-03-29 08:44:51 +02:00
slakmagik
e312f35d1a silence cmp
cmp's '-s' flag is POSIX - if it's as portable as that's supposed to
mean, that might be used instead.
2011-03-29 08:44:51 +02:00
Mesutcan Kurt
2790b996f3 updated turkish translations 2011-03-28 09:47:20 +02:00
Daniel Diaz
d28e105075 compile fix: added <cstdlib> to provide declaration for 'size_t' (gcc-4.6.x likes it that way) 2011-03-28 09:06:22 +02:00
Mathias Gumz
d4f7f17330 compile fix: arguments must match declaration
Sun CC++ 5.11 complaint on linking about missing symbols 'nextWorkspace()',
'prevWorkspace()' etc.
2011-03-23 18:45:34 +01:00
Mathias Gumz
745fb8e71c removed useless code 2011-03-23 18:41:48 +01:00
Mathias Gumz
010ff6b795 configure fix: sstream test needs math.h, thus we should test math.h before
bubbled up on solaris10, had to install 'math-header'.
2011-03-23 18:41:26 +01:00
Mathias Gumz
21022a1952 cosmetics 2011-03-23 12:03:17 +01:00
Mathias Gumz
9086ccafbe compile fix: sunCC again, wants a compile time constant for arrays 2011-03-23 12:03:08 +01:00
Mathias Gumz
e850b01919 compile fix: sunCC 5.11 (sunstudio 12) compiles and links again
biggest change: renaming of 'class Layer' to 'class ResourceLayer' in
Layer.hh to handle complaints about 'ambiguous Layer: Layer or FbTk::Layer'.
'ResourceLayer' sounds crappy, but that was the best I could come
up with right now.
2011-03-23 12:02:15 +01:00
Mathias Gumz
7ece90ad4f merge 2011-03-19 20:12:05 +01:00