[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src/widgets button.cpp
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src/widgets button.cpp |
Date: |
Sat, 11 Dec 2004 15:37:48 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 04/12/11 20:27:13
Modified files:
src/widgets : button.cpp
Log message:
Fix separator in buttons.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/button.cpp.diff?tr1=1.51&tr2=1.52&r1=text&r2=text
Patches:
Index: wesnoth/src/widgets/button.cpp
diff -u wesnoth/src/widgets/button.cpp:1.51 wesnoth/src/widgets/button.cpp:1.52
--- wesnoth/src/widgets/button.cpp:1.51 Mon Nov 22 23:54:27 2004
+++ wesnoth/src/widgets/button.cpp Sat Dec 11 20:27:13 2004
@@ -1,4 +1,4 @@
-/* $Id: button.cpp,v 1.51 2004/11/22 23:54:27 ydirson Exp $ */
+/* $Id: button.cpp,v 1.52 2004/12/11 20:27:13 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -14,6 +14,7 @@
#include "../global.hpp"
#include "button.hpp"
+#include "menu.hpp"
#include "../display.hpp"
#include "../game.hpp"
#include "../font.hpp"
@@ -182,7 +183,7 @@
}
namespace {
- bool not_image(const std::string& str) { return str != "" && str[0] !=
'&'; }
+ bool not_image(const std::string& str) { return !str.empty() && str[0]
!= IMAGE_PREFIX; }
}
void button::set_label(const std::string& val)
@@ -190,8 +191,8 @@
label_ = val;
//if we have a list of items, use the first one that isn't an image
- if(std::find(label_.begin(),label_.end(),',') != label_.end()) {
- const std::vector<std::string>& items = config::split(label_);
+ if (std::find(label_.begin(), label_.end(), COLUMN_SEPARATOR) !=
label_.end()) {
+ const std::vector<std::string>& items = config::split(label_,
COLUMN_SEPARATOR);
const std::vector<std::string>::const_iterator i =
std::find_if(items.begin(),items.end(),not_image);
if(i != items.end()) {
label_ = *i;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src/widgets button.cpp,
Guillaume Melquiond <=