[gnome-subtitles/gtk3] Minor improvements
- From: Pedro Daniel da Rocha Melo e Castro <pcastro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-subtitles/gtk3] Minor improvements
- Date: Sat, 2 Dec 2017 12:19:44 +0000 (UTC)
commit da0fd1b85f799affda25699d333aa584b4638c88
Author: Pedro Castro <pedro gnomesubtitles org>
Date: Sat Dec 2 12:18:20 2017 +0000
Minor improvements
src/GnomeSubtitles/Dialog/EncodingsDialog.cs | 4 ++--
src/GnomeSubtitles/Dialog/VideoOpenDialog.cs | 23 ++++++++++++++---------
2 files changed, 16 insertions(+), 11 deletions(-)
---
diff --git a/src/GnomeSubtitles/Dialog/EncodingsDialog.cs b/src/GnomeSubtitles/Dialog/EncodingsDialog.cs
index 079d177..d86463b 100644
--- a/src/GnomeSubtitles/Dialog/EncodingsDialog.cs
+++ b/src/GnomeSubtitles/Dialog/EncodingsDialog.cs
@@ -59,8 +59,8 @@ public class EncodingsDialog : BaseDialog {
private void BuildDialog (Window parent) {
dialog = new Gtk.Dialog(Catalog.GetString("Character Encodings"), parent, DialogFlags.Modal |
DialogFlagsUseHeaderBar);
- dialog.WidthRequest = 600;
- dialog.HeightRequest = 400;
+ dialog.DefaultWidth = 600;
+ dialog.DefaultHeight = 400;
Grid grid = new Grid();
grid.RowSpacing = 6;
diff --git a/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs b/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs
index 557b313..c23bb49 100644
--- a/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs
+++ b/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs
@@ -29,6 +29,20 @@ public class VideoOpenDialog : BaseDialog {
private Uri chosenUri = null;
public VideoOpenDialog () : base() {
+ BuildDialog();
+
+ base.Init(dialog);
+ }
+
+ /* Public properties */
+
+ public Uri Uri {
+ get { return chosenUri; }
+ }
+
+ /* Private methods */
+
+ private void BuildDialog() {
dialog = new FileChooserDialog(Catalog.GetString("Open Video"), Base.Ui.Window,
FileChooserAction.Open,
Util.GetStockLabel("gtk-cancel"), ResponseType.Cancel,
Util.GetStockLabel("gtk-open"), ResponseType.Ok);
@@ -41,17 +55,8 @@ public class VideoOpenDialog : BaseDialog {
}
SetFilters();
- base.Init(dialog);
- }
-
- /* Public properties */
-
- public Uri Uri {
- get { return chosenUri; }
}
- /* Private methods */
-
private void SetFilters () {
/* Video files */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]