diff options
Diffstat (limited to 'avahi-ui-sharp')
| -rw-r--r-- | avahi-ui-sharp/Makefile.am | 2 | ||||
| -rw-r--r-- | avahi-ui-sharp/ServiceDialog.cs | 14 | ||||
| -rw-r--r-- | avahi-ui-sharp/bssh.cs | 8 | 
3 files changed, 11 insertions, 13 deletions
diff --git a/avahi-ui-sharp/Makefile.am b/avahi-ui-sharp/Makefile.am index e8cf23f..28ea64f 100644 --- a/avahi-ui-sharp/Makefile.am +++ b/avahi-ui-sharp/Makefile.am @@ -1,5 +1,3 @@ -# $Id: Makefile.am 1251 2006-08-21 23:31:59Z lennart $ -  # This file is part of avahi.  #  # avahi is free software; you can redistribute it and/or modify it diff --git a/avahi-ui-sharp/ServiceDialog.cs b/avahi-ui-sharp/ServiceDialog.cs index e0306e1..31f7479 100644 --- a/avahi-ui-sharp/ServiceDialog.cs +++ b/avahi-ui-sharp/ServiceDialog.cs @@ -27,13 +27,13 @@ namespace Avahi.UI          [DllImport ("avahi-ui")]          private static extern IntPtr aui_service_dialog_get_service_type (IntPtr dialog); -         +          [DllImport ("avahi-ui")]          private static extern void aui_service_dialog_set_service_type (IntPtr dialog, IntPtr type);          [DllImport ("avahi-ui")]          private static extern IntPtr aui_service_dialog_get_service_name (IntPtr dialog); -         +          [DllImport ("avahi-ui")]          private static extern void aui_service_dialog_set_service_name (IntPtr dialog, IntPtr type); @@ -114,7 +114,7 @@ namespace Avahi.UI                  for (int i = 0;;i++) {                      if (types[i] != IntPtr.Zero)                          break; -                     +                      GLib.Marshaller.Free (types[i]);                  }              } @@ -172,11 +172,11 @@ namespace Avahi.UI              get {                  ArrayList txtlist = new ArrayList ();                  IntPtr txt = aui_service_dialog_get_txt_data (Raw); -                 +                  for (IntPtr l = txt; l != IntPtr.Zero; l = avahi_string_list_get_next (l)) {                      IntPtr buf = avahi_string_list_get_text (l);                      int len = avahi_string_list_get_size (l); -                     +                      byte[] txtbuf = new byte[len];                      Marshal.Copy (buf, txtbuf, 0, len);                      txtlist.Add (txtbuf); @@ -209,7 +209,7 @@ namespace Avahi.UI                  aui_service_dialog_set_address_family (Raw, value);              }          } -         +          public ServiceDialog (string title, Window parent, params object[] buttonData)          {              Raw = aui_service_dialog_new (title, parent == null ? IntPtr.Zero : parent.Handle, @@ -223,7 +223,7 @@ namespace Avahi.UI          private static IPAddress PtrToAddress (IntPtr ptr)          {              IPAddress address = null; -             +              if (ptr != IntPtr.Zero) {                  IntPtr buf = Stdlib.malloc (256);                  IntPtr addrPtr = avahi_address_snprint (buf, 256, ptr); diff --git a/avahi-ui-sharp/bssh.cs b/avahi-ui-sharp/bssh.cs index 003a3a6..fa3d4d4 100644 --- a/avahi-ui-sharp/bssh.cs +++ b/avahi-ui-sharp/bssh.cs @@ -5,8 +5,8 @@ using Avahi.UI;  public class EntryPoint {      public static void Main () { -        Application.Init ();  -		 +        Application.Init (); +          ServiceDialog dialog = new ServiceDialog ("Choose SSH Server", null,                                                    Stock.Cancel, ResponseType.Cancel,                                                    Stock.Connect, ResponseType.Accept); @@ -17,11 +17,11 @@ public class EntryPoint {              Console.WriteLine ("Connecting to {0}:{1}", dialog.Address, dialog.Port);              string user = Environment.UserName; -             +              foreach (byte[] txtBytes in dialog.TxtData) {                  string txt = System.Text.Encoding.UTF8.GetString (txtBytes);                  string[] splitTxt = txt.Split(new char[] { '=' }, 2); -                 +                  if (splitTxt.Length != 2)                      continue;  | 
