summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-05-08 10:19:13 +0000
committerjabiertxof <info@marker.es>2016-05-08 10:19:13 +0000
commit1556c1a3619c415b3a7abacfdabd89398e411a91 (patch)
treed7718e5873db4b2c25cb3bed94fcc4c3ba87fea4 /src/ui/widget
parentremove a waring on compile (diff)
parentadd missing POTFILES.in line in mirror symmetry LPE (diff)
downloadinkscape-1556c1a3619c415b3a7abacfdabd89398e411a91.tar.gz
inkscape-1556c1a3619c415b3a7abacfdabd89398e411a91.zip
update to trunk
(bzr r13645.1.127)
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/addtoicon.cpp1
-rw-r--r--src/ui/widget/color-icc-selector.cpp13
-rw-r--r--src/ui/widget/color-notebook.cpp4
-rw-r--r--src/ui/widget/color-scales.cpp6
-rw-r--r--src/ui/widget/gimpcolorwheel.c4
-rw-r--r--src/ui/widget/layer-selector.cpp3
-rw-r--r--src/ui/widget/panel.cpp4
-rw-r--r--src/ui/widget/panel.h4
-rw-r--r--src/ui/widget/selected-style.cpp24
9 files changed, 43 insertions, 20 deletions
diff --git a/src/ui/widget/addtoicon.cpp b/src/ui/widget/addtoicon.cpp
index 823e24a00..10294125d 100644
--- a/src/ui/widget/addtoicon.cpp
+++ b/src/ui/widget/addtoicon.cpp
@@ -48,7 +48,6 @@ AddToIcon::AddToIcon() :
//
// _property_pixbuf_add = Gtk::Widget::
- //property_stock_id() = GTK_STOCK_ADD;
set_pixbuf();
}
diff --git a/src/ui/widget/color-icc-selector.cpp b/src/ui/widget/color-icc-selector.cpp
index 2fe4a0704..ec2e69fb3 100644
--- a/src/ui/widget/color-icc-selector.cpp
+++ b/src/ui/widget/color-icc-selector.cpp
@@ -377,7 +377,6 @@ void ColorICCSelector::init()
(gpointer)_impl);
gtk_widget_set_sensitive(_impl->_fixupBtn, FALSE);
gtk_widget_set_tooltip_text(_impl->_fixupBtn, _("Fix RGB fallback to match icc-color() value."));
- // gtk_misc_set_alignment( GTK_MISC (_impl->_fixupBtn), 1.0, 0.5 );
gtk_widget_show(_impl->_fixupBtn);
attachToGridOrTable(t, _impl->_fixupBtn, 0, row, 1, 1);
@@ -431,7 +430,13 @@ void ColorICCSelector::init()
#endif
_impl->_compUI[i]._label = gtk_label_new_with_mnemonic(labelStr.c_str());
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_halign(_impl->_compUI[i]._label, GTK_ALIGN_END);
+#else
gtk_misc_set_alignment(GTK_MISC(_impl->_compUI[i]._label), 1.0, 0.5);
+#endif
+
gtk_widget_show(_impl->_compUI[i]._label);
gtk_widget_set_no_show_all(_impl->_compUI[i]._label, TRUE);
@@ -489,7 +494,13 @@ void ColorICCSelector::init()
// Label
_impl->_label = gtk_label_new_with_mnemonic(_("_A:"));
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_halign(_impl->_label, GTK_ALIGN_END);
+#else
gtk_misc_set_alignment(GTK_MISC(_impl->_label), 1.0, 0.5);
+#endif
+
gtk_widget_show(_impl->_label);
attachToGridOrTable(t, _impl->_label, 0, row, 1, 1);
diff --git a/src/ui/widget/color-notebook.cpp b/src/ui/widget/color-notebook.cpp
index 60abf43bf..6d7ada734 100644
--- a/src/ui/widget/color-notebook.cpp
+++ b/src/ui/widget/color-notebook.cpp
@@ -210,7 +210,11 @@ void ColorNotebook::_initUI()
/* Create RGBA entry and color preview */
_rgbal = gtk_label_new_with_mnemonic(_("RGBA_:"));
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_halign(_rgbal, GTK_ALIGN_END);
+#else
gtk_misc_set_alignment(GTK_MISC(_rgbal), 1.0, 0.5);
+#endif
gtk_box_pack_start(GTK_BOX(rgbabox), _rgbal, TRUE, TRUE, 2);
ColorEntry *rgba_entry = Gtk::manage(new ColorEntry(_selected_color));
diff --git a/src/ui/widget/color-scales.cpp b/src/ui/widget/color-scales.cpp
index 170f83887..48a2693bc 100644
--- a/src/ui/widget/color-scales.cpp
+++ b/src/ui/widget/color-scales.cpp
@@ -92,7 +92,13 @@ void ColorScales::_initUI(SPColorScalesMode mode)
for (i = 0; i < static_cast<gint>(G_N_ELEMENTS(_a)); i++) {
/* Label */
_l[i] = gtk_label_new("");
+
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_set_halign(_l[i], GTK_ALIGN_END);
+#else
gtk_misc_set_alignment(GTK_MISC(_l[i]), 1.0, 0.5);
+#endif
+
gtk_widget_show(_l[i]);
#if GTK_CHECK_VERSION(3, 0, 0)
diff --git a/src/ui/widget/gimpcolorwheel.c b/src/ui/widget/gimpcolorwheel.c
index c857cfa8a..d54486505 100644
--- a/src/ui/widget/gimpcolorwheel.c
+++ b/src/ui/widget/gimpcolorwheel.c
@@ -303,7 +303,9 @@ gimp_color_wheel_realize (GtkWidget *widget)
priv->window = gdk_window_new (parent_window, &attr, attr_mask);
gdk_window_set_user_data (priv->window, wheel);
+#if !GTK_CHECK_VERSION(3,0,0)
gtk_widget_style_attach (widget);
+#endif
}
static void
@@ -1246,7 +1248,7 @@ paint_triangle (GimpColorWheel *wheel,
#endif
}
-#if GTK_CHECK_VERSION(3,2,0)
+#if GTK_CHECK_VERSION(3,0,0)
static gboolean
gimp_color_wheel_draw (GtkWidget *widget,
cairo_t *cr)
diff --git a/src/ui/widget/layer-selector.cpp b/src/ui/widget/layer-selector.cpp
index dc89d233f..2a1fa352b 100644
--- a/src/ui/widget/layer-selector.cpp
+++ b/src/ui/widget/layer-selector.cpp
@@ -32,7 +32,6 @@
#include "util/reverse-list.h"
#include "verbs.h"
#include "widgets/icon.h"
-#include "widgets/shrink-wrap-button.h"
#include "xml/node-event-vector.h"
#include "widgets/gradient-vector.h"
@@ -114,7 +113,6 @@ LayerSelector::LayerSelector(SPDesktop *desktop)
);
_visibility_toggle.set_relief(Gtk::RELIEF_NONE);
- shrink_wrap_button(_visibility_toggle);
_visibility_toggle.set_tooltip_text(_("Toggle current layer visibility"));
pack_start(_visibility_toggle, Gtk::PACK_EXPAND_PADDING);
@@ -135,7 +133,6 @@ LayerSelector::LayerSelector(SPDesktop *desktop)
);
_lock_toggle.set_relief(Gtk::RELIEF_NONE);
- shrink_wrap_button(_lock_toggle);
_lock_toggle.set_tooltip_text(_("Lock or unlock current layer"));
pack_start(_lock_toggle, Gtk::PACK_EXPAND_PADDING);
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index 8a1e98a63..5d4a25a68 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -73,6 +73,9 @@ Panel::Panel(Glib::ustring const &label, gchar const *prefs_path,
_action_area(0),
_fillable(0)
{
+#if WITH_GTKMM_3_0
+ set_orientation( Gtk::ORIENTATION_VERTICAL );
+#endif
_init();
}
@@ -92,7 +95,6 @@ void Panel::_popper(GdkEventButton* event)
void Panel::_init()
{
- Glib::ustring tmp("<");
_anchor = SP_ANCHOR_CENTER;
guint panel_size = 0, panel_mode = 0, panel_ratio = 100, panel_border = 0;
diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h
index a90060e17..7b2836fe8 100644
--- a/src/ui/widget/panel.h
+++ b/src/ui/widget/panel.h
@@ -64,7 +64,11 @@ namespace Widget {
* @see UI::Dialog::DesktopTracker to handle desktop change, selection change and selected object modifications.
* @see UI::Dialog::DialogManager manages the dialogs within inkscape.
*/
+#if WITH_GTKMM_3_0
+class Panel : public Gtk::Box {
+#else
class Panel : public Gtk::VBox {
+#endif
public:
static void prep();
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index 9e283fc64..87cf0b8c4 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -363,19 +363,6 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
_popup_sw.show_all();
}
- _fill_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_fill_click));
- _stroke_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_stroke_click));
- _opacity_place.signal_button_press_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_click));
- _stroke_width_place.signal_button_press_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_sw_click));
- _stroke_width_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_sw_click));
-
-
- _opacity_sb.signal_populate_popup().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_menu));
- _opacity_sb.signal_value_changed().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_changed));
- // Connect to key-press to ensure focus is consistent with other spin buttons when using the keys vs mouse-click
- g_signal_connect (G_OBJECT (_opacity_sb.gobj()), "key-press-event", G_CALLBACK (spinbutton_keypress), _opacity_sb.gobj());
- g_signal_connect (G_OBJECT (_opacity_sb.gobj()), "focus-in-event", G_CALLBACK (spinbutton_focus_in), _opacity_sb.gobj());
-
_fill_place.add(_na[SS_FILL]);
_fill_place.set_tooltip_text(__na[SS_FILL]);
@@ -452,6 +439,17 @@ SelectedStyle::SelectedStyle(bool /*layout*/)
"drag_data_received",
G_CALLBACK(dragDataReceived),
_drop[SS_FILL]);
+
+ _fill_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_fill_click));
+ _stroke_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_stroke_click));
+ _opacity_place.signal_button_press_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_click));
+ _stroke_width_place.signal_button_press_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_sw_click));
+ _stroke_width_place.signal_button_release_event().connect(sigc::mem_fun(*this, &SelectedStyle::on_sw_click));
+ _opacity_sb.signal_populate_popup().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_menu));
+ _opacity_sb.signal_value_changed().connect(sigc::mem_fun(*this, &SelectedStyle::on_opacity_changed));
+ // Connect to key-press to ensure focus is consistent with other spin buttons when using the keys vs mouse-click
+ g_signal_connect (G_OBJECT (_opacity_sb.gobj()), "key-press-event", G_CALLBACK (spinbutton_keypress), _opacity_sb.gobj());
+ g_signal_connect (G_OBJECT (_opacity_sb.gobj()), "focus-in-event", G_CALLBACK (spinbutton_focus_in), _opacity_sb.gobj());
}
SelectedStyle::~SelectedStyle()