[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 01/28: Initial port to Gtk3
noreply at xfce.org
noreply at xfce.org
Thu May 19 20:06:03 CEST 2016
This is an automated email from the git hooks/post-receive script.
ochosi pushed a commit to branch master
in repository panel-plugins/xfce4-clipman-plugin.
commit f0a9258e069c228274ad209b6c53fed5e7acb111
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Tue May 10 23:01:35 2016 +0200
Initial port to Gtk3
It compiles, but it doesn't work yet, lots of work left to do.
---
configure.ac.in | 23 +++----
panel-plugin/Makefile.am | 8 +--
panel-plugin/history.c | 7 +-
panel-plugin/main-panel-plugin.c | 3 -
panel-plugin/main-status-icon.c | 5 +-
panel-plugin/menu.c | 8 +--
panel-plugin/plugin.c | 99 ++++++++++++---------------
panel-plugin/settings-dialog.ui | 55 ++++++++-------
panel-plugin/xfce4-clipman-plugin.desktop.in | 1 +
panel-plugin/xfce4-clipman-settings.c | 18 ++---
panel-plugin/xfce4-popup-clipman.c | 24 ++++---
x11-clipboard-manager/gsd-clipboard-manager.c | 2 +-
12 files changed, 119 insertions(+), 134 deletions(-)
diff --git a/configure.ac.in b/configure.ac.in
index 7d72cd3..506b2fe 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -10,8 +10,8 @@ dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([project_version_major], [1])
-m4_define([project_version_minor], [2])
-m4_define([project_version_micro], [6])
+m4_define([project_version_minor], [4])
+m4_define([project_version_micro], [0])
m4_define([project_version_build], [@REVISION@])
m4_define([project_version_tag], []) # leave empty for release
m4_define([project_version], [project_version_major().project_version_minor().project_version_micro()ifelse(project_version_tag(), [git], [project_version_tag()-project_version_build()], [project_version_tag()])])
@@ -59,22 +59,21 @@ dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
XDT_CHECK_LIBX11_REQUIRE()
-XDT_CHECK_PACKAGE([EXO], [exo-1], [0.6.0])
-XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.18.0])
-XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0])
-XDT_CHECK_PACKAGE([GDKX], [gdk-x11-2.0], [2.14.0])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
-XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
-XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0])
+XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.32.0])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.32.0])
+XDT_CHECK_PACKAGE([GDKX], [gdk-x11-3.0], [3.12.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.12.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.12.0])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-2.0], [4.12.0])
+XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0])
XDT_CHECK_PACKAGE([LIBXPROTO], [xproto], [7.0.0])
XDT_CHECK_PACKAGE([LIBXTST], [xtst], [1.0.0])
dnl ***************************
dnl *** Check for libunique ***
dnl ***************************
-XDT_CHECK_OPTIONAL_PACKAGE([UNIQUE], [unique-1.0], [1.0.0], unique, [Unique support])
+XDT_CHECK_OPTIONAL_PACKAGE([UNIQUE], [unique-3.0], [3.0.0], unique, [Unique support])
if test x"$UNIQUE_FOUND" = x"yes"; then
enable_unique=yes
else
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 554455a..ac1b9c7 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -1,4 +1,4 @@
-NULL =
+NULL =
INCLUDES = \
-I${top_srcdir} \
@@ -58,7 +58,6 @@ xfce4_clipman_settings_SOURCES = \
xfce4_clipman_settings_CFLAGS = \
-DGSEAL_ENABLE \
@GIO_CFLAGS@ \
- @EXO_CFLAGS@ \
@LIBX11_CFLAGS@ \
@GTK_CFLAGS@ \
@LIBXFCE4UI_CFLAGS@ \
@@ -68,7 +67,6 @@ xfce4_clipman_settings_CFLAGS = \
xfce4_clipman_settings_LDADD = \
@GIO_LIBS@ \
- @EXO_LIBS@ \
@LIBX11_LIBS@ \
@GTK_LIBS@ \
@LIBXFCE4UI_LIBS@ \
@@ -94,7 +92,6 @@ xfce4_clipman_CFLAGS = \
-DGSEAL_ENABLE \
-DSTATUS_ICON \
@GIO_CFLAGS@ \
- @EXO_CFLAGS@ \
@LIBX11_CFLAGS@ \
@LIBXTST_CFLAGS@ \
@GDKX_CFLAGS@ \
@@ -107,7 +104,6 @@ xfce4_clipman_CFLAGS = \
xfce4_clipman_LDADD = \
$(top_builddir)/x11-clipboard-manager/libdaemon.la \
@GIO_LIBS@ \
- @EXO_LIBS@ \
@LIBX11_LIBS@ \
@LIBXTST_LIBS@ \
@GDKX_LIBS@ \
@@ -138,7 +134,6 @@ libclipman_la_SOURCES = \
libclipman_la_CFLAGS = \
-DPANEL_PLUGIN \
@GIO_CFLAGS@ \
- @EXO_CFLAGS@ \
@LIBX11_CFLAGS@ \
@LIBXTST_CFLAGS@ \
@GDKX_CFLAGS@ \
@@ -161,7 +156,6 @@ libclipman_la_LDFLAGS = \
libclipman_la_LIBADD = \
$(top_builddir)/x11-clipboard-manager/libdaemon.la \
@GIO_LIBS@ \
- @EXO_LIBS@ \
@LIBX11_LIBS@ \
@LIBXTST_LIBS@ \
@GDKX_LIBS@ \
diff --git a/panel-plugin/history.c b/panel-plugin/history.c
index c997aed..e909df2 100644
--- a/panel-plugin/history.c
+++ b/panel-plugin/history.c
@@ -23,7 +23,7 @@
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
-#include <exo/exo.h>
+//#include <exo/exo.h>
#include <libxfce4util/libxfce4util.h>
#include "common.h"
@@ -277,7 +277,7 @@ clipman_history_add_text (ClipmanHistory *history,
tmp1 = g_strstrip (g_strdup (text));
while (g_strstr_len (tmp1, preview_length, " "))
{
- tmp2 = exo_str_replace (tmp1, " ", " ");
+ //tmp2 = exo_str_replace (tmp1, " ", " ");
g_free (tmp1);
tmp1 = tmp2;
}
@@ -323,7 +323,7 @@ clipman_history_add_image (ClipmanHistory *history,
item = g_slice_new0 (ClipmanHistoryItem);
item->type = CLIPMAN_HISTORY_TYPE_IMAGE;
item->content.image = gdk_pixbuf_copy (image);
- item->preview.image = exo_gdk_pixbuf_scale_ratio (GDK_PIXBUF (image), 128);
+ //item->preview.image = exo_gdk_pixbuf_scale_ratio (GDK_PIXBUF (image), 128);
DBG ("Copy of image (%p) is (%p)", image, item->content.image);
@@ -557,4 +557,3 @@ clipman_history_get_property (GObject *object,
break;
}
}
-
diff --git a/panel-plugin/main-panel-plugin.c b/panel-plugin/main-panel-plugin.c
index 86b67f9..421c653 100644
--- a/panel-plugin/main-panel-plugin.c
+++ b/panel-plugin/main-panel-plugin.c
@@ -85,9 +85,7 @@ panel_plugin_register (XfcePanelPlugin *panel_plugin)
gtk_container_add (GTK_CONTAINER (plugin->button), plugin->image);
gtk_container_add (GTK_CONTAINER (panel_plugin), plugin->button);
-#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
xfce_panel_plugin_set_small (panel_plugin, TRUE);
-#endif
xfce_panel_plugin_add_action_widget (panel_plugin, plugin->button);
g_signal_connect (plugin->button, "button-press-event",
@@ -205,4 +203,3 @@ my_plugin_position_menu (GtkMenu *menu,
break;
}
}
-
diff --git a/panel-plugin/main-status-icon.c b/panel-plugin/main-status-icon.c
index c88d7bc..7573713 100644
--- a/panel-plugin/main-status-icon.c
+++ b/panel-plugin/main-status-icon.c
@@ -34,6 +34,7 @@
/*
* Status Icon
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
static MyPlugin* status_icon_register ();
static gboolean cb_status_icon_is_embedded (GtkStatusIcon *status_icon);
@@ -91,7 +92,7 @@ status_icon_register (void)
{
plugin->status_icon = gtk_status_icon_new_from_stock (GTK_STOCK_PASTE);
}
- gtk_status_icon_set_tooltip (plugin->status_icon, _("Clipman"));
+ //gtk_status_icon_set_tooltip (plugin->status_icon, _("Clipman"));
g_timeout_add_seconds (60, (GSourceFunc)cb_status_icon_is_embedded, plugin->status_icon);
/* Signals */
@@ -236,4 +237,4 @@ update_autostart_file (gboolean autostart)
g_key_file_free (keyfile);
g_free (userfile);
}
-
+G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/panel-plugin/menu.c b/panel-plugin/menu.c
index 64405da..f8313c1 100644
--- a/panel-plugin/menu.c
+++ b/panel-plugin/menu.c
@@ -20,7 +20,7 @@
#include <config.h>
#endif
-#include <exo/exo.h>
+//#include <exo/exo.h>
#include <gtk/gtk.h>
#include <libxfce4ui/libxfce4ui.h>
#include <libxfce4util/libxfce4util.h>
@@ -242,7 +242,7 @@ cb_clear_history (ClipmanMenu *menu)
GtkWidget *content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
#endif
GtkWidget *checkbox = gtk_check_button_new_with_label (_("Don't ask again"));
- exo_binding_new (G_OBJECT (checkbox), "active", G_OBJECT (menu), "never-confirm-history-clear");
+ //exo_binding_new (G_OBJECT (checkbox), "active", G_OBJECT (menu), "never-confirm-history-clear");
gtk_widget_show (checkbox);
gtk_container_add (GTK_CONTAINER (content_area), checkbox);
@@ -548,7 +548,7 @@ clipman_menu_qrcode (char *text)
int i, j, k, rowstride, channels;
guchar *pixel;
unsigned char *data;
-
+
qrcode = QRcode_encodeString8bit(text, 0, QR_ECLEVEL_L);
if (qrcode == NULL)
@@ -574,7 +574,7 @@ clipman_menu_qrcode (char *text)
QRcode_free(qrcode);
g_object_unref(pixbuf);
-
+
return pixbuf_scaled;
}
#endif
diff --git a/panel-plugin/plugin.c b/panel-plugin/plugin.c
index c3c43f7..e03c525 100644
--- a/panel-plugin/plugin.c
+++ b/panel-plugin/plugin.c
@@ -44,7 +44,7 @@
static gboolean my_plugin_set_popup_selection (MyPlugin *plugin);
static gboolean cb_popup_message_received (MyPlugin *plugin,
- GdkEventClient *ev);
+ GdkEvent *ev, gpointer user_data);
static gboolean xfce_popup_grab_available (GdkWindow *win,
guint32 timestamp);
@@ -56,7 +56,7 @@ clipboard_manager_ownership_exists (void)
Display *display;
Atom atom;
- display = GDK_DISPLAY ();
+ display = gdk_x11_get_default_xdisplay ();
atom = XInternAtom (display, "CLIPBOARD_MANAGER", FALSE);
return XGetSelectionOwner (display, atom);
}
@@ -296,26 +296,6 @@ plugin_free (MyPlugin *plugin)
xfconf_shutdown ();
}
-static void
-cb_about_dialog_url_hook (GtkAboutDialog *dialog,
- const gchar *uri,
- gpointer user_data)
-{
- gchar *command = NULL;
-
- if (!gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, NULL))
- {
- command = g_strdup_printf ("exo-open --launch %s", uri);
- if (!g_spawn_command_line_async (command, NULL))
- {
- g_free (command);
- command = g_strdup_printf ("firefox %s", uri);
- g_spawn_command_line_async (command, NULL);
- }
- g_free (command);
- }
-}
-
void
plugin_about (MyPlugin *plugin)
{
@@ -334,7 +314,6 @@ plugin_about (MyPlugin *plugin)
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version.\n";
- gtk_about_dialog_set_url_hook (cb_about_dialog_url_hook, NULL, NULL);
gtk_show_about_dialog (NULL,
"program-name", _("Clipman"),
"logo-icon-name", "xfce4-clipman-plugin",
@@ -382,7 +361,9 @@ plugin_popup_menu (MyPlugin *plugin)
xfce_panel_plugin_register_menu (plugin->panel_plugin, GTK_MENU (plugin->menu));
}
#elif defined (STATUS_ICON)
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_menu_set_screen (GTK_MENU (plugin->menu), gtk_status_icon_get_screen (plugin->status_icon));
+G_GNUC_END_IGNORE_DEPRECATIONS
gtk_menu_popup (GTK_MENU (plugin->menu), NULL, NULL,
plugin->menu_position_func, plugin->status_icon,
0, gtk_get_current_event_time ());
@@ -401,26 +382,28 @@ my_plugin_set_popup_selection (MyPlugin *plugin)
Atom selection_atom;
GtkWidget *win;
Window id;
+ Display *display;
win = gtk_invisible_new ();
gtk_widget_realize (win);
id = GDK_WINDOW_XID (gtk_widget_get_window (win));
+ display = gdk_x11_get_default_xdisplay ();
gscreen = gtk_widget_get_screen (win);
selection_name = g_strdup_printf (XFCE_CLIPMAN_SELECTION"%d",
gdk_screen_get_number (gscreen));
- selection_atom = XInternAtom (GDK_DISPLAY(), selection_name, FALSE);
+ selection_atom = XInternAtom (display, selection_name, FALSE);
- if (XGetSelectionOwner (GDK_DISPLAY(), selection_atom))
+ if (XGetSelectionOwner (display, selection_atom))
{
gtk_widget_destroy (win);
return FALSE;
}
- XSelectInput (GDK_DISPLAY(), id, PropertyChangeMask);
- XSetSelectionOwner (GDK_DISPLAY(), selection_atom, id, GDK_CURRENT_TIME);
+ XSelectInput (display, id, PropertyChangeMask);
+ XSetSelectionOwner (display, selection_atom, id, GDK_CURRENT_TIME);
- g_signal_connect_swapped (win, "client-event",
+ g_signal_connect_swapped (win, "event",
G_CALLBACK (cb_popup_message_received), plugin);
return TRUE;
@@ -428,7 +411,7 @@ my_plugin_set_popup_selection (MyPlugin *plugin)
static gboolean
cb_popup_message_received (MyPlugin *plugin,
- GdkEventClient *ev)
+ GdkEvent *ev, gpointer user_data)
{
{
/* Copy workaround from xfdesktop to handle the awkward case where binding
@@ -436,7 +419,9 @@ cb_popup_message_received (MyPlugin *plugin,
#ifdef PANEL_PLUGIN
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (plugin->button));
#elif defined (STATUS_ICON)
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GdkScreen *screen = gtk_status_icon_get_screen (plugin->status_icon);
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif
GdkWindow *root = gdk_screen_get_root_window (screen);
if (!xfce_popup_grab_available (root, GDK_CURRENT_TIME))
@@ -446,11 +431,11 @@ cb_popup_message_received (MyPlugin *plugin,
}
}
- if (G_LIKELY (ev->data_format == 8 && *(ev->data.b) != '\0'))
- {
- if (!g_ascii_strcasecmp (XFCE_CLIPMAN_MESSAGE, ev->data.b))
- {
- DBG ("Message received: %s", ev->data.b);
+ //if (G_LIKELY (ev->data_format == 8 && *(ev->data.b) != '\0'))
+ //{
+ //if (!g_ascii_strcasecmp (XFCE_CLIPMAN_MESSAGE, ev->data.b))
+ //{
+ //DBG ("Message received: %s", ev->data.b);
if (xfconf_channel_get_bool (plugin->channel, "/tweaks/popup-at-pointer", FALSE))
{
@@ -463,10 +448,10 @@ cb_popup_message_received (MyPlugin *plugin,
}
return TRUE;
- }
- }
+ //}
+ //}
- return FALSE;
+ //return FALSE;
}
/* Code taken from xfwm4/src/menu.c:grab_available(). This should fix the case
@@ -480,40 +465,42 @@ xfce_popup_grab_available (GdkWindow *win, guint32 timestamp)
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK |
GDK_POINTER_MOTION_MASK;
- GdkGrabStatus g1;
- GdkGrabStatus g2;
+ GdkDisplay* display = gdk_window_get_display(win);
+ GdkDeviceManager *device_manager = gdk_display_get_device_manager(display);
+ GdkDevice* device = gdk_device_manager_get_client_pointer(device_manager);
+ GdkGrabStatus g;
+ //GdkGrabStatus g2;
gboolean grab_failed = FALSE;
gint i = 0;
TRACE ("entering grab_available");
- g1 = gdk_pointer_grab (win, TRUE, mask, NULL, NULL, timestamp);
- g2 = gdk_keyboard_grab (win, TRUE, timestamp);
+ g = gdk_device_grab (device, win, GDK_OWNERSHIP_WINDOW, TRUE, mask, NULL, timestamp);
+ //g1 = gdk_pointer_grab (win, TRUE, mask, NULL, NULL, timestamp);
+ //g2 = gdk_keyboard_grab (win, TRUE, timestamp);
- while ((i++ < 2500) && (grab_failed = ((g1 != GDK_GRAB_SUCCESS)
- || (g2 != GDK_GRAB_SUCCESS))))
+ while ((i++ < 2500) && (grab_failed = (g != GDK_GRAB_SUCCESS)))
{
TRACE ("grab not available yet, waiting... (%i)", i);
g_usleep (100);
- if (g1 != GDK_GRAB_SUCCESS)
- {
- g1 = gdk_pointer_grab (win, TRUE, mask, NULL, NULL, timestamp);
- }
- if (g2 != GDK_GRAB_SUCCESS)
+ if (g != GDK_GRAB_SUCCESS)
{
- g2 = gdk_keyboard_grab (win, TRUE, timestamp);
+ g = gdk_device_grab (device, win, GDK_OWNERSHIP_WINDOW, TRUE, mask, NULL, timestamp);
}
+// if (g2 != GDK_GRAB_SUCCESS)
+// {
+// g2 = gdk_keyboard_grab (win, TRUE, timestamp);
+// }
}
- if (g1 == GDK_GRAB_SUCCESS)
- {
- gdk_pointer_ungrab (timestamp);
- }
- if (g2 == GDK_GRAB_SUCCESS)
+ if (g == GDK_GRAB_SUCCESS)
{
- gdk_keyboard_ungrab (timestamp);
+ gdk_device_ungrab (device, timestamp);
}
+// if (g2 == GDK_GRAB_SUCCESS)
+// {
+// gdk_keyboard_ungrab (timestamp);
+// }
return (!grab_failed);
}
-
diff --git a/panel-plugin/settings-dialog.ui b/panel-plugin/settings-dialog.ui
index ee392e4..7a8f17b 100644
--- a/panel-plugin/settings-dialog.ui
+++ b/panel-plugin/settings-dialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-requires libxfce4ui 4.5 -->
+ <requires lib="gtk+" version="3.14"/>
+ <requires lib="libxfce4ui" version="4.12"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkAdjustment" id="adjustment1">
<property name="value">5</property>
@@ -24,7 +24,7 @@
<property name="has_separator">False</property>
<property name="subtitle" translatable="yes">Configure the plugin</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="settings-dialog-vbox">
+ <object class="GtkBox" id="settings-dialog-vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
@@ -34,7 +34,7 @@
<property name="can_focus">True</property>
<property name="border_width">6</property>
<child>
- <object class="GtkVBox" id="vbox-general">
+ <object class="GtkBox" id="vbox-general">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
@@ -51,7 +51,7 @@
<property name="bottom_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox-behavior">
+ <object class="GtkBox" id="vbox-behavior">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
@@ -115,7 +115,7 @@
<property name="bottom_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox-history">
+ <object class="GtkBox" id="vbox-history">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
@@ -163,8 +163,9 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox-history-size">
+ <object class="GtkBox" id="hbox-history-size">
<property name="visible">True</property>
+ <property name="orientation">horizontal</property>s
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="label-history-size">
@@ -228,7 +229,7 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox-actions">
+ <object class="GtkBox" id="vbox-actions">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
@@ -250,8 +251,9 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkBox" id="hbox2">
<property name="visible">True</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
@@ -274,7 +276,7 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkBox" id="vbox4">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
@@ -385,14 +387,15 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox-tweaks">
+ <object class="GtkBox" id="vbox-tweaks">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkBox" id="hbox1">
<property name="visible">True</property>
+ <property name="orientation">horizontal</property>
<property name="tooltip_text" translatable="yes">Automatically paste a selected item from the history</property>
<property name="spacing">4</property>
<child>
@@ -586,14 +589,15 @@
<property name="transient_for">settings-dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="action-dialog-vbox">
+ <object class="GtkBox" id="action-dialog-vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
- <object class="GtkHBox" id="hbox-regex-info">
+ <object class="GtkBox" id="hbox-regex-info">
<property name="visible">True</property>
<property name="border_width">2</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">6</property>
<child>
<object class="GtkImage" id="image-regex-info">
@@ -638,13 +642,14 @@
<property name="bottom_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkVBox" id="vbox-action">
+ <object class="GtkBox" id="vbox-action">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox-action-name">
+ <object class="GtkBox" id="hbox-action-name">
<property name="visible">True</property>
+ <property name="orientation">horizontal</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="label-action-name">
@@ -674,7 +679,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1-action-pattern">
+ <object class="GtkBox" id="hbox1-action-pattern">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
@@ -690,7 +695,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox2-action-pattern">
+ <object class="GtkBox" id="hbox2-action-pattern">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
@@ -733,7 +738,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox-pattern-info">
+ <object class="GtkBox" id="hbox-pattern-info">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
@@ -808,16 +813,16 @@
<property name="bottom_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkHBox" id="hbox-commands">
+ <object class="GtkBox" id="hbox-commands">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <object class="GtkVBox" id="vbox-commands">
+ <object class="GtkBox" id="vbox-commands">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox-command-name">
+ <object class="GtkBox" id="hbox-command-name">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
@@ -850,7 +855,7 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox-command">
+ <object class="GtkBox" id="hbox-command">
<property name="visible">True</property>
<property name="spacing">4</property>
<child>
@@ -908,7 +913,7 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox-command-buttons">
+ <object class="GtkBox" id="vbox-command-buttons">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
@@ -1052,7 +1057,7 @@
<property name="transient_for">action-dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
- <object class="GtkVBox" id="regex-dialog-vbox">
+ <object class="GtkBox" id="regex-dialog-vbox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
diff --git a/panel-plugin/xfce4-clipman-plugin.desktop.in b/panel-plugin/xfce4-clipman-plugin.desktop.in
index 85fc50e..e205a55 100644
--- a/panel-plugin/xfce4-clipman-plugin.desktop.in
+++ b/panel-plugin/xfce4-clipman-plugin.desktop.in
@@ -7,3 +7,4 @@ Icon=xfce4-clipman-plugin
X-XFCE-Module=clipman
X-XFCE-Internal=false
X-XFCE-Unique=true
+X-XFCE-API=2.0
diff --git a/panel-plugin/xfce4-clipman-settings.c b/panel-plugin/xfce4-clipman-settings.c
index 5aa6525..b72ea0a 100644
--- a/panel-plugin/xfce4-clipman-settings.c
+++ b/panel-plugin/xfce4-clipman-settings.c
@@ -203,11 +203,11 @@ prop_dialog_run (void)
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combobox), cell, "text", 0, NULL);
}
- gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("None"));
+ //gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), _("None"));
/* TRANSLATORS: Keyboard shortcut */
- gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Ctrl+V"));
+ //gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), _("Ctrl+V"));
/* TRANSLATORS: Keyboard shortcut */
- gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Shift+Insert"));
+ //gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), _("Shift+Insert"));
gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 0);
xfconf_g_property_bind (xfconf_channel, "/tweaks/paste-on-activate",
@@ -231,7 +231,7 @@ cb_show_help (GtkButton *button)
gchar *offset;
gchar *docpath = NULL;
gchar *command = NULL;
-
+
/* Find localized documentation path on disk */
#ifdef ENABLE_NLS
#ifdef HAVE_LOCALE_H
@@ -750,12 +750,12 @@ cb_test_regex (GtkButton *button)
gtk_widget_hide (dialog);
}
-static void
+static void
cb_test_regex_changed (GtkWidget *widget)
{
if (test_regex_changed_timeout == 0)
- gtk_entry_set_icon_from_stock (GTK_ENTRY (gtk_builder_get_object (builder, "regex-entry")),
- GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_REFRESH);
+ gtk_entry_set_icon_from_icon_name (GTK_ENTRY (gtk_builder_get_object (builder, "regex-entry")),
+ GTK_ENTRY_ICON_SECONDARY, "gtk-refresh");
if (test_regex_changed_timeout > 0)
g_source_remove (test_regex_changed_timeout);
@@ -797,10 +797,10 @@ update_test_regex_textview_tags (void)
regex = g_regex_new (pattern, G_REGEX_CASELESS|G_REGEX_MULTILINE, 0, NULL);
if (regex == NULL)
{
- gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_DIALOG_ERROR);
+ gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, "dialog-error");
return;
}
- gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_APPLY);
+ gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), GTK_ENTRY_ICON_SECONDARY, "dialog-apply");
text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
if (!g_regex_match (regex, text, 0, &match_info))
diff --git a/panel-plugin/xfce4-popup-clipman.c b/panel-plugin/xfce4-popup-clipman.c
index 86de10e..14c90f4 100644
--- a/panel-plugin/xfce4-popup-clipman.c
+++ b/panel-plugin/xfce4-popup-clipman.c
@@ -36,13 +36,15 @@ clipman_plugin_check_is_running (GtkWidget *widget,
GdkScreen *gscreen;
gchar *selection_name;
Atom selection_atom;
+ Display *display;
+ display = gdk_x11_get_default_xdisplay ();
gscreen = gtk_widget_get_screen (widget);
selection_name = g_strdup_printf (XFCE_CLIPMAN_SELECTION"%d",
gdk_screen_get_number (gscreen));
- selection_atom = XInternAtom (GDK_DISPLAY(), selection_name, FALSE);
+ selection_atom = XInternAtom (display, selection_name, FALSE);
- if ((*xid = XGetSelectionOwner (GDK_DISPLAY(), selection_atom)))
+ if ((*xid = XGetSelectionOwner (display, selection_atom)))
return TRUE;
return FALSE;
@@ -51,7 +53,7 @@ clipman_plugin_check_is_running (GtkWidget *widget,
gint
main (gint argc, gchar *argv[])
{
- GdkEventClient gev;
+ GdkEvent gev;
GtkWidget *win;
Window id;
@@ -60,15 +62,16 @@ main (gint argc, gchar *argv[])
win = gtk_invisible_new ();
gtk_widget_realize (win);
- gev.type = GDK_CLIENT_EVENT;
- gev.window = gtk_widget_get_window (win);
- 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), XFCE_CLIPMAN_MESSAGE);
+ //gev.type = GDK_CLIENT_EVENT;
+ //gev.window = gtk_widget_get_window (win);
+ //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), XFCE_CLIPMAN_MESSAGE);
if (clipman_plugin_check_is_running (win, &id))
- gdk_event_send_client_message ((GdkEvent *)&gev, (GdkNativeWindow)id);
+ g_warning ("Fixme...");
+ //gdk_event_send_client_message ((GdkEvent *)&gev, (GdkNativeWindow)id);
else
g_warning ("Can't find the xfce4-clipman-plugin.\n");
gdk_flush ();
@@ -77,4 +80,3 @@ main (gint argc, gchar *argv[])
return FALSE;
}
-
diff --git a/x11-clipboard-manager/gsd-clipboard-manager.c b/x11-clipboard-manager/gsd-clipboard-manager.c
index 422cc65..c1e6a59 100644
--- a/x11-clipboard-manager/gsd-clipboard-manager.c
+++ b/x11-clipboard-manager/gsd-clipboard-manager.c
@@ -276,7 +276,7 @@ start_clipboard_idle_cb (GsdClipboardManager *manager)
Window window;
Time timestamp;
- display = GDK_DISPLAY ();
+ display = gdk_x11_get_default_xdisplay ();
init_atoms (display);
/* Check if there is a clipboard manager running */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list