[Goodies-commits] r6599 - in xfce4-clipman-plugin/branches/xfce-4-6: . panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Fri Jan 30 08:11:15 CET 2009
Author: mmassonnet
Date: 2009-01-30 07:11:15 +0000 (Fri, 30 Jan 2009)
New Revision: 6599
Modified:
xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog
xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/collector.c
xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/history.c
xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/history.h
xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/panel-plugin.c
Log:
Remove the origin of the clipboard from the history items.
Modified: xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog 2009-01-30 06:26:06 UTC (rev 6598)
+++ xfce4-clipman-plugin/branches/xfce-4-6/ChangeLog 2009-01-30 07:11:15 UTC (rev 6599)
@@ -1,4 +1,13 @@
2009-01-30 Mike Massonnet
+Remove the origin of the clipboard from the history items.
+
+ - panel-plugin/history.h, panel-plugin/history.c:
+ Don't store from where a clipboard originated from (useless).
+ Update the public methods and the struct ClipmanHistoryItem.
+ - panel-plugin/collector.c, panel-plugin/panel-plugin.c:
+ Update the code to use the new function declarations.
+
+2009-01-30 Mike Massonnet
Set the settings dialog "buggy".
- panel-plugin/panel-plugin.c:
Modified: xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/collector.c
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/collector.c 2009-01-30 06:26:06 UTC (rev 6598)
+++ xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/collector.c 2009-01-30 07:11:15 UTC (rev 6599)
@@ -139,14 +139,14 @@
{
text = gtk_clipboard_wait_for_text (collector->priv->default_clipboard);
if (text != NULL && text[0] != '\0')
- clipman_history_add_text (collector->priv->history, text, collector->priv->default_clipboard);
+ clipman_history_add_text (collector->priv->history, text);
g_free (text);
}
else if (has_image)
{
image = gtk_clipboard_wait_for_image (collector->priv->default_clipboard);
if (image != NULL)
- clipman_history_add_image (collector->priv->history, image, collector->priv->default_clipboard);
+ clipman_history_add_image (collector->priv->history, image);
g_object_unref (image);
}
}
@@ -184,7 +184,7 @@
{
if (collector->priv->add_primary_clipboard)
{
- clipman_history_add_text (collector->priv->history, text, collector->priv->primary_clipboard);
+ clipman_history_add_text (collector->priv->history, text);
/* Make a copy inside the default clipboard */
collector->priv->restoring = TRUE;
Modified: xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/history.c
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/history.c 2009-01-30 06:26:06 UTC (rev 6598)
+++ xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/history.c 2009-01-30 07:11:15 UTC (rev 6599)
@@ -188,15 +188,13 @@
* clipman_history_add_text:
* @history: a #ClipmanHistory
* @text: the text to add to the history
- * @clipboard: the #GtkClipboard from where the text is originating from
*
* Stores a text inside the history. If the history is growing over the
* maximum number of items, it will delete the oldest text.
*/
void
clipman_history_add_text (ClipmanHistory *history,
- const gchar *text,
- GtkClipboard *clipboard)
+ const gchar *text)
{
ClipmanHistoryItem *item;
gchar *tmp1, *tmp2;
@@ -214,10 +212,9 @@
}
/* Store the text */
- DBG ("Store text `%s' from clipboard (%p)", text, clipboard);
+ DBG ("Store text `%s')", text);
item = g_slice_new0 (ClipmanHistoryItem);
- item->clipboard = clipboard;
item->type = CLIPMAN_HISTORY_TYPE_TEXT;
item->content.text = g_strdup (text);
@@ -253,25 +250,22 @@
* clipman_history_add_image:
* @history: a #ClipmanHistory
* @image: the image to add to the history
- * @clipboard: the #GtkClipboard from where the image is originating from
*
* Stores an image inside the history. If the history is growing over the
* maximum number of items, it will delete the oldest image.
*/
void
clipman_history_add_image (ClipmanHistory *history,
- const GdkPixbuf *image,
- GtkClipboard *clipboard)
+ const GdkPixbuf *image)
{
ClipmanHistoryItem *item;
if (history->priv->max_images_in_history == 0)
return;
- DBG ("Store image (%p) from clipboard (%p)", image, clipboard);
+ DBG ("Store image (%p)", image);
item = g_slice_new0 (ClipmanHistoryItem);
- item->clipboard = clipboard;
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);
Modified: xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/history.h
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/history.h 2009-01-30 06:26:06 UTC (rev 6598)
+++ xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/history.h 2009-01-30 07:11:15 UTC (rev 6599)
@@ -35,7 +35,6 @@
typedef struct _ClipmanHistoryItem ClipmanHistoryItem;
struct _ClipmanHistoryItem
{
- GtkClipboard *clipboard;
ClipmanHistoryType type;
union
{
@@ -84,11 +83,9 @@
ClipmanHistory * clipman_history_get ();
void clipman_history_add_text (ClipmanHistory *history,
- const gchar *text,
- GtkClipboard *clipboard);
+ const gchar *text);
void clipman_history_add_image (ClipmanHistory *history,
- const GdkPixbuf *image,
- GtkClipboard *clipboard);
+ const GdkPixbuf *image);
GSList * clipman_history_get_list (ClipmanHistory *history);
const ClipmanHistoryItem * clipman_history_get_item_to_restore (ClipmanHistory *history);
void clipman_history_set_item_to_restore (ClipmanHistory *history,
Modified: xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/panel-plugin.c
===================================================================
--- xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/panel-plugin.c 2009-01-30 06:26:06 UTC (rev 6598)
+++ xfce4-clipman-plugin/branches/xfce-4-6/panel-plugin/panel-plugin.c 2009-01-30 07:11:15 UTC (rev 6599)
@@ -315,7 +315,7 @@
if (image == NULL)
break;
- clipman_history_add_image (plugin->history, image, clipboard);
+ clipman_history_add_image (plugin->history, image);
g_object_unref (image);
}
@@ -327,7 +327,7 @@
{
texts = g_key_file_get_string_list (keyfile, "texts", "texts", NULL, NULL);
for (i = 0; texts != NULL && texts[i] != NULL; i++)
- clipman_history_add_text (plugin->history, texts[i], clipboard);
+ clipman_history_add_text (plugin->history, texts[i]);
g_unlink (filename);
}
More information about the Goodies-commits
mailing list