summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es>2018-07-25 09:46:37 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx.markerlab.es>2018-07-25 09:46:37 +0000
commit3052c39e53adfe7397987f91f7519d91392ea27f (patch)
tree37feab56ffcb7a681b43a3c0b8bd18737595ab3c /src
parentFix a compiling bug (diff)
downloadinkscape-3052c39e53adfe7397987f91f7519d91392ea27f.tar.gz
inkscape-3052c39e53adfe7397987f91f7519d91392ea27f.zip
Fix codding style
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
-rw-r--r--src/path-prefix.cpp12
-rw-r--r--src/ui/widget/anchor-selector.cpp77
-rw-r--r--src/ui/widget/preferences-widget.h8
4 files changed, 49 insertions, 50 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 14dcb0fe8..b51d2d455 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -623,7 +623,7 @@ static void set_datadir_env()
gchar *datadir = get_datadir_path();
g_setenv("XDG_DATA_HOME", datadir, TRUE);
g_free(datadir);
- //printf("XDG_DATA_HOME = %s\n", g_getenv("XDG_DATA_HOME"));
+ // printf("XDG_DATA_HOME = %s\n", g_getenv("XDG_DATA_HOME"));
}
/**
diff --git a/src/path-prefix.cpp b/src/path-prefix.cpp
index 75dff6a33..2ef9c4f7d 100644
--- a/src/path-prefix.cpp
+++ b/src/path-prefix.cpp
@@ -23,9 +23,9 @@
#endif
-#include <glib.h>
-#include "path-prefix.h"
#include "io/resource.h"
+#include "path-prefix.h"
+#include <glib.h>
/**
@@ -88,10 +88,10 @@ gchar *get_extensions_path()
}
if (pythonpath) {
- new_pythonpath = g_strdup_printf("%s" G_SEARCHPATH_SEPARATOR_S "%s",
- extdir, pythonpath);
+ new_pythonpath = g_strdup_printf("%s" G_SEARCHPATH_SEPARATOR_S "%s", extdir, pythonpath);
g_free(extdir);
- } else {
+ }
+ else {
new_pythonpath = extdir;
}
@@ -102,7 +102,7 @@ gchar *get_datadir_path()
{
using namespace Inkscape::IO::Resource;
gchar *datadir;
-
+
#ifdef WIN32
datadir = g_win32_locale_filename_from_utf8(profile_path(""));
#else
diff --git a/src/ui/widget/anchor-selector.cpp b/src/ui/widget/anchor-selector.cpp
index 0873f9a84..ededc84e3 100644
--- a/src/ui/widget/anchor-selector.cpp
+++ b/src/ui/widget/anchor-selector.cpp
@@ -21,38 +21,38 @@ void AnchorSelector::setupButton(const Glib::ustring& icon, Gtk::ToggleButton& b
buttonIcon->show();
button.set_relief(Gtk::RELIEF_NONE);
- button.show();
- button.add(*buttonIcon);
- button.set_can_focus(false);
+ button.show();
+ button.add(*buttonIcon);
+ button.set_can_focus(false);
}
AnchorSelector::AnchorSelector()
: _container()
{
set_halign(Gtk::ALIGN_CENTER);
- setupButton(INKSCAPE_ICON("boundingbox_top_left"), _buttons[0]);
- setupButton(INKSCAPE_ICON("boundingbox_top"), _buttons[1]);
- setupButton(INKSCAPE_ICON("boundingbox_top_right"), _buttons[2]);
- setupButton(INKSCAPE_ICON("boundingbox_left"), _buttons[3]);
- setupButton(INKSCAPE_ICON("boundingbox_center"), _buttons[4]);
- setupButton(INKSCAPE_ICON("boundingbox_right"), _buttons[5]);
- setupButton(INKSCAPE_ICON("boundingbox_bottom_left"), _buttons[6]);
- setupButton(INKSCAPE_ICON("boundingbox_bottom"), _buttons[7]);
- setupButton(INKSCAPE_ICON("boundingbox_bottom_right"), _buttons[8]);
+ setupButton(INKSCAPE_ICON("boundingbox_top_left"), _buttons[0]);
+ setupButton(INKSCAPE_ICON("boundingbox_top"), _buttons[1]);
+ setupButton(INKSCAPE_ICON("boundingbox_top_right"), _buttons[2]);
+ setupButton(INKSCAPE_ICON("boundingbox_left"), _buttons[3]);
+ setupButton(INKSCAPE_ICON("boundingbox_center"), _buttons[4]);
+ setupButton(INKSCAPE_ICON("boundingbox_right"), _buttons[5]);
+ setupButton(INKSCAPE_ICON("boundingbox_bottom_left"), _buttons[6]);
+ setupButton(INKSCAPE_ICON("boundingbox_bottom"), _buttons[7]);
+ setupButton(INKSCAPE_ICON("boundingbox_bottom_right"), _buttons[8]);
- _container.set_row_homogeneous();
- _container.set_column_homogeneous(true);
+ _container.set_row_homogeneous();
+ _container.set_column_homogeneous(true);
- for(int i = 0; i < 9; ++i) {
- _buttons[i].signal_clicked().connect(
- sigc::bind(sigc::mem_fun(*this, &AnchorSelector::btn_activated), i));
+ for(int i = 0; i < 9; ++i) {
+ _buttons[i].signal_clicked().connect(
+ sigc::bind(sigc::mem_fun(*this, &AnchorSelector::btn_activated), i));
- _container.attach(_buttons[i], i % 3, i / 3, 1, 1);
- }
- _selection = 4;
- _buttons[4].set_active();
+ _container.attach(_buttons[i], i % 3, i / 3, 1, 1);
+ }
+ _selection = 4;
+ _buttons[4].set_active();
- this->add(_container);
+ this->add(_container);
}
AnchorSelector::~AnchorSelector()
@@ -62,27 +62,26 @@ AnchorSelector::~AnchorSelector()
void AnchorSelector::btn_activated(int index)
{
-
- if(_selection == index && _buttons[index].get_active() == false)
- {
- _buttons[index].set_active(true);
- }
- else if(_selection != index && _buttons[index].get_active())
- {
- int old_selection = _selection;
- _selection = index;
- _buttons[old_selection].set_active(false);
- _selectionChanged.emit();
- }
+ if(_selection == index && _buttons[index].get_active() == false)
+ {
+ _buttons[index].set_active(true);
+ }
+ else if(_selection != index && _buttons[index].get_active())
+ {
+ int old_selection = _selection;
+ _selection = index;
+ _buttons[old_selection].set_active(false);
+ _selectionChanged.emit();
+ }
}
void AnchorSelector::setAlignment(int horizontal, int vertical)
{
- int index = 3 * vertical + horizontal;
- if(index >= 0 && index < 9)
- {
- _buttons[index].set_active(!_buttons[index].get_active());
- }
+ int index = 3 * vertical + horizontal;
+ if(index >= 0 && index < 9)
+ {
+ _buttons[index].set_active(!_buttons[index].get_active());
+ }
}
} // namespace Widget
diff --git a/src/ui/widget/preferences-widget.h b/src/ui/widget/preferences-widget.h
index d8d0123d0..80cbf46b6 100644
--- a/src/ui/widget/preferences-widget.h
+++ b/src/ui/widget/preferences-widget.h
@@ -247,11 +247,11 @@ protected:
bool on_mnemonic_activate( bool group_cycling ) override;
};
-class PrefOpenFolder : public Gtk::HBox
-{
-public:
+class PrefOpenFolder : public Gtk::HBox {
+ public:
void init(Glib::ustring const &entry_string, Glib::ustring const &tooltip);
-protected:
+
+ protected:
Gtk::Button *relatedButton;
Gtk::Entry *relatedEntry;
void onRelatedButtonClickedCallback();