summaryrefslogtreecommitdiff
path: root/src/Remember.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Remember.cc')
-rw-r--r--src/Remember.cc50
1 files changed, 26 insertions, 24 deletions
diff --git a/src/Remember.cc b/src/Remember.cc
index c0c0b9d..af0270d 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.36 2004/04/18 17:53:15 fluxgen Exp $ 24// $Id: Remember.cc,v 1.37 2004/06/07 11:46:04 rathnor Exp $
25 25
26#include "Remember.hh" 26#include "Remember.hh"
27#include "ClientPattern.hh" 27#include "ClientPattern.hh"
@@ -32,6 +32,7 @@
32#include "FbCommands.hh" 32#include "FbCommands.hh"
33#include "fluxbox.hh" 33#include "fluxbox.hh"
34 34
35#include "FbTk/I18n.hh"
35#include "FbTk/StringUtil.hh" 36#include "FbTk/StringUtil.hh"
36#include "FbTk/MenuItem.hh" 37#include "FbTk/MenuItem.hh"
37#include "FbTk/App.hh" 38#include "FbTk/App.hh"
@@ -123,25 +124,25 @@ FbTk::Menu *createRememberMenu(Remember &remember, FluxboxWindow &win, bool enab
123 return menu; 124 return menu;
124 } 125 }
125 126
126 // TODO: nls 127 _FB_USES_NLS;
127 menu->insert(new RememberMenuItem("Workspace", remember, win, 128 menu->insert(new RememberMenuItem(_FBTEXT(Remember, Workspace, "Workspace", "Remember Workspace"),
128 Remember::REM_WORKSPACE)); 129 remember, win, Remember::REM_WORKSPACE));
129 menu->insert(new RememberMenuItem("Jump to workspace", remember, win, 130 menu->insert(new RememberMenuItem(_FBTEXT(Remember, JumpToWorkspace, "Jump to workspace", "Change active workspace to remembered one on open"),
130 Remember::REM_JUMPWORKSPACE)); 131 remember, win, Remember::REM_JUMPWORKSPACE));
131 menu->insert(new RememberMenuItem("Dimensions", remember, win, 132 menu->insert(new RememberMenuItem(_FBTEXT(Remember, Dimensions, "Dimensions", "Remember Dimensions - windth width and height"),
132 Remember::REM_DIMENSIONS)); 133 remember, win, Remember::REM_DIMENSIONS));
133 menu->insert(new RememberMenuItem("Position", remember, win, 134 menu->insert(new RememberMenuItem(_FBTEXT(Remember, Position, "Position", "Remember position - window co-ordinates"),
134 Remember::REM_POSITION)); 135 remember, win, Remember::REM_POSITION));
135 menu->insert(new RememberMenuItem("Sticky", remember, win, 136 menu->insert(new RememberMenuItem(_FBTEXT(Remember, Sticky, "Sticky", "Remember Sticky"),
136 Remember::REM_STUCKSTATE)); 137 remember, win, Remember::REM_STUCKSTATE));
137 menu->insert(new RememberMenuItem("Decorations", remember, win, 138 menu->insert(new RememberMenuItem(_FBTEXT(Remember, Decorations, "Decorations", "Remember window decorations"),
138 Remember::REM_DECOSTATE)); 139 remember, win, Remember::REM_DECOSTATE));
139 menu->insert(new RememberMenuItem("Shaded", remember, win, 140 menu->insert(new RememberMenuItem(_FBTEXT(Remember, Shaded, "Shaded", "Remember shaded"),
140 Remember::REM_SHADEDSTATE)); 141 remember, win, Remember::REM_SHADEDSTATE));
141 menu->insert(new RememberMenuItem("Layer", remember, win, 142 menu->insert(new RememberMenuItem(_FBTEXT(Remember, Layer, "Layer", "Remember Layer"),
142 Remember::REM_LAYER)); 143 remember, win, Remember::REM_LAYER));
143 menu->insert(new RememberMenuItem("Save on close", remember, win, 144 menu->insert(new RememberMenuItem(_FBTEXT(Remember, SaveOnClose, "Save on close", "Save remembered attributes on close"),
144 Remember::REM_SAVEONCLOSE)); 145 remember, win, Remember::REM_SAVEONCLOSE));
145 146
146 menu->update(); 147 menu->update();
147 return menu; 148 return menu;
@@ -284,6 +285,7 @@ Application * Remember::add(WinClient &winclient) {
284 285
285int Remember::parseApp(ifstream &file, Application &app, string *first_line) { 286int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
286 string line; 287 string line;
288 _FB_USES_NLS;
287 int row = 0; 289 int row = 0;
288 while (! file.eof()) { 290 while (! file.eof()) {
289 if (first_line || getline(file, line)) { 291 if (first_line || getline(file, line)) {
@@ -415,7 +417,7 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
415 } else if (str_key == "end") { 417 } else if (str_key == "end") {
416 return row; 418 return row;
417 } else { 419 } else {
418 cerr << "Unsupported apps key = " << str_key << endl; 420 cerr << _FBTEXT(Remember, Unknown, "Unknown apps key", "apps entry type not known")<<" = " << str_key << endl;
419 } 421 }
420 } 422 }
421 } 423 }
@@ -758,13 +760,13 @@ void Remember::forgetAttrib(WinClient &winclient, Attribute attrib) {
758 760
759void Remember::setupFrame(FluxboxWindow &win) { 761void Remember::setupFrame(FluxboxWindow &win) {
760 WinClient &winclient = win.winClient(); 762 WinClient &winclient = win.winClient();
761 763 _FB_USES_NLS;
762 // we don't touch the window if it is a transient 764 // we don't touch the window if it is a transient
763 // of something else 765 // of something else
764 766
765 // All windows get the remember menu. 767 // All windows get the remember menu.
766 // TODO: nls 768 win.addExtraMenu(_FBTEXT(Remember, MenuItemName, "Remember...", "Remember item in menu"),
767 win.addExtraMenu("Remember...", createRememberMenu(*this, win, (winclient.transientFor() == 0))); 769 createRememberMenu(*this, win, (winclient.transientFor() == 0)));
768 770
769 if (winclient.transientFor()) 771 if (winclient.transientFor())
770 return; 772 return;