summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-03-19 09:38:56 +0000
committerJabiertxo Arraiza Zenotz <jtx@jtx.marker.es>2013-03-19 09:38:56 +0000
commit757f1b17bf5db6b7b5cc8725a0ee3c438c08cafc (patch)
treec62786af287828f0f70dba2e079be3cea604d8f4 /src/ui
parentWorking width widgets (diff)
parentDrop remaining unused functions (diff)
downloadinkscape-757f1b17bf5db6b7b5cc8725a0ee3c438c08cafc.tar.gz
inkscape-757f1b17bf5db6b7b5cc8725a0ee3c438c08cafc.zip
Widgets to effect added
(bzr r11950.1.59)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/control-manager.cpp15
-rw-r--r--src/ui/dialog/export.cpp5
-rw-r--r--src/ui/dialog/filedialogimpl-gtkmm.cpp8
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp4
-rw-r--r--src/ui/dialog/text-edit.cpp3
-rw-r--r--src/ui/tool/multi-path-manipulator.cpp1
-rw-r--r--src/ui/tool/node.cpp2
-rw-r--r--src/ui/widget/layer-selector.cpp11
-rw-r--r--src/ui/widget/licensor.cpp3
9 files changed, 13 insertions, 39 deletions
diff --git a/src/ui/control-manager.cpp b/src/ui/control-manager.cpp
index b14f27b8b..62e6ce3a3 100644
--- a/src/ui/control-manager.cpp
+++ b/src/ui/control-manager.cpp
@@ -31,29 +31,18 @@ namespace {
std::map<Inkscape::ControlType, std::vector<int> > sizeTable;
// Note: The following operator overloads are local to this file at the moment to discourage flag manipulation elsewhere.
-
+/*
ControlFlags operator |(ControlFlags lhs, ControlFlags rhs)
{
return static_cast<ControlFlags>(static_cast<int>(lhs) | static_cast<int>(rhs));
}
-
-ControlFlags& operator |=(ControlFlags &lhs, ControlFlags rhs)
-{
- lhs = lhs | rhs;
- return lhs;
-}
+*/
ControlFlags operator &(ControlFlags lhs, ControlFlags rhs)
{
return static_cast<ControlFlags>(static_cast<int>(lhs) & static_cast<int>(rhs));
}
-ControlFlags& operator &=(ControlFlags &lhs, ControlFlags rhs)
-{
- lhs = lhs & rhs;
- return lhs;
-}
-
ControlFlags operator ^(ControlFlags lhs, ControlFlags rhs)
{
return static_cast<ControlFlags>(static_cast<int>(lhs) ^ static_cast<int>(rhs));
diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp
index 603786742..ac039bf77 100644
--- a/src/ui/dialog/export.cpp
+++ b/src/ui/dialog/export.cpp
@@ -412,7 +412,6 @@ void Export::set_default_filename () {
if ( SP_ACTIVE_DOCUMENT && SP_ACTIVE_DOCUMENT->getURI() )
{
- gchar *name;
SPDocument * doc = SP_ACTIVE_DOCUMENT;
const gchar *uri = doc->getURI();
const gchar *text_extension = get_file_save_extension (Inkscape::Extension::FILE_SAVE_METHOD_SAVE_AS).c_str();
@@ -441,7 +440,7 @@ void Export::set_default_filename () {
g_free(uri_copy);
}
} else {
- name = g_strconcat(uri, ".png", NULL);
+ gchar *name = g_strconcat(uri, ".png", NULL);
filename_entry.set_text(name);
filename_entry.set_position(strlen(name));
@@ -1310,7 +1309,7 @@ void Export::onBrowse ()
WCHAR _filename[_MAX_PATH + 1];
memset(_filename, 0, sizeof(_filename));
gunichar2* utf16_path_string = g_utf8_to_utf16(filename.c_str(), -1, NULL, NULL, NULL);
- wcsncpy(_filename, (wchar_t*)utf16_path_string, _MAX_PATH);
+ wcsncpy(_filename, reinterpret_cast<wchar_t*>(utf16_path_string), _MAX_PATH);
g_free(utf16_path_string);
opf.hwndOwner = (HWND)(GDK_WINDOW_HWND(gtk_widget_get_window(GTK_WIDGET(this))));
diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp
index 75f80ed4a..cb6d92799 100644
--- a/src/ui/dialog/filedialogimpl-gtkmm.cpp
+++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp
@@ -1068,7 +1068,7 @@ FileSaveDialogImplGtk::FileSaveDialogImplGtk( Gtk::Window &parentWindow,
std::vector<Gtk::Entry *> entries;
findEntryWidgets(cont, entries);
//g_message("Found %d entry widgets\n", entries.size());
- if (entries.size() >=1 )
+ if (!entries.empty())
{
//Catch when user hits [return] on the text field
fileNameEntry = entries[0];
@@ -1080,7 +1080,7 @@ FileSaveDialogImplGtk::FileSaveDialogImplGtk( Gtk::Window &parentWindow,
std::vector<Gtk::Expander *> expanders;
findExpanderWidgets(cont, expanders);
//g_message("Found %d expander widgets\n", expanders.size());
- if (expanders.size() >=1 )
+ if (!expanders.empty())
{
//Always show the file list
Gtk::Expander *expander = expanders[0];
@@ -1639,7 +1639,7 @@ FileExportDialogImpl::FileExportDialogImpl( Gtk::Window& parentWindow,
std::vector<Gtk::Entry *> entries;
findEntryWidgets(cont, entries);
//g_message("Found %d entry widgets\n", entries.size());
- if (entries.size() >=1 )
+ if (!entries.empty())
{
//Catch when user hits [return] on the text field
fileNameEntry = entries[0];
@@ -1651,7 +1651,7 @@ FileExportDialogImpl::FileExportDialogImpl( Gtk::Window& parentWindow,
std::vector<Gtk::Expander *> expanders;
findExpanderWidgets(cont, expanders);
//g_message("Found %d expander widgets\n", expanders.size());
- if (expanders.size() >=1 )
+ if (!expanders.empty())
{
//Always show the file list
Gtk::Expander *expander = expanders[0];
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index 989c40264..5afc85f10 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -945,13 +945,11 @@ private:
and all widgets within the setting group are aligned automatically. */
void add_widget(Gtk::Widget* w, const Glib::ustring& label)
{
- Gtk::Label *lbl = 0;
Gtk::HBox *hb = Gtk::manage(new Gtk::HBox);
hb->set_spacing(12);
if(label != "") {
- //lbl = Gtk::manage(new Gtk::Label(label + (label == "" ? "" : ":"), Gtk::ALIGN_LEFT)); colon now in label (LP #358921)
- lbl = Gtk::manage(new Gtk::Label(label, Gtk::ALIGN_START));
+ Gtk::Label *lbl = Gtk::manage(new Gtk::Label(label, Gtk::ALIGN_START));
hb->pack_start(*lbl, false, false);
_size_group->add_widget(*lbl);
lbl->show();
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index a71227861..84d469750 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -423,12 +423,11 @@ void TextEdit::onSelectionChange()
void TextEdit::updateObjectText ( SPItem *text )
{
GtkTextIter start, end;
- gchar *str;
// write text
if (gtk_text_buffer_get_modified (text_buffer)) {
gtk_text_buffer_get_bounds (text_buffer, &start, &end);
- str = gtk_text_buffer_get_text (text_buffer, &start, &end, TRUE);
+ gchar *str = gtk_text_buffer_get_text (text_buffer, &start, &end, TRUE);
sp_te_set_repr_text_multiline (text, str);
g_free (str);
gtk_text_buffer_set_modified (text_buffer, FALSE);
diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp
index 2ef8c1766..3623bb006 100644
--- a/src/ui/tool/multi-path-manipulator.cpp
+++ b/src/ui/tool/multi-path-manipulator.cpp
@@ -65,7 +65,6 @@ typedef std::pair<double, IterPair> DistanceMapItem;
void find_join_iterators(ControlPointSelection &sel, IterPairList &pairs)
{
IterSet join_iters;
- DistanceMap dists;
// find all endnodes in selection
for (ControlPointSelection::iterator i = sel.begin(); i != sel.end(); ++i) {
diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp
index 819f5db54..a1fa4e55b 100644
--- a/src/ui/tool/node.cpp
+++ b/src/ui/tool/node.cpp
@@ -398,7 +398,7 @@ void Handle::dragged(Geom::Point &new_pos, GdkEventMotion *event)
}
std::vector<Inkscape::SnapCandidatePoint> unselected;
- if (snap) {
+ if (snap && ( (!held_control(*event) && _pm().isBSpline()) || !_pm().isBSpline())) {
ControlPointSelection::Set &nodes = _parent->_selection.allPoints();
for (ControlPointSelection::Set::iterator i = nodes.begin(); i != nodes.end(); ++i) {
Node *n = static_cast<Node*>(*i);
diff --git a/src/ui/widget/layer-selector.cpp b/src/ui/widget/layer-selector.cpp
index fbb9c0e24..7b1a8dbfb 100644
--- a/src/ui/widget/layer-selector.cpp
+++ b/src/ui/widget/layer-selector.cpp
@@ -163,17 +163,6 @@ LayerSelector::~LayerSelector() {
_selection_changed_connection.disconnect();
}
-namespace {
-
-/** Helper function - detaches desktop from selector
- */
-bool detach(LayerSelector *selector) {
- selector->setDesktop(NULL);
- return FALSE;
-}
-
-}
-
/** Sets the desktop for the widget. First disconnects signals
* for the current desktop, then stores the pointer to the
* given \a desktop, and attaches its signals to this one.
diff --git a/src/ui/widget/licensor.cpp b/src/ui/widget/licensor.cpp
index 8ecd36af2..c729354cb 100644
--- a/src/ui/widget/licensor.cpp
+++ b/src/ui/widget/licensor.cpp
@@ -79,7 +79,8 @@ void LicenseItem::on_toggled()
//---------------------------------------------------
Licensor::Licensor()
-: Gtk::VBox(false,4)
+: Gtk::VBox(false,4),
+ _eentry (NULL)
{
}