[Goodies-commits] r7151 - in xfce4-clipman-plugin/trunk: . panel-plugin tests
Mike Massonnet
mmassonnet at xfce.org
Fri Apr 10 11:29:21 CEST 2009
Author: mmassonnet
Date: 2009-04-10 09:29:21 +0000 (Fri, 10 Apr 2009)
New Revision: 7151
Added:
xfce4-clipman-plugin/trunk/tests/test_targets.c
Modified:
xfce4-clipman-plugin/trunk/ChangeLog
xfce4-clipman-plugin/trunk/TODO
xfce4-clipman-plugin/trunk/panel-plugin/settings-dialog.glade
xfce4-clipman-plugin/trunk/tests/Makefile.am
Log:
New test program to report targets
Modified: xfce4-clipman-plugin/trunk/ChangeLog
===================================================================
--- xfce4-clipman-plugin/trunk/ChangeLog 2009-04-09 19:36:24 UTC (rev 7150)
+++ xfce4-clipman-plugin/trunk/ChangeLog 2009-04-10 09:29:21 UTC (rev 7151)
@@ -1,4 +1,7 @@
2009-04-02 Mike Massonnet
+New test program to report targets
+
+2009-04-02 Mike Massonnet
String update (Regex > Pattern)
2009-04-02 Mike Massonnet
Modified: xfce4-clipman-plugin/trunk/TODO
===================================================================
--- xfce4-clipman-plugin/trunk/TODO 2009-04-09 19:36:24 UTC (rev 7150)
+++ xfce4-clipman-plugin/trunk/TODO 2009-04-10 09:29:21 UTC (rev 7151)
@@ -1,2 +1,6 @@
Actions:
- A regex validator dialog
+Collector:
+- As of the last "set clipman automatically the owner" change, for instance
+Thunar copy files has a special type but reported as utf8 string, it is
+necessary to have a proper filter on what is to be copied and not
Modified: xfce4-clipman-plugin/trunk/panel-plugin/settings-dialog.glade
===================================================================
--- xfce4-clipman-plugin/trunk/panel-plugin/settings-dialog.glade 2009-04-09 19:36:24 UTC (rev 7150)
+++ xfce4-clipman-plugin/trunk/panel-plugin/settings-dialog.glade 2009-04-10 09:29:21 UTC (rev 7151)
@@ -404,7 +404,7 @@
<child>
<widget class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="n_rows">2</property>
+ <property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="column_spacing">2</property>
<property name="row_spacing">6</property>
@@ -480,6 +480,21 @@
<property name="bottom_attach">2</property>
</packing>
</child>
+ <child>
+ <widget class="GtkCheckButton" id="checkbutton1">
+ <property name="label" translatable="yes">Activate on default clipboard</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip" translatable="yes">By default the action is triggerred by a selection, check this option to trigger the action only when you make a manual copy</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
Modified: xfce4-clipman-plugin/trunk/tests/Makefile.am
===================================================================
--- xfce4-clipman-plugin/trunk/tests/Makefile.am 2009-04-09 19:36:24 UTC (rev 7150)
+++ xfce4-clipman-plugin/trunk/tests/Makefile.am 2009-04-10 09:29:21 UTC (rev 7151)
@@ -10,9 +10,12 @@
-DLOCALEDIR=\"$(localedir)\" \
$(NULL)
-noinst_PROGRAMS = test-actions
+noinst_PROGRAMS = test-actions test-targets
test_actions_SOURCES = test_actions.c ../panel-plugin/actions.c ../panel-plugin/actions.h ../panel-plugin/common.h
test_actions_CFLAGS = @GTK_CFLAGS@ @EXO_CFLAGS@ @LIBXFCE4UTIL_CFLAGS@ @LIBXFCEGUI4_CFLAGS@
test_actions_LDADD = @GTK_LIBS@ @EXO_LIBS@ @LIBXFCE4UTIL_LIBS@ @LIBXFCEGUI4_LIBS@
+test_targets_SOURCES = test_targets.c
+test_targets_CFLAGS = @GTK_CFLAGS@
+test_targets_LDADD = @GTK_LIBS@
endif
Added: xfce4-clipman-plugin/trunk/tests/test_targets.c
===================================================================
--- xfce4-clipman-plugin/trunk/tests/test_targets.c (rev 0)
+++ xfce4-clipman-plugin/trunk/tests/test_targets.c 2009-04-10 09:29:21 UTC (rev 7151)
@@ -0,0 +1,40 @@
+#include <glib.h>
+#include <gtk/gtk.h>
+
+static void
+cb (GtkClipboard *clipboard,
+ GdkEvent *event,
+ gpointer udata)
+{
+ GdkAtom *atoms;
+ gint n_atoms;
+
+ if (!gtk_clipboard_wait_for_targets (clipboard, &atoms, &n_atoms))
+ return;
+
+ gint i;
+ for (i = 0; i < n_atoms; i++)
+ {
+ gchar *name = gdk_atom_name (atoms[i]);
+ g_print ("%s\n", name);
+ g_free (name);
+ }
+ g_print ("\n");
+
+ g_free (atoms);
+}
+
+int main (int argc, char *argv[])
+{
+ GtkClipboard *clipboard;
+
+ gtk_init (&argc, &argv);
+
+ clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
+ g_signal_connect (clipboard, "owner-change", G_CALLBACK (cb), NULL);
+
+ gtk_main ();
+
+ return 0;
+}
+
More information about the Goodies-commits
mailing list