Commit Graph

83 Commits

Author SHA1 Message Date
vanhofen
dfce6dd08f change RC_back handling; its not longer translated to RC_home
Origin commit data
------------------
Commit: b0c6332f44
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-01-03 (Mon, 03 Jan 2022)

Origin message was:
------------------
- change RC_back handling; its not longer translated to RC_home
2022-01-03 22:32:25 +01:00
Thilo Graf
d738fc22c1 gui/widget: add class CHourGlass
Provides an hourglass/snake-loader function to visualize running processes.
A template xcf-file for Gimp 2.10 is appended. Feel free to edit.


Origin commit data
------------------
Commit: 0e809c9c76
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-10-09 (Sat, 09 Oct 2021)
2021-10-09 01:23:28 +02:00
Thilo Graf
205c8eda14 hintbox: try to fix logic for enable/disable timeout bar.
Timeout bar could not be switched off, is now disabled for CHint
TODO: find a better solution to vizualize timeout for CHint.
 It looks not so good on the top of the hintbox, especially
 with round corners or frameless window.


Origin commit data
------------------
Commit: 77d482a43e
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-10-04 (Mon, 04 Oct 2021)

Origin message was:
------------------
hintbox: try to fix logic for enable/disable timeout bar.

Timeout bar could not be switched off, is now disabled for CHint
TODO: find a better solution to vizualize timeout for CHint.
   It looks not so good on the top of the hintbox, especially
   with round corners or frameless window.
2021-10-04 22:01:31 +02:00
Thilo Graf
b933f3e9f2 hintbox: expand ShowHintS() with slot parameter
This allows to execute one ore more methods inside the ShowHintS() method.
This should simplify calls of CHint messages with or without hide delays
In the simplest or most cases, only one code line is necessary for this,
see examples inside test_menu.cpp or here:

Single methode:
old:
CHintBox *hintBox new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_SERVICEMENU_GETPLUGINS_HINT));
hintBox->paint();
g_Plugins->loadPlugins();
sleep(1);
hintBox->.hide();
delete hintbox;

new:
ShowHintS(LOCALE_SERVICEMENU_GETPLUGINS_HINT, 1, true, sigc::mem_fun(g_Plugins, &CPlugins::loadPlugins));

Multiple methods:
old:
	CHint *hint = new CHint("Restart Tuner");
	hint->paint();
	g_Zapit->setStandby(true);
	sleep(2);
	g_Zapit->setStandby(false);
	sleep(2);
	g_Zapit->Rezap();
	delete hint;

new:
	std::vector <hint_message_data_t> hints;
	hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), true),"Stopping tuner...", NONEXISTANT_LOCALE, 2, true});
	hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), false), "Start tuner...", NONEXISTANT_LOCALE, 2, true});
	hints.push_back({sigc::hide_return(sigc::mem_fun(g_Zapit, &CZapitClient::Rezap)), "Rezap...", NONEXISTANT_LOCALE, 2, true});
	ShowHintS(hints);

slots can be used with sigc::bind, sigc::hide_return (or what ever) too.
sample slot:
sigc::slot<void> sl = sigc::bind(sigc::mem_fun(this, &ClassName::method), parameter);

Note: Usage of namespace sigc are doing to simplify the lines,
 but this is a matter of discretion.

TODO: - timeoutbar should visualize a kind of busy mode.
 - implemetations


Origin commit data
------------------
Commit: 0ae328d081
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-10-04 (Mon, 04 Oct 2021)

Origin message was:
------------------
hintbox: expand ShowHintS() with slot parameter

This allows to execute one ore more methods inside the ShowHintS() method.
This should simplify calls of CHint messages with or without hide delays
In the simplest or most cases, only one code line is necessary for this,
see examples inside test_menu.cpp or here:

Single methode:
old:
CHintBox *hintBox new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_SERVICEMENU_GETPLUGINS_HINT));
hintBox->paint();
g_Plugins->loadPlugins();
sleep(1);
hintBox->.hide();
delete hintbox;

new:
ShowHintS(LOCALE_SERVICEMENU_GETPLUGINS_HINT, 1, true, sigc::mem_fun(g_Plugins, &CPlugins::loadPlugins));

Multiple methods:
old:
	CHint *hint = new CHint("Restart Tuner");
	hint->paint();
	g_Zapit->setStandby(true);
	sleep(2);
	g_Zapit->setStandby(false);
	sleep(2);
	g_Zapit->Rezap();
	delete hint;

new:
	std::vector <hint_message_data_t> hints;
	hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), true),"Stopping tuner...", NONEXISTANT_LOCALE, 2, true});
	hints.push_back({sigc::bind(sigc::mem_fun(g_Zapit, &CZapitClient::setStandby), false), "Start tuner...", NONEXISTANT_LOCALE, 2, true});
	hints.push_back({sigc::hide_return(sigc::mem_fun(g_Zapit, &CZapitClient::Rezap)), "Rezap...", NONEXISTANT_LOCALE, 2, true});
	ShowHintS(hints);

slots can be used with sigc::bind, sigc::hide_return (or what ever) too.
sample slot:
sigc::slot<void> sl = sigc::bind(sigc::mem_fun(this, &ClassName::method), parameter);

Note: Usage of namespace sigc are doing to simplify the lines,
   but this is a matter of discretion.

TODO: - timeoutbar should visualize a kind of busy mode.
   - implemetations
2021-10-04 22:01:31 +02:00
vanhofen
aa364e0925 hintbox: fix hardcoded keys
Origin commit data
------------------
Commit: fbbdf0c29b
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-03-15 (Mon, 15 Mar 2021)

Origin message was:
------------------
- hintbox: fix hardcoded keys
2021-03-15 23:51:54 +01:00
Thilo Graf
d43dd75176 cc: rework color handling for select and focus status
Origin commit data
------------------
Commit: 0477ff06c0
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-12-07 (Mon, 07 Dec 2020)
2020-12-07 23:28:52 +01:00
Thilo Graf
bcaa80a4fb hintbox: assign missing item name for timeout bar
Origin commit data
------------------
Commit: 5c52524c66
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-02-16 (Sun, 16 Feb 2020)

Origin message was:
------------------
hintbox: assign missing item name for timeout bar
2020-02-16 20:53:09 +01:00
Thilo Graf
a898de1948 hintbox: fix enable/disable timeout bar
enable_timeout_bar was not considered within exec().
Each try to disable timeout bar (eg. with enableTimeOutBar())
was without effect.


Origin commit data
------------------
Commit: 0cc13fb9c5
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-02-13 (Thu, 13 Feb 2020)
2020-02-13 22:10:50 +01:00
Jacek Jendrzej
cf726e676a hintbox: supplement to fix getMaxWidth, hintbox have shadow default ON and shadow is added to width in cc_item (dx+sw). This break RestoreScreen
Origin commit data
------------------
Commit: e6ae6124b1
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-02-04 (Tue, 04 Feb 2020)
2020-02-04 22:17:59 +01:00
Jacek Jendrzej
5d4076bc72 hintbox: fix getMaxWidth
Origin commit data
------------------
Commit: 406e051bd9
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-02-04 (Tue, 04 Feb 2020)
2020-02-04 22:17:59 +01:00
Jacek Jendrzej
4d1888c0b6 supplement to 1e76f6ef4491f263cc8811c63af23844876e9d22, progresspar clean is after 'add possibility for more control of timeout bar' broken
Origin commit data
------------------
Commit: eecf4f8f92
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-24 (Fri, 24 Jan 2020)
2020-01-24 22:04:09 +01:00
Jacek Jendrzej
fc27d9d910 hintbox: fix destructor, supplement to 1e76f6ef4491f263cc8811c63af23844876e9d22
Origin commit data
------------------
Commit: 63a3ef00d3
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-23 (Thu, 23 Jan 2020)
2020-01-23 21:15:51 +01:00
Thilo Graf
76f1f37af2 hintbox: add possibility for more control of timeout bar
So we can enable/disable directly with setTimeOut() method.
Usefully to disable timeout bar if not required.


Origin commit data
------------------
Commit: 86fa9b0ca9
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-01-23 (Thu, 23 Jan 2020)
2020-01-23 21:15:51 +01:00
Thilo Graf
890de5d78d hintbox: fix init order of setValue() and paint()
Origin commit data
------------------
Commit: d9f4044668
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-01-05 (Sun, 05 Jan 2020)
2020-01-06 22:25:46 +01:00
Thilo Graf
de56424c45 cc_timer/cc_frm_clock: allow use of milisecond intervals
Should be easier and more flexible to handle without nano parameter,
some reworkes in other classes and thread handlings are required.


Origin commit data
------------------
Commit: 5afe92e526
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-01-05 (Sun, 05 Jan 2020)
2020-01-06 22:25:46 +01:00
Thilo Graf
b60daa3fd0 themes: add option to enable frames for message and hint boxes
Origin commit data
------------------
Commit: e3f1754f14
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-10-27 (Sun, 27 Oct 2019)
2019-10-27 22:56:50 +01:00
Thilo Graf
8e13aadd70 CHintBox/CMsgBox: use frames as default for better highlighting
Origin commit data
------------------
Commit: bc0934d47b
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-10-27 (Sun, 27 Oct 2019)
2019-10-27 22:56:50 +01:00
Thilo Graf
8857197ec8 widget/hintbox.cpp/h: use disconnect instead check for OnTimer
diconnect ensures handle of current slot.


Origin commit data
------------------
Commit: 05042deb51
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-01-01 (Tue, 01 Jan 2019)
2019-01-01 21:50:50 +01:00
Thilo Graf
84439d05ee hintbox/msgbox: add more specific thread names
For better tracing while debugging.


Origin commit data
------------------
Commit: 957b5e00ea
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-01-01 (Tue, 01 Jan 2019)
2019-01-01 21:50:50 +01:00
Thilo Graf
aed5eeb242 src/gui/widget/hintbox.cpp: connect OnTimer slot only if is still empty
Prevent multiple connections to slot. Only to be sure.


Origin commit data
------------------
Commit: eb209de47a
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-12-10 (Mon, 10 Dec 2018)
2018-12-10 22:37:05 +01:00
GetAway
85044fc000 hintbox.cpp: fix scale of box width
Origin commit data
------------------
Commit: 8c4badf007
Author: GetAway <get-away@t-online.de>
Date: 2018-10-16 (Tue, 16 Oct 2018)
2018-10-16 23:57:28 +02:00
Thilo Graf
a4da9d28a9 widget/hintbox.cpp: add explicit init of var picon
Had some issues while compile with gcc 7.x.
Exact data type was expected.


Origin commit data
------------------
Commit: 882a4654a8
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-12-04 (Mon, 04 Dec 2017)
2017-12-04 20:16:12 +01:00
vanhofen
20451a9be6 rcinput: simplify calcTimeoutEnd() calls; 0 is "off" by default now
Origin commit data
------------------
Commit: 99cc7f850a
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-09-29 (Fri, 29 Sep 2017)

Origin message was:
------------------
- rcinput: simplify calcTimeoutEnd() calls; 0 is "off" by default now
2017-09-29 10:34:23 +02:00
Thilo Graf
6603d1126e CHintBox: fix possible unintended cut of text
Last line size was not considered.


Origin commit data
------------------
Commit: 87b53a8597
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-09-17 (Sun, 17 Sep 2017)
2017-09-17 21:50:59 +02:00
Thilo Graf
2de45c33b6 Merge branch 'master' into pu/fb-setmode
Origin commit data
------------------
Commit: c0cc7ef192
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-05-21 (Sun, 21 May 2017)
2017-05-21 18:09:22 +02:00
Thilo Graf
1fff9dbad3 CHintBox: use less colors time scale mode for visual timeout
Otherwise probably in this context to much colored with default settings.


Origin commit data
------------------
Commit: 8c29b8e68f
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-05-21 (Sun, 21 May 2017)
2017-05-21 18:00:21 +02:00
Thilo Graf
44af471dd9 CHintBox: fix position in case of missing text
Without text, position was not complete calculated.
Only default position was used.


Origin commit data
------------------
Commit: e48cc87b6f
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-05-17 (Wed, 17 May 2017)
2017-05-17 20:11:28 +02:00
Thilo Graf
caa00d432d CHintBox: fix passed width parameter
Origin commit data
------------------
Commit: 820ea4db3b
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-02-26 (Sun, 26 Feb 2017)
2017-02-26 21:29:53 +01:00
Stefan Seyfried
8107c333eb set useful thread names for all spawned threads
Origin commit data
------------------
Commit: 5188f721c4
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-12 (Sun, 12 Feb 2017)
2017-02-12 22:55:36 +01:00
Stefan Seyfried
30fd1a003c cc: reduce impact of cc_draw header from 161 to 4 files
Origin commit data
------------------
Commit: 58c6dbf469
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-12 (Sun, 12 Feb 2017)
2017-02-12 22:50:44 +01:00
Stefan Seyfried
f6d5a96838 replace fontrenderer.h include with forward declaration
in order to flatten the build dependency tree further, include
fontrenderer.h directly where needed, in header files a forward
declaration is enough


Origin commit data
------------------
Commit: 2303d94300
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-05 (Sun, 05 Feb 2017)
2017-02-07 17:23:42 +01:00
Stefan Seyfried
e32ff6b40a hintbox: restore proper handling of up/down keys
When no scrollbar is present, just pass through up/down keys instead
of only canceling the hintbox. This restores the behaviour before
commit 11b3307251.
Prominent examle is the "channel not available" popup which prevented
further channel switching until canceled.


Origin commit data
------------------
Commit: 5f93b57d84
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-01-29 (Sun, 29 Jan 2017)
2017-01-29 21:27:45 +01:00
Thilo Graf
862f212214 CHintBox: add possibility to left hintbox with RC_up and RC_down
RC_up and RC_down are used for text scroll, but most message texts
are small and no scroll mode is required. In case of large texts
it should falling back to scroll mode.


Origin commit data
------------------
Commit: 1d8de839d5
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-10 (Tue, 10 Jan 2017)
2017-01-11 11:32:32 +01:00
Thilo Graf
91d2fa8784 CHintBox: add overloaded version of setMsgText() with locale parameter
Origin commit data
------------------
Commit: c60accaeae
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-04 (Wed, 04 Jan 2017)
2017-01-05 22:53:47 +01:00
Thilo Graf
02f613dbb7 CHintBox: small cosmetics for initial positions
This should have no effect, because calculation of position and dimensions
is mostly dependency from message text. So this is only formality.


Origin commit data
------------------
Commit: b714998065
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-12-22 (Thu, 22 Dec 2016)
2016-12-22 10:01:53 +01:00
Thilo Graf
e8039bf784 CHintBox: fix timeout comparsion
default timeout was not defined


Origin commit data
------------------
Commit: bd75701fc3
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-12-12 (Mon, 12 Dec 2016)
2016-12-12 21:37:17 +01:00
vanhofen
8f55c83ce0 rename BUTTON_TOP to BUTTON_UP; it isn't a top-button
Origin commit data
------------------
Commit: 0dc0789de8
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-07 (Wed, 07 Dec 2016)

Origin message was:
------------------
- rename BUTTON_TOP to BUTTON_UP; it isn't a top-button
2016-12-07 15:37:03 +01:00
Thilo Graf
3bed87466a Messages: move window to top of screen
User request.


Origin commit data
------------------
Commit: 644063d2c8
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-22 (Tue, 22 Nov 2016)
2016-11-22 11:01:30 +01:00
Thilo Graf
c91143c82d CHintBox: fix missing shadow for popups
Must be enabled with enum, bool has no effect.


Origin commit data
------------------
Commit: e46d65fb92
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-22 (Tue, 22 Nov 2016)
2016-11-22 10:44:50 +01:00
Thilo Graf
97b57a783d Messages: try to fix API message handling
Passed timeout for messeages an popup's fired by yWeb API was not really
ok.
For popups now we have a setting with default value of 6 seconds timeout
Popups fired with ShowHint() use this as default. Value of 0 and -1
are ignored.
Messages fired with ShowMsg() should be fixed and interpret
value 0 or -1 as no timeout and will remain on the screen.


Origin commit data
------------------
Commit: 8b97f72ed1
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-22 (Tue, 22 Nov 2016)
2016-11-22 10:32:10 +01:00
Thilo Graf
ae117fae66 Messages: add option to change size of message text
Include default size and localized setup.

TODO: localize for nederlands and slovak, current english only.


Origin commit data
------------------
Commit: 4988df1dd9
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-20 (Sun, 20 Nov 2016)
2016-11-20 01:08:14 +01:00
Thilo Graf
5bb70ba9e9 CHintBox: update ascII scheme
Origin commit data
------------------
Commit: 27905b9acf
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-12 (Sat, 12 Nov 2016)
2016-11-12 14:51:18 +01:00
Thilo Graf
527a5ad046 CHintBox: remove center text mode on used picon
Origin commit data
------------------
Commit: 075917e32d
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-11 (Fri, 11 Nov 2016)
2016-11-11 23:10:39 +01:00
Thilo Graf
9ea70e4ea7 CHintBox: try to fix truncated chars
Last chars were truncated. Indent and titel text were not considered.


Origin commit data
------------------
Commit: 7f5a576795
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-11 (Fri, 11 Nov 2016)
2016-11-11 21:42:07 +01:00
Thilo Graf
2f89d7ff76 CHintBox: optimize dynamic window width bahavior on different line sizes
Width calculation is now depends on largest line of text.


Origin commit data
------------------
Commit: 0952efaba4
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-10 (Thu, 10 Nov 2016)
2016-11-10 11:19:09 +01:00
Thilo Graf
c337d0449e CHintBox/CMsgBox: rework text handling and dynamic size behavior
Origin commit data
------------------
Commit: e3f51f2c91
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-03 (Thu, 03 Nov 2016)
2016-11-10 11:18:56 +01:00
Thilo Graf
0704180bf9 CHintBox: add member to get maximal required width
Origin commit data
------------------
Commit: 4bdd5e11a9
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-10-31 (Mon, 31 Oct 2016)
2016-11-10 11:15:43 +01:00
Thilo Graf
23a56859aa CHintBox: move showTimeOutBar() to protected, add params to enableTimeOutBar()
Explicit call of disableTimeOutBar() after exec() is required to ensure
we have no timebar opened objects. I'm not shure, but otherwise crashs
could be possible.

showTimeOutBar() is required for OnTimer(). It doesn't need any
parameter.


Origin commit data
------------------
Commit: a80b861cb5
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-10-25 (Tue, 25 Oct 2016)
2016-10-25 08:53:23 +02:00
Thilo Graf
ebc13d46b3 CHintBox: try to optimize height and width of message window
Origin commit data
------------------
Commit: a5ce26dfd9
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-10-23 (Sun, 23 Oct 2016)
2016-10-24 10:31:28 +02:00
Thilo Graf
c8c22653a1 CHintBox: ensure remove timeout bar from screen if hintbox object is closed
Timeout bar is not embedded like other cc items in this form, therefor is
is better to kill this object explicit from screen otherwise it is possible
we hab artefacts after closing of hintbox window.


Origin commit data
------------------
Commit: 6580c5a54a
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-10-21 (Fri, 21 Oct 2016)

Origin message was:
------------------
CHintBox: ensure remove timeout bar from screen if hintbox object is closed

Timeout bar is not embedded like other cc items in this form, therefor is
is better to kill this object explicit from screen otherwise it is possible
we hab artefacts after closing of hintbox window.
2016-10-24 10:31:28 +02:00