summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/attributes.cpp3
-rw-r--r--src/attributes.h2
-rw-r--r--src/ui/dialog/styledialog.cpp30
-rw-r--r--src/ui/dialog/styledialog.h15
-rw-r--r--src/ui/widget/ink-flow-box.cpp6
5 files changed, 23 insertions, 33 deletions
diff --git a/src/attributes.cpp b/src/attributes.cpp
index 575e40b5c..3fa8c0fff 100644
--- a/src/attributes.cpp
+++ b/src/attributes.cpp
@@ -604,8 +604,7 @@ sp_attribute_name(SPAttributeEnum id)
return props[id].name;
}
-std::vector<Glib::ustring>
-sp_attribute_name_list(bool cssattr, bool attr)
+std::vector<Glib::ustring> sp_attribute_name_list(bool cssattr, bool attr)
{
std::vector<Glib::ustring> result;
static AttributeLookupImpl const _instance;
diff --git a/src/attributes.h b/src/attributes.h
index f49d8d2f9..7a49e2808 100644
--- a/src/attributes.h
+++ b/src/attributes.h
@@ -14,8 +14,8 @@
*
* Released under GNU GPL v2+, read the file 'COPYING' for more information.
*/
-#include <vector>
#include <glibmm/value.h>
+#include <vector>
/**
* True iff k is a property in SVG, i.e. something that can be written either in a style attribute
diff --git a/src/ui/dialog/styledialog.cpp b/src/ui/dialog/styledialog.cpp
index 7bb58cef9..23dfcf407 100644
--- a/src/ui/dialog/styledialog.cpp
+++ b/src/ui/dialog/styledialog.cpp
@@ -21,11 +21,10 @@
#include "selection.h"
#include "style-internal.h"
#include "style.h"
+#include "svg/svg-color.h"
#include "ui/icon-loader.h"
#include "ui/widget/iconrenderer.h"
#include "verbs.h"
-#include "svg/svg-color.h"
-#include "attributes.h"
#include "xml/attribute-record.h"
#include "xml/node-observer.h"
@@ -210,16 +209,16 @@ StyleDialog::StyleDialog()
Glib::RefPtr<Gtk::ListStore> completionModel = Gtk::ListStore::create(_mCSSData);
_entry_completion = Gtk::EntryCompletion::create();
_entry_completion->set_model(completionModel);
- _entry_completion->set_text_column (_mCSSData._colCSSData);
+ _entry_completion->set_text_column(_mCSSData._colCSSData);
_entry_completion->set_minimum_key_length(1);
_entry_completion->set_popup_completion(true);
- for (auto prop : sp_attribute_name_list(true)){
+ for (auto prop : sp_attribute_name_list(true)) {
Gtk::TreeModel::Row row = *(completionModel->append());
row[_mCSSData._colCSSData] = prop;
}
_mainBox.set_orientation(Gtk::ORIENTATION_VERTICAL);
- _getContents()->pack_start(_mainBox, Gtk::PACK_EXPAND_WIDGET);
+ _getContents()->pack_start(_mainBox, Gtk::PACK_EXPAND_WIDGET);
_all_css->get_style_context()->add_class("stylesheettoggler");
// Document & Desktop
_desktop_changed_connection =
@@ -476,7 +475,8 @@ void StyleDialog::_readStyleElement()
value->property_editable() = true;
value->signal_edited().connect(
sigc::bind<Glib::RefPtr<Gtk::TreeStore>>(sigc::mem_fun(*this, &StyleDialog::_valueEdited), store));
- //value->signal_editing_started().connect( sigc::bind<Glib::RefPtr<Gtk::TreeStore> >(sigc::mem_fun(*this, &StyleDialog::_startValueEdit), store));
+ // value->signal_editing_started().connect( sigc::bind<Glib::RefPtr<Gtk::TreeStore> >(sigc::mem_fun(*this,
+ // &StyleDialog::_startValueEdit), store));
addCol = css_tree->append_column("CSS Value", *value) - 1;
col = css_tree->get_column(addCol);
if (col) {
@@ -623,11 +623,8 @@ void StyleDialog::_readStyleElement()
r1 = sp_svg_read_color(value.c_str(), r1);
guint32 r2 = 0; // if there's no color, return black
r2 = sp_svg_read_color(iter->get_value().c_str(), r2);
- if (attr_prop.count(iter->name) ||
- (value != iter->get_value() &&
- (r1 & 0xff == 0 ||
- r1 != r2)))
- {
+ if (attr_prop.count(iter->name) ||
+ (value != iter->get_value() && (r1 & 0xff == 0 || r1 != r2))) {
row[_mColumns._colStrike] = true;
} else {
row[_mColumns._colStrike] = false;
@@ -872,7 +869,7 @@ void StyleDialog::_writeStyleElement(Glib::RefPtr<Gtk::TreeStore> store, Glib::u
iter->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG);
}
} else {
- SPObject * obj = document->getObjectById(selectorname);
+ SPObject *obj = document->getObjectById(selectorname);
obj->style->readFromObject(obj);
obj->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG);
}
@@ -929,14 +926,13 @@ bool StyleDialog::_addRow(GdkEventButton *evt, Glib::RefPtr<Gtk::TreeStore> stor
return false;
}
-void
-StyleDialog::_startNameEdit(Gtk::CellEditable* cell, const Glib::ustring& path)
+void StyleDialog::_startNameEdit(Gtk::CellEditable *cell, const Glib::ustring &path)
{
Gtk::Entry *entry = dynamic_cast<Gtk::Entry *>(cell);
entry->set_completion(_entry_completion);
}
-/* void
+/* void
StyleDialog::_setAutocompletion(Gtk::Entry *entry, SPStyleEnum const cssenum[])
{
Glib::RefPtr<Gtk::ListStore> completionModel = Gtk::ListStore::create(_mCSSData);
@@ -944,7 +940,7 @@ StyleDialog::_setAutocompletion(Gtk::Entry *entry, SPStyleEnum const cssenum[])
entry_completion->set_text_column (_mCSSData._colCSSData);
entry_completion->set_minimum_key_length(0);
entry_completion->set_popup_completion(true);
-
+
gint counter = 0;
const char * key = cssenum[counter].key;
while (key) {
@@ -955,7 +951,7 @@ StyleDialog::_setAutocompletion(Gtk::Entry *entry, SPStyleEnum const cssenum[])
}
}
-void
+void
StyleDialog::_startValueEdit(Gtk::CellEditable* cell, const Glib::ustring& path, Glib::RefPtr<Gtk::TreeStore> store)
{
Gtk::TreeModel::Row row = *store->get_iter(path);
diff --git a/src/ui/dialog/styledialog.h b/src/ui/dialog/styledialog.h
index 99a0a8ece..7b1a7cde5 100644
--- a/src/ui/dialog/styledialog.h
+++ b/src/ui/dialog/styledialog.h
@@ -18,19 +18,19 @@
#include "style-enums.h"
#include <glibmm/regex.h>
#include <gtkmm/builder.h>
-#include <gtkmm/cellrenderercombo.h>
#include <gtkmm/celleditable.h>
+#include <gtkmm/cellrenderercombo.h>
+#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
#include <gtkmm/entrycompletion.h>
-#include <gtkmm/dialog.h>
#include <gtkmm/eventbox.h>
+#include <gtkmm/liststore.h>
#include <gtkmm/paned.h>
#include <gtkmm/scrolledwindow.h>
#include <gtkmm/switch.h>
#include <gtkmm/treemodelfilter.h>
#include <gtkmm/treeselection.h>
#include <gtkmm/treestore.h>
-#include <gtkmm/liststore.h>
#include <gtkmm/treeview.h>
#include <ui/widget/panel.h>
@@ -99,11 +99,8 @@ class StyleDialog : public Widget::Panel {
class CSSData : public Gtk::TreeModel::ColumnRecord {
public:
- CSSData()
- {
- add(_colCSSData);
- }
- Gtk::TreeModelColumn<Glib::ustring> _colCSSData; // Name of the property.
+ CSSData() { add(_colCSSData); }
+ Gtk::TreeModelColumn<Glib::ustring> _colCSSData; // Name of the property.
};
CSSData _mCSSData;
@@ -128,7 +125,7 @@ class StyleDialog : public Widget::Panel {
void _nameEdited(const Glib::ustring &path, const Glib::ustring &name, Glib::RefPtr<Gtk::TreeStore> store,
Gtk::TreeView *css_tree);
void _valueEdited(const Glib::ustring &path, const Glib::ustring &value, Glib::RefPtr<Gtk::TreeStore> store);
- void _startNameEdit(Gtk::CellEditable* cell, const Glib::ustring& path);
+ void _startNameEdit(Gtk::CellEditable *cell, const Glib::ustring &path);
// void _startValueEdit(Gtk::CellEditable* cell, const Glib::ustring& path, Glib::RefPtr<Gtk::TreeStore> store);
// void _setAutocompletion(Gtk::Entry *entry, SPStyleEnum const cssenum[]);
diff --git a/src/ui/widget/ink-flow-box.cpp b/src/ui/widget/ink-flow-box.cpp
index 728d720a3..8485dd932 100644
--- a/src/ui/widget/ink-flow-box.cpp
+++ b/src/ui/widget/ink-flow-box.cpp
@@ -30,10 +30,8 @@ InkFlowBox::InkFlowBox(const gchar *name)
tbutton->set_always_show_image(true);
_flowbox.set_selection_mode(Gtk::SelectionMode::SELECTION_NONE);
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- prefs->setBool(Glib::ustring("/dialogs/") + get_name() +
- Glib::ustring("/flowbox/lock"), false);
- tbutton->set_active(prefs->getBool(Glib::ustring("/dialogs/") + get_name() +
- Glib::ustring("/flowbox/lock"), true));
+ prefs->setBool(Glib::ustring("/dialogs/") + get_name() + Glib::ustring("/flowbox/lock"), false);
+ tbutton->set_active(prefs->getBool(Glib::ustring("/dialogs/") + get_name() + Glib::ustring("/flowbox/lock"), true));
Glib::ustring iconname = "object-unlocked";
if (tbutton->get_active()) {
iconname = "object-locked";