X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=tilda-terminal.c;h=14567dab471d15d6622f47c345131a745b0ed476;hb=93db48f0c2f7a1185d4da9d9ab7cde83b9a3aa94;hp=91921d20ad8bb6c152f092d36d9ea5b7e1935580;hpb=3390da90c845629c6c0c0b1c333555404bac5c53;p=tilda-gobject.git diff --git a/tilda-terminal.c b/tilda-terminal.c index 91921d2..14567da 100644 --- a/tilda-terminal.c +++ b/tilda-terminal.c @@ -22,6 +22,31 @@ tilda_terminal_dbus_register_object (TildaTerminal *tt) 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; +} + +gboolean +tilda_terminal_close (TildaTerminal *self, GError **error) +{ + debug_enter (); + debug_assert (TILDA_IS_TERMINAL(self)); + + TildaWindow *parent_window = TILDA_WINDOW(self->parent_window); + + tilda_window_remove_terminal (parent_window, self->number); + + return TRUE; +} + /** * Start the current tt->shell in the given TildaTerminal * NOTE: this will kill whatever is running in the terminal,