diff options
author | sr55 <[email protected]> | 2008-04-29 16:29:33 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-04-29 16:29:33 +0000 |
commit | bbd3571c649d6e3735ad4cc493497119e93e5606 (patch) | |
tree | 99d67f0f244f2d00115e6f8f5fbab9e8502143d0 /win | |
parent | 82085af4ca15f94743d2185e9ce514b8fb934a7b (diff) |
WinGui:
- Update checker now reads either unstable or stable appcast based on the last digit of the build number.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1448 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/Functions/RssReader.cs | 27 | ||||
-rw-r--r-- | win/C#/Properties/Settings.Designer.cs | 12 | ||||
-rw-r--r-- | win/C#/Properties/Settings.settings | 3 | ||||
-rw-r--r-- | win/C#/app.config | 3 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 8 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 39 | ||||
-rw-r--r-- | win/C#/frmMain.resx | 6 |
7 files changed, 50 insertions, 48 deletions
diff --git a/win/C#/Functions/RssReader.cs b/win/C#/Functions/RssReader.cs index c2da4aad6..ec461a402 100644 --- a/win/C#/Functions/RssReader.cs +++ b/win/C#/Functions/RssReader.cs @@ -28,7 +28,10 @@ namespace Handbrake.Functions private void readRss()
{
- rssReader = new XmlTextReader(Properties.Settings.Default.appcast);
+ if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))
+ rssReader = new XmlTextReader(Properties.Settings.Default.appcast_unstable);
+ else
+ rssReader = new XmlTextReader(Properties.Settings.Default.appcast);
rssDoc = new XmlDocument();
rssDoc.Load(rssReader);
@@ -64,23 +67,13 @@ namespace Handbrake.Functions hb_versionInfo = nodeItem["description"].InnerText;
// Get the version
- string input = nodeItem.InnerXml;
Match ver;
- if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))
- ver = Regex.Match(input, @"<cli-unstable>[0-9]* \""[0-9.]*\""");
- else
- ver = Regex.Match(input, @"<cli-stable>[0-9]* \""[0-9.]*\""");
- string[] hb_ver_find = ver.ToString().Split(' ');
- hb_version = hb_ver_find[1].Replace("\"", "");
-
- // Get the build number
- input = nodeItem.InnerXml;
- Match build;
- if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))
- build = Regex.Match(input, @"<cli-unstable>[0-9]*");
- else
- build = Regex.Match(input, @"<cli-stable>[0-9]*");
- hb_build = build.ToString().Replace("<cli-stable>", "").Replace("<cli-unstable>", "");
+ string input = nodeItem.InnerXml;
+ ver = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");
+ hb_version = ver.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");
+
+ ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\""");
+ hb_build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");
// Get the update file
hb_file = nodeItem["windows"].InnerText;
diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index 530f45aa0..e5f9dd949 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -178,5 +178,17 @@ namespace Handbrake.Properties { this["appcast"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("http://handbrake.fr/appcast_unstable.xml")]
+ public string appcast_unstable {
+ get {
+ return ((string)(this["appcast_unstable"]));
+ }
+ set {
+ this["appcast_unstable"] = value;
+ }
+ }
}
}
diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index c6aa3a371..ab759a13b 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -41,5 +41,8 @@ <Setting Name="appcast" Type="System.String" Scope="User">
<Value Profile="(Default)">http://handbrake.fr/appcast.xml</Value>
</Setting>
+ <Setting Name="appcast_unstable" Type="System.String" Scope="User">
+ <Value Profile="(Default)">http://handbrake.fr/appcast_unstable.xml</Value>
+ </Setting>
</Settings>
</SettingsFile>
\ No newline at end of file diff --git a/win/C#/app.config b/win/C#/app.config index 32e36ee37..61a016d11 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -46,6 +46,9 @@ <setting name="appcast" serializeAs="String">
<value>http://handbrake.fr/appcast.xml</value>
</setting>
+ <setting name="appcast_unstable" serializeAs="String">
+ <value>http://handbrake.fr/appcast_unstable.xml</value>
+ </setting>
</Handbrake.Properties.Settings>
</userSettings>
</configuration>
\ No newline at end of file diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index e2e6df1fa..2ce420367 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -37,7 +37,7 @@ namespace Handbrake this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label Label38;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();
this.File_Save = new System.Windows.Forms.SaveFileDialog();
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
@@ -621,9 +621,9 @@ namespace Handbrake //
// number
//
- dataGridViewCellStyle3.Format = "N0";
- dataGridViewCellStyle3.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle3;
+ dataGridViewCellStyle1.Format = "N0";
+ dataGridViewCellStyle1.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle1;
this.number.HeaderText = "Chapter Number";
this.number.MaxInputLength = 3;
this.number.Name = "number";
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 1dd9b2b61..e4f79a648 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -648,25 +648,32 @@ namespace Handbrake if ((text_destination.Text.Contains(".mp4")) || (text_destination.Text.Contains(".m4v")))
{
check_largeFile.Enabled = true;
- check_iPodAtom.Enabled = true;
check_optimiseMP4.Enabled = true;
- check_largeFile.Visible = true;
- check_iPodAtom.Visible = true;
- check_optimiseMP4.Visible = true;
}
else
{
+ check_largeFile.Enabled = false;
+ check_optimiseMP4.Enabled = false;
check_largeFile.Checked = false;
- check_iPodAtom.Checked = false;
check_optimiseMP4.Checked = false;
- check_largeFile.Visible = false;
- check_iPodAtom.Visible = false;
- check_optimiseMP4.Visible = false;
}
//Turn off some options which are H.264 only when the user selects a non h.264 encoder
- if (!drp_videoEncoder.Text.Contains("H.264"))
+ if (drp_videoEncoder.Text.Contains("H.264"))
+ {
+ if (check_2PassEncode.CheckState == CheckState.Checked)
+ check_turbo.Enabled = true;
+
+ h264Tab.Enabled = true;
+ if ((text_destination.Text.Contains(".mp4")) || (text_destination.Text.Contains(".m4v")))
+ check_iPodAtom.Enabled = true;
+ else
+ check_iPodAtom.Enabled = false;
+ if (!drp_anamorphic.Items.Contains("Loose"))
+ drp_anamorphic.Items.Add("Loose");
+ }
+ else
{
check_turbo.CheckState = CheckState.Unchecked;
check_turbo.Enabled = false;
@@ -674,21 +681,9 @@ namespace Handbrake rtf_x264Query.Text = "";
check_iPodAtom.Enabled = false;
check_iPodAtom.Checked = false;
- check_optimiseMP4.Enabled = false;
if (drp_anamorphic.Items.Count == 3)
drp_anamorphic.Items.RemoveAt(2);
}
- else
- {
- if (check_2PassEncode.CheckState == CheckState.Checked)
- check_turbo.Enabled = true;
-
- h264Tab.Enabled = true;
- check_iPodAtom.Enabled = true;
- check_optimiseMP4.Enabled = true;
- if (!drp_anamorphic.Items.Contains("Loose"))
- drp_anamorphic.Items.Add("Loose");
- }
}
@@ -1978,6 +1973,8 @@ namespace Handbrake #endregion
+
+
// This is the END of the road ------------------------------------------------------------------------------
}
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx index e9b8e49f4..e91100bb4 100644 --- a/win/C#/frmMain.resx +++ b/win/C#/frmMain.resx @@ -149,12 +149,6 @@ Make sure you have selected a "Title" from the "Source" box above otherwise the list will not be populated with the correct amount of chapters.
Note: Do not change any of the chapter numbers!</value>
</data>
- <metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
<metadata name="DVD_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>223, 15</value>
</metadata>
|