[kazehakase-svn] [3267] * src/bookmarks/kz-xbel.c: Use strcmp() instead of g_str_has_prefix()

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
Thu Oct 4 14:17:39 JST 2007


Revision: 3267
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3267
Author:   ikezoe
Date:     2007-10-04 14:17:39 +0900 (Thu, 04 Oct 2007)

Log Message:
-----------
* src/bookmarks/kz-xbel.c: Use strcmp() instead of g_str_has_prefix()
because g_str_has_prefix() can not distinguish "header" and
"header_and_body"

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/src/bookmarks/kz-xbel.c

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2007-10-04 04:54:57 UTC (rev 3266)
+++ kazehakase/trunk/ChangeLog	2007-10-04 05:17:39 UTC (rev 3267)
@@ -9,6 +9,9 @@
 	* data/icons/kz-select-all.png: Removed.
 	* src/actions/kz-actions.c: Use GTK_STOCK_SELECT_ALL instead of
 	KZ_STOCK_SELECT_ALL.
+	* src/bookmarks/kz-xbel.c: Use strcmp() instead of g_str_has_prefix()
+	because g_str_has_prefix() can not distinguish "header" and
+	"header_and_body"
 
 2007-10-04  Kouhei Sutou  <kou****@cozmi*****>
 

Modified: kazehakase/trunk/src/bookmarks/kz-xbel.c
===================================================================
--- kazehakase/trunk/src/bookmarks/kz-xbel.c	2007-10-04 04:54:57 UTC (rev 3266)
+++ kazehakase/trunk/src/bookmarks/kz-xbel.c	2007-10-04 05:17:39 UTC (rev 3267)
@@ -333,73 +333,73 @@
 		{
 			KzXMLAttr *attr = a_node->data;
 
-			if (g_str_has_prefix(attr->name, "kz:update_interval"))
+			if (!strcmp(attr->name, "kz:update_interval"))
 			{
 				interval = atoi(attr->value);
 				kz_bookmark_file_set_interval(KZ_BOOKMARK_FILE(bookmark), interval);
 			}
-			else if (g_str_has_prefix(attr->name, "kz:smart_regex"))
+			else if (!strcmp(attr->name, "kz:smart_regex"))
 			{
 				smart_regex = attr->value;
 			}
-			else if (g_str_has_prefix(attr->name, "kz:smart_uri"))
+			else if (!strcmp(attr->name, "kz:smart_uri"))
 			{
 				smart_uri = attr->value;
 			}
-			else if (g_str_has_prefix(attr->name, "kz:smart_encode"))
+			else if (!strcmp(attr->name, "kz:smart_encode"))
 			{
 				smart_encode = attr->value;
 			}
-			else if (g_str_has_prefix(attr->name, "kz:smart_urlencode"))
+			else if (!strcmp(attr->name, "kz:smart_urlencode"))
 			{
 				urlencode = TRUE;
 			}
-			else if (g_str_has_prefix(attr->name, "kz:smart_history") && !smart_history)
+			else if (!strcmp(attr->name, "kz:smart_history") && !smart_history)
 			{
 				smart_history = KZ_BOOKMARK(kz_bookmark_file_new(attr->value,
 							    NULL, NULL));
 				is_smart_history = TRUE;
 			}
-			else if (g_str_has_prefix(attr->name, "kz:xmlrpc"))
+			else if (!strcmp(attr->name, "kz:xmlrpc"))
 			{
 				kz_bookmark_file_set_xmlrpc(KZ_BOOKMARK_FILE(bookmark), attr->value);
 			}
-			else if (g_str_has_prefix(attr->name, "kz:xmlrpc_user"))
+			else if (!strcmp(attr->name, "kz:xmlrpc_user"))
 			{
 				kz_bookmark_file_set_xmlrpc_user(KZ_BOOKMARK_FILE(bookmark), attr->value);
 			}
-			else if (g_str_has_prefix(attr->name, "kz:xmlrpc_pass"))
+			else if (!strcmp(attr->name, "kz:xmlrpc_pass"))
 			{
 				kz_bookmark_file_set_xmlrpc_pass(KZ_BOOKMARK_FILE(bookmark), attr->value);
 			}
-			else if (g_str_has_prefix(attr->name, "kz:smart_xmlrpc"))
+			else if (!strcmp(attr->name, "kz:smart_xmlrpc"))
 			{
 				kz_bookmark_file_set_xmlrpc(KZ_BOOKMARK_FILE(smart_history), attr->value);
 			}
-			else if (g_str_has_prefix(attr->name, "kz:smart_xmlrpc_user"))
+			else if (!strcmp(attr->name, "kz:smart_xmlrpc_user"))
 			{
 				kz_bookmark_file_set_xmlrpc_user(KZ_BOOKMARK_FILE(smart_history), attr->value);
 			}
-			else if (g_str_has_prefix(attr->name, "kz:smart_xmlrpc_pass"))
+			else if (!strcmp(attr->name, "kz:smart_xmlrpc_pass"))
 			{
 				kz_bookmark_file_set_xmlrpc_pass(KZ_BOOKMARK_FILE(smart_history), attr->value);
 			}
-			else if (g_str_has_prefix(attr->name, "kz:current_position"))
+			else if (!strcmp(attr->name, "kz:current_position"))
 			{
 				guint pos = (guint)atoi(attr->value);
 				kz_bookmark_set_current(bookmark, pos);
 			}
-			else if (g_str_has_prefix(attr->name, "kz:lock"))
+			else if (!strcmp(attr->name, "kz:lock"))
 			{
 				if (!strcmp(attr->value, "yes"))
 					kz_bookmark_set_lock(bookmark, TRUE);
 			}
-			else if (g_str_has_prefix(attr->name, "kz:auto_refresh"))
+			else if (!strcmp(attr->name, "kz:auto_refresh"))
 			{
 				if (!strcmp(attr->value, "yes"))
 					kz_bookmark_set_auto_refresh(bookmark, TRUE);
 			}
-			else if (g_str_has_prefix(attr->name, "kz:javascript"))
+			else if (!strcmp(attr->name, "kz:javascript"))
 			{
 				if (!strcmp(attr->value, "yes"))
 					kz_bookmark_set_javascript(bookmark, TRUE);




More information about the Kazehakase-cvs mailing list
Zurück zum Archiv-Index