[moserial] remove deprecated gtk stock icon names



commit 645ca2e1d94914b159c4576eddf7c423e215d53f
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Tue Aug 16 16:10:24 2011 -0400

    remove deprecated gtk stock icon names

 src/MainWindow.vala           |    6 +++---
 src/ReceiveChooserDialog.vala |    2 +-
 src/RecordDialog.vala         |    2 +-
 src/SendChooserDialog.vala    |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/MainWindow.vala b/src/MainWindow.vala
index b3c900e..89aa25f 100644
--- a/src/MainWindow.vala
+++ b/src/MainWindow.vala
@@ -777,7 +777,7 @@ public class moserial.MainWindow : Gtk.Window //Have to extend Gtk.Winow to get
 
 	private bool keyPress(Widget widget, EventKey key) {
 		/* Bug 551184 â Need gdk/gdkkeysyms.h bindings */
-		if (key.keyval == 0xff1b) {	/* Escape */
+		if (key.keyval == Gdk.keyval_from_name ("Escape")) {
 			AutoScroll.scroll (va1);
                         AutoScroll.scroll (va2);
                         AutoScroll.scroll (va3);
@@ -842,7 +842,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.Stock.CANCEL, Gtk.ResponseType.CANCEL, Gtk.Stock.SAVE, Gtk.ResponseType.ACCEPT, null);
                 dialog.set_do_overwrite_confirmation(true);
                 dialog.set_local_only(false);
 	        int response = dialog.run();
@@ -860,7 +860,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.Stock.CANCEL, Gtk.ResponseType.CANCEL, Gtk.Stock.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 12a2cb1..1de305c 100644
--- a/src/ReceiveChooserDialog.vala
+++ b/src/ReceiveChooserDialog.vala
@@ -33,7 +33,7 @@ public class moserial.ReceiveChooserDialog : GLib.Object
                 dialog = (FileChooserDialog)builder.get_object("receive_chooser_dialog");
                 protocolCombo = (ComboBox)builder.get_object("receive_chooser_protocol");
                 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.Stock.CANCEL, Gtk.ResponseType.CANCEL, Gtk.Stock.OK, Gtk.ResponseType.ACCEPT, null);
                 protocolCombo.set_active(2);
                 dialog.response.connect(response);
         }
diff --git a/src/RecordDialog.vala b/src/RecordDialog.vala
index 94e94a8..6dc9cb4 100644
--- a/src/RecordDialog.vala
+++ b/src/RecordDialog.vala
@@ -37,7 +37,7 @@ public class moserial.RecordDialog : GLib.Object
                 streamCombo = (ComboBox)builder.get_object("record_stream");
                 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.Stock.CANCEL, Gtk.ResponseType.CANCEL, Gtk.Stock.SAVE, Gtk.ResponseType.ACCEPT, null);
                 dialog.set_do_overwrite_confirmation(true);
 		dialog.set_local_only(false);
                 streamCombo.set_active(0);
diff --git a/src/SendChooserDialog.vala b/src/SendChooserDialog.vala
index 9c683d0..eab9eed 100644
--- a/src/SendChooserDialog.vala
+++ b/src/SendChooserDialog.vala
@@ -32,7 +32,7 @@ public class moserial.SendChooserDialog : GLib.Object
                 dialog = (FileChooserDialog)builder.get_object("send_chooser_dialog");
                 protocolCombo = (ComboBox)builder.get_object("send_chooser_protocol");
                 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.Stock.CANCEL, Gtk.ResponseType.CANCEL, Gtk.Stock.OK, Gtk.ResponseType.ACCEPT, null);
                 protocolCombo.set_active(2);
                 dialog.response.connect(response);
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]