summaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-08-14 05:53:38 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-08-14 05:53:38 (GMT)
commit31b47e78147ca20803b123f392bfd2002b70e052 (patch)
treef7beb9baa9daf86d66358fd834cafae14de7c782 /src/FbTk
parente169d33552c8e7070aa6e13da0187f2013b4cfc3 (diff)
downloadfluxbox_lack-31b47e78147ca20803b123f392bfd2002b70e052.zip
fluxbox_lack-31b47e78147ca20803b123f392bfd2002b70e052.tar.bz2
cleanup of some files
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/AutoReloadHelper.cc14
-rw-r--r--src/FbTk/AutoReloadHelper.hh4
-rw-r--r--src/FbTk/ImageControl.cc4
3 files changed, 11 insertions, 11 deletions
diff --git a/src/FbTk/AutoReloadHelper.cc b/src/FbTk/AutoReloadHelper.cc
index e3c1d59..17124d4 100644
--- a/src/FbTk/AutoReloadHelper.cc
+++ b/src/FbTk/AutoReloadHelper.cc
@@ -40,19 +40,19 @@ void AutoReloadHelper::checkReload() {
40 } 40 }
41} 41}
42 42
43void AutoReloadHelper::setMainFile(std::string file) { 43void AutoReloadHelper::setMainFile(const std::string& file) {
44 file = StringUtil::expandFilename(file); 44 std::string expanded_file = StringUtil::expandFilename(file);
45 if (file == m_main_file) 45 if (expanded_file == m_main_file)
46 return; 46 return;
47 m_main_file = file; 47 m_main_file = expanded_file;
48 reload(); 48 reload();
49} 49}
50 50
51void AutoReloadHelper::addFile(std::string file) { 51void AutoReloadHelper::addFile(const std::string& file) {
52 if (file.empty()) 52 if (file.empty())
53 return; 53 return;
54 file = StringUtil::expandFilename(file); 54 std::string expanded_file = StringUtil::expandFilename(file);
55 m_timestamps[file] = FileUtil::getLastStatusChangeTimestamp(file.c_str()); 55 m_timestamps[expanded_file] = FileUtil::getLastStatusChangeTimestamp(expanded_file.c_str());
56} 56}
57 57
58void AutoReloadHelper::reload() { 58void AutoReloadHelper::reload() {
diff --git a/src/FbTk/AutoReloadHelper.hh b/src/FbTk/AutoReloadHelper.hh
index 36be8f1..b337a4a 100644
--- a/src/FbTk/AutoReloadHelper.hh
+++ b/src/FbTk/AutoReloadHelper.hh
@@ -34,8 +34,8 @@ namespace FbTk {
34class AutoReloadHelper { 34class AutoReloadHelper {
35public: 35public:
36 36
37 void setMainFile(std::string filename); 37 void setMainFile(const std::string& filename);
38 void addFile(std::string filename); 38 void addFile(const std::string& filename);
39 void setReloadCmd(RefCount<Command<void> > cmd) { m_reload_cmd = cmd; } 39 void setReloadCmd(RefCount<Command<void> > cmd) { m_reload_cmd = cmd; }
40 40
41 void checkReload(); 41 void checkReload();
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc
index b9c3685..38114c8 100644
--- a/src/FbTk/ImageControl.cc
+++ b/src/FbTk/ImageControl.cc
@@ -495,7 +495,7 @@ void ImageControl::createColorTable() {
495 for (int b = 0; b < m_colors_per_channel; b++, i++) { 495 for (int b = 0; b < m_colors_per_channel; b++, i++) {
496 m_colors[i].red = (r * 0xffff) / (m_colors_per_channel - 1); 496 m_colors[i].red = (r * 0xffff) / (m_colors_per_channel - 1);
497 m_colors[i].green = (g * 0xffff) / (m_colors_per_channel - 1); 497 m_colors[i].green = (g * 0xffff) / (m_colors_per_channel - 1);
498 m_colors[i].blue = (b * 0xffff) / (m_colors_per_channel - 1);; 498 m_colors[i].blue = (b * 0xffff) / (m_colors_per_channel - 1);
499 m_colors[i].flags = DoRed|DoGreen|DoBlue; 499 m_colors[i].flags = DoRed|DoGreen|DoBlue;
500 } 500 }
501 } 501 }
@@ -587,7 +587,7 @@ void ImageControl::createColorTable() {
587 for (unsigned int i = 0; i < m_num_colors; i++) { 587 for (unsigned int i = 0; i < m_num_colors; i++) {
588 m_colors[i].red = (i * 0xffff) / (m_colors_per_channel - 1); 588 m_colors[i].red = (i * 0xffff) / (m_colors_per_channel - 1);
589 m_colors[i].green = (i * 0xffff) / (m_colors_per_channel - 1); 589 m_colors[i].green = (i * 0xffff) / (m_colors_per_channel - 1);
590 m_colors[i].blue = (i * 0xffff) / (m_colors_per_channel - 1);; 590 m_colors[i].blue = (i * 0xffff) / (m_colors_per_channel - 1);
591 m_colors[i].flags = DoRed|DoGreen|DoBlue; 591 m_colors[i].flags = DoRed|DoGreen|DoBlue;
592 592
593 if (! XAllocColor(disp, m_colormap, 593 if (! XAllocColor(disp, m_colormap,