[glib] Shorten a variable name
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Shorten a variable name
- Date: Thu, 8 Dec 2011 23:13:02 +0000 (UTC)
commit d6f2281329ca6b70e63537d41b2b6cf0b9aa94ef
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Nov 28 20:37:07 2011 -0500
Shorten a variable name
gio/gmenuexporter.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/gio/gmenuexporter.c b/gio/gmenuexporter.c
index 6d9df45..87e2ca3 100644
--- a/gio/gmenuexporter.c
+++ b/gio/gmenuexporter.c
@@ -857,7 +857,7 @@ g_menu_exporter_new (GDBusConnection *connection,
/* {{{1 Public API */
-static GHashTable *g_menu_exporter_exported_menus;
+static GHashTable *exported_menus;
/**
* g_menu_model_dbus_export_start:
@@ -891,12 +891,13 @@ g_menu_model_dbus_export_start (GDBusConnection *connection,
{
GMenuExporter *exporter;
- if G_UNLIKELY (g_menu_exporter_exported_menus == NULL)
- g_menu_exporter_exported_menus = g_hash_table_new (NULL, NULL);
+ if G_UNLIKELY (exported_menus == NULL)
+ exported_menus = g_hash_table_new (NULL, NULL);
- if G_UNLIKELY (g_hash_table_lookup (g_menu_exporter_exported_menus, menu))
+ if G_UNLIKELY (g_hash_table_lookup (exported_menus, menu))
{
- g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_FILE_EXISTS, "The given GMenuModel has already been exported");
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_FILE_EXISTS,
+ "The given GMenuModel has already been exported");
return FALSE;
}
@@ -905,7 +906,7 @@ g_menu_model_dbus_export_start (GDBusConnection *connection,
if (exporter == NULL)
return FALSE;
- g_hash_table_insert (g_menu_exporter_exported_menus, menu, exporter);
+ g_hash_table_insert (exported_menus, menu, exporter);
return TRUE;
}
@@ -927,14 +928,14 @@ g_menu_model_dbus_export_stop (GMenuModel *menu)
{
GMenuExporter *exporter;
- if G_UNLIKELY (g_menu_exporter_exported_menus == NULL)
+ if G_UNLIKELY (exported_menus == NULL)
return FALSE;
- exporter = g_hash_table_lookup (g_menu_exporter_exported_menus, menu);
+ exporter = g_hash_table_lookup (exported_menus, menu);
if G_UNLIKELY (exporter == NULL)
return FALSE;
- g_hash_table_remove (g_menu_exporter_exported_menus, menu);
+ g_hash_table_remove (exported_menus, menu);
g_menu_exporter_free (exporter);
return TRUE;
@@ -965,10 +966,10 @@ g_menu_model_dbus_export_query (GMenuModel *menu,
{
GMenuExporter *exporter;
- if (g_menu_exporter_exported_menus == NULL)
+ if (exported_menus == NULL)
return FALSE;
- exporter = g_hash_table_lookup (g_menu_exporter_exported_menus, menu);
+ exporter = g_hash_table_lookup (exported_menus, menu);
if (exporter == NULL)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]