summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-02-16 10:26:03 (GMT)
committerfluxgen <fluxgen>2004-02-16 10:26:03 (GMT)
commit17c41e5bacb70bbe2910ec3bd967343236a437db (patch)
treea487fcdc40019c1a9a3acc3eba7ccc7249dfe451
parentc0cf1d918bd4a8b21ae57f79c570a534866795e7 (diff)
downloadfluxbox_lack-17c41e5bacb70bbe2910ec3bd967343236a437db.zip
fluxbox_lack-17c41e5bacb70bbe2910ec3bd967343236a437db.tar.bz2
added hidden state to remember, patch from akira
-rw-r--r--src/IconbarTool.cc4
-rw-r--r--src/Remember.cc29
-rw-r--r--src/Remember.hh22
3 files changed, 40 insertions, 15 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index 72e6ce1..d1292c4 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: IconbarTool.cc,v 1.32 2004/01/21 14:13:57 fluxgen Exp $ 23// $Id: IconbarTool.cc,v 1.33 2004/02/16 10:26:03 fluxgen Exp $
24 24
25#include "IconbarTool.hh" 25#include "IconbarTool.hh"
26 26
@@ -682,7 +682,7 @@ void IconbarTool::removeWindow(FluxboxWindow &win) {
682 682
683void IconbarTool::addWindow(FluxboxWindow &win) { 683void IconbarTool::addWindow(FluxboxWindow &win) {
684 // we just want windows that has clients 684 // we just want windows that has clients
685 if (win.clientList().empty()) 685 if (win.clientList().empty() || win.isHidden() )
686 return; 686 return;
687 687
688 IconButton *button = new IconButton(m_icon_container, m_theme.focusedText().font(), win); 688 IconButton *button = new IconButton(m_icon_container, m_theme.focusedText().font(), win);
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);
diff --git a/src/Remember.hh b/src/Remember.hh
index 50c15df..2e92e42 100644
--- a/src/Remember.hh
+++ b/src/Remember.hh
@@ -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.hh,v 1.14 2004/01/19 18:26:25 fluxgen Exp $ 24// $Id: Remember.hh,v 1.15 2004/02/16 10:25:34 fluxgen Exp $
25 25
26/* Based on the original "Remember patch" by Xavier Brouckaert */ 26/* Based on the original "Remember patch" by Xavier Brouckaert */
27 27
@@ -50,6 +50,7 @@ public:
50 inline void forgetShadedstate() { shadedstate_remember = false; } 50 inline void forgetShadedstate() { shadedstate_remember = false; }
51 inline void forgetTabstate() { tabstate_remember = false; } 51 inline void forgetTabstate() { tabstate_remember = false; }
52 inline void forgetDecostate() { decostate_remember = false; } 52 inline void forgetDecostate() { decostate_remember = false; }
53 inline void forgetHiddenstate() { hiddenstate_remember= false; }
53 inline void forgetStuckstate() { stuckstate_remember = false; } 54 inline void forgetStuckstate() { stuckstate_remember = false; }
54 inline void forgetJumpworkspace() { jumpworkspace_remember = false; } 55 inline void forgetJumpworkspace() { jumpworkspace_remember = false; }
55 inline void forgetLayer() { layer_remember = false; } 56 inline void forgetLayer() { layer_remember = false; }
@@ -59,6 +60,9 @@ public:
59 { workspace = ws; workspace_remember = true; } 60 { workspace = ws; workspace_remember = true; }
60 inline void rememberDimensions(int width, int height) 61 inline void rememberDimensions(int width, int height)
61 { w = width; h = height; dimensions_remember = true; } 62 { w = width; h = height; dimensions_remember = true; }
63
64 inline void rememberHiddenstate(bool state)
65 { hiddenstate= state; hiddenstate_remember= true; }
62 inline void rememberPosition(int posx, int posy, unsigned char rfc= 0 ) 66 inline void rememberPosition(int posx, int posy, unsigned char rfc= 0 )
63 { x = posx; y = posy; refc = rfc; position_remember = true; } 67 { x = posx; y = posy; refc = rfc; position_remember = true; }
64 inline void rememberShadedstate(bool state) 68 inline void rememberShadedstate(bool state)
@@ -102,6 +106,9 @@ public:
102 bool stuckstate_remember; 106 bool stuckstate_remember;
103 bool stuckstate; 107 bool stuckstate;
104 108
109 bool hiddenstate_remember;
110 bool hiddenstate;
111
105 bool jumpworkspace_remember; 112 bool jumpworkspace_remember;
106 bool jumpworkspace; 113 bool jumpworkspace;
107 114
@@ -129,16 +136,17 @@ public:
129 * holds which attributes to remember 136 * holds which attributes to remember
130 */ 137 */
131 enum Attribute { 138 enum Attribute {
132 REM_WORKSPACE=0, 139 REM_DECOSTATE= 0,
133 REM_DIMENSIONS, 140 REM_DIMENSIONS,
141 REM_HIDDENSTATE,
142 REM_JUMPWORKSPACE,
143 REM_LAYER,
134 REM_POSITION, 144 REM_POSITION,
135 REM_STUCKSTATE, 145 REM_SAVEONCLOSE,
136 REM_DECOSTATE,
137 REM_SHADEDSTATE, 146 REM_SHADEDSTATE,
147 REM_STUCKSTATE,
138 //REM_TABSTATE, ... external tabs disabled atm 148 //REM_TABSTATE, ... external tabs disabled atm
139 REM_LAYER, 149 REM_WORKSPACE,
140 REM_JUMPWORKSPACE,
141 REM_SAVEONCLOSE,
142 REM_LASTATTRIB // not actually used 150 REM_LASTATTRIB // not actually used
143 }; 151 };
144 152