]> spindle.queued.net Git - midori/commitdiff
Expose midori_view_populate_popup for use in extensions
authorChristian Dywan <christian@twotoasts.de>
Thu, 29 Apr 2010 00:19:20 +0000 (02:19 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 29 Apr 2010 00:19:20 +0000 (02:19 +0200)
midori/midori-view.c
midori/midori-view.h

index ca6e32759fca5c5f654268a49c09ccb1d0626683..32ac7342c8e029cd7e96c8642bce6f3aadfc5fa7 100644 (file)
@@ -239,11 +239,6 @@ static void
 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)
 {
@@ -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)
index 73af4d75f94f8b74429a1eb1b115ed512ce6ff5c..e1ae4dde729d0f9712d821184d8a346398f6c5a6 100644 (file)
@@ -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__ */