Commit graph

92 commits

Author SHA1 Message Date
Dave Davenport
5185f1181c Validate if input is utf-8 for dmenu, if not ignore that line
This should avoid crashing on invalid encoding.
2016-02-09 19:54:43 +01:00
Dave Davenport
e7b18d3a88 Issue: #334: Only allow markup-rows to be set on cmdline
This should avoid people setting this in XResrouces and breaking random dmenu scripts.
2016-02-09 07:37:48 +01:00
Dave Davenport
69b88caac5 Allow user to open an disabled modi. 2016-02-04 09:20:10 +01:00
Dave Davenport
b557c4df6e Issue: #333, Check if row is selected, don't assume selected_line is valid. 2016-02-03 09:01:13 +01:00
Dave Davenport
eadf455c8c Let DMenu mode reuse open dialog and not restart it. handy for multi-select. 2016-01-20 18:50:33 +01:00
Dave Davenport
d0716efe12 Refactor menu function into three parts, setup, itterrate and finalize. 2016-01-20 18:24:31 +01:00
Dave Davenport
cc682f107b Update display value for modi (testing) 2016-01-12 22:18:10 +01:00
Dave Davenport
13810d5911 Add experimental 'password' mode. (#315) 2016-01-10 13:10:44 +01:00
Dave Davenport
d7dab65e5b Making widget class, moving stuff around 2016-01-09 16:22:09 +01:00
Dave Davenport
dc8fb4f202 Start making SardemFF happy. Use g_return_if_fail 2016-01-08 09:16:59 +01:00
Dave Davenport
fa51aeb484 More splitting and abstracting. 2016-01-07 21:27:20 +01:00
Dave Davenport
e8daff0f6a First cleanup steps. 2016-01-07 19:47:37 +01:00
Dave Davenport
51b5511017 More doxygen sugar. 2016-01-07 16:01:56 +01:00
Dave Davenport
5a3c202423 Update copyright 2016-01-01 00:27:00 +01:00
Dave Davenport
696d0a2fa0 Fix 1 off memory leak 2015-12-23 17:03:00 +01:00
Dave Davenport
270ec0c14b Fix out of memory bound on array 2015-12-22 20:57:57 +01:00
Dave Davenport
08d6d6b685 Fix return code multi-select 2015-12-12 20:54:59 +01:00
Dave Davenport
eaa553bfd5 Indent. 2015-12-03 22:48:30 +01:00
Dave Davenport
697abdfdfc [DMenu] Add option to read from file instead of stdin. 2015-12-03 18:22:13 +01:00
Dave Davenport
4b77a1728d Remove custom code, replace by glib, fix fuzzy matching for unicode.
- Also fixes char endianess issues.
2015-12-01 22:09:34 +01:00
Qball Cow
ff52140697 Check for nil before updating. 2015-12-01 13:17:59 +01:00
Dave Davenport
544229d975 Issue #287 mark selected rows. 2015-11-30 14:05:39 +01:00
Dave Davenport
bf60d9c01c Fix return code 2015-11-28 11:59:11 +01:00
Dave Davenport
864a00b9fd Add option to dump filtered list to stdout.
uses format option and filter `-dump`.
2015-11-27 13:14:46 +01:00
Dave Davenport
3c411433b4 Big rename from Switcher to Mode internal, to match with user terminology 2015-11-25 09:26:38 +01:00
Dave Davenport
627643281d Fix ; in macro. 2015-11-24 22:53:40 +01:00
Dave Davenport
00a555b685 Create more consistent ordering of arguments 2015-11-24 14:22:35 +01:00
Dave Davenport
fa2bcd778c Fix for complete issue #273.
- Add complete handler.
2015-11-24 13:59:35 +01:00
Dave Davenport
cbba58914f Some cleanups and re-ordering of parameters to be consistent. 2015-11-23 22:15:27 +01:00
Dave Davenport
ad778b7dc1 Const making. 2015-11-23 22:15:27 +01:00
Dave Davenport
5bdcd47dde consts and small ensurance (though should be correct to begin with) 2015-11-22 00:33:26 +01:00
Dave Davenport
8c9b72f34e Start at fixing Issue 273, this might break some things.
* Only use get_display_data for displaying. (Except the select complete (ctrl-space), this needs fixing).
 * Fix possible race condition in parallelization.
 * Fix small bug in case-sensitive handling. (beware for collision in keybinding)
 * Keep less lists around.
2015-11-21 23:59:59 +01:00
Dave Davenport
238a34162a Try to fix crasher on mixing glib free and free. 2015-11-15 13:12:43 +01:00
Dave Davenport
2eaffceada Fix printing. 2015-11-14 19:59:56 +01:00
Dave Davenport
56e85d0f5a Cleanup. 2015-11-14 19:42:43 +01:00
Dave Davenport
80e873c8a3 Add threadpool support, add optional timings compile flag 2015-11-14 13:47:45 +01:00
Qball Cow
311cedf87f Fix silly little bug. 2015-11-12 14:53:02 +01:00
Qball Cow
c7dcb4821a Use getdelim instead of custom fgets function. 2015-11-12 14:15:33 +01:00
Dave Davenport
bc2b532a51 Add dmenu options to -h 2015-10-21 18:58:01 +02:00
Dave Davenport
64cb4c781c Fix some compiler warnings 2015-10-19 09:23:06 +02:00
Dave Davenport
4975704a05 Fix #244 Do not catch sigchld, let glib handle this internally
- TODO fix man page viewing.
2015-10-12 08:12:25 +02:00
QC
56e023dcee Remove unneeded check. 2015-10-11 14:13:08 +02:00
Tom Hinton
af6a4b83eb Make normal filtering of plain ASCII lines faster
This patch adds a field lines_not_ascii to the MenuState structure. The
nth entry is 0 unless the nth member of MenuState.lines has a non-ascii
codepoint in it.

All comparison functions (menu_match_cb type) take an additional
argument to tell them if the thing they are matching is not_ascii. They
can use this to determine whether to collate and case-fold the
input (for non-ascii strings), or whether to use strstr/strcasestr (for
ascii strings).

The change is not currently implemented for flex matching, due to my
laziness. However, it should be a simple enough matter to add.

For my large input of 400,000 lines, this reduces typical filtering time
to about ten microseconds from about 2 seconds.
2015-10-01 12:16:41 +01:00
Tom Hinton
574bf2da82 Make dmenu reading very marginally faster
A slight reduction in use of realloc and avoidance of 3 or 4 strlens for
a string we know the length of
2015-10-01 11:41:44 +01:00
QC
31fe5759b8 More line fixing. 2015-09-19 21:00:06 +02:00
QC
b18d68eff2 Adjust new editor width 2015-09-19 12:57:48 +02:00
QC
442e235c24 Some cleanups, tweak uncrustify. 2015-09-19 12:21:30 +02:00
Dave Davenport
d2aad68bce Keep the line matched (if possible) when filtering. 2015-09-08 22:23:03 +02:00
Dave Davenport
13203c9de7 Refactor to make dmenu use Switcher, and make menu func use this. 2015-09-08 21:41:54 +02:00
Dave Davenport
2c45c02c7f Small cleanup. 2015-09-03 08:20:08 +02:00