remember on the class AND instance name by default
This commit is contained in:
parent
f46660f711
commit
2006d20d45
2 changed files with 12 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.0.0:
|
||||
*07/08/05:
|
||||
* When saving window info for rememberm use class name AND instance name.
|
||||
This should fix firefox/thunderbird issues, but note that mplayer (nogui)
|
||||
sets the vo driver name as the instance name. (Simon)
|
||||
Remember.cc
|
||||
* Fix menu heading encoding (Simon)
|
||||
sf.net bug #1712583: NLS:Non-latin characters displayed incorrectly in menu title
|
||||
MenuCreator.cc
|
||||
|
|
|
@ -318,15 +318,22 @@ Application * Remember::add(WinClient &winclient) {
|
|||
ClientPattern *p = new ClientPattern();
|
||||
Application *app = new Application(0);
|
||||
|
||||
// by default, we match against the WMClass of a window.
|
||||
// by default, we match against the WMClass of a window (instance and class strings)
|
||||
string win_name = p->getProperty(ClientPattern::NAME, winclient);
|
||||
string win_class = p->getProperty(ClientPattern::CLASS, winclient);
|
||||
|
||||
// replace special chars like ( ) and [ ] with \( \) and \[ \]
|
||||
win_name = FbTk::StringUtil::replaceString(win_name, "(", "\\(");
|
||||
win_name = FbTk::StringUtil::replaceString(win_name, ")", "\\)");
|
||||
win_name = FbTk::StringUtil::replaceString(win_name, "[", "\\[");
|
||||
win_name = FbTk::StringUtil::replaceString(win_name, "]", "\\]");
|
||||
|
||||
win_class = FbTk::StringUtil::replaceString(win_class, "(", "\\(");
|
||||
win_class = FbTk::StringUtil::replaceString(win_class, ")", "\\)");
|
||||
win_class = FbTk::StringUtil::replaceString(win_class, "[", "\\[");
|
||||
win_class = FbTk::StringUtil::replaceString(win_class, "]", "\\]");
|
||||
|
||||
p->addTerm(win_name, ClientPattern::NAME);
|
||||
p->addTerm(win_class, ClientPattern::CLASS);
|
||||
m_clients[&winclient] = app;
|
||||
p->addMatch();
|
||||
|
|
Loading…
Reference in a new issue