diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-01-10 21:31:33 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2012-05-15 18:40:26 +0800 |
commit | 9ca45ec3003e83b1f054bfc1f1ecf5c820c6eeca (patch) | |
tree | 1407f9203aaac10732750dbe86b3d9fe3cf1e9ea /src | |
parent | dc9eca230ab16dad1cb3462bebcd23f7101668df (diff) | |
download | gsoc2013-empathy-9ca45ec3003e83b1f054bfc1f1ecf5c820c6eeca.tar gsoc2013-empathy-9ca45ec3003e83b1f054bfc1f1ecf5c820c6eeca.tar.gz gsoc2013-empathy-9ca45ec3003e83b1f054bfc1f1ecf5c820c6eeca.tar.bz2 gsoc2013-empathy-9ca45ec3003e83b1f054bfc1f1ecf5c820c6eeca.tar.lz gsoc2013-empathy-9ca45ec3003e83b1f054bfc1f1ecf5c820c6eeca.tar.xz gsoc2013-empathy-9ca45ec3003e83b1f054bfc1f1ecf5c820c6eeca.tar.zst gsoc2013-empathy-9ca45ec3003e83b1f054bfc1f1ecf5c820c6eeca.zip |
EmpathyMainWindow: inherit from GtkApplicationWindow
That's recommended for a better GNOME 3 integration.
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-roster-window.c | 8 | ||||
-rw-r--r-- | src/empathy-roster-window.h | 6 | ||||
-rw-r--r-- | src/empathy.c | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c index 8e4230488..77b328e9d 100644 --- a/src/empathy-roster-window.c +++ b/src/empathy-roster-window.c @@ -100,7 +100,7 @@ enum PROP_SHELL_RUNNING }; -G_DEFINE_TYPE (EmpathyRosterWindow, empathy_roster_window, GTK_TYPE_WINDOW); +G_DEFINE_TYPE (EmpathyRosterWindow, empathy_roster_window, GTK_TYPE_APPLICATION_WINDOW) struct _EmpathyRosterWindowPriv { EmpathyIndividualStore *individual_store; @@ -2748,7 +2748,9 @@ empathy_roster_window_init (EmpathyRosterWindow *self) } GtkWidget * -empathy_roster_window_dup (void) +empathy_roster_window_new (GtkApplication *app) { - return g_object_new (EMPATHY_TYPE_ROSTER_WINDOW, NULL); + return g_object_new (EMPATHY_TYPE_ROSTER_WINDOW, + "application", app, + NULL); } diff --git a/src/empathy-roster-window.h b/src/empathy-roster-window.h index 54404ad38..82fedb79d 100644 --- a/src/empathy-roster-window.h +++ b/src/empathy-roster-window.h @@ -41,18 +41,18 @@ typedef struct _EmpathyRosterWindowPriv EmpathyRosterWindowPriv; struct _EmpathyRosterWindow { - GtkWindow parent; + GtkApplicationWindow parent; EmpathyRosterWindowPriv *priv; }; struct _EmpathyRosterWindowClass { - GtkWindowClass parent_class; + GtkApplicationWindowClass parent_class; }; GType empathy_roster_window_get_type (void); -GtkWidget *empathy_roster_window_dup (void); +GtkWidget * empathy_roster_window_new (GtkApplication *app); void empathy_roster_window_show_preferences (EmpathyRosterWindow *self, const gchar *tab); diff --git a/src/empathy.c b/src/empathy.c index 548a5e79f..712632f7e 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -350,7 +350,7 @@ empathy_app_command_line (GApplication *app, self->activated = TRUE; /* Setting up UI */ - self->window = empathy_roster_window_dup (); + self->window = empathy_roster_window_new (GTK_APPLICATION (app)); gtk_application_add_window (GTK_APPLICATION (app), GTK_WINDOW (self->window)); |