The RunCommand method allows users to send arbitrary text over DBus,
and have it entered into the terminal as if they had typed it themselves.
This is a feature which was requested by Chris Ward. Thanks!
g_free (object_path);
}
+gboolean
+tilda_terminal_run_command (TildaTerminal *self, gchar *command, GError **error)
+{
+ debug_enter ();
+ debug_assert (TILDA_IS_TERMINAL(self));
+
+ vte_terminal_feed_child (VTE_TERMINAL(self->vte_term), command, -1);
+ vte_terminal_feed_child (VTE_TERMINAL(self->vte_term), "\n", -1);
+
+ return TRUE;
+}
+
/**
* Start the current tt->shell in the given TildaTerminal
* NOTE: this will kill whatever is running in the terminal,
GType tilda_terminal_get_type (void);
/* API */
+gboolean tilda_terminal_run_command (TildaTerminal *self, gchar *command, GError **error);
#endif /* TILDA_TERMINAL_H */
<interface name="net.sourceforge.Tilda.Window.Terminal">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="tilda_terminal" />
+ <method name="RunCommand">
+ <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="tilda_terminal_run_command" />
+ <arg type="s" name="command" direction="in" />
+ </method>
+
</interface>
</node>