summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/panel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget/panel.cpp')
-rw-r--r--src/ui/widget/panel.cpp32
1 files changed, 7 insertions, 25 deletions
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index ab13577d7..dff92594b 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -12,20 +12,17 @@
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+#include <config.h>
#endif
#include <gtkmm/dialog.h> // for Gtk::RESPONSE_*
#include <gtkmm/menu.h>
-#include <gtkmm/stock.h>
-#include <gtkmm/radiobutton.h>
+#include <gtkmm/checkmenuitem.h>
#include <gtkmm/radiomenuitem.h>
#include <gtkmm/separatormenuitem.h>
#include <glibmm/i18n.h>
-#include <gtk/gtk.h>
-
#include "panel.h"
#include "icon-size.h"
#include "preferences.h"
@@ -68,15 +65,13 @@ Panel::Panel(Glib::ustring const &label, gchar const *prefs_path,
_label(label),
_apply_label(apply_label),
_verb_num(verb_num),
- _temp_arrow(Gtk::ARROW_LEFT, Gtk::SHADOW_ETCHED_OUT),
+ _temp_arrow(),
_menu(0),
_action_area(0),
_fillable(0)
{
set_name( "InkscapePanel" );
-#if WITH_GTKMM_3_0
set_orientation( Gtk::ORIENTATION_VERTICAL );
-#endif
_init();
}
@@ -273,11 +268,9 @@ void Panel::_init()
_top_bar.pack_end(_menu_popper, false, false);
gint width = 0;
gint height = 0;
-
- if ( gtk_icon_size_lookup( Inkscape::getRegisteredIconSize(Inkscape::ICON_SIZE_DECORATION), &width, &height ) ) {
- _temp_arrow.set_size_request(width, height);
- }
-
+ gtk_image_set_from_icon_name(_temp_arrow.gobj(),
+ "pan-start-symbolic",
+ Inkscape::getRegisteredIconSize(Inkscape::ICON_SIZE_SMALL_TOOLBAR));
_menu_popper.add(_temp_arrow);
_menu_popper.signal_button_press_event().connect_notify(sigc::mem_fun(*this, &Panel::_popper));
}
@@ -582,14 +575,7 @@ void Panel::_apply()
Gtk::Button *Panel::addResponseButton(const Glib::ustring &button_text, int response_id, bool pack_start)
{
- Gtk::Button *button = new Gtk::Button(button_text);
- _addResponseButton(button, response_id, pack_start);
- return button;
-}
-
-Gtk::Button *Panel::addResponseButton(const Gtk::StockID &stock_id, int response_id, bool pack_start)
-{
- Gtk::Button *button = new Gtk::Button(stock_id);
+ Gtk::Button *button = new Gtk::Button(button_text, true);
_addResponseButton(button, response_id, pack_start);
return button;
}
@@ -598,13 +584,9 @@ void Panel::_addResponseButton(Gtk::Button *button, int response_id, bool pack_s
{
// Create a button box for the response buttons if it's the first button to be added
if (!_action_area) {
-#if WITH_GTKMM_3_0
_action_area = new Gtk::ButtonBox();
_action_area->set_layout(Gtk::BUTTONBOX_END);
_action_area->set_spacing(6);
-#else
- _action_area = new Gtk::HButtonBox(Gtk::BUTTONBOX_END, 6);
-#endif
_action_area->set_border_width(4);
pack_end(*_action_area, Gtk::PACK_SHRINK, 0);
}