[kazehakase-svn] [3353] * src/kz-statusbar.{c,h}, /src/actions/ kz-actions-dynamic.c:

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Wed Jan 9 22:25:17 JST 2008


Revision: 3353
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3353
Author:   furyo
Date:     2008-01-09 22:25:17 +0900 (Wed, 09 Jan 2008)

Log Message:
-----------
	* src/kz-statusbar.{c,h}, /src/actions/kz-actions-dynamic.c:
	Print copied string in Statusbar when CopyInUserFormat action is executed.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/src/actions/kz-actions-dynamic.c
    kazehakase/trunk/src/kz-statusbar.c
    kazehakase/trunk/src/kz-statusbar.h

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2008-01-09 12:42:30 UTC (rev 3352)
+++ kazehakase/trunk/ChangeLog	2008-01-09 13:25:17 UTC (rev 3353)
@@ -1,5 +1,10 @@
 2008-01-09  Ryo SHIMIZU  <furyo****@on-ai*****>
 
+	* src/kz-statusbar.{c,h}, /src/actions/kz-actions-dynamic.c:
+	Print copied string in Statusbar when CopyInUserFormat action is executed.
+
+2008-01-09  Ryo SHIMIZU  <furyo****@on-ai*****>
+
 	* src/kz-xml.c: Fix a bug a xml data written with "CDATA" was
 	not parsed. (ex. kernel.org RSS http://kernel.org/kdist/rss.xml )
 

Modified: kazehakase/trunk/src/actions/kz-actions-dynamic.c
===================================================================
--- kazehakase/trunk/src/actions/kz-actions-dynamic.c	2008-01-09 12:42:30 UTC (rev 3352)
+++ kazehakase/trunk/src/actions/kz-actions-dynamic.c	2008-01-09 13:25:17 UTC (rev 3353)
@@ -27,6 +27,7 @@
 #include "kazehakase.h"
 #include "kz-icons.h"
 #include "kz-navi.h"
+#include "kz-statusbar.h"
 
 #define KZ_ACTIONS_DYNAMIC_COPY_IN_USER_FORMAT_KEY "KzActionsDynamic::CopyInUserFormat"
 #define KZ_ACTIONS_DYNAMIC_SMART_LIST_KEY "KzActionsDynamic::SmartList"
@@ -54,6 +55,7 @@
 	gchar *text;
 	gchar *str;
 	gchar *compress_str;
+	gchar *statusbar_message;
 	gint i;
 	gint counts = 0;
 
@@ -161,10 +163,14 @@
 	compress_str = g_strcompress(str);
 
 	gtkutil_copy_text(compress_str);
+	
+	statusbar_message = g_strconcat("Copy to clipboard ", compress_str, NULL);
+	kz_statusbar_set_copied_text(KZ_STATUSBAR(kztab->kz->statusbar), statusbar_message);
 
 	if(str) g_free(str);
 	if(compress_str) g_free(compress_str);
 	if(text) g_free(text);
+	if(statusbar_message) g_free(statusbar_message);
 }
 
 void

Modified: kazehakase/trunk/src/kz-statusbar.c
===================================================================
--- kazehakase/trunk/src/kz-statusbar.c	2008-01-09 12:42:30 UTC (rev 3352)
+++ kazehakase/trunk/src/kz-statusbar.c	2008-01-09 13:25:17 UTC (rev 3353)
@@ -53,12 +53,14 @@
 	guint status_link_message;
 	guint status_gesture;
 	guint status_search;
+	guint status_text_copy;
 };
 #define KZ_STATUSBAR_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), KZ_TYPE_STATUSBAR, KzStatusbarPrivate))
 
 #define STATUS_LINK_MESSAGE "INTERNAL_LINK_MESSAGE"
 #define STATUS_GESTURE "INTERNAL_GESTURE"
 #define STATUS_SEARCH "INTERNAL_SEARCH"
+#define STATUS_TEXT_COPY "INTERNAL_TEXT_COPY"
 
 static GObject *constructor (GType type,
                              guint n_props,
@@ -170,6 +172,9 @@
 	priv->status_search =
 		gtk_statusbar_get_context_id(GTK_STATUSBAR(priv->statusbar),
 					     STATUS_SEARCH);
+	priv->status_text_copy =
+		gtk_statusbar_get_context_id(GTK_STATUSBAR(priv->statusbar),
+					     STATUS_TEXT_COPY);
 
 	/* status bar */
 	gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(priv->statusbar),
@@ -345,6 +350,18 @@
 
 
 void
+kz_statusbar_set_copied_text (KzStatusbar *bar, const gchar *text)
+{
+	KzStatusbarPrivate *priv;
+
+	g_return_if_fail(KZ_IS_STATUSBAR(bar));
+	
+	priv = KZ_STATUSBAR_GET_PRIVATE (bar);
+
+	kz_statusbar_set_text(bar, text, priv->status_text_copy);
+}
+
+void
 kz_statusbar_set_focus_to_find_area (KzStatusbar *bar)
 {
 	KzStatusbarPrivate *priv;

Modified: kazehakase/trunk/src/kz-statusbar.h
===================================================================
--- kazehakase/trunk/src/kz-statusbar.h	2008-01-09 12:42:30 UTC (rev 3352)
+++ kazehakase/trunk/src/kz-statusbar.h	2008-01-09 13:25:17 UTC (rev 3353)
@@ -36,6 +36,7 @@
 					    const gchar *name);
 void       kz_statusbar_set_link_text    (KzStatusbar *bar, const gchar *text);
 void       kz_statusbar_set_gesture_text (KzStatusbar *bar, const gchar *text);
+void       kz_statusbar_set_copied_text (KzStatusbar *bar, const gchar *text);
 
 void       kz_statusbar_set_focus_to_find_area (KzStatusbar *bar);
 




More information about the Kazehakase-cvs mailing list
Back to archive index