From: Ira W. Snyder Date: Sun, 20 Jan 2008 02:47:05 +0000 (-0800) Subject: [Window] Add Close DBus Method call X-Git-Url: https://www.irasnyder.com/gitweb/?p=tilda-gobject.git;a=commitdiff_plain;h=e3c534b41c49d6acab9e922eb888e5371c50a378 [Window] Add Close DBus Method call Add the Close method call to the DBus API. This allows users to close a running window. --- diff --git a/tilda-window.c b/tilda-window.c index f9b1ba5..3c143e6 100644 --- a/tilda-window.c +++ b/tilda-window.c @@ -64,6 +64,22 @@ tilda_window_find_next_free_terminal_number (TildaWindow *self) return 0; } +/** + * Clean up and remove self completely from the program + * + * Should only be used by DBus... + */ +gboolean +tilda_window_close (TildaWindow *self) +{ + debug_enter (); + debug_assert (TILDA_IS_WINDOW(self)); + + tilda_del_window (self->number); + + return TRUE; +} + gboolean tilda_window_add_terminal (TildaWindow *self) { diff --git a/tilda-window.h b/tilda-window.h index bc6cd89..1806096 100644 --- a/tilda-window.h +++ b/tilda-window.h @@ -75,6 +75,7 @@ struct _TildaWindowClass { GType tilda_window_get_type (void); /* API */ +gboolean tilda_window_close (TildaWindow *self); gboolean tilda_window_add_terminal (TildaWindow *self); gboolean tilda_window_remove_terminal (TildaWindow *self, gint terminal_number); diff --git a/tilda-window.xml b/tilda-window.xml index a2b372a..b449c72 100644 --- a/tilda-window.xml +++ b/tilda-window.xml @@ -9,6 +9,10 @@ + + + +