Unverified Commit 90cf6540 authored by Murray Cumming's avatar Murray Cumming
Browse files

Use Gtk::Menu::popup_at_pointer() instead of (deprecated) popup().

Strangely, popup() is not deprecated in GTK+ 4.
parent 0bc8bf73
......@@ -73,7 +73,7 @@ public:
/** void on_show_context(guint button, guint32 activate_time);
*/
typedef sigc::signal<void(guint, guint32)> type_signal_show_context;
typedef sigc::signal<void(GdkEventButton*)> type_signal_show_context;
type_signal_show_context signal_show_context();
/** For instance,
......
......@@ -153,7 +153,7 @@ private:
void on_show_context_menu(guint button, guint32 activate_time)
{
if(m_context_menu)
m_context_menu->popup(button, activate_time);
m_context_menu->popup_at_pointer((GdkEvent*)event);
}
*/
......
......@@ -177,7 +177,7 @@ bool ImageGlom::on_button_press_event(GdkEventButton *button_event)
if(mods & GDK_BUTTON3_MASK)
{
//Give user choices of actions on this item:
popup_menu(button_event->button, button_event->time);
popup_menu(button_event);
return true; //We handled this event.
}
......@@ -189,7 +189,7 @@ bool ImageGlom::on_button_press_event(GdkEventButton *button_event)
if(mods & GDK_BUTTON3_MASK)
{
//Give user choices of actions on this item:
popup_menu(button_event->button, button_event->time);
popup_menu(button_event);
return true; //We handled this event.
}
......@@ -986,7 +986,7 @@ void ImageGlom::set_read_only(bool read_only)
m_read_only = read_only;
}
void ImageGlom::popup_menu(guint button, guint32 activate_time)
void ImageGlom::popup_menu(GdkEventButton* event)
{
if(!m_menu_popup_user_mode)
{
......@@ -994,7 +994,7 @@ void ImageGlom::popup_menu(guint button, guint32 activate_time)
return;
}
m_menu_popup_user_mode->popup(button, activate_time);
m_menu_popup_user_mode->popup_at_pointer((GdkEvent*)event);
m_action_select_file->set_enabled();
}
......
......@@ -89,7 +89,7 @@ private:
void setup_menu_usermode();
void show_image_data();
void popup_menu(guint button, guint32 activate_time);
void popup_menu(GdkEventButton* event);
const GdaBinary* get_binary() const;
......
......@@ -131,7 +131,7 @@ bool NotebookLabel::on_button_press_event(GdkEventButton *button_event)
if(mods & GDK_BUTTON3_MASK)
{
//Give user choices of actions on this item:
m_popup_menu->popup(button_event->button, button_event->time);
m_popup_menu->popup_at_pointer((GdkEvent*)button_event);
return true; //We handled this event.
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment