From b92e577ea62c2a94ba38390fa67d9dcea3db88af Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Fri, 14 Sep 2018 18:58:18 +0200 Subject: Remove sp-xmlview-attr with attrdialog (C++) and improve interface --- src/ui/dialog/cssdialog.cpp | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'src/ui/dialog/cssdialog.cpp') diff --git a/src/ui/dialog/cssdialog.cpp b/src/ui/dialog/cssdialog.cpp index 901bcf36c..47922fc64 100644 --- a/src/ui/dialog/cssdialog.cpp +++ b/src/ui/dialog/cssdialog.cpp @@ -80,7 +80,11 @@ CssDialog::CssDialog(): _attrCol->add_attribute(_attrRenderer->property_text(), _cssColumns._styleAttrVal); } - _styleButton(_buttonAddProperty, "list-add", "Add a new property"); + GtkWidget *child = GTK_WIDGET(sp_get_icon_image("list-add", GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj()); + gtk_widget_show(child); + _buttonAddProperty.add(*manage(Glib::wrap(child))); + _buttonAddProperty.set_relief(Gtk::RELIEF_NONE); + _buttonAddProperty.set_tooltip_text("Add a new property"); _mainBox.pack_end(_buttonBox, Gtk::PACK_SHRINK); _buttonBox.pack_start(_buttonAddProperty, Gtk::PACK_SHRINK); @@ -113,25 +117,6 @@ void CssDialog::setDesktop(SPDesktop* desktop) _desktop = desktop; } - -/** - * @brief CssDialog::_styleButton - * @param btn - * @param iconName - * @param tooltip - * This function sets the style of '+'button at the bottom of dialog. - */ -void CssDialog::_styleButton(Gtk::Button& btn, char const* iconName, - char const* tooltip) -{ - GtkWidget *child = GTK_WIDGET(sp_get_icon_image(iconName, GTK_ICON_SIZE_SMALL_TOOLBAR)->gobj()); - gtk_widget_show(child); - btn.add(*manage(Glib::wrap(child))); - btn.set_relief(Gtk::RELIEF_NONE); - btn.set_tooltip_text(tooltip); -} - - /** * @brief CssDialog::_addProperty * This function is a slot to signal_clicked for '+' button at the bottom of CSS -- cgit v1.2.3