summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2017-12-26 22:54:27 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2017-12-26 22:54:27 +0000
commit5075322fc9b7fabc429c294ca9e8a00e9da69377 (patch)
treedd1f02bb4209b273401c95b7be57904c675f64d6 /src/ui/widget
parentInkview: GtkMM deprecation fixes (diff)
downloadinkscape-5075322fc9b7fabc429c294ca9e8a00e9da69377.tar.gz
inkscape-5075322fc9b7fabc429c294ca9e8a00e9da69377.zip
GtkMM popup menu deprecation fixes
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/panel.cpp4
-rw-r--r--src/ui/widget/selected-style.cpp12
2 files changed, 16 insertions, 0 deletions
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index aea9b7e8e..cc17262af 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -83,7 +83,11 @@ void Panel::_popper(GdkEventButton* event)
{
if ( (event->type == GDK_BUTTON_PRESS) && (event->button == 3 || event->button == 1) ) {
if (_menu) {
+#if GTKMM_CHECK_VERSION(3,22,0)
+ _menu->popup_at_pointer(reinterpret_cast<GdkEvent *>(event));
+#else
_menu->popup(event->button, event->time);
+#endif
}
}
}
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index d9b93f6db..1c6556884 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -822,7 +822,11 @@ SelectedStyle::on_fill_click(GdkEventButton *event)
fs->showPageFill();
} else if (event->button == 3) { // right-click, popup menu
+#if GTKMM_CHECK_VERSION(3,22,0)
+ _popup[SS_FILL].popup_at_pointer(reinterpret_cast<GdkEvent *>(event));
+#else
_popup[SS_FILL].popup(event->button, event->time);
+#endif
} else if (event->button == 2) { // middle click, toggle none/lastcolor
if (_mode[SS_FILL] == SS_NONE) {
on_fill_lastused();
@@ -840,7 +844,11 @@ SelectedStyle::on_stroke_click(GdkEventButton *event)
if (Dialog::FillAndStroke *fs = get_fill_and_stroke_panel(_desktop))
fs->showPageStrokePaint();
} else if (event->button == 3) { // right-click, popup menu
+#if GTKMM_CHECK_VERSION(3,22,0)
+ _popup[SS_STROKE].popup_at_pointer(reinterpret_cast<GdkEvent *>(event));
+#else
_popup[SS_STROKE].popup(event->button, event->time);
+#endif
} else if (event->button == 2) { // middle click, toggle none/lastcolor
if (_mode[SS_STROKE] == SS_NONE) {
on_stroke_lastused();
@@ -858,7 +866,11 @@ SelectedStyle::on_sw_click(GdkEventButton *event)
if (Dialog::FillAndStroke *fs = get_fill_and_stroke_panel(_desktop))
fs->showPageStrokeStyle();
} else if (event->button == 3) { // right-click, popup menu
+#if GTKMM_CHECK_VERSION(3,22,0)
+ _popup_sw.popup_at_pointer(reinterpret_cast<GdkEvent *>(event));
+#else
_popup_sw.popup(event->button, event->time);
+#endif
} else if (event->button == 2) { // middle click, toggle none/lastwidth?
//
}