Commit graph

6051 commits

Author SHA1 Message Date
Mario J. Rugiero
7e17056c35 Initialize m_index in MenuItem's constructors. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
2238c004aa Reduce the scope of the variable err in stringTokensBetween. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
2275e1e6e4 doSubmenu function in menutest.cc avoids copying labelstr by using a const reference. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
bf607341da addMatching and insertFromParent functions from FocusableList now avoid copying m_parent->clientList() and use a const reference instead. 2015-05-01 10:46:21 +02:00
Mario J. Rugiero
63f89cb433 Pass pre_command to CommandDialog as const reference to avoid unnecessary copying. 2015-05-01 10:46:20 +02:00
Casey Dahlin
79a358346a Don't assume ICONV_NULL = 0
We define the value ICONV_NULL = -1, but when we attempt to set the
s_iconv_convs array to all NULL values, we zero the array instead of setting
its entries to -1.

This patch properly initializes and wipes s_iconv_convs.
2015-04-11 08:25:59 +02:00
Mathias Gumz
88a74ff1cd Final notes 2015-02-08 11:44:34 +01:00
Mathias Gumz
7c3b9a34f3 Prepare manpages for 1.3.7 2015-02-08 11:20:53 +01:00
Arkadiusz Bokowy
e3300411eb Fix: typo during refactoring
Commit 63d9d69 introduced a bug, which has manifested itself by setting
window transparent state to the fully opaque (255).
2015-02-08 11:14:48 +01:00
Mathias Gumz
9f824b89fd Move internal code to internal side of FbTk::Transparent 2015-02-08 11:06:58 +01:00
Mathias Gumz
495846f1ee Add .mailmap file 2015-02-08 10:47:52 +01:00
Volkan Gezer
140b9717d7 Update Turkish translation
This adds missing strings as well as fixes the typos and grammar issues.
2015-02-07 18:27:22 +01:00
Mathias Gumz
09abda1482 Update ChangeLog and NEWS 2015-02-07 18:22:39 +01:00
Mathias Gumz
f84671ef8e Minor 2015-02-07 18:05:41 +01:00
Mathias Gumz
bd983fab55 Create buttons for titlebar with proper sizes
Instead of creating the titlebar buttons with a size of 10x10 pixels
and rely on resizing later on we now pick the correct dimensions
right on.

This fixes also bug #1125 ("Detaching a window from a tab-group renders
app-icon to 1/2"); the problem also occurred on restart.

I took the chance to refactor a little bit.
2015-02-07 17:59:37 +01:00
Mathias Gumz
c30b75091a Fix glitch of TabOptions menu 2015-02-07 11:46:00 +01:00
Mathias Gumz
9814549fb3 Show toggleitems in menu 2015-02-07 10:13:43 +01:00
Mathias Gumz
17bd806337 Cosmetic 2015-02-07 10:09:24 +01:00
Mathias Gumz
1bacaa7ecb Boyscouting 2015-02-07 09:41:38 +01:00
Mathias Gumz
046092d166 Fix cleaning exposed menu items 2015-02-07 09:38:22 +01:00
Mathias Gumz
8834435bd0 Avoid signed/unsigned woes; minor cleanup 2015-02-07 09:30:28 +01:00
Mathias Gumz
a649a45ed8 Add uncommited #include "MenuSearch.hh"
Note to myself: less gitting at late hours.
2015-02-06 07:31:04 +01:00
Mathias Gumz
896b8df8ee Update documentation to reflect menu search options 2015-02-05 21:48:52 +01:00
Mathias Gumz
92940571f3 Cleanup; Remove unused function 2015-02-05 21:35:02 +01:00
Mathias Gumz
0da4be2a01 Feature: different MenuSearch modes
Fluxbox now supports three MenuSearch modes:

* NoWhere - essentially "disabling" the menu search.
* Somewhere - the search string matches somewhere.
* ItemStart - the search string matches at the start of a menu item.

The default value is "ItemStart", just in the good old times. As long as
this feature is not configurable via the menu it would irritate users
with distinct muscle memory who type without thinking OR checking the
visual feedback: they would trigger items they did not intent to trigger
after years of the old behavior.

Once this feature get's an entry in the config menu the default value
might change.
2015-02-05 21:30:44 +01:00
Mathias Gumz
e79228cc08 Fix problem with too small WinButtons
Under some circumstances a WinButton might be tiny (1x1 pixel). Substracting
values > 1 yields either 0 or something reaaaaly big (UINT_MAX). This will
make fluxbox either crash or make it act weird. We don't want this.
2015-02-04 21:06:51 +01:00
Mathias Gumz
53b3120b32 Move nls globals into #ifdef NLS 2015-02-04 21:06:32 +01:00
Mathias Gumz
461d4b7dbd Fix crash: click the Remember-menu works again
This commit fixes a subtle regression introduced by myself in
f64727ca: WinClient wc = FbMenu::window()->winclient() creates a
copy and this copy gets cleaned up at the end of the scope. What
I really wanted was a reference.
2015-02-01 19:41:07 +01:00
Mathias Gumz
c207226a32 Fix regression: use proper texture for the grips 2015-02-01 09:40:49 +01:00
Mathias Gumz
e1359adfd0 Cosmetic 2015-02-01 08:07:26 +01:00
Mathias Gumz
017de68d5e Close to 1.3.7 2015-01-31 21:56:40 +01:00
Mathias Gumz
fff0abad76 Improve I18n support
Among the first steps to produce better i18n support is to test the created
translations adhoc without running "make install". To achieve this, fluxbox
now honors several environment variables:

- NLSPATH: fluxbox won't create the absolute path to the catalog and thus
  catopen() is free to use NLSPATH as described in the manpage. Example
  given: "/tmp/%N" will pick "/tmp/fluxbox.cat". %N refers to FLUXBOX_CATFILE.

- FLUXBOX_CATFILE: By setting FLUXBOX_CATFILE the users can make fluxbox to
  use a different name for the catalog file.  Default: "fluxbox.cat"

- FLUXBOX_CATDIR: Per default fluxbox tries to find FLUXBOX_CATFILE at several
  places. Setting this environment variable allows to point fluxbox to a
  different search path for the catalog files.

Then, fluxbox tries catopen() first without changing the deduced catalog file
name. After that it applies some heuristics to get a good catalog file name.
2015-01-31 21:37:44 +01:00
Mathias Gumz
57f21b64ca Update translations: add CommonDefaultWindowMenuFile 2015-01-31 21:05:07 +01:00
Mathias Gumz
0a87632032 Clean up FbTk::I18n API
Move private stuff into FbTk/I18n.cc.
2015-01-31 12:04:30 +01:00
Mathias Gumz
f8b9c9a211 Fix sometimes missing windowmenu
When the windowmenu file is empty in ~/.fluxbox/init the code falls
back to the default. In ab2eef4 I forgot to set the rc_path which
caused this bug to happen.
2015-01-30 22:09:27 +01:00
Mathias Gumz
da285bcb11 Add chrome* to fluxbox-generate_menu 2015-01-29 13:24:57 +01:00
Mathias Gumz
bf43ba16c4 Use strncpy() instead of strcpy() 2015-01-29 11:52:00 +01:00
Mathias Gumz
37e8c1e93e Use strncpy() instead of strcpy() 2015-01-29 11:46:57 +01:00
Mathias Gumz
129d0ac31e Make fluxbox strcat() free
Again, gcc-4.2.1 of OpenBSD-5.6 pointed out the use of strcat(). I took the
chance to explain the reasons for the code a little bit.
2015-01-29 11:43:05 +01:00
Mathias Gumz
8b44c7a184 Simpler code to set _NET_DESKTOP_NAMES
gcc-4.2.1 on OpenBSD-5.6 hinted that strcpy() is not the safest function on
earth. While seeing the code I wondered why it we first create copies
of the names at all (let alone using memset() and then strcpy() after it).
2015-01-29 11:38:48 +01:00
Mathias Gumz
8e5a10ea6c Compiler boyscouting: init order 2015-01-28 21:44:20 +01:00
Mathias Gumz
876500a259 Fix correctness of string search
The lookup for the skip value needs to be based upon the lowercase version of
the current byte.
2015-01-28 21:42:05 +01:00
Mathias Gumz
77f0963d00 Increase verbosity of 'configure' summary
After 'configure' finishes it states just CXXFLAGS and LIBS. But these are
actually not complete, the build system will use much more later on. Problems
with the build system are easier to address if 'configure' is a little bit
more verbose.
2015-01-28 20:36:55 +01:00
Mathias Gumz
aa39a1a666 Fix mishandled [maxmized] statement in apps file
In f64727ca I removed one 'else' too much. As a result all [maximized] lines
were mapped to MAX_NONE. Fixed.

The rest of the commit is just some cosmetic to reduce indentation and shorten
function names, easier to read.
2015-01-28 20:28:58 +01:00
Mathias Gumz
03ce82a473 Feature: typeahead in menu matches text anywhere
This commit implements a tweak to the typeahead feature already existent in
fluxbox: If the user opens up a menu and starts typing, fluxbox tries to
detect matching menu items and makes them available for quick selection.
The typed pattern is now search also in the middle of the text.

I opted to strip down the code quite a bit and remove complexity by throwing
out FbTk::TypeAhead and FbTk::SearchResult because I do not see the need for a
general solution when the only use case for such a feature is in fluxbox'
menus. FbTk::ITypeAheadable shrunk down to 2 functions; the whole file might
be combined with the code that implements FbTk::Menu::TypeSearch.
FbTk::Menu::setIndex() and related code is also gone: the position of each
menu item is defined by it's position in the items container. This reduces the
mount of book keeping fluxbox has to do. Fewer moving parts is a good thing.

It's possible that users start to complaint because they expect their
typed pattern to match only at the beginning of the text OR that some
demand other tweaks. We will see.

This commit also fixes a regression introduced by 8387742c. The bug made
the menu vanish.
2015-01-28 16:02:59 +01:00
Daniel Campbell
fc245408d6 Fix printf bug in fluxbox-generate_menu 2015-01-25 13:37:31 +01:00
Mathias Gumz
6721c7c70b Add 'lxterminal' and 'geany' to fbgm
Implements #305 (feature request "Recognize lxterminal and geany
(fluxbox-generate_menu)"
2015-01-24 19:17:02 +01:00
Mathias Gumz
e650b34d20 Update Changelog; prepare 1.3.7 2015-01-24 10:49:19 +01:00
Mathias Gumz
75cf246de5 Cleanup 2015-01-24 10:36:00 +01:00
Mathias Gumz
e0c5436f44 Improve code documentation
'width' might imply something 'aligned horizontally'. The first parameter
of maxTextLength() is given in pixels. To avoid confusion, the name of
the parameter is changed.

The comment before the binary search reflects better why and what we
need to do.
2015-01-24 10:35:21 +01:00