[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 01/01: plugin: Bind middle-click to toggle "inhibit"
noreply at xfce.org
noreply at xfce.org
Tue Mar 24 22:24:42 CET 2020
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-clipman-plugin.
commit 794363aaf85687f1af4e899de14925ffc01742f4
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue Mar 24 22:24:28 2020 +0100
plugin: Bind middle-click to toggle "inhibit"
---
panel-plugin/main-panel-plugin.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/panel-plugin/main-panel-plugin.c b/panel-plugin/main-panel-plugin.c
index 7f9c314..1ec1e97 100644
--- a/panel-plugin/main-panel-plugin.c
+++ b/panel-plugin/main-panel-plugin.c
@@ -183,9 +183,16 @@ cb_button_pressed (GtkButton *button,
GdkEventButton *event,
MyPlugin *plugin)
{
- if (event->button != 1 && !(event->state & GDK_CONTROL_MASK))
+ gboolean inhibit;
+
+ if (event->button != 1 && event->button != 2 && !(event->state & GDK_CONTROL_MASK))
return FALSE;
- if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
+ else if (event->button == 2)
+ {
+ inhibit = xfconf_channel_get_bool (plugin->channel, "/tweaks/inhibit", FALSE);
+ xfconf_channel_set_bool (plugin->channel, "/tweaks/inhibit", !inhibit);
+ }
+ else if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
plugin_popup_menu (plugin);
return TRUE;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list