summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-09-30 05:01:21 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-09-30 05:01:21 +0000
commit51a9de94671f1f7ee1cf2a57ef5dfde94b4a802b (patch)
tree2b13433eacbdb557f1ca8f4782b832453d1a0165 /src/ui/widget
parentmemleak fix (part of bug #1043571) (diff)
downloadinkscape-51a9de94671f1f7ee1cf2a57ef5dfde94b4a802b.tar.gz
inkscape-51a9de94671f1f7ee1cf2a57ef5dfde94b4a802b.zip
Fix for 1058470 : Trace Bitmap Live Preview
(bzr r11716)
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/panel.cpp14
-rw-r--r--src/ui/widget/panel.h6
2 files changed, 12 insertions, 8 deletions
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index 1f945ada6..42435f298 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -572,21 +572,21 @@ void Panel::_apply()
g_warning("Apply button clicked for panel [Panel::_apply()]");
}
-Gtk::Button *Panel::addResponseButton(const Glib::ustring &button_text, int response_id)
+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);
+ _addResponseButton(button, response_id, pack_start);
return button;
}
-Gtk::Button *Panel::addResponseButton(const Gtk::StockID &stock_id, int response_id)
+Gtk::Button *Panel::addResponseButton(const Gtk::StockID &stock_id, int response_id, bool pack_start)
{
Gtk::Button *button = new Gtk::Button(stock_id);
- _addResponseButton(button, response_id);
+ _addResponseButton(button, response_id, pack_start);
return button;
}
-void Panel::_addResponseButton(Gtk::Button *button, int response_id)
+void Panel::_addResponseButton(Gtk::Button *button, int response_id, bool pack_start)
{
// Create a button box for the response buttons if it's the first button to be added
if (!_action_area) {
@@ -597,6 +597,10 @@ void Panel::_addResponseButton(Gtk::Button *button, int response_id)
_action_area->pack_end(*button);
+ if (pack_start) {
+ _action_area->set_child_secondary( *button , true);
+ }
+
if (response_id != 0) {
// Re-emit clicked signals as response signals
button->signal_clicked().connect(sigc::bind(_signal_response.make_slot(), response_id));
diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h
index 2d92d65c9..b4cc04809 100644
--- a/src/ui/widget/panel.h
+++ b/src/ui/widget/panel.h
@@ -96,8 +96,8 @@ public:
/* Methods providing a Gtk::Dialog like interface for adding buttons that emit Gtk::RESPONSE
* signals on click. */
- Gtk::Button* addResponseButton (const Glib::ustring &button_text, int response_id);
- Gtk::Button* addResponseButton (const Gtk::StockID &stock_id, int response_id);
+ Gtk::Button* addResponseButton (const Glib::ustring &button_text, int response_id, bool pack_start=false);
+ Gtk::Button* addResponseButton (const Gtk::StockID &stock_id, int response_id, bool pack_start=false);
void setDefaultResponse(int response_id);
void setResponseSensitive(int response_id, bool setting);
@@ -119,7 +119,7 @@ protected:
virtual void _handleResponse(int response_id);
/* Helper methods */
- void _addResponseButton(Gtk::Button *button, int response_id);
+ void _addResponseButton(Gtk::Button *button, int response_id, bool pack_start=false);
Inkscape::Selection *_getSelection();
/**