diff options
author | simonb <simonb> | 2007-08-05 03:10:04 (GMT) |
---|---|---|
committer | simonb <simonb> | 2007-08-05 03:10:04 (GMT) |
commit | 2006d20d45eaa091c737067004ec7421a0cfc730 (patch) | |
tree | 84565cfd38a8390a183a196891f2bc5d5a64c58a | |
parent | f46660f711a1e48879087cfda08de43c1ab401c0 (diff) | |
download | fluxbox-2006d20d45eaa091c737067004ec7421a0cfc730.zip fluxbox-2006d20d45eaa091c737067004ec7421a0cfc730.tar.bz2 |
remember on the class AND instance name by default
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/Remember.cc | 9 |
2 files changed, 12 insertions, 1 deletions
@@ -1,6 +1,10 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0.0: | 2 | Changes for 1.0.0: |
3 | *07/08/05: | 3 | *07/08/05: |
4 | * When saving window info for rememberm use class name AND instance name. | ||
5 | This should fix firefox/thunderbird issues, but note that mplayer (nogui) | ||
6 | sets the vo driver name as the instance name. (Simon) | ||
7 | Remember.cc | ||
4 | * Fix menu heading encoding (Simon) | 8 | * Fix menu heading encoding (Simon) |
5 | sf.net bug #1712583: NLS:Non-latin characters displayed incorrectly in menu title | 9 | sf.net bug #1712583: NLS:Non-latin characters displayed incorrectly in menu title |
6 | MenuCreator.cc | 10 | MenuCreator.cc |
diff --git a/src/Remember.cc b/src/Remember.cc index aec9921..31b416a 100644 --- a/src/Remember.cc +++ b/src/Remember.cc | |||
@@ -318,15 +318,22 @@ Application * Remember::add(WinClient &winclient) { | |||
318 | ClientPattern *p = new ClientPattern(); | 318 | ClientPattern *p = new ClientPattern(); |
319 | Application *app = new Application(0); | 319 | Application *app = new Application(0); |
320 | 320 | ||
321 | // by default, we match against the WMClass of a window. | 321 | // by default, we match against the WMClass of a window (instance and class strings) |
322 | string win_name = p->getProperty(ClientPattern::NAME, winclient); | ||
322 | string win_class = p->getProperty(ClientPattern::CLASS, winclient); | 323 | string win_class = p->getProperty(ClientPattern::CLASS, winclient); |
323 | 324 | ||
324 | // replace special chars like ( ) and [ ] with \( \) and \[ \] | 325 | // replace special chars like ( ) and [ ] with \( \) and \[ \] |
326 | win_name = FbTk::StringUtil::replaceString(win_name, "(", "\\("); | ||
327 | win_name = FbTk::StringUtil::replaceString(win_name, ")", "\\)"); | ||
328 | win_name = FbTk::StringUtil::replaceString(win_name, "[", "\\["); | ||
329 | win_name = FbTk::StringUtil::replaceString(win_name, "]", "\\]"); | ||
330 | |||
325 | win_class = FbTk::StringUtil::replaceString(win_class, "(", "\\("); | 331 | win_class = FbTk::StringUtil::replaceString(win_class, "(", "\\("); |
326 | win_class = FbTk::StringUtil::replaceString(win_class, ")", "\\)"); | 332 | win_class = FbTk::StringUtil::replaceString(win_class, ")", "\\)"); |
327 | win_class = FbTk::StringUtil::replaceString(win_class, "[", "\\["); | 333 | win_class = FbTk::StringUtil::replaceString(win_class, "[", "\\["); |
328 | win_class = FbTk::StringUtil::replaceString(win_class, "]", "\\]"); | 334 | win_class = FbTk::StringUtil::replaceString(win_class, "]", "\\]"); |
329 | 335 | ||
336 | p->addTerm(win_name, ClientPattern::NAME); | ||
330 | p->addTerm(win_class, ClientPattern::CLASS); | 337 | p->addTerm(win_class, ClientPattern::CLASS); |
331 | m_clients[&winclient] = app; | 338 | m_clients[&winclient] = app; |
332 | p->addMatch(); | 339 | p->addMatch(); |