summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/xml-tree.cpp
diff options
context:
space:
mode:
authorEduard Braun <eduard.braun2@gmx.de>2017-07-09 12:42:10 +0000
committerEduard Braun <eduard.braun2@gmx.de>2017-07-09 12:42:10 +0000
commit241554b7ad311b5868ba284c7a4e6a410432b9bd (patch)
tree8bf6fed572d27e9b97ca60b90ae1684ba4856eeb /src/ui/dialog/xml-tree.cpp
parentUse .xml when exporting shortcuts by default (diff)
parentShortcuts: Fix for 7d248fbba5b0c24d9a24cda8c3f2e79f96395553 (is_user_set was ... (diff)
downloadinkscape-241554b7ad311b5868ba284c7a4e6a410432b9bd.tar.gz
inkscape-241554b7ad311b5868ba284c7a4e6a410432b9bd.zip
Merge branch 'master' into shortcuts
Diffstat (limited to 'src/ui/dialog/xml-tree.cpp')
-rw-r--r--src/ui/dialog/xml-tree.cpp58
1 files changed, 39 insertions, 19 deletions
diff --git a/src/ui/dialog/xml-tree.cpp b/src/ui/dialog/xml-tree.cpp
index 72aaadb9f..83c0de45b 100644
--- a/src/ui/dialog/xml-tree.cpp
+++ b/src/ui/dialog/xml-tree.cpp
@@ -17,7 +17,6 @@
*/
#include "xml-tree.h"
-#include "widgets/icon.h"
#include <glibmm/i18n.h>
#include "desktop.h"
@@ -87,7 +86,8 @@ XmlTree::XmlTree (void) :
contents->set_spacing(0);
contents->set_size_request(320, 260);
- status.set_alignment( 0.0, 0.5);
+ status.set_halign(Gtk::ALIGN_START);
+ status.set_valign(Gtk::ALIGN_CENTER);
status.set_size_request(1, -1);
status.set_markup("");
status.set_line_wrap(true);
@@ -109,57 +109,74 @@ XmlTree::XmlTree (void) :
gtk_widget_set_tooltip_text( GTK_WIDGET(tree), _("Drag to reorder nodes") );
tree_toolbar.set_toolbar_style(Gtk::TOOLBAR_ICONS);
- xml_element_new_button.set_icon_widget(*Gtk::manage(Glib::wrap(
- sp_icon_new (Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON("xml-element-new")))) );
+
+ auto xml_element_new_icon = Gtk::manage(new Gtk::Image());
+ xml_element_new_icon->set_from_icon_name("xml-element-new", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+
+ xml_element_new_button.set_icon_widget(*xml_element_new_icon);
xml_element_new_button.set_tooltip_text(_("New element node"));
xml_element_new_button.set_sensitive(false);
tree_toolbar.add(xml_element_new_button);
- xml_text_new_button.set_icon_widget(*Gtk::manage(Glib::wrap(
- sp_icon_new (Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON("xml-text-new")))));
+ auto xml_text_new_icon = Gtk::manage(new Gtk::Image());
+ xml_text_new_icon->set_from_icon_name("xml-text-new", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+
+ xml_text_new_button.set_icon_widget(*xml_text_new_icon);
xml_text_new_button.set_tooltip_text(_("New text node"));
xml_text_new_button.set_sensitive(false);
tree_toolbar.add(xml_text_new_button);
- xml_node_duplicate_button.set_icon_widget(*Gtk::manage(Glib::wrap(
- sp_icon_new (Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON("xml-node-duplicate")))));
+ auto xml_node_duplicate_icon = Gtk::manage(new Gtk::Image());
+ xml_node_duplicate_icon->set_from_icon_name("xml-node-duplicate", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+
+ xml_node_duplicate_button.set_icon_widget(*xml_node_duplicate_icon);
xml_node_duplicate_button.set_tooltip_text(_("Duplicate node"));
xml_node_duplicate_button.set_sensitive(false);
tree_toolbar.add(xml_node_duplicate_button);
tree_toolbar.add(separator);
- xml_node_delete_button.set_icon_widget(*Gtk::manage(Glib::wrap(
- sp_icon_new (Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON("xml-node-delete")))));
+ auto xml_node_delete_icon = Gtk::manage(new Gtk::Image());
+ xml_node_delete_icon->set_from_icon_name("xml-node-delete", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+
+ xml_node_delete_button.set_icon_widget(*xml_node_delete_icon);
xml_node_delete_button.set_tooltip_text(Q_("nodeAsInXMLdialogTooltip|Delete node"));
xml_node_delete_button.set_sensitive(false);
tree_toolbar.add(xml_node_delete_button);
tree_toolbar.add(separator2);
- unindent_node_button.set_icon_widget(*Gtk::manage(Glib::wrap(
- sp_icon_new (Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON("format-indent-less")))));
+ auto format_indent_less_icon = Gtk::manage(new Gtk::Image());
+ format_indent_less_icon->set_from_icon_name("format-indent-less", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+
+ unindent_node_button.set_icon_widget(*format_indent_less_icon);
unindent_node_button.set_label(_("Unindent node"));
unindent_node_button.set_tooltip_text(_("Unindent node"));
unindent_node_button.set_sensitive(false);
tree_toolbar.add(unindent_node_button);
- indent_node_button.set_icon_widget(*Gtk::manage(Glib::wrap(
- sp_icon_new (Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON("format-indent-more")))));
+ auto format_indent_more_icon = Gtk::manage(new Gtk::Image());
+ format_indent_more_icon->set_from_icon_name("format-indent-more", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+
+ indent_node_button.set_icon_widget(*format_indent_more_icon);
indent_node_button.set_label(_("Indent node"));
indent_node_button.set_tooltip_text(_("Indent node"));
indent_node_button.set_sensitive(false);
tree_toolbar.add(indent_node_button);
- raise_node_button.set_icon_widget(*Gtk::manage(Glib::wrap(
- sp_icon_new (Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON("go-up")))));
+ auto go_up_icon = Gtk::manage(new Gtk::Image());
+ go_up_icon->set_from_icon_name("go-up", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+
+ raise_node_button.set_icon_widget(*go_up_icon);
raise_node_button.set_label(_("Raise node"));
raise_node_button.set_tooltip_text(_("Raise node"));
raise_node_button.set_sensitive(false);
tree_toolbar.add(raise_node_button);
- lower_node_button.set_icon_widget(*Gtk::manage(Glib::wrap(
- sp_icon_new (Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON("go-down")))));
+ auto go_down_icon = Gtk::manage(new Gtk::Image());
+ go_down_icon->set_from_icon_name("go-down", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+
+ lower_node_button.set_icon_widget(*go_down_icon);
lower_node_button.set_label(_("Lower node"));
lower_node_button.set_tooltip_text(_("Lower node"));
lower_node_button.set_sensitive(false);
@@ -183,7 +200,10 @@ XmlTree::XmlTree (void) :
attributes = SP_XMLVIEW_ATTR_LIST(sp_xmlview_attr_list_new(NULL));
attr_toolbar.set_toolbar_style(Gtk::TOOLBAR_ICONS);
- xml_attribute_delete_button.set_icon_widget(*Gtk::manage(Glib::wrap(sp_icon_new (Inkscape::ICON_SIZE_LARGE_TOOLBAR, INKSCAPE_ICON("xml-attribute-delete")))));
+
+ auto xml_attribute_delete_icon = Gtk::manage(new Gtk::Image());
+ xml_attribute_delete_icon->set_from_icon_name("xml-attribute-delete", Gtk::ICON_SIZE_LARGE_TOOLBAR);
+ xml_attribute_delete_button.set_icon_widget(*xml_attribute_delete_icon);
xml_attribute_delete_button.set_tooltip_text(_("Delete attribute"));
xml_attribute_delete_button.set_sensitive(false);
attr_toolbar.add(xml_attribute_delete_button);