[gnome-session] gsm: Remove duplicated code
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] gsm: Remove duplicated code
- Date: Tue, 27 Mar 2012 08:35:49 +0000 (UTC)
commit 97dd8abb2e91ace479154b74077e7c86f5bc2ca0
Author: Vincent Untz <vuntz gnome org>
Date: Fri Mar 23 17:06:56 2012 +0100
gsm: Remove duplicated code
https://bugzilla.gnome.org/show_bug.cgi?id=672419
gnome-session/gsm-manager.c | 24 ++++--------------------
1 files changed, 4 insertions(+), 20 deletions(-)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index 6d01b98..96747f7 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -352,9 +352,9 @@ _find_by_cookie (const char *id,
}
static gboolean
-_find_by_startup_id (const char *id,
- GsmClient *client,
- const char *startup_id_a)
+_client_has_startup_id (const char *id,
+ GsmClient *client,
+ const char *startup_id_a)
{
const char *startup_id_b;
@@ -378,7 +378,7 @@ app_condition_changed (GsmApp *app,
condition);
client = (GsmClient *)gsm_store_find (manager->priv->clients,
- (GsmStoreFunc)_find_by_startup_id,
+ (GsmStoreFunc)_client_has_startup_id,
(char *)gsm_app_peek_startup_id (app));
if (condition) {
@@ -2098,22 +2098,6 @@ gsm_manager_get_failsafe (GsmManager *manager)
return manager->priv->failsafe;
}
-static gboolean
-_client_has_startup_id (const char *id,
- GsmClient *client,
- const char *startup_id_a)
-{
- const char *startup_id_b;
-
- startup_id_b = gsm_client_peek_startup_id (client);
-
- if (IS_STRING_EMPTY (startup_id_b)) {
- return FALSE;
- }
-
- return (strcmp (startup_id_a, startup_id_b) == 0);
-}
-
static void
on_client_disconnected (GsmClient *client,
GsmManager *manager)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]