[moserial] simpler code to read in the UI files, fixes compiler warning about ignored error
- From: Michael J. Chudobiak <mjc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [moserial] simpler code to read in the UI files, fixes compiler warning about ignored error
- Date: Fri, 22 Dec 2017 16:11:13 +0000 (UTC)
commit 922651719965b8f364cb20c9a8d3a940bb9ff617
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Fri Dec 22 11:09:50 2017 -0500
simpler code to read in the UI files, fixes compiler warning about ignored error
src/MainWindow.vala | 3 +--
src/PreferencesDialog.vala | 3 +--
src/ReceiveChooserDialog.vala | 3 +--
src/ReceiveProgressDialog.vala | 3 +--
src/RecordDialog.vala | 3 +--
src/SendChooserDialog.vala | 3 +--
src/SendProgressDialog.vala | 3 +--
src/SettingsDialog.vala | 3 +--
src/XmodemFilenameDialog.vala | 3 +--
9 files changed, 9 insertions(+), 18 deletions(-)
---
diff --git a/src/MainWindow.vala b/src/MainWindow.vala
index aa1d49f..fcebdae 100644
--- a/src/MainWindow.vala
+++ b/src/MainWindow.vala
@@ -106,8 +106,7 @@ public class moserial.MainWindow : Gtk.Window //Have to extend Gtk.Winow to get
GLib.Object(startupProfileFilename: profileFilename);
}
construct {
- Builder builder = new Builder();
- builder.add_from_resource(Config.UIROOT + "mainwindow.ui");
+ var builder = new Gtk.Builder.from_resource(Config.UIROOT + "mainwindow.ui");
//setup window
gtkWindow = (Gtk.Window)builder.get_object("window");
diff --git a/src/PreferencesDialog.vala b/src/PreferencesDialog.vala
index 633591b..9728076 100644
--- a/src/PreferencesDialog.vala
+++ b/src/PreferencesDialog.vala
@@ -33,8 +33,7 @@ public class moserial.PreferencesDialog : GLib.Object
private SpinButton timeout;
public signal void updatePreferences(Preferences preferences);
construct {
- Builder builder = new Builder();
- builder.add_from_resource(Config.UIROOT + "preferences.ui");
+ var builder = new Gtk.Builder.from_resource(Config.UIROOT + "preferences.ui");
dialog = (Dialog)builder.get_object("preferences_dialog");
okButton = (Button)builder.get_object("preferences_ok");
diff --git a/src/ReceiveChooserDialog.vala b/src/ReceiveChooserDialog.vala
index dbf3066..b419c79 100644
--- a/src/ReceiveChooserDialog.vala
+++ b/src/ReceiveChooserDialog.vala
@@ -26,8 +26,7 @@ public class moserial.ReceiveChooserDialog : GLib.Object
public string path;
construct {
- Builder builder = new Builder();
- builder.add_from_resource(Config.UIROOT + "receive_chooser.ui");
+ var builder = new Gtk.Builder.from_resource(Config.UIROOT + "receive_chooser.ui");
dialog = (FileChooserDialog)builder.get_object("receive_chooser_dialog");
diff --git a/src/ReceiveProgressDialog.vala b/src/ReceiveProgressDialog.vala
index bb2febd..56bb90c 100644
--- a/src/ReceiveProgressDialog.vala
+++ b/src/ReceiveProgressDialog.vala
@@ -26,8 +26,7 @@ public class moserial.ReceiveProgressDialog : GLib.Object
private ProgressBar progressBar;
public signal void transferCanceled();
construct {
- Builder builder = new Builder();
- builder.add_from_resource(Config.UIROOT + "receive_progress.ui");
+ var builder = new Gtk.Builder.from_resource(Config.UIROOT + "receive_progress.ui");
dialog = (Dialog)builder.get_object("receive_progress_dialog");
cancelButton = (Button)builder.get_object("receive_progress_cancel");
diff --git a/src/RecordDialog.vala b/src/RecordDialog.vala
index 400d1a0..ee68f81 100644
--- a/src/RecordDialog.vala
+++ b/src/RecordDialog.vala
@@ -28,8 +28,7 @@ public class moserial.RecordDialog : GLib.Object
public signal void stopRecording();
public SerialStreamRecorder.Direction direction;
construct {
- Builder builder = new Builder();
- builder.add_from_resource(Config.UIROOT + "record_dialog.ui");
+ var builder = new Gtk.Builder.from_resource(Config.UIROOT + "record_dialog.ui");
dialog = (FileChooserDialog)builder.get_object("record_dialog");
cancelButton = (Button)builder.get_object("record_cancel");
diff --git a/src/SendChooserDialog.vala b/src/SendChooserDialog.vala
index 0b636a1..4b365d7 100644
--- a/src/SendChooserDialog.vala
+++ b/src/SendChooserDialog.vala
@@ -25,8 +25,7 @@ public class moserial.SendChooserDialog : GLib.Object
public signal void startTransfer();
public string filename;
construct {
- Builder builder = new Builder();
- builder.add_from_resource(Config.UIROOT + "send_chooser_dialog.ui");
+ var builder = new Gtk.Builder.from_resource(Config.UIROOT + "send_chooser_dialog.ui");
dialog = (FileChooserDialog)builder.get_object("send_chooser_dialog");
diff --git a/src/SendProgressDialog.vala b/src/SendProgressDialog.vala
index 16738da..c0f2bd7 100644
--- a/src/SendProgressDialog.vala
+++ b/src/SendProgressDialog.vala
@@ -26,8 +26,7 @@ public class moserial.SendProgressDialog : GLib.Object
private ProgressBar progressBar;
public signal void transferCanceled();
construct {
- Builder builder = new Builder();
- builder.add_from_resource(Config.UIROOT + "send_progress_dialog.ui");
+ var builder = new Gtk.Builder.from_resource(Config.UIROOT + "send_progress_dialog.ui");
dialog = (Dialog)builder.get_object("send_progress_dialog");
cancelButton = (Button)builder.get_object("send_progress_cancel");
diff --git a/src/SettingsDialog.vala b/src/SettingsDialog.vala
index a49f160..5c7a7a2 100644
--- a/src/SettingsDialog.vala
+++ b/src/SettingsDialog.vala
@@ -43,8 +43,7 @@ public class moserial.SettingsDialog : GLib.Object
public signal void updateSettings(Settings settings);
construct {
- Builder builder = new Builder();
- builder.add_from_resource(Config.UIROOT + "settings_dialog.ui");
+ var builder = new Gtk.Builder.from_resource(Config.UIROOT + "settings_dialog.ui");
dialog = (Dialog)builder.get_object("settings_dialog");
cancelButton = (Button)builder.get_object("settings_cancel_button");
diff --git a/src/XmodemFilenameDialog.vala b/src/XmodemFilenameDialog.vala
index 4db265c..662bd9d 100644
--- a/src/XmodemFilenameDialog.vala
+++ b/src/XmodemFilenameDialog.vala
@@ -24,8 +24,7 @@ public class moserial.XmodemFilenameDialog : GLib.Object
private Gtk.Entry xmodemFilename;
public string filename;
construct {
- Builder builder = new Builder();
- builder.add_from_resource(Config.UIROOT + "xmodem_filename_dialog.ui");
+ var builder = new Gtk.Builder.from_resource(Config.UIROOT + "xmodem_filename_dialog.ui");
dialog = (Dialog)builder.get_object("xmodem_filename_dialog");
xmodemFilename = (Gtk.Entry)builder.get_object("xmodem_filename");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]