[Xfce4-commits] [panel-plugins/xfce4-places-plugin] 03/03: Cleanup old xfce4-popup-places code
noreply at xfce.org
noreply at xfce.org
Thu May 23 13:57:01 CEST 2019
This is an automated email from the git hooks/post-receive script.
s k u n n y k 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-places-plugin.
commit 1a762f8351da4c1a1c17b6d10986a5fc772ea7f6
Author: Romain Bouvier <skunnyk at alteroot.org>
Date: Thu May 23 13:52:12 2019 +0200
Cleanup old xfce4-popup-places code
- It uses xfce4-popup-places.sh since
89bad7fa73fcd9c61a67735c00f0eb3bb9c864af (2012)
---
panel-plugin/xfce4-popup-places.c | 89 ---------------------------------------
panel-plugin/xfce4-popup-places.h | 35 ---------------
2 files changed, 124 deletions(-)
diff --git a/panel-plugin/xfce4-popup-places.c b/panel-plugin/xfce4-popup-places.c
deleted file mode 100644
index aed6ab4..0000000
--- a/panel-plugin/xfce4-popup-places.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* $Id$
- *
- * Places - panel plugin for Xfce Desktop Environment
- * popup command
- * Adapted from xfce4-panel's windowlist plugin
- *
- * Copyright (C) 2002-2006 Olivier Fourdan
- * 2007 Mike Massonnet <mmassonnet at xfce.com>
- * 2007 Diego Ongaro <ongardie at gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-#include <X11/Xlib.h>
-
-#include "xfce4-popup-places.h"
-
-
-
-static gboolean
-plugin_check_is_running (GtkWidget *widget,
- Window *xid)
-{
- GdkScreen *gscreen;
- gchar selection_name[256];
- Atom selection_atom;
-
- gscreen = gtk_widget_get_screen (widget);
-
- g_snprintf (selection_name, 256,
- XFCE_PLACES_SELECTION"%d",
- gdk_screen_get_number (gscreen));
- selection_atom = XInternAtom (GDK_DISPLAY (), selection_name, FALSE);
-
- if ((*xid = XGetSelectionOwner (GDK_DISPLAY (), selection_atom)))
- return TRUE;
- else
- return FALSE;
-}
-
-gint
-main (gint argc, gchar *argv[])
-{
- GdkEventClient gev;
- GtkWidget *win;
- Window id;
-
- gtk_init (&argc, &argv);
-
- win = gtk_invisible_new ();
- gtk_widget_realize (win);
-
- gev.type = GDK_CLIENT_EVENT;
- gev.window = win->window;
- gev.send_event = TRUE;
- gev.message_type = gdk_atom_intern ("STRING", FALSE);
- gev.data_format = 8;
- g_snprintf (gev.data.b, sizeof (gev.data.b), PLACES_MSG_MENU);
-
- if (plugin_check_is_running (win, &id))
- gdk_event_send_client_message ((GdkEvent *)&gev, (GdkNativeWindow)id);
- else
- g_warning ("Can't find the xfce4-places-plugin.\n");
- gdk_flush ();
-
- gtk_widget_destroy (win);
-
- return FALSE;
-}
-
-/* vim: set ai et tabstop=4: */
diff --git a/panel-plugin/xfce4-popup-places.h b/panel-plugin/xfce4-popup-places.h
deleted file mode 100644
index 4555c42..0000000
--- a/panel-plugin/xfce4-popup-places.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* $Id$
- *
- * Places - panel plugin for Xfce Desktop Environment
- * popup command
- * Adapted from xfce4-panel's windowlist plugin
- *
- * Copyright (C) 2002-2006 Olivier Fourdan
- * 2007 Mike Massonnet <mmassonnet at gmail.com>
- * 2007 Diego Ongaro <ongardie at gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef __XFCE4_POPUP_PLACES_H__
-#define __XFCE4_POPUP_PLACES_H__
-
-#define XFCE_PLACES_SELECTION "XFCE_PLACES_SELECTION"
-
-#define PLACES_MSG_MENU "MENU"
-
-#endif
-
-/* vim: set ai et tabstop=4: */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list