#include <glib.h>
Go to the source code of this file.
Functions | |
G_BEGIN_DECLS void | show_registry (GConfClient *client, const char **paths) |
Print all entries in and under given path, recursively. | |
void | show_entry (GConfClient *client, GConfEntry *entry) |
Print a single entries. |
void show_entry | ( | GConfClient * | client, | |
GConfEntry * | entry | |||
) |
Print a single entries.
---------------------------------------------------------------------------
Name : show_entry
client | GConf client handle | |
entry | GConf entry |
--------------------------------------------------------------------------
Definition at line 84 of file show.c.
References UNUSED.
Referenced by dump_entries(), export_gconf_entry(), key_changed_callback(), and show_key().
00085 { 00086 UNUSED(client); 00087 GConfValue *value = gconf_entry_get_value(entry); 00088 gboolean is_default = gconf_entry_get_is_default(entry); 00089 gboolean is_writable = gconf_entry_get_is_writable(entry); 00090 00091 g_print("Key %s\t", entry->key); 00092 00093 if (value) 00094 { 00095 g_print("%s%s", (is_default ? " DEFAULT" : ""), (is_writable ? " WRITABLE" : "")); 00096 00097 switch (value->type) 00098 { 00099 case GCONF_VALUE_STRING: 00100 g_print(" STRING\t`%s`", gconf_value_get_string(value)); 00101 break; 00102 00103 case GCONF_VALUE_INT: 00104 g_print(" INT\t %d", gconf_value_get_int(value)); 00105 break; 00106 00107 case GCONF_VALUE_FLOAT: 00108 g_print(" FLOAT\t %f", gconf_value_get_float(value)); 00109 break; 00110 00111 case GCONF_VALUE_BOOL: 00112 g_print(" BOOL\t %s", (gconf_value_get_bool(value) ? "true" : "false")); 00113 break; 00114 00115 case GCONF_VALUE_SCHEMA: 00116 g_print(" SCHEMA (data not shown for this type)"); 00117 break; 00118 00119 case GCONF_VALUE_LIST: 00120 { 00121 g_print(" LIST of "); 00122 GSList *valuelist = gconf_value_get_list(value); 00123 gsize len = g_slist_length(valuelist); 00124 00125 switch (gconf_value_get_list_type(value)) 00126 { 00127 case GCONF_VALUE_STRING: 00128 g_print("%d STRINGS\t", len); 00129 while (valuelist!=NULL) 00130 { 00131 g_print("%s;", gconf_value_get_string(valuelist->data)); 00132 valuelist=valuelist->next; 00133 } 00134 break; 00135 00136 case GCONF_VALUE_INT: 00137 g_print("%d INTS\t", len); 00138 while (valuelist!=NULL) 00139 { 00140 g_print("%d;", gconf_value_get_int(valuelist->data)); 00141 valuelist=valuelist->next; 00142 } 00143 break; 00144 00145 case GCONF_VALUE_FLOAT: 00146 g_print("%d FLOATS\t", len); 00147 while (valuelist!=NULL) 00148 { 00149 g_print("%f;", gconf_value_get_float(valuelist->data)); 00150 valuelist=valuelist->next; 00151 } 00152 break; 00153 00154 case GCONF_VALUE_BOOL: 00155 g_print("%d BOOLS\t", len); 00156 while (valuelist!=NULL) 00157 { 00158 g_print("%s;", (gconf_value_get_bool(valuelist->data) ? "true" : "false")); 00159 valuelist=valuelist->next; 00160 } 00161 break; 00162 00163 default: 00164 g_print("Unsupported data type %d\n", value->type); 00165 break; 00166 } 00167 00168 g_slist_free(valuelist); 00169 } 00170 break; 00171 00172 case GCONF_VALUE_PAIR: 00173 g_print(" PAIR (data not shown for this type)"); 00174 break; 00175 00176 case GCONF_VALUE_INVALID: 00177 default: 00178 g_print(" has invalid type"); 00179 break; 00180 } 00181 } 00182 else 00183 { 00184 g_print(" has invalid type"); 00185 } 00186 00187 g_print("\n"); 00188 }
G_BEGIN_DECLS void show_registry | ( | GConfClient * | client, | |
const char ** | paths | |||
) |
Print all entries in and under given path, recursively.
Description: Copyright (C) 2008 iRex Technologies B.V. All rights reserved.---------------------------------------------------------------------------
Name : show_registry
client | GConf client handle | |
paths | Array of paths |
--------------------------------------------------------------------------
Definition at line 76 of file show.c.
References dump_dir().
Referenced by main().