[Xfce4-commits] <midori:master> Expose midori_view_populate_popup for use in extensions

Christian Dywan noreply at xfce.org
Thu Apr 29 02:38:01 CEST 2010


Updating branch refs/heads/master
         to efa81643c5d95aaea4c159298015343893e60f4c (commit)
       from a25e4c5f0ace96c91bb0d0b28f591f128f71e21d (commit)

commit efa81643c5d95aaea4c159298015343893e60f4c
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Apr 29 02:19:20 2010 +0200

    Expose midori_view_populate_popup for use in extensions

 midori/midori-view.c |   24 ++++++++++++++++++------
 midori/midori-view.h |    6 ++++++
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index ca6e327..32ac734 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -240,11 +240,6 @@ midori_view_speed_dial_save (GtkWidget*   web_view,
                              const gchar* message);
 
 static void
-midori_view_populate_popup (MidoriView* view,
-                            GtkWidget*  menu,
-                            gboolean    manual);
-
-static void
 midori_view_class_init (MidoriViewClass* class)
 {
     GObjectClass* gobject_class;
@@ -1926,7 +1921,24 @@ midori_view_insert_menu_item (GtkMenuShell* menu,
     return menuitem;
 }
 
-static void
+/**
+ * midori_view_populate_popup:
+ * @view: a #MidoriView
+ * @menu: a #GtkMenu
+ * @manual: %TRUE if this a manually created popup
+ *
+ * Populates the given @menu with context menu items
+ * according to the position of the mouse pointer. This
+ * can be used in situations where a custom hotkey
+ * opens the context menu or the default behaviour
+ * needs to be intercepted.
+ *
+ * @manual should usually be %TRUE, except for the
+ * case where @menu was created by the #WebKitWebView.
+ *
+ * Since: 0.2.5
+ */
+void
 midori_view_populate_popup (MidoriView* view,
                             GtkWidget*  menu,
                             gboolean    manual)
diff --git a/midori/midori-view.h b/midori/midori-view.h
index 73af4d7..e1ae4dd 100644
--- a/midori/midori-view.h
+++ b/midori/midori-view.h
@@ -229,6 +229,12 @@ midori_view_get_web_view               (MidoriView*        view);
 MidoriSecurity
 midori_view_get_security               (MidoriView*        view);
 
+void
+midori_view_populate_popup             (MidoriView*        view,
+                                        GtkWidget*         menu,
+                                        gboolean           manual);
+
+
 G_END_DECLS
 
 #endif /* __MIDORI_VIEW_H__ */



More information about the Xfce4-commits mailing list