diff --git a/Programs/GridProxyGUI/IgeMacMenuGlobal.cs b/Programs/GridProxyGUI/IgeMacMenuGlobal.cs new file mode 100644 index 00000000..009b041c --- /dev/null +++ b/Programs/GridProxyGUI/IgeMacMenuGlobal.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace IgeMacIntegration { + + public class IgeMacMenu { + + [DllImport("libigemacintegration.dylib")] + static extern void ige_mac_menu_connect_window_key_handler (IntPtr window); + + public static void ConnectWindowKeyHandler (Gtk.Window window) + { + ige_mac_menu_connect_window_key_handler (window.Handle); + } + + [DllImport("libigemacintegration.dylib")] + static extern void ige_mac_menu_set_global_key_handler_enabled (bool enabled); + + public static bool GlobalKeyHandlerEnabled { + set { + ige_mac_menu_set_global_key_handler_enabled (value); + } + } + + [DllImport("libigemacintegration.dylib")] + static extern void ige_mac_menu_set_menu_bar(IntPtr menu_shell); + + public static Gtk.MenuShell MenuBar { + set { + ige_mac_menu_set_menu_bar(value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("libigemacintegration.dylib")] + static extern void ige_mac_menu_set_quit_menu_item(IntPtr quit_item); + + public static Gtk.MenuItem QuitMenuItem { + set { + ige_mac_menu_set_quit_menu_item(value == null ? IntPtr.Zero : value.Handle); + } + } + + [DllImport("libigemacintegration.dylib")] + static extern IntPtr ige_mac_menu_add_app_menu_group(); + + public static IgeMacIntegration.IgeMacMenuGroup AddAppMenuGroup() { + IntPtr raw_ret = ige_mac_menu_add_app_menu_group(); + IgeMacIntegration.IgeMacMenuGroup ret = raw_ret == IntPtr.Zero ? null : (IgeMacIntegration.IgeMacMenuGroup) GLib.Opaque.GetOpaque (raw_ret, typeof (IgeMacIntegration.IgeMacMenuGroup), false); + return ret; + } + } + + public class IgeMacMenuGroup : GLib.Opaque { + + [DllImport("libigemacintegration.dylib")] + static extern void ige_mac_menu_add_app_menu_item(IntPtr raw, IntPtr menu_item, IntPtr label); + + public void AddMenuItem(Gtk.MenuItem menu_item, string label) { + IntPtr native_label = GLib.Marshaller.StringToPtrGStrdup (label); + ige_mac_menu_add_app_menu_item(Handle, menu_item == null ? IntPtr.Zero : menu_item.Handle, native_label); + GLib.Marshaller.Free (native_label); + } + + public IgeMacMenuGroup(IntPtr raw) : base(raw) {} + } +} diff --git a/Programs/GridProxyGUI/MainWindow.cs b/Programs/GridProxyGUI/MainWindow.cs index 0b967089..78463582 100755 --- a/Programs/GridProxyGUI/MainWindow.cs +++ b/Programs/GridProxyGUI/MainWindow.cs @@ -34,12 +34,31 @@ public partial class MainWindow : Gtk.Window : base(Gtk.WindowType.Toplevel) { Build(); - SetIconFromFile("libomv.png"); - tabsMain.Page = 1; - mainSplit.Position = 600; - txtSummary.ModifyFont(Pango.FontDescription.FromString("monospace bold 9")); + ProxyLogger.Init(); + ProxyLogger.OnLogLine += new ProxyLogger.Log(Logger_OnLogLine); - string font = "monospace"; + SetIconFromFile("libomv.png"); + tabsMain.Page = 0; + mainSplit.Position = 600; + + string font; + if (PlatformDetection.IsMac) + { + txtSummary.ModifyFont(Pango.FontDescription.FromString("monospace bold")); + font = "monospace"; + IgeMacIntegration.IgeMacMenu.GlobalKeyHandlerEnabled = true; + IgeMacIntegration.IgeMacMenu.MenuBar = menuMain; + MenuItem quit = new MenuItem("Quit"); + quit.Activated += (object sender, EventArgs e) => OnExitActionActivated(sender, e); + IgeMacIntegration.IgeMacMenu.QuitMenuItem = quit; + menuMain.Hide(); + menuSeparator.Hide(); + } + else + { + txtSummary.ModifyFont(Pango.FontDescription.FromString("monospace bold 9")); + font = "monospace 9"; + } txtRequest.ModifyFont(Pango.FontDescription.FromString(font)); CreateTags(txtRequest.Buffer); @@ -58,8 +77,6 @@ public partial class MainWindow : Gtk.Window StatsTimer.Elapsed += StatsTimer_Elapsed; StatsTimer.Enabled = true; - ProxyLogger.Init(); - ProxyManager.OnLoginResponse += ProxyManager_OnLoginResponse; ProxyManager.OnPacketLog += ProxyManager_OnPacketLog; ProxyManager.OnCapabilityAdded += new ProxyManager.CapsAddedHandler(ProxyManager_OnCapabilityAdded); @@ -200,16 +217,14 @@ public partial class MainWindow : Gtk.Window PacketCounter++; int size = 0; - string contentType = String.Empty; if (req.RawRequest != null) { size += req.RawRequest.Length; - contentType = req.RequestHeaders.Get("Content-Type"); } - if (req.RawResponse != null) + + if (req.RawResponse != null) { size += req.RawResponse.Length; - contentType = req.ResponseHeaders.Get("Content-Type"); } GridProxy.Direction direction; @@ -276,7 +291,6 @@ public partial class MainWindow : Gtk.Window protected void StartPoxy() { AppendLog("Starting proxy..." + Environment.NewLine); - ProxyLogger.OnLogLine += new ProxyLogger.Log(Logger_OnLogLine); proxy = new ProxyManager(txtPort.Text, cbListen.ActiveText, cbLoginURL.ActiveText); proxy.Start(); } @@ -284,7 +298,6 @@ public partial class MainWindow : Gtk.Window protected void StopProxy() { AppendLog("Proxy stopped" + Environment.NewLine); - ProxyLogger.OnLogLine -= new ProxyLogger.Log(Logger_OnLogLine); if (proxy != null) proxy.Stop(); proxy = null; foreach (var child in new List(containerFilterUDP.Children)) diff --git a/Programs/GridProxyGUI/PlatformDetection.cs b/Programs/GridProxyGUI/PlatformDetection.cs new file mode 100644 index 00000000..6253120c --- /dev/null +++ b/Programs/GridProxyGUI/PlatformDetection.cs @@ -0,0 +1,41 @@ +using System; +using System.IO; + +namespace GridProxyGUI +{ + public static class PlatformDetection + { + public readonly static bool IsWindows; + public readonly static bool IsMac; + + static PlatformDetection () + { + IsWindows = Path.DirectorySeparatorChar == '\\'; + IsMac = !IsWindows && IsRunningOnMac(); + } + + //From Managed.Windows.Forms/XplatUI + static bool IsRunningOnMac () + { + IntPtr buf = IntPtr.Zero; + try { + buf = System.Runtime.InteropServices.Marshal.AllocHGlobal (8192); + // This is a hacktastic way of getting sysname from uname () + if (uname (buf) == 0) { + string os = System.Runtime.InteropServices.Marshal.PtrToStringAnsi (buf); + if (os == "Darwin") + return true; + } + } catch { + } finally { + if (buf != IntPtr.Zero) + System.Runtime.InteropServices.Marshal.FreeHGlobal (buf); + } + return false; + } + + [System.Runtime.InteropServices.DllImport ("libc")] + static extern int uname (IntPtr buf); + } +} + diff --git a/Programs/GridProxyGUI/gtk-gui/MainWindow.cs b/Programs/GridProxyGUI/gtk-gui/MainWindow.cs index c5d3e039..d552e3ee 100755 --- a/Programs/GridProxyGUI/gtk-gui/MainWindow.cs +++ b/Programs/GridProxyGUI/gtk-gui/MainWindow.cs @@ -21,8 +21,8 @@ public partial class MainWindow private global::Gtk.VBox vboxMenuMain; private global::Gtk.HBox hboxMenu; private global::Gtk.Alignment alignment2; - private global::Gtk.MenuBar menubar1; - private global::Gtk.VSeparator vseparator1; + private global::Gtk.MenuBar menuMain; + private global::Gtk.VSeparator menuSeparator; private global::Gtk.Label label1; private global::Gtk.ComboBoxEntry cbListen; private global::Gtk.Label label2; @@ -92,7 +92,7 @@ public partial class MainWindow private global::Gtk.TextView txtResponseNotation; private global::Gtk.Label label12; private global::Gtk.Label label10; - + protected virtual void Build () { global::Stetic.Gui.Initialize (this); @@ -104,14 +104,14 @@ public partial class MainWindow w1.Add (this.FileAction, "f"); this.ExitAction = new global::Gtk.Action ("ExitAction", global::Mono.Unix.Catalog.GetString ("Exit"), null, null); this.ExitAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Exit"); - w1.Add (this.ExitAction, "q"); + w1.Add (this.ExitAction, "q"); this.EditAction = new global::Gtk.Action ("EditAction", global::Mono.Unix.Catalog.GetString ("Edit"), null, null); this.EditAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Edit"); w1.Add (this.EditAction, null); this.HelpAction = new global::Gtk.Action ("HelpAction", global::Mono.Unix.Catalog.GetString ("Help"), null, null); this.HelpAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Help"); w1.Add (this.HelpAction, null); - this.AboutAction = new global::Gtk.Action ("AboutAction", global::Mono.Unix.Catalog.GetString ("About"), null, null); + this.AboutAction = new global::Gtk.Action ("AboutAction", global::Mono.Unix.Catalog.GetString ("About"), global::Mono.Unix.Catalog.GetString ("Shows the wonderful creator info"), null); this.AboutAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("About"); w1.Add (this.AboutAction, null); this.RemoveAction = new global::Gtk.Action ("RemoveAction", global::Mono.Unix.Catalog.GetString ("Remove"), null, null); @@ -131,13 +131,13 @@ public partial class MainWindow w1.Add (this.SelectedAction, null); this.FindAction = new global::Gtk.Action ("FindAction", global::Mono.Unix.Catalog.GetString ("Find"), null, null); this.FindAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Find (Ctrl-F)"); - w1.Add (this.FindAction, "f"); + w1.Add (this.FindAction, "f"); this.OpenSessionAction = new global::Gtk.Action ("OpenSessionAction", global::Mono.Unix.Catalog.GetString ("Open Session..."), null, null); this.OpenSessionAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Open Session..."); - w1.Add (this.OpenSessionAction, "o"); + w1.Add (this.OpenSessionAction, "o"); this.SaveSessionAction = new global::Gtk.Action ("SaveSessionAction", global::Mono.Unix.Catalog.GetString ("Save Session"), null, null); this.SaveSessionAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Save Session"); - w1.Add (this.SaveSessionAction, "s"); + w1.Add (this.SaveSessionAction, "s"); this.SaveSessionAsAction = new global::Gtk.Action ("SaveSessionAsAction", global::Mono.Unix.Catalog.GetString ("Save Session As..."), null, null); this.SaveSessionAsAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Save Session As..."); w1.Add (this.SaveSessionAsAction, null); @@ -160,20 +160,20 @@ public partial class MainWindow this.alignment2 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F); this.alignment2.Name = "alignment2"; // Container child alignment2.Gtk.Container+ContainerChild - this.UIManager.AddUiFromString (@""); - this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar1"))); - this.menubar1.Name = "menubar1"; - this.alignment2.Add (this.menubar1); + this.UIManager.AddUiFromString (""); + this.menuMain = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menuMain"))); + this.menuMain.Name = "menuMain"; + this.alignment2.Add (this.menuMain); this.hboxMenu.Add (this.alignment2); global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hboxMenu [this.alignment2])); w3.Position = 0; w3.Expand = false; w3.Fill = false; // Container child hboxMenu.Gtk.Box+BoxChild - this.vseparator1 = new global::Gtk.VSeparator (); - this.vseparator1.Name = "vseparator1"; - this.hboxMenu.Add (this.vseparator1); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hboxMenu [this.vseparator1])); + this.menuSeparator = new global::Gtk.VSeparator (); + this.menuSeparator.Name = "menuSeparator"; + this.hboxMenu.Add (this.menuSeparator); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hboxMenu [this.menuSeparator])); w4.Position = 1; w4.Expand = false; w4.Fill = false; @@ -302,7 +302,7 @@ public partial class MainWindow this.tabsMain = new global::Gtk.Notebook (); this.tabsMain.CanFocus = true; this.tabsMain.Name = "tabsMain"; - this.tabsMain.CurrentPage = 2; + this.tabsMain.CurrentPage = 0; // Container child tabsMain.Gtk.Notebook+NotebookChild this.vboxLog = new global::Gtk.VBox (); this.vboxLog.Name = "vboxLog"; @@ -445,34 +445,58 @@ public partial class MainWindow this.btnLoadFilters.CanFocus = true; this.btnLoadFilters.Name = "btnLoadFilters"; this.btnLoadFilters.UseUnderline = true; - this.btnLoadFilters.Label = global::Mono.Unix.Catalog.GetString ("Load"); - global::Gtk.Image w33 = new global::Gtk.Image (); - w33.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-open", global::Gtk.IconSize.Menu); - this.btnLoadFilters.Image = w33; + // Container child btnLoadFilters.Gtk.Container+ContainerChild + global::Gtk.Alignment w33 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); + // Container child GtkAlignment.Gtk.Container+ContainerChild + global::Gtk.HBox w34 = new global::Gtk.HBox (); + w34.Spacing = 2; + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Image w35 = new global::Gtk.Image (); + w35.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-open", global::Gtk.IconSize.Menu); + w34.Add (w35); + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Label w37 = new global::Gtk.Label (); + w37.LabelProp = global::Mono.Unix.Catalog.GetString ("Load"); + w37.UseUnderline = true; + w34.Add (w37); + w33.Add (w34); + this.btnLoadFilters.Add (w33); this.hbox2.Add (this.btnLoadFilters); - global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.btnLoadFilters])); - w34.Position = 0; - w34.Expand = false; - w34.Fill = false; + global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.btnLoadFilters])); + w41.Position = 0; + w41.Expand = false; + w41.Fill = false; // Container child hbox2.Gtk.Box+BoxChild this.btnSaveFilters = new global::Gtk.Button (); this.btnSaveFilters.CanFocus = true; this.btnSaveFilters.Name = "btnSaveFilters"; this.btnSaveFilters.UseUnderline = true; - this.btnSaveFilters.Label = global::Mono.Unix.Catalog.GetString ("Save"); - global::Gtk.Image w35 = new global::Gtk.Image (); - w35.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save", global::Gtk.IconSize.Menu); - this.btnSaveFilters.Image = w35; + // Container child btnSaveFilters.Gtk.Container+ContainerChild + global::Gtk.Alignment w42 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); + // Container child GtkAlignment.Gtk.Container+ContainerChild + global::Gtk.HBox w43 = new global::Gtk.HBox (); + w43.Spacing = 2; + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Image w44 = new global::Gtk.Image (); + w44.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save", global::Gtk.IconSize.Menu); + w43.Add (w44); + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Label w46 = new global::Gtk.Label (); + w46.LabelProp = global::Mono.Unix.Catalog.GetString ("Save"); + w46.UseUnderline = true; + w43.Add (w46); + w42.Add (w43); + this.btnSaveFilters.Add (w42); this.hbox2.Add (this.btnSaveFilters); - global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.btnSaveFilters])); - w36.Position = 1; - w36.Expand = false; - w36.Fill = false; + global::Gtk.Box.BoxChild w50 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.btnSaveFilters])); + w50.Position = 1; + w50.Expand = false; + w50.Fill = false; this.hboxFilter.Add (this.hbox2); - global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox2])); - w37.Position = 0; - w37.Expand = false; - w37.Fill = false; + global::Gtk.Box.BoxChild w51 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox2])); + w51.Position = 0; + w51.Expand = false; + w51.Fill = false; // Container child hboxFilter.Gtk.Box+BoxChild this.hbox3 = new global::Gtk.HBox (); this.hbox3.Name = "hbox3"; @@ -493,8 +517,8 @@ public partial class MainWindow this.GtkLabel8.LabelProp = global::Mono.Unix.Catalog.GetString ("UDP Packets & Login"); this.frameFilterUDP.LabelWidget = this.GtkLabel8; this.hbox3.Add (this.frameFilterUDP); - global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frameFilterUDP])); - w39.Position = 0; + global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frameFilterUDP])); + w53.Position = 0; // Container child hbox3.Gtk.Box+BoxChild this.frameFilterCap = new global::Gtk.Frame (); this.frameFilterCap.Name = "frameFilterCap"; @@ -510,11 +534,11 @@ public partial class MainWindow this.GtkLabel9.LabelProp = global::Mono.Unix.Catalog.GetString ("Capabilities & EventQueue Messages"); this.frameFilterCap.LabelWidget = this.GtkLabel9; this.hbox3.Add (this.frameFilterCap); - global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frameFilterCap])); - w41.Position = 1; + global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frameFilterCap])); + w55.Position = 1; this.hboxFilter.Add (this.hbox3); - global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox3])); - w42.Position = 1; + global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox3])); + w56.Position = 1; // Container child hboxFilter.Gtk.Box+BoxChild this.hbox4 = new global::Gtk.HBox (); this.hbox4.Name = "hbox4"; @@ -528,8 +552,8 @@ public partial class MainWindow this.cbSelectAllUDP.DrawIndicator = true; this.cbSelectAllUDP.UseUnderline = true; this.hbox4.Add (this.cbSelectAllUDP); - global::Gtk.Box.BoxChild w43 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.cbSelectAllUDP])); - w43.Position = 0; + global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.cbSelectAllUDP])); + w57.Position = 0; // Container child hbox4.Gtk.Box+BoxChild this.cbSelectAllCap = new global::Gtk.CheckButton (); this.cbSelectAllCap.CanFocus = true; @@ -538,17 +562,17 @@ public partial class MainWindow this.cbSelectAllCap.DrawIndicator = true; this.cbSelectAllCap.UseUnderline = true; this.hbox4.Add (this.cbSelectAllCap); - global::Gtk.Box.BoxChild w44 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.cbSelectAllCap])); - w44.Position = 1; + global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.cbSelectAllCap])); + w58.Position = 1; this.hboxFilter.Add (this.hbox4); - global::Gtk.Box.BoxChild w45 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox4])); - w45.PackType = ((global::Gtk.PackType)(1)); - w45.Position = 2; - w45.Expand = false; - w45.Fill = false; + global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox4])); + w59.PackType = ((global::Gtk.PackType)(1)); + w59.Position = 2; + w59.Expand = false; + w59.Fill = false; this.tabsMain.Add (this.hboxFilter); - global::Gtk.Notebook.NotebookChild w46 = ((global::Gtk.Notebook.NotebookChild)(this.tabsMain [this.hboxFilter])); - w46.Position = 1; + global::Gtk.Notebook.NotebookChild w60 = ((global::Gtk.Notebook.NotebookChild)(this.tabsMain [this.hboxFilter])); + w60.Position = 1; // Notebook tab this.label5 = new global::Gtk.Label (); this.label5.Name = "label5"; @@ -592,8 +616,8 @@ public partial class MainWindow this.txtRequestRaw.Editable = false; this.GtkScrolledWindow1.Add (this.txtRequestRaw); this.tabsRequst.Add (this.GtkScrolledWindow1); - global::Gtk.Notebook.NotebookChild w50 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst [this.GtkScrolledWindow1])); - w50.Position = 1; + global::Gtk.Notebook.NotebookChild w64 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst [this.GtkScrolledWindow1])); + w64.Position = 1; // Notebook tab this.label6 = new global::Gtk.Label (); this.label6.Name = "label6"; @@ -611,8 +635,8 @@ public partial class MainWindow this.txtRequestNotation.Editable = false; this.GtkScrolledWindow2.Add (this.txtRequestNotation); this.tabsRequst.Add (this.GtkScrolledWindow2); - global::Gtk.Notebook.NotebookChild w52 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst [this.GtkScrolledWindow2])); - w52.Position = 2; + global::Gtk.Notebook.NotebookChild w66 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst [this.GtkScrolledWindow2])); + w66.Position = 2; // Notebook tab this.label8 = new global::Gtk.Label (); this.label8.Name = "label8"; @@ -620,8 +644,8 @@ public partial class MainWindow this.tabsRequst.SetTabLabel (this.GtkScrolledWindow2, this.label8); this.label8.ShowAll (); this.vboxInspector.Add (this.tabsRequst); - global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.vboxInspector [this.tabsRequst])); - w53.Position = 0; + global::Gtk.Box.BoxChild w67 = ((global::Gtk.Box.BoxChild)(this.vboxInspector [this.tabsRequst])); + w67.Position = 0; // Container child vboxInspector.Gtk.Box+BoxChild this.tabsRequst1 = new global::Gtk.Notebook (); this.tabsRequst1.CanFocus = true; @@ -655,8 +679,8 @@ public partial class MainWindow this.txtResponseRaw.Editable = false; this.GtkScrolledWindow4.Add (this.txtResponseRaw); this.tabsRequst1.Add (this.GtkScrolledWindow4); - global::Gtk.Notebook.NotebookChild w57 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst1 [this.GtkScrolledWindow4])); - w57.Position = 1; + global::Gtk.Notebook.NotebookChild w71 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst1 [this.GtkScrolledWindow4])); + w71.Position = 1; // Notebook tab this.label11 = new global::Gtk.Label (); this.label11.Name = "label11"; @@ -674,8 +698,8 @@ public partial class MainWindow this.txtResponseNotation.Editable = false; this.GtkScrolledWindow5.Add (this.txtResponseNotation); this.tabsRequst1.Add (this.GtkScrolledWindow5); - global::Gtk.Notebook.NotebookChild w59 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst1 [this.GtkScrolledWindow5])); - w59.Position = 2; + global::Gtk.Notebook.NotebookChild w73 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst1 [this.GtkScrolledWindow5])); + w73.Position = 2; // Notebook tab this.label12 = new global::Gtk.Label (); this.label12.Name = "label12"; @@ -683,11 +707,11 @@ public partial class MainWindow this.tabsRequst1.SetTabLabel (this.GtkScrolledWindow5, this.label12); this.label12.ShowAll (); this.vboxInspector.Add (this.tabsRequst1); - global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.vboxInspector [this.tabsRequst1])); - w60.Position = 1; + global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.vboxInspector [this.tabsRequst1])); + w74.Position = 1; this.tabsMain.Add (this.vboxInspector); - global::Gtk.Notebook.NotebookChild w61 = ((global::Gtk.Notebook.NotebookChild)(this.tabsMain [this.vboxInspector])); - w61.Position = 2; + global::Gtk.Notebook.NotebookChild w75 = ((global::Gtk.Notebook.NotebookChild)(this.tabsMain [this.vboxInspector])); + w75.Position = 2; // Notebook tab this.label10 = new global::Gtk.Label (); this.label10.Name = "label10"; @@ -696,8 +720,8 @@ public partial class MainWindow this.label10.ShowAll (); this.mainSplit.Add (this.tabsMain); this.vboxMenuMain.Add (this.mainSplit); - global::Gtk.Box.BoxChild w63 = ((global::Gtk.Box.BoxChild)(this.vboxMenuMain [this.mainSplit])); - w63.Position = 1; + global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.vboxMenuMain [this.mainSplit])); + w77.Position = 1; this.Add (this.vboxMenuMain); if ((this.Child != null)) { this.Child.ShowAll (); diff --git a/Programs/GridProxyGUI/gtk-gui/generated.cs b/Programs/GridProxyGUI/gtk-gui/generated.cs index c8654260..8b35f0bf 100644 --- a/Programs/GridProxyGUI/gtk-gui/generated.cs +++ b/Programs/GridProxyGUI/gtk-gui/generated.cs @@ -5,7 +5,7 @@ namespace Stetic internal class Gui { private static bool initialized; - + internal static void Initialize (Gtk.Widget iconRenderer) { if ((Stetic.Gui.initialized == false)) { @@ -13,7 +13,7 @@ namespace Stetic } } } - + internal class IconLoader { public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size) @@ -24,7 +24,7 @@ namespace Stetic } else { int sz; int sy; - global::Gtk.Icon.SizeLookup (size, out sz, out sy); + global::Gtk.Icon.SizeLookup (size, out sz, out sy); try { return Gtk.IconTheme.Default.LoadIcon (name, sz, 0); } catch (System.Exception) { @@ -39,26 +39,22 @@ namespace Stetic pmap.DrawRectangle (gc, false, 0, 0, (sz - 1), (sz - 1)); gc.SetLineAttributes (3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round); gc.RgbFgColor = new Gdk.Color (255, 0, 0); - pmap.DrawLine (gc, (sz / 4), (sz / 4), ((sz - 1) - - (sz / 4)), ((sz - 1) - - (sz / 4))); - pmap.DrawLine (gc, ((sz - 1) - - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - - (sz / 4))); + pmap.DrawLine (gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4))); + pmap.DrawLine (gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4))); return Gdk.Pixbuf.FromDrawable (pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz); } } } } } - + internal class ActionGroups { public static Gtk.ActionGroup GetActionGroup (System.Type type) { return Stetic.ActionGroups.GetActionGroup (type.FullName); } - + public static Gtk.ActionGroup GetActionGroup (string name) { return null; diff --git a/Programs/GridProxyGUI/gtk-gui/gui.stetic b/Programs/GridProxyGUI/gtk-gui/gui.stetic index 59d60a29..c11d69f0 100644 --- a/Programs/GridProxyGUI/gtk-gui/gui.stetic +++ b/Programs/GridProxyGUI/gtk-gui/gui.stetic @@ -5,7 +5,7 @@ - + @@ -17,7 +17,7 @@ Action - <Primary>q + <Control>q Exit Exit @@ -36,6 +36,7 @@ Action About About + Shows the wonderful creator info Action @@ -64,19 +65,19 @@ Action - <Primary>f + <Control>f Find Find (Ctrl-F) Action - <Primary>o + <Control>o Open Session... Open Session... Action - <Primary>s + <Control>s Save Session Save Session @@ -104,9 +105,9 @@ - + - + @@ -140,7 +141,7 @@ - + @@ -325,7 +326,7 @@ http://login.orgrid.org/ True - 2 + 0