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




commit acb528c92798fcc4b25d34253ccf69ff314a6062
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 51ebc91d0..3013e2cdf 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -4983,7 +4983,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);
 
@@ -7982,9 +7982,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]