Add missing extern to tilda.h
[tilda-gobject.git] / tilda-window.c
index 1ac2a14..dcef0f5 100644 (file)
@@ -77,7 +77,7 @@ tilda_window_close (TildaWindow *self)
        debug_enter  ();
        debug_assert (TILDA_IS_WINDOW(self));
 
-       tilda_controller_delete_window (TILDA_CONTROLLER(self->controller), self->number);
+       tilda_controller_remove_window (TILDA_CONTROLLER(self->controller), self->number);
 
        return TRUE;
 }
@@ -157,7 +157,7 @@ tilda_window_remove_terminal (TildaWindow *self, gint terminal_number)
                        if (gtk_notebook_get_n_pages (GTK_NOTEBOOK (self->notebook)) < 1)
                        {
                                debug_printf ("no terminals left, closing window %d\n", self->number);
-                               tilda_controller_delete_window (TILDA_CONTROLLER(self->controller), self->number);
+                               tilda_controller_remove_window (TILDA_CONTROLLER(self->controller), self->number);
                        }
 
                        /* Leave the loop, we're done */
@@ -298,6 +298,12 @@ tilda_window_try_to_bind_key (TildaWindow *self, const gchar *new_key)
        if (new_key == NULL || strcmp("", new_key) == 0)
                return FALSE;
 
+       /* Check that no other windows are using the key */
+       // FIXME: there should be a hidden option to disable this. Maybe some people want
+       // to have logs in two Tildas, and just show them with one key. Crazy...
+       if (tilda_controller_global_key_in_use(TILDA_CONTROLLER(self->controller), new_key))
+               return FALSE;
+
        /* Unbind if we were set */
        if (self->key)
                tomboy_keybinder_unbind (self->key, tilda_window_keybinding_cb);