]> git.0d.be Git - empathy.git/blobdiff - src/empathy.c
use a single window, with tabs
[empathy.git] / src / empathy.c
index 5cfe9f38bb02704e4d12cc26d3e6ad70974e1e75..fa71d706640e778bc626cbbbbd7b2991778d7f0f 100644 (file)
@@ -24,6 +24,7 @@
 #include <glib/gstdio.h>
 #include <glib/gi18n.h>
 #include <libnotify/notify.h>
+#include <tp-account-widgets/tpaw-utils.h>
 
 #ifdef HAVE_LIBCHAMPLAIN
 #include <clutter-gtk/clutter-gtk.h>
@@ -31,6 +32,7 @@
 
 #include "empathy-accounts-common.h"
 #include "empathy-accounts-dialog.h"
+#include "empathy-bus-names.h"
 #include "empathy-chatroom-manager.h"
 #include "empathy-client-factory.h"
 #include "empathy-connection-aggregator.h"
@@ -49,8 +51,6 @@
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
 #include "empathy-debug.h"
 
-#define EMPATHY_DBUS_NAME "org.gnome.Empathy"
-
 #define EMPATHY_TYPE_APP (empathy_app_get_type ())
 #define EMPATHY_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_APP, EmpathyApp))
 #define EMPATHY_APP_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), EMPATHY_TYPE_APP, EmpathyAppClass))
@@ -317,6 +317,10 @@ empathy_app_activate (GApplication *app)
           "<Primary>h",
           "win." EMPATHY_PREFS_UI_SHOW_OFFLINE,
           NULL);
+      gtk_application_add_accelerator (GTK_APPLICATION (app),
+          "<Control>Page_Up", "win.tab_prev", NULL);
+      gtk_application_add_accelerator (GTK_APPLICATION (app),
+          "<Control>Page_Down", "win.tab_next", NULL);
 
       /* check if Shell is running */
       dbus = tp_dbus_daemon_dup (&error);
@@ -342,7 +346,7 @@ empathy_app_activate (GApplication *app)
   else
     {
       if (!self->start_hidden)
-        empathy_window_present (GTK_WINDOW (self->window));
+        tpaw_window_present (GTK_WINDOW (self->window));
     }
 
   /* Display the accounts dialog if needed */
@@ -421,7 +425,7 @@ empathy_app_local_command_line (GApplication *app,
 
   if (!g_application_register (app, NULL, &error))
     {
-      g_warning("Impossible to register empathy: %s", error->message);
+      g_warning ("Impossible to register empathy: %s", error->message);
       g_clear_error (&error);
       *exit_status = EXIT_FAILURE;
       return retval;
@@ -836,7 +840,7 @@ main (int argc, char *argv[])
   add_empathy_features ();
 
   app = g_object_new (EMPATHY_TYPE_APP,
-      "application-id", EMPATHY_DBUS_NAME,
+      "application-id", EMPATHY_CHAT_BUS_NAME,
       NULL);
 
   retval = g_application_run (G_APPLICATION (app), argc, argv);