Commit graph

5488 commits

Author SHA1 Message Date
Mathias Gumz
61bf564718 removed useless code
'tools' is transformed to lower case some lines above,
'm_tools_ is a copy of the lower cased 'tools'.
2010-09-15 12:44:14 +02:00
Mathias Gumz
0beda162d4 code deduplication by using <algorithm> and FbTk/STLUtil.hh 2010-09-15 12:43:30 +02:00
Mathias Gumz
12e1ef7826 code deduplication by using <algorithm> and FbTk/STLUtil.hh 2010-09-15 02:07:09 +02:00
Mathias Gumz
ba316aa18a code cleanup, missing commit for 2b62cf9733 2010-09-15 01:27:27 +02:00
Mathias Gumz
52f614b598 bugfix: 'reset' nr_shapes to '0' after last instance of 'Shape' 2010-09-15 01:23:56 +02:00
Mathias Gumz
2b62cf9733 cleanup and code deduplication
* ClientPattern.cc: make compiler happy (complaints about XPROP not handled in switch)
* FbTk/FbPixmap.cc FbTk/StringUtil.cc: signed vs unsigned
* FbTk/FbString.cc: missing return
* WinClient.cc: create atoms only once; use helper function
* Window.cc: use a helper function
2010-09-15 01:22:01 +02:00
Mathias Gumz
c6047e9eba use one array instead of two to hold both 'names' and 'atoms' for the rootwindow 2010-09-14 16:59:05 +02:00
Mathias Gumz
f39bcbd93c bugfix: create the corner pixmaps only once per screen
for each window (windows, menue etc) the initCorners() function of
FbTk/Shape.cc was called (which is ok). On each call the corner pixmaps
(of the Screen the window belongs to) were created and destroyed the
formerly created pixmaps. this is not needed.
2010-09-14 16:58:08 +02:00
Mathias Gumz
75b9a4ed72 bugfix: free the shape-corners on the last used 'Shape'
the global 's_corners' vector was still used on an application shutdown
(including ctrl-c SIGINT). depending on when 's_corners' was created on
the stack this could lead to an exception ('pure virtual called') while
trying to free the 'FbPixmaps' without having a valid
'FbTk::Application::instance()' left.
2010-09-14 16:54:08 +02:00
Mathias Gumz
36893ac7f9 bugfix: small typo in last cleanup prevented loading workspace names 2010-09-14 12:24:20 +02:00
Mathias Gumz
b10d58588a cosmetic code cleaning
* use FbTk::StringUtil::number2String() to avoid 'sprintf'
* use FbTk::Util::clamp()
* use FbTk::STLUtil::destroyAndClear()
* whitespaces
2010-09-13 22:07:10 +02:00
Mathias Gumz
deb6a1ebf4 code simplification
we do not need a std::map just to store an attribute on an AtomHandler,
it makes housekeeping just more annoying.
2010-09-13 22:04:24 +02:00
Mathias Gumz
f6af17aa58 code simplification 2010-09-13 21:59:09 +02:00
Mathias Gumz
24e4e98dbe updated config version to '13' and adjusted 'fluxbox-update_configs' accordingly
our users should migrate seamlessly to our new windows-cycling behaviour
without losing their current way of doing things. so, 'fluxbox-update_configs'
tries its best to add '(workspace=[current])' wherever it looks like a valid
place for it. such changed lines are marked by '!! FBCV13' at the end and can
be easily spotted in case the updater got it wrong.

addtional changes:

* added '-check' to 'fluxbox-update_configs' to check the version number in
  '~/.fluxbox/init' vs. the version number of 'fluxbox-update_configs'

* moved the update-code for each version into its own function, easier
  housekeeping
2010-09-11 22:04:15 +02:00
Mathias Gumz
51f054e777 added '(workspace=[current])' to our default keys
commit 882a50fe1d removed the hardcoded limit to
cycle to windows on other workspaces, though it was and IS a good default
behaviour. if users do not want this (they want to cycle to windows on other
workspaces), they should explicitly avoid '(workspace=[current])' in their
keysfile.
2010-09-11 21:53:55 +02:00
Mathias Gumz
faa4c97888 added 'SetXProp' action and (@PROP=foo) clientpattern
these two allow 'tagging' of arbitrary windows with 'tags' (or 'labels'). such 'tagged' windows can then be used in ':NextWindow (@PROP=foo)' commands to quickly cycle through a subset of available windows.
since the 'tags' are applied as real xproperties to a window they survive a restart of fluxbox or even another windowmanager. the user can also set the tags by using xprop(1).

the next step regarding the UI should be to visualize the tags of a window.
2010-09-11 17:09:07 +02:00
Mathias Gumz
4e2c7e2167 moved helper struct TextPropPtr into anonymous namespace 2010-09-10 16:36:17 +02:00
Mathias Gumz
a6ed9498cc code cleanup
* moved code from public API to internals
* avoid code duplication ( while(!m_terms.empty()) ...)
* cosmetic '(*it)->' vs 'term.'
2010-09-10 16:35:49 +02:00
Mathias Gumz
882a50fe1d removed hardcoded limitation to cycle/focus windows on all workspaces
reasons:

* fixes #1732115, allows to have chatwindows on another workspaces and reach them via :NextWindow (urgent=yes)
* old behavior can be achieve by using the (workspace=[current]) pattern
2010-09-10 13:32:47 +02:00
Mathias Gumz
8a7c117153 disabled potentially dead code 2010-09-09 23:24:47 +02:00
Mathias Gumz
ecdaba2874 simpler code 2010-09-09 23:24:27 +02:00
Mathias Gumz
ffd5f28072 removed dead code 2010-09-09 23:23:52 +02:00
Mathias Gumz
7fdb0676a7 bugfix: initialize the Shape of a menu AFTER we created the window for the menu
on startup a lot of 'Fluxbox: X Error: BadDrawable (invalid Pixmap ...)' occured.
this was caused by using an empty 'Window' to create the shape.
2010-09-09 23:23:33 +02:00
Mathias Gumz
2b9a38cba5 minor cleanup 2010-09-09 15:33:34 +02:00
Mathias Gumz
534db1d409 reduced 'switch/case' and 'else if' hell a little bit 2010-09-09 15:33:12 +02:00
Mathias Gumz
77f39235cf added FbTk::Util::clamp() and simplified related code 2010-09-09 15:31:54 +02:00
Mathias Gumz
1657374940 use FbTk apis instead of raw xlib calls 2010-09-09 12:48:19 +02:00
Mathias Gumz
e685117941 simpler to use FbTk/Timer api 2010-09-09 12:47:38 +02:00
Mathias Gumz
82d0de9ef4 cosmetic 2010-09-08 22:31:41 +02:00
Mathias Gumz
8a08110f19 simpler way of expressing 'Singleton' for 'FbAtoms' 2010-09-08 22:09:06 +02:00
Mathias Gumz
dc5a105c3e fixed code duplication 2010-09-08 21:52:13 +02:00
Mathias Gumz
7a149626e6 improved 'escapeRememberChars()' routine by traversing the string only once
removed obsolete 'getuint()' function
2010-09-08 21:45:33 +02:00
Mathias Gumz
48cc67965b avoid code duplication 2010-09-08 21:43:38 +02:00
Mathias Gumz
b76be98227 improved extract*Number functions from FbTk/StringUtil.cc 2010-09-08 21:42:48 +02:00
Mathias Gumz
6ecfa0ef3e cosmetic fix: looks like a copyNpaste issue 2010-09-08 20:48:37 +02:00
Mathias Gumz
26c1cd0cee code simplification 2010-09-08 20:48:01 +02:00
Mathias Gumz
08bd29d0d8 updated ChangeLog 2010-09-08 20:20:41 +02:00
Mathias Gumz
f4fab105ff avoid code duplication 2010-09-08 20:18:28 +02:00
Mathias Gumz
64afa48bb3 removed unused code 2010-09-08 20:17:36 +02:00
Mathias Gumz
690d926ac4 introduced FbTk::BidiString
a 'BidiString' holds both the logical content and the visual reordered
version of the content of a string. this helps to reduce the number of
calls to reorder the string before drawing it (as introduced in the patch
from Ken Bloom) and to be more consistent in menus and textboxes (drawing
cursors and underlining text).
2010-09-08 20:17:21 +02:00
Mathias Gumz
1e8fe2bc14 removed redundant if-statement 2010-09-08 11:19:49 +02:00
Mathias Gumz
df2f51b7b6 updated 'Changelog' 2010-09-05 11:03:46 +02:00
Mathias Gumz
8feb0b8c83 avoid constructing new strings implicit 2010-09-05 10:49:05 +02:00
Mathias Gumz
83656fc0e8 cosmetic 2010-09-05 10:47:12 +02:00
Mathias Gumz
63f9c8c1a2 reuse temporary memory for reencoding / reordering fribidi-strings 2010-09-05 10:47:01 +02:00
Mathias Gumz
60c92b96f2 added info about 'BIDI' support to 'fluxbox -info' 2010-09-05 08:49:13 +02:00
Ken Bloom
ea98db4140 added support for bidirectional text 2010-09-04 15:01:33 +02:00
Mathias Gumz
b1b2f47e7d minor code simplification 2010-09-04 14:41:39 +02:00
Mathias Gumz
1e9dafdc67 fixed the default 'OnTitlebar Mouse1' actions 2010-09-04 14:41:11 +02:00
Mathias Gumz
b8987fc623 code simplification / deduplication
* parse the string only once for a bunch of chars to check instead of
  starting over again and again from the beginning, created a helper
  function to do this (FbTk::StringUtil::findCharFromAlphabetAfterTrigger)

* put same code into a function (setClockModeLabel())

* use much simpler code to switch between 12h and 24h mode and replace
  the fmt-switches
2010-08-24 17:30:24 +02:00