Procházet zdrojové kódy

Merge branch 'upstream'

Héctor García před 10 roky
rodič
revize
d930d5ff49
6 změnil soubory, kde provedl 62 přidání a 3 odebrání
  1. 4 0
      ChangeLog
  2. 2 0
      Makefile.am
  3. 2 0
      NEWS
  4. 4 3
      mssh.1
  5. 38 0
      mssh.bash-completion
  6. 12 0
      src/mssh-window.c

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+2014-01-20  Héctor García  <[email protected]>
+
+    Make paste with mouse middle button focus on terminal
+
 2014-01-15  Héctor García  <[email protected]>
 
     Added patch from Oscar Fernandez to support comments on configuration archive

+ 2 - 0
Makefile.am

@@ -11,3 +11,5 @@ if GCONF_SCHEMAS_INSTALL
 install-data-local:
 	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/$(schema_DATA)
 endif
+
+man1_MANS = mssh.1

+ 2 - 0
NEWS

@@ -0,0 +1,2 @@
+Since around 15 Jan 2014 I (Héctor García) did take over code development and maintenance.
+Hope Bradley Smith can come around some time in the future to get his great project back.

+ 4 - 3
mssh.1

@@ -3,7 +3,7 @@
 mssh \- tool to administrate multiple servers at once
 .SH SYNOPSIS
 .B mssh
-[\fIOPTION\fR]... (-a \fIALIAS\fR | \fIHOSTS\fR[\fI:PORT\fR])
+[\fIOPTION\fR]... (\-a \fIALIAS\fR | \fIHOSTS\fR[\fI:PORT\fR])
 .SH DESCRIPTION
 .B MultiSSH
 is a GTK+ based ssh client to issue the same commands to multiple servers.
@@ -31,8 +31,9 @@ colon and a space separated list of hosts on the right.
 
 .SH AUTHOR
 .B MultiSSH
-was written by Bradley Smith <brad@brad\-smith.co.uk>
+was originally written by Bradley Smith <brad@brad\-smith.co.uk> and it is currently develop by Héctor García <[email protected]>
 .SH COPYRIGHT
+Copyright (C) 2014 Héctor García <[email protected]>
 Copyright (C) 2009 Bradley Smith <brad@brad\-smith.co.uk>
 .SH REPORTING BUGS
-Report bugs to <brad@brad\-smith.co.uk>.
+Report bugs to <[email protected]>.

+ 38 - 0
mssh.bash-completion

@@ -0,0 +1,38 @@
+# bash completion for mssh
+# Written by Héctor García <[email protected]>
+
+_mssh_alias()
+{
+  if [ -f ~/.mssh_clusters ]; then
+    COMPREPLY=( $( compgen -W '$( command cat ~/.mssh_clusters 2>/dev/null \
+       | grep -v "^\s*$" | grep -v "^#" | sed -e "s/:.*$//" )' -- $cur ) )
+  fi
+
+  return 0
+}  
+
+_mssh()
+{
+  local cur=${COMP_WORDS[COMP_CWORD]} 
+  local prev=${COMP_WORDS[COMP_CWORD-1]}
+
+  COMPREPLY=()
+
+  case "$prev" in
+   -a)
+     _mssh_alias
+     return 0
+     ;;
+  esac
+
+  # completing -a option
+  if [[ "$cur" == -* ]]; then
+    COMPREPLY=( $( compgen -W "-a" -- $cur ) )
+    return 0
+  fi
+
+  _known_hosts_real "$cur"
+
+}
+
+complete -F _mssh mssh

+ 12 - 0
src/mssh-window.c

@@ -21,6 +21,8 @@ static gboolean mssh_window_entry_focused(GtkWidget *widget,
 static gboolean mssh_window_session_close(gpointer data);
 static void mssh_window_session_focused(MSSHTerminal *terminal,
     gpointer data);
+static gboolean mssh_window_mouse_paste_cb(MSSHTerminal *terminal,
+    gpointer data);
 static void mssh_window_insert(GtkWidget *widget, gchar *new_text,
     gint new_text_length, gint *position, gpointer data);
 static void mssh_window_add_session(MSSHWindow *window, char *hostname);
@@ -248,6 +250,14 @@ void mssh_window_session_closed(MSSHTerminal *terminal, gpointer data)
     }
 }
 
+static gboolean mssh_window_mouse_paste_cb(MSSHTerminal *terminal,
+    gpointer data)
+{
+    gtk_widget_grab_focus(GTK_WIDGET(terminal));
+
+    return FALSE;
+}
+
 static void mssh_window_session_focused(MSSHTerminal *terminal,
     gpointer data)
 {
@@ -355,6 +365,8 @@ static void mssh_window_add_session(MSSHWindow *window, char *hostname)
         G_CALLBACK(mssh_window_session_closed), window);
     g_signal_connect(G_OBJECT(terminal), "session-focused",
         G_CALLBACK(mssh_window_session_focused), window);
+    g_signal_connect(GTK_WIDGET(terminal), "button-release-event",
+        G_CALLBACK(mssh_window_mouse_paste_cb), window);
 
     mssh_terminal_init_session(terminal, hostname);