diff options
author | fluxgen <fluxgen> | 2004-02-16 10:26:03 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-02-16 10:26:03 (GMT) |
commit | 17c41e5bacb70bbe2910ec3bd967343236a437db (patch) | |
tree | a487fcdc40019c1a9a3acc3eba7ccc7249dfe451 /src/Remember.cc | |
parent | c0cf1d918bd4a8b21ae57f79c570a534866795e7 (diff) | |
download | fluxbox-17c41e5bacb70bbe2910ec3bd967343236a437db.zip fluxbox-17c41e5bacb70bbe2910ec3bd967343236a437db.tar.bz2 |
added hidden state to remember, patch from akira
Diffstat (limited to 'src/Remember.cc')
-rw-r--r-- | src/Remember.cc | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/Remember.cc b/src/Remember.cc index fef995b..5f1787f 100644 --- a/src/Remember.cc +++ b/src/Remember.cc | |||
@@ -21,7 +21,7 @@ | |||
21 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 21 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
22 | // DEALINGS IN THE SOFTWARE. | 22 | // DEALINGS IN THE SOFTWARE. |
23 | 23 | ||
24 | // $Id: Remember.cc,v 1.33 2003/12/19 00:48:41 fluxgen Exp $ | 24 | // $Id: Remember.cc,v 1.34 2004/02/16 10:25:33 fluxgen Exp $ |
25 | 25 | ||
26 | #include "Remember.hh" | 26 | #include "Remember.hh" |
27 | #include "ClientPattern.hh" | 27 | #include "ClientPattern.hh" |
@@ -208,15 +208,16 @@ Application::Application(bool grouped) | |||
208 | : is_grouped(grouped), | 208 | : is_grouped(grouped), |
209 | group(0) | 209 | group(0) |
210 | { | 210 | { |
211 | workspace_remember = | 211 | decostate_remember = |
212 | dimensions_remember = | 212 | dimensions_remember = |
213 | hiddenstate_remember = | ||
214 | jumpworkspace_remember = | ||
215 | layer_remember = | ||
213 | position_remember = | 216 | position_remember = |
214 | stuckstate_remember = | ||
215 | decostate_remember = | ||
216 | shadedstate_remember = | 217 | shadedstate_remember = |
218 | stuckstate_remember = | ||
217 | tabstate_remember = | 219 | tabstate_remember = |
218 | jumpworkspace_remember = | 220 | workspace_remember = |
219 | layer_remember = | ||
220 | save_on_close_remember = false; | 221 | save_on_close_remember = false; |
221 | } | 222 | } |
222 | 223 | ||
@@ -363,6 +364,8 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) { | |||
363 | app.rememberShadedstate((str_label=="yes")); | 364 | app.rememberShadedstate((str_label=="yes")); |
364 | } else if (str_key == "Tab") { | 365 | } else if (str_key == "Tab") { |
365 | app.rememberTabstate((str_label=="yes")); | 366 | app.rememberTabstate((str_label=="yes")); |
367 | } else if (str_key == "Hidden") { | ||
368 | app.rememberHiddenstate((str_label=="yes")); | ||
366 | } else if (str_key == "Deco") { | 369 | } else if (str_key == "Deco") { |
367 | if (str_label == "NONE") { | 370 | if (str_label == "NONE") { |
368 | app.rememberDecostate((unsigned int) 0); | 371 | app.rememberDecostate((unsigned int) 0); |
@@ -545,6 +548,9 @@ void Remember::save() { | |||
545 | if (a.tabstate_remember) { | 548 | if (a.tabstate_remember) { |
546 | apps_file << " [Tab]\t\t{" << ((a.tabstate)?"yes":"no") << "}" << endl; | 549 | apps_file << " [Tab]\t\t{" << ((a.tabstate)?"yes":"no") << "}" << endl; |
547 | } | 550 | } |
551 | if (a.hiddenstate_remember) { | ||
552 | apps_file << " [Hidden]\t\t{" << ((a.tabstate)?"yes":"no") << "}" << endl; | ||
553 | } | ||
548 | if (a.decostate_remember) { | 554 | if (a.decostate_remember) { |
549 | switch (a.decostate) { | 555 | switch (a.decostate) { |
550 | case (0) : | 556 | case (0) : |
@@ -601,6 +607,9 @@ bool Remember::isRemembered(WinClient &winclient, Attribute attrib) { | |||
601 | case REM_POSITION: | 607 | case REM_POSITION: |
602 | return app->position_remember; | 608 | return app->position_remember; |
603 | break; | 609 | break; |
610 | case REM_HIDDENSTATE: | ||
611 | return app->hiddenstate_remember; | ||
612 | break; | ||
604 | case REM_STUCKSTATE: | 613 | case REM_STUCKSTATE: |
605 | return app->stuckstate_remember; | 614 | return app->stuckstate_remember; |
606 | break; | 615 | break; |
@@ -646,6 +655,9 @@ void Remember::rememberAttrib(WinClient &winclient, Attribute attrib) { | |||
646 | case REM_POSITION: | 655 | case REM_POSITION: |
647 | app->rememberPosition(win->x(), win->y()); | 656 | app->rememberPosition(win->x(), win->y()); |
648 | break; | 657 | break; |
658 | case REM_HIDDENSTATE: | ||
659 | app->rememberHiddenstate(win->isHidden()); | ||
660 | break; | ||
649 | case REM_SHADEDSTATE: | 661 | case REM_SHADEDSTATE: |
650 | app->rememberShadedstate(win->isShaded()); | 662 | app->rememberShadedstate(win->isShaded()); |
651 | break; | 663 | break; |
@@ -691,6 +703,9 @@ void Remember::forgetAttrib(WinClient &winclient, Attribute attrib) { | |||
691 | case REM_POSITION: | 703 | case REM_POSITION: |
692 | app->forgetPosition(); | 704 | app->forgetPosition(); |
693 | break; | 705 | break; |
706 | case REM_HIDDENSTATE: | ||
707 | app->forgetHiddenstate(); | ||
708 | break; | ||
694 | case REM_STUCKSTATE: | 709 | case REM_STUCKSTATE: |
695 | app->forgetStuckstate(); | 710 | app->forgetStuckstate(); |
696 | break; | 711 | break; |
@@ -794,6 +809,8 @@ void Remember::setupFrame(FluxboxWindow &win) { | |||
794 | if (win.isStuck() && !app->stuckstate || | 809 | if (win.isStuck() && !app->stuckstate || |
795 | !win.isStuck() && app->stuckstate) | 810 | !win.isStuck() && app->stuckstate) |
796 | win.stick(); // toggles | 811 | win.stick(); // toggles |
812 | if (app->hiddenstate_remember) | ||
813 | win.setHidden(true); | ||
797 | 814 | ||
798 | if (app->layer_remember) | 815 | if (app->layer_remember) |
799 | win.moveToLayer(app->layer); | 816 | win.moveToLayer(app->layer); |