diff options
| author | Denis Declara <declara91@gmail.com> | 2012-04-15 12:29:45 +0000 |
|---|---|---|
| committer | Denis Declara <declara91@gmail.com> | 2012-04-15 12:29:45 +0000 |
| commit | 6b5ff661a46ea1779c86f6947006c5ed32926117 (patch) | |
| tree | a5b170f0830854e99ad065055ee2a3996933e614 /src/ui/widget | |
| parent | Improved User interface. (diff) | |
| parent | i18n. Fix for Bug #980518 (Please use c-format). (diff) | |
| download | inkscape-6b5ff661a46ea1779c86f6947006c5ed32926117.tar.gz inkscape-6b5ff661a46ea1779c86f6947006c5ed32926117.zip | |
Trunk merge
(bzr r11073.1.15)
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/dock-item.h | 4 | ||||
| -rw-r--r-- | src/ui/widget/panel.cpp | 8 | ||||
| -rw-r--r-- | src/ui/widget/panel.h | 7 | ||||
| -rw-r--r-- | src/ui/widget/registered-widget.h | 4 | ||||
| -rw-r--r-- | src/ui/widget/selected-style.cpp | 12 | ||||
| -rw-r--r-- | src/ui/widget/spinbutton.cpp | 12 | ||||
| -rw-r--r-- | src/ui/widget/style-swatch.cpp | 4 | ||||
| -rw-r--r-- | src/ui/widget/zoom-status.cpp | 2 |
8 files changed, 37 insertions, 16 deletions
diff --git a/src/ui/widget/dock-item.h b/src/ui/widget/dock-item.h index 75ffea1a0..608badb62 100644 --- a/src/ui/widget/dock-item.h +++ b/src/ui/widget/dock-item.h @@ -15,7 +15,11 @@ #include <gtkmm/frame.h> #include <gtkmm/window.h> +#if WITH_EXT_GDL +#include <gdl/gdl.h> +#else #include "libgdl/gdl.h" +#endif namespace Gtk { class HButtonBox; diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp index 0989c7d0d..45c4e5f07 100644 --- a/src/ui/widget/panel.cpp +++ b/src/ui/widget/panel.cpp @@ -88,7 +88,7 @@ void Panel::_popper(GdkEventButton* event) void Panel::_init() { Glib::ustring tmp("<"); - _anchor = Gtk::ANCHOR_CENTER; + _anchor = SP_ANCHOR_CENTER; guint panel_size = 0, panel_mode = 0, panel_ratio = 100; bool panel_wrap = 0; @@ -269,13 +269,13 @@ void Panel::setLabel(Glib::ustring const &label) _tab_title.set_label(_label); } -void Panel::setOrientation(Gtk::AnchorType how) +void Panel::setOrientation(SPAnchorType how) { if (_anchor != how) { _anchor = how; switch (_anchor) { - case Gtk::ANCHOR_NORTH: - case Gtk::ANCHOR_SOUTH: + case SP_ANCHOR_NORTH: + case SP_ANCHOR_SOUTH: { if (_menu_desired) { _menu_popper.reference(); diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h index c1942ef05..2d92d65c9 100644 --- a/src/ui/widget/panel.h +++ b/src/ui/widget/panel.h @@ -18,8 +18,9 @@ #include <gtkmm/button.h> #include <gtkmm/eventbox.h> #include <gtkmm/label.h> - +#include "enums.h" #include <vector> +#include <map> class SPDesktop; class SPDocument; @@ -80,7 +81,7 @@ public: int const &getVerb() const; Glib::ustring const &getApplyLabel() const; - virtual void setOrientation(Gtk::AnchorType how); + virtual void setOrientation(SPAnchorType how); virtual void present(); //< request to be present @@ -126,7 +127,7 @@ protected: */ Glib::ustring const _prefs_path; bool _menu_desired; - Gtk::AnchorType _anchor; + SPAnchorType _anchor; /* Signals */ sigc::signal<void, int> _signal_response; diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h index 52a44114d..2a7843a51 100644 --- a/src/ui/widget/registered-widget.h +++ b/src/ui/widget/registered-widget.h @@ -12,11 +12,11 @@ #ifndef INKSCAPE_UI_WIDGET_REGISTERED_WIDGET__H_ #define INKSCAPE_UI_WIDGET_REGISTERED_WIDGET__H_ +#include "ui/widget/scalar.h" #include <2geom/affine.h> #include "xml/node.h" #include "registry.h" -#include "ui/widget/scalar.h" #include "ui/widget/scalar-unit.h" #include "ui/widget/point.h" #include "ui/widget/text.h" @@ -30,6 +30,8 @@ #include "desktop-handles.h" #include "sp-namedview.h" +#include <gtkmm/checkbutton.h> + class SPUnit; class SPDocument; diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index ab7b99237..c81385dd7 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -164,10 +164,10 @@ SelectedStyle::SelectedStyle(bool /*layout*/) _na[i].show_all(); __na[i] = (_("Nothing selected")); - _none[i].set_markup (_("<i>None</i>")); + _none[i].set_markup (C_("Fill and stroke", "<i>None</i>")); sp_set_font_size_smaller (GTK_WIDGET(_none[i].gobj())); _none[i].show_all(); - __none[i] = (i == SS_FILL)? (_("No fill")) : (_("No stroke")); + __none[i] = (i == SS_FILL)? (C_("Fill and stroke", "No fill")) : (C_("Fill and stroke", "No stroke")); _pattern[i].set_markup (_("Pattern")); sp_set_font_size_smaller (GTK_WIDGET(_pattern[i].gobj())); @@ -1259,7 +1259,11 @@ RotateableSwatch::do_motion(double by, guint modifier) { g_object_unref (bitmap); g_object_unref (mask); gdk_window_set_cursor(gtk_widget_get_window(w), cr); +#if GTK_CHECK_VERSION(3,0,0) + g_object_unref(cr); +#else gdk_cursor_unref(cr); +#endif cr_set = true; } } @@ -1314,7 +1318,11 @@ RotateableSwatch::do_release(double by, guint modifier) { GtkWidget *w = GTK_WIDGET(gobj()); gdk_window_set_cursor(gtk_widget_get_window(w), NULL); if (cr) { +#if GTK_CHECK_VERSION(3,0,0) + g_object_unref(cr); +#else gdk_cursor_unref (cr); +#endif cr = NULL; } cr_set = false; diff --git a/src/ui/widget/spinbutton.cpp b/src/ui/widget/spinbutton.cpp index 60b7856f6..8ba8d413d 100644 --- a/src/ui/widget/spinbutton.cpp +++ b/src/ui/widget/spinbutton.cpp @@ -17,6 +17,12 @@ #include "util/expression-evaluator.h" #include "event-context.h" +#if !GTK_CHECK_VERSION(2,22,0) +#define GDK_KEY_Escape 0xff1b +#define GDK_KEY_z 0x07a +#define GDK_KEY_Z 0x05a +#endif + namespace Inkscape { namespace UI { namespace Widget { @@ -64,12 +70,12 @@ bool SpinButton::on_my_focus_in_event(GdkEventFocus* /*event*/) bool SpinButton::on_my_key_press_event(GdkEventKey* event) { switch (get_group0_keyval (event)) { - case GDK_Escape: + case GDK_KEY_Escape: undo(); return true; // I consumed the event break; - case GDK_z: - case GDK_Z: + case GDK_KEY_z: + case GDK_KEY_Z: if (event->state & GDK_CONTROL_MASK) { undo(); return true; // I consumed the event diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp index 0ecf2dd5e..1ee26e803 100644 --- a/src/ui/widget/style-swatch.cpp +++ b/src/ui/widget/style-swatch.cpp @@ -298,9 +298,9 @@ StyleSwatch::setStyle(SPStyle *query) place->set_tooltip_text(tip); g_free (tip); } else if (paint->set && paint->isNone()) { - _value[i].set_markup(_("<i>None</i>")); + _value[i].set_markup(C_("Fill and stroke", "<i>None</i>")); place->add(_value[i]); - place->set_tooltip_text((i == SS_FILL)? (_("No fill")) : (_("No stroke"))); + place->set_tooltip_text((i == SS_FILL)? (C_("Fill and stroke", "No fill")) : (C_("Fill and stroke", "No stroke"))); if (i == SS_STROKE) has_stroke = false; } else if (!paint->set) { _value[i].set_markup(_("<b>Unset</b>")); diff --git a/src/ui/widget/zoom-status.cpp b/src/ui/widget/zoom-status.cpp index fa8191671..579449744 100644 --- a/src/ui/widget/zoom-status.cpp +++ b/src/ui/widget/zoom-status.cpp @@ -106,7 +106,7 @@ ZoomStatus::on_value_changed() double zoom_factor = pow(2, get_value()); Geom::Rect const d = _dt->get_display_area(); _dt->zoom_absolute(d.midpoint()[Geom::X], d.midpoint()[Geom::Y], zoom_factor); - gtk_widget_grab_focus(static_cast<GtkWidget*>((void*)_dt->canvas)); /// \todo this no love song + gtk_widget_grab_focus(static_cast<GtkWidget*>((void*)_dt->canvas)); _upd_f = false; } |
