Commit Graph

80 Commits

Author SHA1 Message Date
Andrzej Rybczak
495ec25a0a simplify Clear() in Window and its derivatives
it removes argument responsible for immediate refreshing.
since after all calls that were refreshing screen there was
call to Refresh() anyway, this switch doesn't make much sense.
2009-11-13 15:59:18 +01:00
Andrzej Rybczak
35a182d79e add support for scrolling the list with mouse wheel by given number of lines 2009-11-11 00:31:52 +01:00
Andrzej Rybczak
a98eb5e9ac add range support in NCurses::Menu::Sort() 2009-10-17 17:01:48 +02:00
Andrzej Rybczak
21dccc83fd fix compilation --without-taglib
caused by 3551057dbb
2009-10-14 15:22:05 +02:00
Andrzej Rybczak
70910b77ed make ncmpcpp compile with -fno-exceptions 2009-09-21 06:01:21 +02:00
Andrzej Rybczak
1a3dcbfe17 set attributes in Menu::Refresh() by operators<<()
this also makes Window::{Bold,UnderLine,Reverse,Altcharset} private.
these should only be called by internals of Window class.
2009-09-21 01:34:37 +02:00
Andrzej Rybczak
ec18a34513 apply selected item prefix to menu before clearing the line
if selected item prefix turned on a color or other format flag
it should be appended to the whole line, not only the part that
is going to be drawn using item displayer.
2009-09-21 01:20:02 +02:00
Andrzej Rybczak
b47ad169dc add new function: Menu::CurrentlyDrawedPosition()
this'll be used to simplify displaying currently playing item
2009-09-20 22:23:03 +02:00
Andrzej Rybczak
ad685091bc rename Menu::BoldOption() to Menu::Bold() 2009-09-19 02:44:44 +02:00
Andrzej Rybczak
3bdb798852 clean NCurse::List class a bit and remove a few redundant functions 2009-09-19 01:18:41 +02:00
Andrzej Rybczak
8109d26daf refresh main screen only if necessary 2009-09-17 00:59:30 +00:00
Andrzej Rybczak
436dbddc81 simplify NCurses::Menu::Goto() 2009-09-16 19:56:32 +00:00
Andrzej Rybczak
f1ff84302e document NCurses::Menu class 2009-09-16 19:20:10 +00:00
Andrzej Rybczak
fc6d367f75 remove Clone() and EmptyClone() methods from NCurses::Window and derives
these functions served no purpose.
2009-09-16 03:10:53 +00:00
Andrzej Rybczak
55f064a59b make NCurses::Menu::Clear() clear used filter 2009-09-08 14:06:38 +02:00
Andrzej Rybczak
c0fcac9b1d make guard checks in Menu::Refresh() more readable 2009-09-06 05:28:47 +02:00
Andrzej Rybczak
330f19acbb make adding to main playlist inactive if selected items are from there 2009-09-04 14:08:23 +02:00
Andrzej Rybczak
9dab25e02c use prefix ++ instead of postfix where available 2009-07-04 06:41:35 +02:00
Andrzej Rybczak
10a9427270 throw away Menu::GetPosition() as Menu::Choice() does the same
oh cool, I forgot that such function already exists under different name ~~
2009-05-26 22:11:49 +02:00
Andrzej Rybczak
d965f4e517 new feature: mouse support 2009-05-25 21:46:36 +02:00
Andrzej Rybczak
ec5a4bb3c2 do not clear last used filter in Menu::Clear() 2009-05-09 22:12:03 +02:00
Andrzej Rybczak
5455977914 fix compilation with -std=c++0x 2009-04-17 04:26:54 +02:00
Andrzej Rybczak
310b6c0ecd new feature: cyclic scrolling 2009-03-30 20:03:23 +02:00
Andrzej Rybczak
f24db993aa fix reapplying filter the same as the last one used
I was passing Menu::itsFilter by const reference to Menu::ApplyFilter().
however, the function was clearing all filtering related stuff, including
itsFilter itself, so passed reference was pointing at previously cleared
string. then the function checked if new filter was empty and it obviously
was, so exited then. funny bug.
2009-03-24 19:26:47 +01:00
Andrzej Rybczak
5b36fda511 reapply filter even if it's the same as the last one applied 2009-03-24 18:11:21 +01:00
Andrzej Rybczak
a9bad6863b check if ptr is NULL before dereferencing it in Menu::GetSelected() 2009-03-17 19:48:34 +01:00
Andrzej Rybczak
24fc414826 fix bolding/unbolding items, if screen is filtered 2009-03-14 18:04:31 +01:00
Andrzej Rybczak
d03c4a88b6 fix Menu copy constructor
it has to make deep copy of itsOptions.
2009-03-13 13:26:29 +01:00
Andrzej Rybczak
a20469b403 never get full playlist from mpd, always request for changes 2009-03-13 12:58:17 +01:00
Andrzej Rybczak
fd7ac3b3f5 new feature: move item(s) in playlist to given position 2009-03-11 20:27:55 +01:00
Andrzej Rybczak
a80bf2a7bf use typename keyword instead of class as it's more logical 2009-03-10 22:47:39 +01:00
Andrzej Rybczak
1667079b59 do not include misc.h in menu.h as it's redundant there 2009-03-10 17:26:03 +01:00
Andrzej Rybczak
29f49415dd add support for regular expressions (basic and extended)
it intruduces regex support in search engine
and filtering/searching in all screens
2009-03-08 22:16:18 +01:00
Andrzej Rybczak
6be91a8216 improve searching a bit / fix going to previous found position 2009-03-08 17:45:28 +01:00
Andrzej Rybczak
a3da430f1f change InternalSorting to class 2009-03-08 13:27:14 +01:00
Andrzej Rybczak
b21ede24f4 move searching to Menu class, also remember last constraint
this improvement also make that list of found items is not cleared
if one switches to another screen. it's remebered until the content
of screen changes (e.g. item is deleted from playlist)
2009-03-07 18:23:31 +01:00
Andrzej Rybczak
a4599fffe7 speed up browsing media library
the way media library was searching for albums
was wrong and by the way totally inefficient.
2009-03-07 12:26:16 +01:00
Andrzej Rybczak
ea973b6b4a put classes related to ncurses into NCurses namespace 2009-03-05 17:43:13 +01:00
Andrzej Rybczak
c1ba3bc4ba apply filter only if the previously applied one was different 2009-02-19 17:01:26 +01:00
Andrzej Rybczak
c827c88993 use ncurses pad instead of ncurses window by default 2009-02-18 21:45:54 +01:00
Andrzej Rybczak
5d2daab416 new feature: apply filter to screen (Ctrl-F)
if one applies a filter, only items that contain this
filter will be displayed. works on all screens.
2009-02-17 17:57:55 +01:00
Andrzej Rybczak
2cb9b46135 use vector of pointers to options rather than vector of options
this way I can implement options filtering with much less effort.
2009-02-17 10:03:21 +01:00
Andrzej Rybczak
43a8e2284e provide generic interface for dealing with selected items 2009-02-16 18:20:45 +01:00
Andrzej Rybczak
b43d4dddeb throw away unneeded code 2009-02-15 22:28:04 +01:00
Andrzej Rybczak
f9f5149b76 includes cleaning 2009-02-10 12:19:59 +01:00
Andrzej Rybczak
791daa1f7e clear window only if last element is deleted 2009-01-30 19:01:22 +01:00
Andrzej Rybczak
1244223919 if menu is empty, clear it
before this if the only element was removed from menu, it was still displayed.
2009-01-22 14:32:42 +01:00
Andrzej Rybczak
0c9e10091f update fsf address and copyright info 2009-01-17 00:52:08 +01:00
Andrzej Rybczak
2db104f2e1 do not attempt to get/select/whatever item from an empty menu 2008-12-28 21:13:04 +01:00
Andrzej Rybczak
c71f07df6d eliminate remained compiler warnings 2008-12-12 22:50:22 +01:00