moved function so fluxbox compiles with --disable-remember
This commit is contained in:
parent
6f8a5c7a8d
commit
b4b927dad9
5 changed files with 32 additions and 30 deletions
|
@ -1,5 +1,8 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.0.0:
|
||||
*07/06/16:
|
||||
* Fixed compile error with --disable-remember (Mark)
|
||||
Window.cc/hh Remember.cc/hh
|
||||
*07/06/09:
|
||||
* Minor change to the /bin/sh - solution (Mathias)
|
||||
we are using now just $SHELL -c <line_here>
|
||||
|
|
|
@ -290,32 +290,6 @@ Remember::~Remember() {
|
|||
s_instance = 0;
|
||||
}
|
||||
|
||||
int Remember::getDecoFromString(const string &str_label) {
|
||||
if (strcasecmp(str_label.c_str(), "NONE") == 0)
|
||||
return 0;
|
||||
if (strcasecmp(str_label.c_str(), "NORMAL") == 0)
|
||||
return FluxboxWindow::DECORM_LAST - 1;
|
||||
if (strcasecmp(str_label.c_str(), "TINY") == 0)
|
||||
return FluxboxWindow::DECORM_TITLEBAR
|
||||
| FluxboxWindow::DECORM_ICONIFY
|
||||
| FluxboxWindow::DECORM_MENU
|
||||
| FluxboxWindow::DECORM_TAB;
|
||||
if (strcasecmp(str_label.c_str(), "TOOL") == 0)
|
||||
return FluxboxWindow::DECORM_TITLEBAR
|
||||
| FluxboxWindow::DECORM_MENU;
|
||||
if (strcasecmp(str_label.c_str(), "BORDER") == 0)
|
||||
return FluxboxWindow::DECORM_BORDER
|
||||
| FluxboxWindow::DECORM_MENU;
|
||||
if (strcasecmp(str_label.c_str(), "TAB") == 0)
|
||||
return FluxboxWindow::DECORM_BORDER
|
||||
| FluxboxWindow::DECORM_MENU
|
||||
| FluxboxWindow::DECORM_TAB;
|
||||
unsigned int mask;
|
||||
if (getuint(str_label.c_str(), mask))
|
||||
return mask;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Application* Remember::find(WinClient &winclient) {
|
||||
// if it is already associated with a application, return that one
|
||||
// otherwise, check it against every pattern that we've got
|
||||
|
@ -474,7 +448,7 @@ int Remember::parseApp(ifstream &file, Application &app, string *first_line) {
|
|||
app.rememberIconHiddenstate((strcasecmp(str_label.c_str(), "yes") == 0));
|
||||
app.rememberFocusHiddenstate((strcasecmp(str_label.c_str(), "yes") == 0));
|
||||
} else if (strcasecmp(str_key.c_str(), "Deco") == 0) {
|
||||
int deco = getDecoFromString(str_label);
|
||||
int deco = FluxboxWindow::getDecoMaskFromString(str_label);
|
||||
if (deco == -1)
|
||||
had_error = 1;
|
||||
else
|
||||
|
|
|
@ -205,8 +205,6 @@ public:
|
|||
Remember();
|
||||
~Remember();
|
||||
|
||||
static int getDecoFromString(const std::string &str);
|
||||
|
||||
Application* find(WinClient &winclient);
|
||||
Application* add(WinClient &winclient);
|
||||
FluxboxWindow* findGroup(Application *, BScreen &screen);
|
||||
|
|
|
@ -388,7 +388,7 @@ void FluxboxWindow::init() {
|
|||
m_blackbox_attrib.premax_w = m_blackbox_attrib.premax_h = 0;
|
||||
|
||||
// set default decorations but don't apply them
|
||||
setDecorationMask(Remember::getDecoFromString(screen().defaultDeco()), false);
|
||||
setDecorationMask(getDecoMaskFromString(screen().defaultDeco()), false);
|
||||
|
||||
functions.resize = functions.move = functions.iconify = functions.maximize
|
||||
= functions.close = functions.tabable = true;
|
||||
|
@ -4206,3 +4206,29 @@ void FluxboxWindow::associateClient(WinClient &client) {
|
|||
evm.add(*this, client.window());
|
||||
client.setFluxboxWindow(this);
|
||||
}
|
||||
|
||||
int FluxboxWindow::getDecoMaskFromString(const string &str_label) {
|
||||
if (strcasecmp(str_label.c_str(), "NONE") == 0)
|
||||
return 0;
|
||||
if (strcasecmp(str_label.c_str(), "NORMAL") == 0)
|
||||
return FluxboxWindow::DECORM_LAST - 1;
|
||||
if (strcasecmp(str_label.c_str(), "TINY") == 0)
|
||||
return FluxboxWindow::DECORM_TITLEBAR
|
||||
| FluxboxWindow::DECORM_ICONIFY
|
||||
| FluxboxWindow::DECORM_MENU
|
||||
| FluxboxWindow::DECORM_TAB;
|
||||
if (strcasecmp(str_label.c_str(), "TOOL") == 0)
|
||||
return FluxboxWindow::DECORM_TITLEBAR
|
||||
| FluxboxWindow::DECORM_MENU;
|
||||
if (strcasecmp(str_label.c_str(), "BORDER") == 0)
|
||||
return FluxboxWindow::DECORM_BORDER
|
||||
| FluxboxWindow::DECORM_MENU;
|
||||
if (strcasecmp(str_label.c_str(), "TAB") == 0)
|
||||
return FluxboxWindow::DECORM_BORDER
|
||||
| FluxboxWindow::DECORM_MENU
|
||||
| FluxboxWindow::DECORM_TAB;
|
||||
unsigned int mask = atoi(str_label.c_str());
|
||||
if (mask)
|
||||
return mask;
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -399,6 +399,7 @@ public:
|
|||
int layerNum() const { return m_layernum; }
|
||||
void setLayerNum(int layernum);
|
||||
|
||||
static int getDecoMaskFromString(const std::string &str);
|
||||
|
||||
unsigned int titlebarHeight() const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue