[moserial] Fix deprecated Gtk.Stock
- From: Michael J. Chudobiak <mjc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [moserial] Fix deprecated Gtk.Stock
- Date: Sat, 16 Jan 2021 13:35:26 +0000 (UTC)
commit adb7d7a0f349a60017956c5f7fcec184f2b9d0a3
Author: Mictronics <github mictronics de>
Date: Sun Apr 26 10:13:51 2020 +0200
Fix deprecated Gtk.Stock
src/MainWindow.vala | 4 ++--
src/ReceiveChooserDialog.vala | 2 +-
src/RecordDialog.vala | 2 +-
src/SendChooserDialog.vala | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/MainWindow.vala b/src/MainWindow.vala
index ad05b66..149b4d8 100644
--- a/src/MainWindow.vala
+++ b/src/MainWindow.vala
@@ -849,7 +849,7 @@ public class moserial.MainWindow : Gtk.Window // Have to extend Gtk.Winow to get
private void saveProfileAs () {
var dialog = new FileChooserDialog (null, gtkWindow, Gtk.FileChooserAction.SAVE);
- dialog.add_buttons (Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL, Gtk.Stock.SAVE,
Gtk.ResponseType.ACCEPT, null);
+ dialog.add_buttons ("gtk-cancel", Gtk.ResponseType.CANCEL, "gtk-save", Gtk.ResponseType.ACCEPT,
null);
dialog.set_do_overwrite_confirmation (true);
dialog.set_local_only (false);
int response = dialog.run ();
@@ -867,7 +867,7 @@ public class moserial.MainWindow : Gtk.Window // Have to extend Gtk.Winow to get
private void loadProfile () {
var dialog = new FileChooserDialog (null, gtkWindow, Gtk.FileChooserAction.OPEN);
- dialog.add_buttons (Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL, Gtk.Stock.OPEN,
Gtk.ResponseType.ACCEPT, null);
+ dialog.add_buttons ("gtk-cancel", Gtk.ResponseType.CANCEL, "gtk-open", Gtk.ResponseType.ACCEPT,
null);
dialog.set_local_only (false);
int response = dialog.run ();
if (response == Gtk.ResponseType.ACCEPT) {
diff --git a/src/ReceiveChooserDialog.vala b/src/ReceiveChooserDialog.vala
index ba4bb16..c9af335 100644
--- a/src/ReceiveChooserDialog.vala
+++ b/src/ReceiveChooserDialog.vala
@@ -34,7 +34,7 @@ public class moserial.ReceiveChooserDialog : GLib.Object {
MoUtils.populateComboBox (protocolCombo, Rzwrapper.ProtocolStrings);
dialog.delete_event.connect (hide);
- dialog.add_buttons (Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL, Gtk.Stock.OK,
Gtk.ResponseType.ACCEPT, null);
+ dialog.add_buttons ("gtk-cancel", Gtk.ResponseType.CANCEL, "gtk-ok", Gtk.ResponseType.ACCEPT, null);
protocolCombo.set_active (Rzwrapper.Protocol.ZMODEM);
dialog.response.connect (response);
}
diff --git a/src/RecordDialog.vala b/src/RecordDialog.vala
index ce3123c..eafe212 100644
--- a/src/RecordDialog.vala
+++ b/src/RecordDialog.vala
@@ -39,7 +39,7 @@ public class moserial.RecordDialog : GLib.Object {
dialog.delete_event.connect (hide);
dialog.response.connect (response);
- dialog.add_buttons (Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL, Gtk.Stock.SAVE,
Gtk.ResponseType.ACCEPT, null);
+ dialog.add_buttons ("gtk-cancel", Gtk.ResponseType.CANCEL, "gtk-save", Gtk.ResponseType.ACCEPT,
null);
dialog.set_do_overwrite_confirmation (true);
dialog.set_local_only (false);
diff --git a/src/SendChooserDialog.vala b/src/SendChooserDialog.vala
index 9828234..9911ddf 100644
--- a/src/SendChooserDialog.vala
+++ b/src/SendChooserDialog.vala
@@ -33,7 +33,7 @@ public class moserial.SendChooserDialog : GLib.Object {
MoUtils.populateComboBox (protocolCombo, Szwrapper.ProtocolStrings);
dialog.delete_event.connect (hide);
- dialog.add_buttons (Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL, Gtk.Stock.OK,
Gtk.ResponseType.ACCEPT, null);
+ dialog.add_buttons ("gtk-cancel", Gtk.ResponseType.CANCEL, "gtk-ok", Gtk.ResponseType.ACCEPT, null);
protocolCombo.set_active (Szwrapper.Protocol.ZMODEM);
dialog.response.connect (response);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]