[evince/wip/gpoo/gtk4-rebase-port: 38/65] ev-view: pass x and y coordinate when popup-menu signal triggered




commit bc12c87f3d40259d9adaf753c1f401d2d9f07f40
Author: Qiu Wenbo <qiuwenbo kylinos com cn>
Date:   Fri Aug 13 14:40:29 2021 +0800

    ev-view: pass x and y coordinate when popup-menu signal triggered
    
    Signed-off-by: Qiu Wenbo <qiuwenbo kylinos com cn>

 libview/ev-view-marshal.list |  1 +
 libview/ev-view.c            | 10 ++++++----
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libview/ev-view-marshal.list b/libview/ev-view-marshal.list
index 97bcc59f8..63c6eddd7 100644
--- a/libview/ev-view-marshal.list
+++ b/libview/ev-view-marshal.list
@@ -1,3 +1,4 @@
 VOID:ENUM,ENUM
 VOID:INT,INT
+VOID:POINTER,DOUBLE,DOUBLE
 BOOLEAN:ENUM,INT,BOOLEAN
diff --git a/libview/ev-view.c b/libview/ev-view.c
index e20a7696d..1dafedbfe 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -4997,7 +4997,7 @@ ev_view_do_popup_menu (EvView *view,
        if (annot)
                items = g_list_prepend (items, annot);
 
-       g_signal_emit (view, signals[SIGNAL_POPUP_MENU], 0, items);
+       g_signal_emit (view, signals[SIGNAL_POPUP_MENU], 0, items, x, y);
 
        g_list_free (items);
 
@@ -8020,9 +8020,11 @@ ev_view_class_init (EvViewClass *class)
                         G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
                         G_STRUCT_OFFSET (EvViewClass, popup_menu),
                         NULL, NULL,
-                        g_cclosure_marshal_VOID__POINTER,
-                        G_TYPE_NONE, 1,
-                        G_TYPE_POINTER);
+                        ev_view_marshal_VOID__POINTER_DOUBLE_DOUBLE,
+                        G_TYPE_NONE, 3,
+                        G_TYPE_POINTER,
+                        G_TYPE_DOUBLE,
+                        G_TYPE_DOUBLE);
        signals[SIGNAL_SELECTION_CHANGED] = g_signal_new ("selection-changed",
                          G_TYPE_FROM_CLASS (object_class),
                          G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]