diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-06-20 13:20:52 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-06-20 13:20:52 +0000 |
| commit | af32f53a859d8bc0dc5c07d644a8158f8c950cdc (patch) | |
| tree | 0ed9599288b92de7441e624630659a9faee4ab3b /src/ui/widget/spin-button-tool-item.cpp | |
| parent | Merge branch 'copypasta' of gitlab.com:nathanal/inkscape (diff) | |
| parent | Remove deprecated usage of custom Gtk::IconSize (diff) | |
| download | inkscape-af32f53a859d8bc0dc5c07d644a8158f8c950cdc.tar.gz inkscape-af32f53a859d8bc0dc5c07d644a8158f8c950cdc.zip | |
Merge branch 'gtk3-deprecated' of gitlab.com:Qantas94Heavy/inkscape
Diffstat (limited to 'src/ui/widget/spin-button-tool-item.cpp')
| -rw-r--r-- | src/ui/widget/spin-button-tool-item.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/ui/widget/spin-button-tool-item.cpp b/src/ui/widget/spin-button-tool-item.cpp index c21989723..b283939e9 100644 --- a/src/ui/widget/spin-button-tool-item.cpp +++ b/src/ui/widget/spin-button-tool-item.cpp @@ -418,9 +418,9 @@ SpinButtonToolItem::set_icon(const Glib::ustring& icon_name) } bool -SpinButtonToolItem::on_btn_button_press_event(GdkEventButton *button_event) +SpinButtonToolItem::on_btn_button_press_event(const GdkEventButton *button_event) { - if (gdk_event_triggers_context_menu((GdkEvent *)button_event) && + if (gdk_event_triggers_context_menu(reinterpret_cast<const GdkEvent *>(button_event)) && button_event->type == GDK_BUTTON_PRESS) { do_popup_menu(button_event); return true; @@ -430,21 +430,12 @@ SpinButtonToolItem::on_btn_button_press_event(GdkEventButton *button_event) } void -SpinButtonToolItem::do_popup_menu(GdkEventButton *button_event) +SpinButtonToolItem::do_popup_menu(const GdkEventButton *button_event) { auto menu = create_numeric_menu(); menu->attach_to_widget(*_btn); menu->show_all(); - - int button = 0; - int time = gtk_get_current_event_time(); - - if (button_event) { - button = button_event->button; - time = button_event->time; - } - - menu->popup(button, time); + menu->popup_at_pointer(reinterpret_cast<const GdkEvent *>(button_event)); } /** |
