[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 343/473: Fix menu flashing when button is pressed rapidly. Closes #75.
noreply at xfce.org
noreply at xfce.org
Mon Feb 16 23:58:33 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 8682cab3bf8e2d813e449693e0c7dfb468b9a2f7
Author: Graeme Gott <graeme at gottcode.org>
Date: Fri Feb 28 07:15:21 2014 -0500
Fix menu flashing when button is pressed rapidly. Closes #75.
---
panel-plugin/plugin.cpp | 13 ++++++++-----
panel-plugin/plugin.h | 4 ++--
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/panel-plugin/plugin.cpp b/panel-plugin/plugin.cpp
index 5964bcc..6dfcb9b 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2014 Graeme Gott <graeme at gottcode.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -304,7 +304,7 @@ gboolean Plugin::button_clicked(GtkWidget*, GdkEvent* event)
}
else
{
- popup_menu(false);
+ popup_menu(false, false);
}
return true;
@@ -358,7 +358,7 @@ gboolean Plugin::remote_event(XfcePanelPlugin*, gchar* name, GValue* value)
}
else
{
- popup_menu(value && G_VALUE_HOLDS_BOOLEAN(value) && g_value_get_boolean(value));
+ popup_menu(value && G_VALUE_HOLDS_BOOLEAN(value) && g_value_get_boolean(value), true);
}
return true;
@@ -439,12 +439,15 @@ gboolean Plugin::size_changed(XfcePanelPlugin*, gint size)
//-----------------------------------------------------------------------------
-void Plugin::popup_menu(bool at_cursor)
+void Plugin::popup_menu(bool at_cursor, bool activate_button)
{
if (!at_cursor)
{
xfce_panel_plugin_block_autohide(m_plugin, true);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_button), true);
+ if (activate_button)
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_button), true);
+ }
m_window->show(m_button, xfce_panel_plugin_get_orientation(m_plugin) == GTK_ORIENTATION_HORIZONTAL);
}
else
diff --git a/panel-plugin/plugin.h b/panel-plugin/plugin.h
index c6b8227..28a033a 100644
--- a/panel-plugin/plugin.h
+++ b/panel-plugin/plugin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2014 Graeme Gott <graeme at gottcode.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -69,7 +69,7 @@ private:
gboolean remote_event(XfcePanelPlugin*, gchar* name, GValue* value);
void save();
gboolean size_changed(XfcePanelPlugin*, gint size);
- void popup_menu(bool at_cursor);
+ void popup_menu(bool at_cursor, bool activate_button);
private:
XfcePanelPlugin* m_plugin;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list