[Bbs2ch-cvs 227] [210] スレッドリダイレクタを 0 .4. 2 の動作にするオプションの追加

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2007年 9月 1日 (土) 18:13:53 JST


Revision: 210
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=bbs2ch&view=rev&rev=210
Author:   flyson
Date:     2007-09-01 18:13:53 +0900 (Sat, 01 Sep 2007)

Log Message:
-----------
スレッドリダイレクタを 0.4.2 の動作にするオプションの追加

Modified Paths:
--------------
    trunk/bbs2chreader/chrome/content/bbs2chreader/settings/general-pane.xul
    trunk/bbs2chreader/components/b2rThreadRedirector.js
    trunk/bbs2chreader/defaults/preferences/bbs2chreader-pref.js

Modified: trunk/bbs2chreader/chrome/content/bbs2chreader/settings/general-pane.xul
===================================================================
--- trunk/bbs2chreader/chrome/content/bbs2chreader/settings/general-pane.xul	2007-09-01 08:53:26 UTC (rev 209)
+++ trunk/bbs2chreader/chrome/content/bbs2chreader/settings/general-pane.xul	2007-09-01 09:13:53 UTC (rev 210)
@@ -19,6 +19,8 @@
 				onchange="setCcontainerDisabled(this.name, 'boxRedirectorAsk', true)"/>
 		<preference id="extensions.bbs2chreader.thread_redirector.ask"
 				name="extensions.bbs2chreader.thread_redirector.ask" type="bool"/>
+		<preference id="extensions.bbs2chreader.thread_redirector.throw_bookmarks"
+				name="extensions.bbs2chreader.thread_redirector.throw_bookmarks" type="bool"/>
 		<preference id="extensions.bbs2chreader.tab_load_in_foreground"
 				name="extensions.bbs2chreader.tab_load_in_foreground" type="bool"/>
 		<preference id="extensions.bbs2chreader.http_proxy_mode"
@@ -40,14 +42,19 @@
 		<checkbox label="URL の表示制限を無視して開く"
 				preference="extensions.bbs2chreader.browser_contextmenu_disregard_url_option"/>
 		</hbox>
-		<checkbox label="2ch スレッド URL を bbs2chreader で開く"
+		<checkbox label="新しいタブを開いたとき、すぐにそのタブに切り替える"
+			preference="extensions.bbs2chreader.tab_load_in_foreground"/>
+	</settingbox>
+
+	<settingbox label="スレッドリダイレクタ" orient="vertical">
+		<checkbox label="2ch スレッド URL を自動的に bbs2chreader で開く"
 				preference="extensions.bbs2chreader.thread_redirector.enabled"/>
-		<hbox id="boxRedirectorAsk" class="indent">
+		<vbox id="boxRedirectorAsk" class="indent">
 			<checkbox label="毎回確認する"
 				preference="extensions.bbs2chreader.thread_redirector.ask"/>
-		</hbox>
-		<checkbox label="新しいタブを開いたとき、すぐにそのタブに切り替える"
-			preference="extensions.bbs2chreader.tab_load_in_foreground"/>
+			<checkbox label="ブックマークやスレッド表示からはそのまま開く"
+				preference="extensions.bbs2chreader.thread_redirector.throw_bookmarks"/>
+		</vbox>
 	</settingbox>
 
 	<settingbox label="プロキシ">

Modified: trunk/bbs2chreader/components/b2rThreadRedirector.js
===================================================================
--- trunk/bbs2chreader/components/b2rThreadRedirector.js	2007-09-01 08:53:26 UTC (rev 209)
+++ trunk/bbs2chreader/components/b2rThreadRedirector.js	2007-09-01 09:13:53 UTC (rev 210)
@@ -52,6 +52,7 @@
 	_init: function(){
 		this._PREF_ENABLED = "extensions.bbs2chreader.thread_redirector.enabled";
 		this._PREF_ASK = "extensions.bbs2chreader.thread_redirector.ask";
+		this._PREF_THROW_BOOKMARKS = "extensions.bbs2chreader.thread_redirector.throw_bookmarks";
 
 		this._observerService = Components.classes["@mozilla.org/observer-service;1"]
 					.getService(Components.interfaces.nsIObserverService);
@@ -126,8 +127,11 @@
 			return this.ACCEPT;
 		}
 
-		if(aRequestOrigin.host == "127.0.0.1" || aRequestOrigin.scheme == "chrome"){
-			return this.ACCEPT;
+
+		if(this._pref.getBoolPref(this._PREF_THROW_BOOKMARKS)){
+			if(aRequestOrigin.host == "127.0.0.1" || aRequestOrigin.scheme == "chrome"){
+				return this.ACCEPT;
+			}
 		}
 
 			// Be Profile Page

Modified: trunk/bbs2chreader/defaults/preferences/bbs2chreader-pref.js
===================================================================
--- trunk/bbs2chreader/defaults/preferences/bbs2chreader-pref.js	2007-09-01 08:53:26 UTC (rev 209)
+++ trunk/bbs2chreader/defaults/preferences/bbs2chreader-pref.js	2007-09-01 09:13:53 UTC (rev 210)
@@ -20,6 +20,7 @@
 
 pref("extensions.bbs2chreader.thread_redirector.enabled", false);
 pref("extensions.bbs2chreader.thread_redirector.ask", true);
+pref("extensions.bbs2chreader.thread_redirector.throw_bookmarks", false);
 
 pref("extensions.bbs2chreader.bbsmenu_load_url", "http://menu.2ch.net/bbsmenu.html");
 pref("extensions.bbs2chreader.bbsmenu_toggle_open_container", false);




bbs2ch-cvs メーリングリストの案内
Back to archive index