From: Ira W. Snyder Date: Sun, 20 Jan 2008 04:04:34 +0000 (-0800) Subject: [Terminal] Add Close method to the DBus API X-Git-Url: https://www.irasnyder.com/gitweb/?a=commitdiff_plain;h=4583ff32f9ae60c5d2847534e77df2e2a7025aaf;p=tilda-gobject.git [Terminal] Add Close method to the DBus API This method allows the user to close a terminal over DBus. This gives TildaTerminal the same feature as TildaWindow. --- diff --git a/tilda-terminal.c b/tilda-terminal.c index 12c08af..14567da 100644 --- a/tilda-terminal.c +++ b/tilda-terminal.c @@ -34,6 +34,19 @@ tilda_terminal_run_command (TildaTerminal *self, gchar *command, GError **error) 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, diff --git a/tilda-terminal.h b/tilda-terminal.h index 81815f0..5d59a50 100644 --- a/tilda-terminal.h +++ b/tilda-terminal.h @@ -81,6 +81,7 @@ GType tilda_terminal_get_type (void); /* API */ gboolean tilda_terminal_run_command (TildaTerminal *self, gchar *command, GError **error); +gboolean tilda_terminal_close (TildaTerminal *self, GError **error); #endif /* TILDA_TERMINAL_H */ diff --git a/tilda-terminal.xml b/tilda-terminal.xml index 0818981..1d91c54 100644 --- a/tilda-terminal.xml +++ b/tilda-terminal.xml @@ -10,6 +10,10 @@ + + + +