Browse Source

Merge remote-tracking branch 'upstream/master' into upstream

Héctor García 8 years ago
parent
commit
ea8d050983
5 changed files with 38 additions and 23 deletions
  1. 8 0
      ChangeLog
  2. 2 2
      configure.ac
  3. 7 0
      mssh.1
  4. 10 8
      src/mssh-gconf.c
  5. 11 13
      src/mssh-terminal.c

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+2015-06-08 Héctor García  <[email protected]>
+
+	Added info on man page
+
+	Migrated to vte 0.40
+
+	Bumped to version 2.2
+
 2014-12-15 Héctor García  <[email protected]>
 
 	Integrated gettext support

+ 2 - 2
configure.ac

@@ -1,4 +1,4 @@
-AC_INIT([MultiSSH], [2.1], [[email protected]], [mssh])
+AC_INIT([MultiSSH], [2.2], [[email protected]], [mssh])
 AM_CONFIG_HEADER([config.h])
 AM_INIT_AUTOMAKE
 
@@ -16,7 +16,7 @@ IT_PROG_INTLTOOL(0.26)
 
 AC_PROG_CC
 
-PKG_CHECK_MODULES(MSSH, [gtk+-3.0 vte-2.90 gconf-2.0])
+PKG_CHECK_MODULES(MSSH, [gtk+-3.0 vte-2.91 gconf-2.0])
 AC_SUBST(MSSH_CFLAGS)
 AC_SUBST(MSSH_LIBS)
 

+ 7 - 0
mssh.1

@@ -32,6 +32,13 @@ the colon and a space separated list of hosts on the right.
 Also uses a combination of {key} value system with a command alias inside 
 curls on the left and a text to send to the terminals on the right.
 
+.SH SHORTCUTS
+Modifier key (configurable throught preferences) + arrow key to move around terminals.
+
+Ctrl + Shift + x to toggling maximize terminal.
+
+Ctrl + Shift + n to show the dialog for adding new host.
+
 .SH AUTHOR
 .B MultiSSH
 was originally written by Bradley Smith <brad@brad\-smith.co.uk> and it is currently develop by Héctor García <[email protected]>

+ 10 - 8
src/mssh-gconf.c

@@ -8,20 +8,22 @@
 void mssh_gconf_notify_font(GConfClient *client, guint cnxn_id,
     GConfEntry *entry, gpointer data)
 {
+    PangoFontDescription *font_desc;
     GConfValue *value;
-    const gchar *font;
     int i;
 
     MSSHWindow *window = MSSH_WINDOW(data);
 
     value = gconf_entry_get_value(entry);
-    font = gconf_value_get_string(value);
 
+    font_desc = pango_font_description_from_string(gconf_value_get_string(value));
     for(i = 0; i < window->terminals->len; i++)
     {
-        vte_terminal_set_font_from_string(VTE_TERMINAL(g_array_index(
-            window->terminals, MSSHTerminal*, i)), font);
+        vte_terminal_set_font(VTE_TERMINAL(g_array_index(
+            window->terminals, MSSHTerminal*, i)), font_desc);
     }
+
+    pango_font_description_free(font_desc);
 }
 
 void mssh_gconf_notify_fg_colour(GConfClient *client, guint cnxn_id,
@@ -40,7 +42,7 @@ void mssh_gconf_notify_fg_colour(GConfClient *client, guint cnxn_id,
 
     for(i = 0; i < window->terminals->len; i++)
     {
-        vte_terminal_set_color_foreground_rgba(VTE_TERMINAL(g_array_index(
+        vte_terminal_set_color_foreground(VTE_TERMINAL(g_array_index(
             window->terminals, MSSHTerminal*, i)), &colour);
     }
 }
@@ -61,7 +63,7 @@ void mssh_gconf_notify_bg_colour(GConfClient *client, guint cnxn_id,
 
     for(i = 0; i < window->terminals->len; i++)
     {
-        vte_terminal_set_color_background_rgba(VTE_TERMINAL(g_array_index(
+        vte_terminal_set_color_background(VTE_TERMINAL(g_array_index(
             window->terminals, MSSHTerminal*, i)), &colour);
     }
 }
@@ -98,7 +100,7 @@ void mssh_gconf_notify_fg_colour_focus(GConfClient *client, guint cnxn_id,
 
     if (idx != -1) {
         /* found the currently focused terminal, update the color */
-        vte_terminal_set_color_foreground_rgba(VTE_TERMINAL(g_array_index(
+        vte_terminal_set_color_foreground(VTE_TERMINAL(g_array_index(
             window->terminals, MSSHTerminal*, idx)), &colour);
     }
 }
@@ -135,7 +137,7 @@ void mssh_gconf_notify_bg_colour_focus(GConfClient *client, guint cnxn_id,
 
     if (idx != -1) {
         /* found the currently focused terminal, update the color */
-        vte_terminal_set_color_background_rgba(VTE_TERMINAL(g_array_index(
+        vte_terminal_set_color_background(VTE_TERMINAL(g_array_index(
             window->terminals, MSSHTerminal*, idx)), &colour);
     }
 

+ 11 - 13
src/mssh-terminal.c

@@ -67,16 +67,17 @@ void mssh_terminal_start_session(MSSHTerminal *terminal, char **env)
          args[4] = NULL;
     }
 
-    vte_terminal_fork_command_full(VTE_TERMINAL(terminal),
-                                   VTE_PTY_NO_LASTLOG|VTE_PTY_NO_UTMP|VTE_PTY_NO_WTMP,
-                                   NULL,  /* working dir */
-                                   args,
-                                   env,
-                                   G_SPAWN_SEARCH_PATH,
-                                   NULL,  /* child_setup */
-                                   NULL,  /* child_setup_data */
-                                   NULL,  /* *child_pid */
-                                   NULL); /* Error handling */
+    vte_terminal_spawn_sync(VTE_TERMINAL(terminal),
+                            VTE_PTY_NO_LASTLOG|VTE_PTY_NO_UTMP|VTE_PTY_NO_WTMP,
+                            NULL,  /* working dir */
+                            args,
+                            env,
+                            G_SPAWN_SEARCH_PATH,
+                            NULL,  /* child_setup */
+                            NULL,  /* child_setup_data */
+                            NULL,  /* *child_pid */
+                            NULL,  /* *cancellable */
+                            NULL); /* Error handling */
 
     free(args[0]);
 }
@@ -114,9 +115,6 @@ static void mssh_terminal_init(MSSHTerminal* terminal)
     terminal->started = 0;
     terminal->ended = 0;
 
-    vte_terminal_set_word_chars(VTE_TERMINAL(terminal),
-        "-A-Za-z0-9,./?%&#:_=+@~");
-
     g_signal_connect(G_OBJECT(terminal), "child-exited",
         G_CALLBACK(mssh_terminal_child_exited), terminal);
     g_signal_connect(G_OBJECT(terminal), "focus-in-event",