[devhelp] App: remove dh_app_new_window() public function
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] App: remove dh_app_new_window() public function
- Date: Wed, 20 Dec 2017 15:11:22 +0000 (UTC)
commit 08bb33e4e6e829c6c92b11b27d6c5580f6a7118d
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Dec 20 15:23:00 2017 +0100
App: remove dh_app_new_window() public function
Used only in dh-app.c.
Add also my copyright, I've already done a lot of commits in DhApp.
src/dh-app.c | 17 +++++------------
src/dh-app.h | 3 +--
2 files changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/src/dh-app.c b/src/dh-app.c
index c5c1e12..13172c8 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -4,6 +4,7 @@
* Copyright (C) 2002 Mikael Hallendal <micke imendio com>
* Copyright (C) 2004-2008 Imendio AB
* Copyright (C) 2012 Aleksander Morgado <aleksander gnu org>
+ * Copyright (C) 2017 Sébastien Wilmet <swilmet gnome org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -287,9 +288,9 @@ dh_app_startup (GApplication *application)
}
static void
-dh_app_activate (GApplication *application)
+dh_app_activate (GApplication *app)
{
- dh_app_new_window (DH_APP (application));
+ g_action_group_activate_action (G_ACTION_GROUP (app), "new-window", NULL);
}
static gboolean option_version;
@@ -359,7 +360,7 @@ dh_app_command_line (GApplication *g_app,
}
if (option_new_window)
- dh_app_new_window (app);
+ g_action_group_activate_action (G_ACTION_GROUP (app), "new-window", NULL);
if (option_search != NULL)
g_action_group_activate_action (G_ACTION_GROUP (app),
@@ -426,16 +427,8 @@ dh_app_peek_first_window (DhApp *app)
}
/* Create a new window */
- dh_app_new_window (app);
+ g_action_group_activate_action (G_ACTION_GROUP (app), "new-window", NULL);
/* And look for the newly created window again */
return dh_app_peek_first_window (app);
}
-
-void
-dh_app_new_window (DhApp *app)
-{
- g_return_if_fail (DH_IS_APP (app));
-
- g_action_group_activate_action (G_ACTION_GROUP (app), "new-window", NULL);
-}
diff --git a/src/dh-app.h b/src/dh-app.h
index 1456738..90d03d5 100644
--- a/src/dh-app.h
+++ b/src/dh-app.h
@@ -1,6 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2012 Aleksander Morgado <aleksander gnu org>
+ * Copyright (C) 2017 Sébastien Wilmet <swilmet gnome org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -47,8 +48,6 @@ DhApp * dh_app_new (void);
GtkWindow * dh_app_peek_first_window (DhApp *app);
-void dh_app_new_window (DhApp *app);
-
G_END_DECLS
#endif /* DH_APP_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]