Permalink
Browse files

Options.xul:

Preference Dialog Window will be replaced with new layout.

Tabs become...

Signed-off-by: Rookie <Thierry@.(none)>
  • Loading branch information...
1 parent 59c1183 commit f3c51cebb05f6c44cce0211a02e4e3f75c445951 Rookie committed Sep 20, 2011
Showing with 0 additions and 260 deletions.
  1. +0 −260 chrome/content/interfaces/options.xul
@@ -1,260 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<!DOCTYPE window SYSTEM "chrome://imagegrabber/locale/options.dtd">
-
-
-<prefwindow title="&imagegrabber_options;" id="imagegrabberPreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
- ondialogaccept="setPrefGlobVars();"
- onload="setEnableStates();">
-
-<stringbundleset id="stringbundleset">
- <stringbundle id="imagegrabber-strings" src="chrome://imagegrabber/locale/imagegrabber.properties" />
-</stringbundleset>
-
-<prefpane id="paneGeneral">
-
-<preferences>
- <preference id="showDLDir" name="extensions.imagegrabber.showdldir" type="bool"/>
- <preference id="boolpref_autorename" name="extensions.imagegrabber.autorename" type="bool"/>
- <preference id="maxThreads" name="extensions.imagegrabber.maxthreads" type="int"/>
- <preference id="enableDebug" name="extensions.imagegrabber.enabledebug" type="bool"/>
- <preference id="enableConLog" name="extensions.imagegrabber.enableconlog" type="bool"/>
- <preference id="numRetries" name="extensions.imagegrabber.numretries" type="int"/>
- <preference id="reqTimeout" name="extensions.imagegrabber.requesttimeout" type="int"/>
- <preference id="downloadTimeout" name="extensions.imagegrabber.downloadtimeout" type="int"/>
- <preference id="createDocSub" name="extensions.imagegrabber.createdoctitlesubfolder" type="bool"/>
- <preference id="showInTools" name="extensions.imagegrabber.showintools" type="bool"/>
- <preference id="cacheThreadSuck" name="extensions.imagegrabber.cachethreadsuck" type="bool"/>
- <preference id="fileExistBehavior" name="extensions.imagegrabber.fileexistsbehavior" type="string"/>
- <preference id="prefixFileName" name="extensions.imagegrabber.prefixfilenames" type="bool"/>
- <preference id="createPageDirs" name="extensions.imagegrabber.createpagedirs" type="bool"/>
- <preference id="prefixDirs" name="extensions.imagegrabber.prefixdirectories" type="bool"/>
- <preference id="cacheDLWin" name="extensions.imagegrabber.cachedlwin" type="bool"/>
- <preference id="removeDupLinks" name="extensions.imagegrabber.removeduplinks" type="bool"/>
- <preference id="removeDupLinksXpages" name="extensions.imagegrabber.removeduplinksXpages" type="bool"/>
- <preference id="downloadEmbeddedImages" name="extensions.imagegrabber.downloadembeddedimages" type="bool"/>
- <preference id="minEmbeddedHeight" name="extensions.imagegrabber.minembeddedheight" type="int"/>
- <preference id="minEmbeddedWidth" name="extensions.imagegrabber.minembeddedwidth" type="int"/>
- <preference id="minFileSize" name="extensions.imagegrabber.minfilesize" type="int"/>
- <preference id="hostfcb_autoUpdate" name="extensions.imagegrabber.hostfautoupdate" type="bool"/>
- <preference id="hostfUpdateConfirm" name="extensions.imagegrabber.hostfupdateconfirm" type="bool"/>
- <preference id="hostfrg_mergeBehavior" name="extensions.imagegrabber.hostfmergebehavior" type="string"/>
- <preference id="autocb_autoCloseWindow" name="extensions.imagegrabber.autoclosewindow" type="bool"/>
- <preference id="useLastModFromHeader" name="extensions.imagegrabber.uselastmodfromheader" type="bool"/>
-</preferences>
-
-<script type="application/x-javascript" src="chrome://imagegrabber/content/imagegrabber/globals.js" />
-<script type="application/x-javascript" src="chrome://imagegrabber/content/imagegrabber/imagegrabber.js" />
-<script type="application/x-javascript" src="chrome://imagegrabber/content/imagegrabber/debug.js" />
-<script type="application/x-javascript" src="chrome://imagegrabber/content/imagegrabber/utils.js" />
-
-<script type="text/javascript">
-<![CDATA[
-function setEnableStates() {
- ihg_Globals.strbundle = document.getElementById("imagegrabber-strings");
- ihg_Functions.read_locale_strings();
- toggleEnableState('cb_prefixFileNames', true, 'rg_existBehavior');
- toggleEnableState('cb_createDocSub', false, 'cb_prefixDirs');
- toggleEnableState('cb_removeDupLinks', false, 'cb_removeDupLinksXpages');
- toggleEnableState('cb_embImages', false, 'lab_minEmbeddedWidth', 'lab_minEmbeddedHeight', 'lab_minSize');
- toggleEnableState('cb_autoUpdate', false, 'cb_suppressConfirm', 'rg_mergeBehavior');
-
- ['maxThreads','numRetries','reqTimeout'].forEach(function(item) {
- document.getElementById('scale_' + item).setAttribute('preference', item);
- document.getElementById(item).updateElements();
- });
- }
-
-function setPrefGlobVars() {
- var prefManager = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
-
- var chkBx2 = document.getElementById("cb_enableConLog");
-
- prefManager.setBoolPref("javascript.options.showInConsole", chkBx2.checked);
- }
-
-// This function toggles the enabled state of a target element with ID
-// of 'targetId'. The enabled state of the target element is dictated
-// by the 'checked' state of the control element with ID of 'controlId'.
-//
-// The invertState flag specifies whether or not the target element
-// should be disabled when the control element is enabled ( true )
-// or vice versa (false).
-//
-// This is a variable length function to allow multiple targetId's
-// i.e.: toggleEnableState(controlId, invertState, targetId1, targetId2, ...)
-
-function toggleEnableState() {
- var args = toggleEnableState.arguments;
-
- var controlId = args[0];
- var controlElem = document.getElementById(controlId);
-
- var invertState = args[1];
- var targetDisabled = invertState ? controlElem.checked : !controlElem.checked;
-
- for (var i = 2; i < args.length; i++) {
- var targetId = args[i];
- var targetElem = document.getElementById(targetId);
- targetElem.disabled = targetDisabled;
- }
- }
-
-]]>
-</script>
-
-<tabbox id="optionsTabThingy">
-
-<tabs>
- <tab label="&file_saving_options;" id="fileopts" orient="vertical"/>
- <tab label="&general;" id="genopts" orient="vertical"/>
- <tab label="&embedded_images;" id="tp_embeddedopts" orient="vertical"/>
- <tab label="&host_file;" id="hostfopts" orient="vertical"/>
- <tab label="&host_options;" id="hostopts" orient="vertical"/>
- <tab label="&debugging;" id="debug" orient="vertical"/>
-</tabs>
-
-
-<tabpanels>
- <tabpanel id="fileopts">
- <vbox>
- <checkbox id="cb_prefixFileNames" preference="prefixFileName" label="&prefix_filenames_to_reflect_page_order;"
- oncommand="toggleEnableState(this.id, true, 'rg_existBehavior');"/>
- <groupbox id="gb_existBehavior">
- <caption label="&what_to_do_if_file_exists_in_target_location;"/>
- <radiogroup id="rg_existBehavior" preference="fileExistBehavior" orient="horizontal">
- <radio label="&rename_file;" value="rename" flex="1"/>
- <radio label="&skip_file;" value="skip" flex="1"/>
- <radio label="&overwrite_file;" value="overwrite" flex="1"/>
- </radiogroup>
- </groupbox>
- <checkbox preference="boolpref_autorename" label="&autorename_imagevenue_and_fapomatic_files;"/>
- <checkbox id="cb_createDocSub" preference="createDocSub" label="&create_a_subdirectory_with_document_title_inside_the_target_directory;" oncommand="toggleEnableState(this.id, false, 'cb_prefixDirs');"/>
- <checkbox id="cb_prefixDirs" preference="prefixDirs" label="&prefix_directories_to_uniquely_and_chronologically_identify_them;" class="indent"/>
- <checkbox id="boolpref_createPageDirs" preference="createPageDirs" label="&create_separate_directories_for_each_page_when_using_thread_sucker;"/>
- <checkbox id="cb_useLastModFromHeader" preference="useLastModFromHeader" label="&use_last_modified_header;"/>
- </vbox>
- </tabpanel>
-
- <tabpanel id="genopts">
- <vbox>
- <checkbox id="cb_showDLDir" preference="showDLDir" label="&show_the_download_directory_box;"/>
- <checkbox id="cb_showInTools" preference="showInTools" label="&show_the_image_grabber_menu_in_the_tools_menu;" onclick="alert('&alert_restart;');"/>
- <checkbox id="cb_removeDupLinks" preference="removeDupLinks" label="&remove_duplicate_links;" oncommand="toggleEnableState(this.id, false, 'cb_removeDupLinksXpages');"/>
- <checkbox id="cb_removeDupLinksXpages" preference="removeDupLinksXpages" label="&even_across_multiple_pages;" class="indent"/>
- <checkbox id="cb_autoCloseWindow" preference="autocb_autoCloseWindow" label="&close_download_window;"/>
- <checkbox id="cb_cacheDLWin" hidden="true" preference="cacheDLWin" label="&keep_download_window_contents;"/>
- </vbox>
- </tabpanel>
-
- <tabpanel id="tp_embeddedopts">
- <groupbox>
- <caption>
- <checkbox id="cb_embImages" preference="downloadEmbeddedImages" label="&download_embedded_images;"
- oncommand="toggleEnableState(this.id, false, 'lab_minEmbeddedWidth', 'lab_minEmbeddedHeight', 'lab_minSize');"/>
- </caption>
- <grid>
- <rows>
- <label>&enter_the_minimum_width_and_height_that_will_be_considered_for_downloading;</label>
- <row align="center">
- <label control="lab_minEmbeddedWidth">&image_width;</label>
- <hbox><textbox id="lab_minEmbeddedWidth" type="number" size="3" hidespinbuttons="true" preference="minEmbeddedWidth"/>px</hbox>
- </row>
- <row align="center">
- <label control="lab_minEmbeddedHeight">&image_height;</label>
- <hbox><textbox id="lab_minEmbeddedHeight" type="number" size="3" hidespinbuttons="true" preference="minEmbeddedHeight"/>px</hbox>
- </row>
- <separator height="10" />
- <label>&enter_the_minimum_file_size;</label>
- <label>&setting_this_value_to_zero_disables_this_filter;</label>
- <row align="center">
- <label control="lab_minSize">&file_size_filter;</label>
- <hbox><textbox id="lab_minSize" type="number" size="3" hidespinbuttons="true" preference="minFileSize"/>&kilobytes;</hbox>
- </row>
- <separator height="10" />
- <label>&the_file_size_filter_is_the_only_one_used;</label>
- </rows>
- </grid>
- </groupbox>
- </tabpanel>
-
- <tabpanel id="hostfopts">
- <vbox>
- <groupbox>
- <caption label="&host_file_update;"/>
- <checkbox id="cb_autoUpdate" preference="hostfcb_autoUpdate" label="&enable_automatic_update;" oncommand="toggleEnableState(this.id, false, 'cb_suppressConfirm', 'rg_mergeBehavior');"/>
- <checkbox id="cb_suppressConfirm" preference="hostfUpdateConfirm" label="&suppress_confirmation_dialog;" class="indent"/>
- <groupbox class="indent">
- <caption label="&merge_behavior;"/>
- <radiogroup id="rg_mergeBehavior" preference="hostfrg_mergeBehavior">
- <radio label="&merge_host_file_ask;" value="ask"/>
- <radio label="&merge_host_file_overwrite;" value="overwrite"/>
- <radio label="&merge_host_file_add;" value="add"/>
- </radiogroup>
- </groupbox>
- </groupbox>
- </vbox>
- </tabpanel>
-
- <tabpanel id="tp_hostops">
- <grid>
- <rows>
- <row align="center">
- <label control="scale_maxThreads">&max_simultaneous_http_requests;</label>
- <scale id="scale_maxThreads" min="1" max="10" preference-editable="true" movetoclick="true"/>
- <textbox type="number" size="2" hidespinbuttons="true" class="plain" style="color:black" disabled="true" preference="maxThreads"/>
- </row>
- <row align="center">
- <label control="scale_numRetries">&max_number_of_retries_for_each_link;</label>
- <scale id="scale_numRetries" min="1" max="99" preference-editable="true" movetoclick="true"/>
- <textbox type="number" size="2" hidespinbuttons="true" class="plain" style="color:black" disabled="true" preference="numRetries"/>
- </row>
- <row align="center">
- <label control="scale_reqTimeout">&request_timeout_before_retry;</label>
- <scale id="scale_reqTimeout" min="15" max="90" preference-editable="true" increment="5"/>
- <textbox type="number" size="2" hidespinbuttons="true" class="plain" style="color:black" disabled="true" preference="reqTimeout"/>
- </row>
- <separator/>
- <row align="center">
- <label control="list_downloadtimeout">&host_timeout_between_downloads;</label>
- <menulist id="list_downloadtimeout" preference="downloadTimeout">
- <menupopup>
- <menuitem label="Disabled" value="0"/>
- <menuitem label="1 sec." value="1"/>
- <menuitem label="2 sec." value="2"/>
- <menuitem label="3 sec." value="3"/>
- <menuitem label="4 sec." value="4"/>
- <menuitem label="5 sec." value="5"/>
- <menuitem label="6 sec." value="6"/>
- <menuitem label="8 sec." value="8"/>
- <menuitem label="10 sec." value="10"/>
- <menuitem label="15 sec." value="15"/>
- <menuitem label="20 sec." value="20"/>
- <menuitem label="25 sec." value="25"/>
- <menuitem label="30 sec." value="30"/>
- <menuitem label="60 sec." value="60"/>
- </menupopup>
- </menulist>
- </row>
- </rows>
- </grid>
- </tabpanel>
-
- <tabpanel id="tp_debug">
- <vbox>
- <label>&disclaimer;</label>
- <label>&disclaimer_line1;</label>
- <label>&disclaimer_line2;</label>
- <label>&disclaimer_line3;</label>
- <separator height="15" />
- <checkbox id="cb_enableConLog" preference="enableConLog" label="&enable_console_logging;" onclick="alert(ihg_Globals.strings.read_disclaimer);"/>
- <checkbox id="cb_enableDebug" preference="enableDebug" label="&enable_debugging_logging;" onclick="alert(ihg_Globals.strings.read_disclaimer);"/>
- <button id="but_clear" label="&clear_log;" oncommand="ihg_Functions.clearLog();" />
- <button id="but_copy" label="&copy_log_to_local_folder;" oncommand="ihg_Functions.copyLog();" />
- </vbox>
- </tabpanel>
-
-</tabpanels>
-</tabbox>
-</prefpane>
-</prefwindow>

0 comments on commit f3c51ce

Please sign in to comment.