[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 88/473: Allow subclasses to extend context menu.
noreply at xfce.org
noreply at xfce.org
Mon Feb 16 23:54:18 CET 2015
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit bad61c2a585bde3a008ceb37e0e78bfefe1f85c7
Author: Graeme Gott <graeme at gottcode.org>
Date: Fri Jul 12 12:12:45 2013 -0400
Allow subclasses to extend context menu.
---
src/page.cpp | 8 ++++++++
src/page.hpp | 1 +
2 files changed, 9 insertions(+)
diff --git a/src/page.cpp b/src/page.cpp
index 36d7ade..7bfd921 100644
--- a/src/page.cpp
+++ b/src/page.cpp
@@ -193,6 +193,8 @@ void Page::create_context_menu(GtkTreeIter* iter, GdkEventButton* event)
g_signal_connect_swapped(menuitem, "activate", SLOT_CALLBACK(Page::add_selected_to_panel), this);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
+ extend_context_menu(menu);
+
gtk_widget_show_all(menu);
// Show context menu
@@ -231,6 +233,12 @@ void Page::destroy_context_menu(GtkMenuShell* menu)
//-----------------------------------------------------------------------------
+void Page::extend_context_menu(GtkWidget*)
+{
+}
+
+//-----------------------------------------------------------------------------
+
void Page::position_context_menu(GtkMenu*, gint* x, gint* y, gboolean* push_in, Page* page)
{
// Find rectangle of selected row
diff --git a/src/page.hpp b/src/page.hpp
index a350466..96d109d 100644
--- a/src/page.hpp
+++ b/src/page.hpp
@@ -68,6 +68,7 @@ private:
private:
Launcher* get_selected_launcher() const;
void create_context_menu(GtkTreeIter* iter, GdkEventButton* event);
+ virtual void extend_context_menu(GtkWidget* menu);
static void position_context_menu(GtkMenu*, gint* x, gint* y, gboolean* push_in, Page* page);
private:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list