]> granicus.if.org Git - handbrake/commitdiff
WinGui: Minor design tweaks to the No Titles found dialog.
authorsr55 <sr55.hb@outlook.com>
Mon, 20 Apr 2015 20:54:35 +0000 (20:54 +0000)
committersr55 <sr55.hb@outlook.com>
Mon, 20 Apr 2015 20:54:35 +0000 (20:54 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7109 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/Controls/AlertPanel.xaml
win/CS/HandBrakeWPF/Controls/AlertPanel.xaml.cs [new file with mode: 0644]
win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
win/CS/HandBrakeWPF/Properties/Resources.resx

index 2960a7292eb355255982ba49be9a740e9f1efdce..5e8b756eee511653738aab407c0693018b945136 100644 (file)
                                                    Text="{Binding Message, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"\r
                            />\r
 \r
-                        <TextBlock SnapsToDevicePixels="True" VerticalAlignment="Top" FontSize="12" FontFamily="Segoe UI Light" Margin="0,5" HorizontalAlignment="Left"\r
+                        <TextBlock SnapsToDevicePixels="True" VerticalAlignment="Top" FontSize="14" FontFamily="Segoe UI Light" Margin="0,5" HorizontalAlignment="Left"\r
                                                    Text="{Binding SubMessage, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" \r
                                                    TextWrapping="WrapWithOverflow"\r
                            />\r
                     </StackPanel>\r
              \r
                     <Button Content="{Binding ActionText, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Margin="0,10,0,0"\r
-                            x:Name="StatusActionButton" Click="StatusActionButton_OnClick" Padding="8,2" HorizontalAlignment="Right"\r
+                            x:Name="StatusActionButton" Click="StatusActionButton_OnClick" Padding="8,2" HorizontalAlignment="Right" IsDefault="True"\r
                             Visibility="{Binding IsActionButtonVisible, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Converter={StaticResource boolTovisibility}}" />\r
 \r
                 </StackPanel>\r
diff --git a/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml.cs b/win/CS/HandBrakeWPF/Controls/AlertPanel.xaml.cs
new file mode 100644 (file)
index 0000000..8c2b39e
--- /dev/null
@@ -0,0 +1,131 @@
+// --------------------------------------------------------------------------------------------------------------------\r
+// <copyright file="AlertPanel.xaml.cs" company="HandBrake Project (http://handbrake.fr)">\r
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
+// </copyright>\r
+// <summary>\r
+//   Interaction logic for AlertPanel.xaml\r
+// </summary>\r
+// --------------------------------------------------------------------------------------------------------------------\r
+\r
+namespace HandBrakeWPF.Controls\r
+{\r
+    using System;\r
+    using System.Windows;\r
+    using System.Windows.Controls;\r
+\r
+    /// <summary>\r
+    /// Interaction logic for AlertPanel.xaml\r
+    /// </summary>\r
+    public partial class AlertPanel : UserControl\r
+    {\r
+        /// <summary>\r
+        /// Initializes a new instance of the <see cref="AlertPanel"/> class.\r
+        /// </summary>\r
+        public AlertPanel()\r
+        {\r
+            InitializeComponent();\r
+            this.Message = "Message";\r
+        }\r
+\r
+        /// <summary>\r
+        /// Dependancy Property for the Message Property\r
+        /// </summary>\r
+        public static readonly DependencyProperty MessageProperty =\r
+            DependencyProperty.Register("Message", typeof(string), typeof(AlertPanel), new UIPropertyMetadata("Loading..."));\r
+\r
+        /// <summary>\r
+        /// Dependancy Property for the submessage propery\r
+        /// </summary>\r
+        public static readonly DependencyProperty SubMessageProperty =\r
+            DependencyProperty.Register("SubMessage", typeof(string), typeof(AlertPanel), new FrameworkPropertyMetadata("Please Wait", FrameworkPropertyMetadataOptions.AffectsRender));\r
+\r
+        /// <summary>\r
+        /// Dependancy Property for the submessage propery\r
+        /// </summary>\r
+        public static readonly DependencyProperty DefaultActionProperty =\r
+            DependencyProperty.Register("DefaultAction", typeof(Action), typeof(AlertPanel), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.None, DefaultActionSet));\r
+\r
+        /// <summary>\r
+        /// Dependancy Property for the submessage propery\r
+        /// </summary>\r
+        public static readonly DependencyProperty ActionTextProperty =\r
+            DependencyProperty.Register("ActionText", typeof(string), typeof(AlertPanel), new UIPropertyMetadata("Cancel"));\r
+\r
+        /// <summary>\r
+        /// Gets or sets Message.\r
+        /// </summary>\r
+        public string Message\r
+        {\r
+            get { return (string)GetValue(MessageProperty); }\r
+            set { SetValue(MessageProperty, value); }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets SubMessage.\r
+        /// </summary>\r
+        public string SubMessage\r
+        {\r
+            get { return (string)GetValue(SubMessageProperty); }\r
+            set { SetValue(SubMessageProperty, value); }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the cancel action.\r
+        /// </summary>\r
+        public Action DefaultAction\r
+        {\r
+            get { return (Action)GetValue(DefaultActionProperty); }\r
+            set { SetValue(DefaultActionProperty, value); }\r
+        }\r
+\r
+        /// <summary>\r
+        /// The on cancel action set.\r
+        /// </summary>\r
+        /// <param name="d">\r
+        /// The d.\r
+        /// </param>\r
+        /// <param name="e">\r
+        /// The e.\r
+        /// </param>\r
+        private static void DefaultActionSet(DependencyObject d, DependencyPropertyChangedEventArgs e)\r
+        {    \r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets or sets the action text.\r
+        /// </summary>\r
+        public string ActionText\r
+        {\r
+            get { return (string)GetValue(ActionTextProperty); }\r
+            set { SetValue(ActionTextProperty, value); }\r
+        }\r
+\r
+        /// <summary>\r
+        /// Gets a value indicating whether is action button visible.\r
+        /// </summary>\r
+        public bool IsActionButtonVisible\r
+        {\r
+            get\r
+            {\r
+                return true; // this.CancelAction != null;\r
+            }\r
+        }\r
+\r
+        /// <summary>\r
+        /// The status action button_ on click.\r
+        /// </summary>\r
+        /// <param name="sender">\r
+        /// The sender.\r
+        /// </param>\r
+        /// <param name="e">\r
+        /// The e.\r
+        /// </param>\r
+        private void StatusActionButton_OnClick(object sender, RoutedEventArgs e)\r
+        {\r
+            if (this.DefaultAction != null)\r
+            {\r
+                this.DefaultAction();\r
+            }\r
+        }\r
+    }\r
+}\r
index 4d30f91916104304c4693297762c63ccfa6850f3..3d98340ec784e48b6f44697712d5721321e61b7d 100644 (file)
@@ -652,7 +652,7 @@ namespace HandBrakeWPF.Properties {
         ///   Looks up a localized string similar to HandBrake will not be able to encode the seleteced source as it did not find a valid source with titles to encode. \r
         ///This could be due to one of the following reasons:\r
         ///- The source file is not a valid video file or is in a format that HandBrake does not support.\r
-        ///- The source may be copy protected or include DRM. Please note that HandBrake is not a ripper.\r
+        ///- The source may be copy protected or include DRM. Please note that HandBrake does not support the removal of copy protections.\r
         ///\r
         ///The Activity log may have further information..\r
         /// </summary>\r
index c0cbc37b73f9d27a0d5b04fbb62c67eaf1446960..17eae84442dd9f446d43fac26043aa02192b17ee 100644 (file)
@@ -569,7 +569,7 @@ Foreign Audio Preferred, else First - If the foreign audio track exists, it will
     <value>HandBrake will not be able to encode the seleteced source as it did not find a valid source with titles to encode. \r
 This could be due to one of the following reasons:\r
 - The source file is not a valid video file or is in a format that HandBrake does not support.\r
-- The source may be copy protected or include DRM. Please note that HandBrake is not a ripper.\r
+- The source may be copy protected or include DRM. Please note that HandBrake does not support the removal of copy protections.\r
 \r
 The Activity log may have further information.</value>\r
   </data>\r