diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-13 03:16:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-13 03:16:00 +0300 |
commit | 39dbb74b3f1adc7d28c1a8ba9bb633afbf745b6b (patch) | |
tree | 7b730913775d25984689d3308b0d561999662192 /src/gui/widgets | |
parent | 262ce6d0ee2737e8d24914e4ed35c29cc335060b (diff) | |
download | plus-39dbb74b3f1adc7d28c1a8ba9bb633afbf745b6b.tar.gz plus-39dbb74b3f1adc7d28c1a8ba9bb633afbf745b6b.tar.bz2 plus-39dbb74b3f1adc7d28c1a8ba9bb633afbf745b6b.tar.xz plus-39dbb74b3f1adc7d28c1a8ba9bb633afbf745b6b.zip |
Fix code style.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/itemlinkhandler.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/window.h | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index 3a4bf165b..293eb5237 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -95,7 +95,7 @@ void ItemLinkHandler::handleLink(const std::string &link, std::string url = link; replaceAll(url, " ", ""); listener.url = url; - ConfirmDialog *confirmDlg = new ConfirmDialog( + ConfirmDialog *const confirmDlg = new ConfirmDialog( _("Open url"), url, false, true); confirmDlg->addActionListener(&listener); } diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index bc0375601..9d8be9717 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -394,7 +394,7 @@ void ScrollArea::drawRightButton(gcn::Graphics *const graphics) void ScrollArea::drawVBar(gcn::Graphics *const graphics) { const gcn::Rectangle dim = getVerticalBarDimension(); - Graphics *g = static_cast<Graphics*>(graphics); + Graphics *const g = static_cast<Graphics*>(graphics); if (vBackground.grid[4]) { @@ -417,7 +417,7 @@ void ScrollArea::drawVBar(gcn::Graphics *const graphics) void ScrollArea::drawHBar(gcn::Graphics *const graphics) { const gcn::Rectangle dim = getHorizontalBarDimension(); - Graphics *g = static_cast<Graphics*>(graphics); + Graphics *const g = static_cast<Graphics*>(graphics); if (hBackground.grid[4]) { diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index e49af5f15..39e09ef4a 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -42,6 +42,8 @@ #include "debug.h" +const int resizeMask = 8 + 4 + 2 + 1; + int Window::instances = 0; int Window::mouseResize = 0; @@ -923,7 +925,7 @@ int Window::getResizeHandles(const gcn::MouseEvent &event) return resizeHandles; } -bool Window::isResizeAllowed(const gcn::MouseEvent &event) +bool Window::isResizeAllowed(const gcn::MouseEvent &event) const { const int y = event.getY(); diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index 01519e271..1e1caa6cd 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -396,7 +396,7 @@ class Window : public gcn::Window, private gcn::WidgetListener gcn::Rectangle getWindowArea() const; - bool isResizeAllowed(const gcn::MouseEvent &event); + bool isResizeAllowed(const gcn::MouseEvent &event) const; void setCaptionFont(gcn::Font *font) { mCaptionFont = font; } @@ -426,8 +426,6 @@ class Window : public gcn::Window, private gcn::WidgetListener CLOSE = 0x10 }; - const int resizeMask = 8 + 4 + 2 + 1; - /** * Ensures the window is on the screen, moving it if necessary. This is * used by loadWindowState and setVisible(true), and when the screen |