[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][TOP]

nautilus patch


あかがきです。

nautilus もろもろのパッチです。

nautilus-news については rdf のエンコードを UTF-8 にキメうったうえに
jconv(kondaraのパッケージ) で変換かましてるというダサさなので
kondara以外のディストリビューションでは適度ににぎるか消しさるか
してください。
diff -uNr nautilus-1.0.3/components/help/converters/gnome-man2html2/gnome-man2html.c nautilus-1.0.3.n/components/help/converters/gnome-man2html2/gnome-man2html.c
--- nautilus-1.0.3/components/help/converters/gnome-man2html2/gnome-man2html.c	Sat Mar  3 10:25:34 2001
+++ nautilus-1.0.3.n/components/help/converters/gnome-man2html2/gnome-man2html.c	Thu May 10 17:53:34 2001
@@ -3604,16 +3604,17 @@
 						out_html(" ");
 					else
 						intbuff[ibp++]=' ';
-				} else if (*h>31 && *h<127)
+				} else //if (*h>31 && *h<127)
 					intbuff[ibp++]=*h;
-				else if (((unsigned char)(*h))>127) {
-					intbuff[ibp++]='&';
-					intbuff[ibp++]='#';
-					intbuff[ibp++]='0'+((unsigned char)(*h))/100;
-					intbuff[ibp++]='0'+(((unsigned char)(*h))%100)/10;
-					intbuff[ibp++]='0'+((unsigned char)(*h))%10;
-					intbuff[ibp++]=';';
-				}
+//TAG
+//				else if (((unsigned char)(*h))>127) {
+//					intbuff[ibp++]='&';
+//					intbuff[ibp++]='#';
+//					intbuff[ibp++]='0'+((unsigned char)(*h))/100;
+//					intbuff[ibp++]='0'+(((unsigned char)(*h))%100)/10;
+//					intbuff[ibp++]='0'+((unsigned char)(*h))%10;
+//					intbuff[ibp++]=';';
+//				}
 				curpos++;
 				break;
 			}
diff -uNr nautilus-1.0.3/libnautilus-private/nautilus-file.c nautilus-1.0.3.n/libnautilus-private/nautilus-file.c
--- nautilus-1.0.3/libnautilus-private/nautilus-file.c	Fri May  4 19:17:52 2001
+++ nautilus-1.0.3.n/libnautilus-private/nautilus-file.c	Fri May 11 16:42:11 2001
@@ -2535,7 +2535,7 @@
 	format = NULL;
 	
 	for (i = 0; ; i += 2) {
-		width_template = formats [i];
+		width_template = _(formats [i]);
 		if (width_template == NULL) {
 			/* no more formats left */
 			g_assert (format != NULL);
@@ -2555,7 +2555,7 @@
 			return result;
 		}
 		
-		format = formats [i + 1];
+		format = _(formats [i + 1]);
 
 		if (measure_callback == NULL) {
 			/* don't care about fitting the width */
diff -uNr nautilus-1.0.3/src/file-manager/fm-list-view.c nautilus-1.0.3.n/src/file-manager/fm-list-view.c
--- nautilus-1.0.3/src/file-manager/fm-list-view.c	Fri May  4 19:18:45 2001
+++ nautilus-1.0.3.n/src/file-manager/fm-list-view.c	Fri May 11 15:08:18 2001
@@ -2374,7 +2374,7 @@
 		fm_list_view_column_set (specification,
 					 "size", _("Size"),
 					 NAUTILUS_FILE_SORT_BY_SIZE,
-					 20, 55, 80, TRUE);
+					 20, 55, 2000, FALSE);
 		break;
 	case 4:
 		fm_list_view_column_set (specification,
diff -uNr nautilus-1.0.3/src/nautilus-sidebar-title.c nautilus-1.0.3.n/src/nautilus-sidebar-title.c
--- nautilus-1.0.3/src/nautilus-sidebar-title.c	Fri May  4 19:18:36 2001
+++ nautilus-1.0.3.n/src/nautilus-sidebar-title.c	Fri May 11 20:18:44 2001
@@ -817,6 +818,7 @@
 
 	more_info_label = eel_label_new_with_background ("");
 	eel_label_make_smaller (EEL_LABEL (more_info_label), 2);
+	eel_label_set_wrap (EEL_LABEL (more_info_label), TRUE);
 	eel_label_set_justify (EEL_LABEL (more_info_label), GTK_JUSTIFY_CENTER);
 	
 	return more_info_label;
diff -uNr nautilus-1.0.3/components/news/news_channels.xml nautilus-1.0.3.n/components/news/news_channels.xml
--- nautilus-1.0.3/components/news/news_channels.xml	Fri May  4 06:27:04 2001
+++ nautilus-1.0.3.n/components/news/news_channels.xml	Thu May 10 19:44:27 2001
@@ -15,6 +15,7 @@
 	<rss_channel name="GNOME News" uri="http://news.gnome.org/gnome-news/rdf"; show="false" open="false"/>	
 	<rss_channel name="Internet.com" uri="http://headlines.internet.com/internetnews/prod-news/news.rss"; show="false" open="false"/>
 	<rss_channel name="KDE News" uri="http://www.kde.org/news/kdenews.rdf"; show="false" open="false"/>
+	<rss_channel name="Kondara" uri="http://www.kondara.org/kondara.rdf"; show="true" open="true"/>
 	<rss_channel name="Kuro5hin" uri="http://www.kuro5hin.org/backend.rdf"; show="false" open="false"/>
   	<rss_channel name="Linux Games" uri="http://linuxgames.com/bin/mynetscape.pl"; show="false" open="false"/>
   	<rss_channel name="Linux Jobs" uri="http://linux.com/mrn/jobs/latest_jobs.rss"; show="false" open="false"/>	
diff -uNr nautilus-1.0.3/components/news/nautilus-news.c nautilus-1.0.3.n/components/news/nautilus-news.c
--- nautilus-1.0.3/components/news/nautilus-news.c	Fri May  4 19:19:24 2001
+++ nautilus-1.0.3.n/components/news/nautilus-news.c	Fri May 11 15:31:54 2001
@@ -73,6 +73,8 @@
 #include <libnautilus/nautilus-clipboard.h>
 #include <libnautilus/nautilus-view-standard-main.h>
 
+#include <jconv.h>
+
 #include "nautilus-news-pixmaps.h"
 
 /* property bag getting and setting routines */
@@ -452,7 +454,7 @@
 
 		/* also, draw the update time in the upper right corner if it fits*/
 		if (channel_data->last_update != 0 && !measure_only) {
-			strftime (&time_str[0], 16, "%I:%M %p",	localtime (&channel_data->last_update));
+			strftime (&time_str[0], 16, _("%I:%M %p"),	localtime (&channel_data->last_update));
 
 			time_dimensions = eel_scalable_font_measure_text (channel_data->owner->font, 9, time_str, strlen (time_str));
 	
@@ -552,8 +554,8 @@
 	
 	current_item = channel_data->items;
 	item_index = 0;
-	
-	while (current_item != NULL) {					
+
+	while (current_item != NULL) {
 		/* draw the text */
 		item_data = (RSSItemData*) current_item->data;		
 		bullet_alpha = 255;
@@ -1156,12 +1158,19 @@
 	int item_count;
 	char *title, *temp_str;
 	gboolean scripting_news_format;
+	char* lang = g_strdup(getenv("LANG"));
+	if(strchr(lang,'_'))
+		*strchr(lang,'_')=0;
 	
 	current_node = container_node->childs;
 	item_count = 0;
 	while (current_node != NULL) {
 		if (eel_strcmp (current_node->name, "item") == 0) {
-			title_node = eel_xml_get_child_by_name (current_node, "title");
+			title_node = eel_xml_get_child_by_name_and_property (current_node, "title","xml:lang",lang);
+			if(!title_node)
+				title_node = eel_xml_get_child_by_name_and_property (current_node, "title","lang",lang);
+			if(!title_node)
+				title_node = eel_xml_get_child_by_name (current_node, "title");
 			/* look for "text", too, to support Scripting News format */
 			scripting_news_format = FALSE;
 			if (title_node == NULL) {
@@ -1169,10 +1178,13 @@
 				scripting_news_format = title_node != NULL;
 			}
 			if (title_node != NULL) {
+				gchar* str;
 				item_parameters = (RSSItemData*) g_new0 (RSSItemData, 1);
 
 				title = xmlNodeGetContent (title_node);
-				item_parameters->item_title = ellipsize_string (title);
+				str=ellipsize_string (title);
+				item_parameters->item_title = jconv_strdup_conv_autodetect (title,NULL,"UTF-8",NULL);
+				g_free(str);
 				xmlFree (title);
 				
 				temp_node = eel_xml_get_child_by_name (current_node, "link");
@@ -1195,6 +1207,7 @@
 		}
 		current_node = current_node->next;
 	}
+	g_free(lang);
 	return item_count;
 }