summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-07-21 22:19:53 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-07-21 22:19:53 +0000
commit34d08da015358e09229ebd7f01744432901bdc47 (patch)
tree5766107cc843557a0fab0c9bda889311ba41d9fc /src/ui/widget
parentFixing some icons dont redraw (diff)
downloadinkscape-34d08da015358e09229ebd7f01744432901bdc47.tar.gz
inkscape-34d08da015358e09229ebd7f01744432901bdc47.zip
Fixing coding style
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/anchor-selector.cpp2
-rw-r--r--src/ui/widget/preferences-widget.cpp23
-rw-r--r--src/ui/widget/preferences-widget.h10
3 files changed, 17 insertions, 18 deletions
diff --git a/src/ui/widget/anchor-selector.cpp b/src/ui/widget/anchor-selector.cpp
index fc7c15f21..0873f9a84 100644
--- a/src/ui/widget/anchor-selector.cpp
+++ b/src/ui/widget/anchor-selector.cpp
@@ -20,7 +20,7 @@ void AnchorSelector::setupButton(const Glib::ustring& icon, Gtk::ToggleButton& b
Gtk::Image *buttonIcon = Gtk::manage(sp_get_icon_image(icon, Gtk::ICON_SIZE_SMALL_TOOLBAR));
buttonIcon->show();
- button.set_relief(Gtk::RELIEF_NONE);
+ button.set_relief(Gtk::RELIEF_NONE);
button.show();
button.add(*buttonIcon);
button.set_can_focus(false);
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp
index 09656a800..7e9335a8a 100644
--- a/src/ui/widget/preferences-widget.cpp
+++ b/src/ui/widget/preferences-widget.cpp
@@ -634,13 +634,14 @@ void PrefCombo::init(Glib::ustring const &prefs_path,
this->set_active(row);
}
-void PrefCombo::init(Glib::ustring const &prefs_path,
- std::vector<Glib::ustring> labels, std::vector<int> values, int default_value)
+void PrefCombo::init(Glib::ustring const &prefs_path, std::vector<Glib::ustring> labels, std::vector<int> values,
+ int default_value)
{
size_t labels_size = labels.size();
size_t values_size = values.size();
if (values_size != labels_size) {
- std::cout << "PrefCombo::" << "Diferent number of values/labels in " << prefs_path << std::endl;
+ std::cout << "PrefCombo::"
+ << "Diferent number of values/labels in " << prefs_path << std::endl;
return;
}
_prefs_path = prefs_path;
@@ -648,8 +649,7 @@ void PrefCombo::init(Glib::ustring const &prefs_path,
int row = 0;
int value = prefs->getInt(_prefs_path, default_value);
- for (int i = 0 ; i < labels_size; ++i)
- {
+ for (int i = 0; i < labels_size; ++i) {
this->append(labels[i]);
_values.push_back(values[i]);
if (value == values[i])
@@ -658,26 +658,25 @@ void PrefCombo::init(Glib::ustring const &prefs_path,
this->set_active(row);
}
-void PrefCombo::init(Glib::ustring const &prefs_path,
- std::vector<Glib::ustring> labels, std::vector<Glib::ustring> values, Glib::ustring default_value)
+void PrefCombo::init(Glib::ustring const &prefs_path, std::vector<Glib::ustring> labels,
+ std::vector<Glib::ustring> values, Glib::ustring default_value)
{
size_t labels_size = labels.size();
size_t values_size = values.size();
if (values_size != labels_size) {
- std::cout << "PrefCombo::" << "Diferent number of values/labels in " << prefs_path << std::endl;
+ std::cout << "PrefCombo::"
+ << "Diferent number of values/labels in " << prefs_path << std::endl;
return;
}
_prefs_path = prefs_path;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
int row = 0;
Glib::ustring value = prefs->getString(_prefs_path);
- if(value.empty())
- {
+ if (value.empty()) {
value = default_value;
}
- for (int i = 0 ; i < labels_size; ++i)
- {
+ for (int i = 0; i < labels_size; ++i) {
this->append(labels[i]);
_ustr_values.push_back(values[i]);
if (value == values[i])
diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h
index f75079c77..5036a1c50 100644
--- a/src/ui/widget/preferences-widget.h
+++ b/src/ui/widget/preferences-widget.h
@@ -185,13 +185,13 @@ public:
* Initialize a combo box.
* with vectors.
*/
- void init(Glib::ustring const &prefs_path,
- std::vector<Glib::ustring> labels, std::vector<int> values, int default_value);
+ void init(Glib::ustring const &prefs_path, std::vector<Glib::ustring> labels, std::vector<int> values,
+ int default_value);
- void init(Glib::ustring const &prefs_path,
- std::vector<Glib::ustring> labels, std::vector<Glib::ustring> values, Glib::ustring default_value);
+ void init(Glib::ustring const &prefs_path, std::vector<Glib::ustring> labels, std::vector<Glib::ustring> values,
+ Glib::ustring default_value);
-protected:
+ protected:
Glib::ustring _prefs_path;
std::vector<int> _values;
std::vector<Glib::ustring> _ustr_values; ///< string key values used optionally instead of numeric _values