aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-08 19:43:38 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-08 19:43:38 (GMT)
commit48cc67965b22801b920317b2778639adeeb5c9ac (patch)
tree8a00da3b393013cbdaa369d54a0d0dc64a680eaf
parentb76be98227bd6e62bc7e5a5fc1c3af0a3dd01b9c (diff)
downloadfluxbox_paul-48cc67965b22801b920317b2778639adeeb5c9ac.zip
fluxbox_paul-48cc67965b22801b920317b2778639adeeb5c9ac.tar.bz2
avoid code duplication
-rw-r--r--src/Remember.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Remember.cc b/src/Remember.cc
index 41bb709..80de7ae 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -360,7 +360,7 @@ bool handleStartupItem(const string &line, int offset) {
360 if (pos > 0) { 360 if (pos > 0) {
361 option = str.substr(0, pos); 361 option = str.substr(0, pos);
362 if (strcasecmp(option.c_str(), "screen") == 0) { 362 if (strcasecmp(option.c_str(), "screen") == 0) {
363 error = !getuint(str.c_str() + pos + 1, screen); 363 error = !FbTk::StringUtil::extractNumber(str.c_str() + pos + 1, screen);
364 } else { 364 } else {
365 error = true; 365 error = true;
366 } 366 }
@@ -453,13 +453,13 @@ int parseApp(ifstream &file, Application &app, string *first_line = 0) {
453 453
454 if (str_key == "workspace") { 454 if (str_key == "workspace") {
455 unsigned int w; 455 unsigned int w;
456 if (getuint(str_label.c_str(), w)) 456 if (FbTk::StringUtil::extractNumber(str_label, w))
457 app.rememberWorkspace(w); 457 app.rememberWorkspace(w);
458 else 458 else
459 had_error = true; 459 had_error = true;
460 } else if (str_key == "head") { 460 } else if (str_key == "head") {
461 unsigned int h; 461 unsigned int h;
462 if (getuint(str_label.c_str(), h)) 462 if (FbTk::StringUtil::extractNumber(str_label, h))
463 app.rememberHead(h); 463 app.rememberHead(h);
464 else 464 else
465 had_error = true; 465 had_error = true;