[gnome-photos] application, main: Simplify code
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] application, main: Simplify code
- Date: Fri, 10 Feb 2017 08:54:07 +0000 (UTC)
commit af2db9947f626f54aef26f496d884443fdd2fb82
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Feb 10 09:40:43 2017 +0100
application, main: Simplify code
There is only one caller of photos_application_new, and there is very
little likelihood of it using the GtkApplication API.
src/photos-application.c | 2 +-
src/photos-application.h | 2 +-
src/photos-main.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index e089a46..86c21d3 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -2007,7 +2007,7 @@ photos_application_search_context_iface_init (PhotosSearchContextInterface *ifac
}
-GtkApplication *
+GApplication *
photos_application_new (void)
{
return g_object_new (PHOTOS_TYPE_APPLICATION,
diff --git a/src/photos-application.h b/src/photos-application.h
index d2a4f60..416a705 100644
--- a/src/photos-application.h
+++ b/src/photos-application.h
@@ -34,7 +34,7 @@ G_BEGIN_DECLS
#define PHOTOS_TYPE_APPLICATION (photos_application_get_type ())
G_DECLARE_FINAL_TYPE (PhotosApplication, photos_application, PHOTOS, APPLICATION, GtkApplication);
-GtkApplication *photos_application_new (void);
+GApplication *photos_application_new (void);
GomMiner *photos_application_get_miner (PhotosApplication *self, const gchar
*provider_type);
diff --git a/src/photos-main.c b/src/photos-main.c
index d2419d3..ef47ce0 100644
--- a/src/photos-main.c
+++ b/src/photos-main.c
@@ -50,7 +50,7 @@ gint
main (gint argc, gchar *argv[])
{
EggCounterArena *counter_arena;
- GtkApplication *app;
+ GApplication *app;
PhotosRemoteDisplayManager *remote_display_mngr;
gint exit_status;
@@ -66,10 +66,10 @@ main (gint argc, gchar *argv[])
app = photos_application_new ();
if (g_getenv ("GNOME_PHOTOS_PERSIST") != NULL)
- g_application_hold (G_APPLICATION (app));
+ g_application_hold (app);
remote_display_mngr = photos_remote_display_manager_dup_singleton ();
- exit_status = g_application_run (G_APPLICATION (app), argc, argv);
+ exit_status = g_application_run (app, argc, argv);
g_object_unref (remote_display_mngr);
g_object_unref (app);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]