Add single-instance detection
[tilda-gobject.git] / tilda-window.c
index 85fa02b..c5ac71a 100644 (file)
@@ -1,6 +1,9 @@
+#include <string.h>
+
 #include "tilda.h"
 #include "tilda-window.h"
 #include "tilda-window-dbus-glue.h"
+#include "tomboykeybinder.h"
 
 /**
  * Find the TildaTerminal corresponding to the currently selected
@@ -81,7 +84,7 @@ tilda_window_add_term (TildaWindow *tw)
        GtkWidget *label = gtk_label_new ("Tilda");
        gint index = gtk_notebook_prepend_page (GTK_NOTEBOOK(tw->notebook), tt->hbox, label);
        gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK(tw->notebook), tt->hbox, TRUE, TRUE, GTK_PACK_END);
-       //gtk_notebook_set_current_page (GTK_NOTEBOOK(tw->notebook), index);
+       gtk_notebook_set_current_page (GTK_NOTEBOOK(tw->notebook), index);
 
        if (gtk_notebook_get_n_pages (GTK_NOTEBOOK(tw->notebook)) > 1)
                gtk_notebook_set_show_tabs (GTK_NOTEBOOK(tw->notebook), TRUE);
@@ -273,7 +276,7 @@ tilda_window_try_to_bind_key (TildaWindow *self, const gchar *new_key)
 
        /* Unbind if we were set */
        if (self->key)
-               tomboy_keybinder_unbind (self->key, tilda_window_keybinding_cb, self);
+               tomboy_keybinder_unbind (self->key, tilda_window_keybinding_cb);
 
        ret = tomboy_keybinder_bind (new_key, tilda_window_keybinding_cb, self);