Commit 6c112717 authored by Ramiro Estrugo's avatar Ramiro Estrugo

Some dumb fixes. Use proper guint type for user_level arguments. Fix some

* nautilus-widgets/nautilus-user-level-manager.c:
(nautilus_user_level_manager_get_user_level),
(nautilus_user_level_manager_make_gconf_key),
(nautilus_user_level_manager_make_current_gconf_key),
(nautilus_user_level_manager_get_user_level_as_string):
* nautilus-widgets/nautilus-user-level-manager.h:
* src/nautilus-window-menus.c: (get_customize_user_level_string):
Some dumb fixes.  Use proper guint type for user_level arguments.
Fix some cut-n-pasted code.  Rename "get_user_level_string" to
"get_user_level_as_string"
parent 8bbdacb1
2000-06-02 Ramiro Estrugo <ramiro@eazel.com>
* nautilus-widgets/nautilus-user-level-manager.c:
(nautilus_user_level_manager_get_user_level),
(nautilus_user_level_manager_make_gconf_key),
(nautilus_user_level_manager_make_current_gconf_key),
(nautilus_user_level_manager_get_user_level_as_string):
* nautilus-widgets/nautilus-user-level-manager.h:
* src/nautilus-window-menus.c: (get_customize_user_level_string):
Some dumb fixes. Use proper guint type for user_level arguments.
Fix some cut-n-pasted code. Rename "get_user_level_string" to
"get_user_level_as_string"
2000-06-02 Eskil Heyn Olsen <eskil@eazel.com>
* components/services/install/lib/eazel-install-rpm-glue.c:
......
......@@ -291,7 +291,7 @@ nautilus_user_level_manager_get_user_level (void)
char *user_level_string;
gint index;
user_level_string = nautilus_user_level_manager_get_user_level_string ();
user_level_string = nautilus_user_level_manager_get_user_level_as_string ();
/* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if
* something's wrong.
......@@ -330,7 +330,7 @@ nautilus_user_level_manager_get_user_level_names (void)
char *
nautilus_user_level_manager_make_gconf_key (const char *preference_name,
int user_level)
guint user_level)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
......@@ -357,26 +357,12 @@ nautilus_user_level_manager_make_gconf_key (const char *preference_name,
char *
nautilus_user_level_manager_make_current_gconf_key (const char *preference_name)
{
char *key;
char *user_level_string;
g_return_val_if_fail (preference_name != NULL, NULL);
user_level_string = nautilus_user_level_manager_get_user_level_string ();
g_assert (user_level_string != NULL);
key = g_strdup_printf ("%s/%s/%s",
USER_LEVEL_PATH,
user_level_string,
preference_name);
g_free (user_level_string);
return key;
return nautilus_user_level_manager_make_gconf_key (preference_name,
nautilus_user_level_manager_get_user_level ());
}
char *
nautilus_user_level_manager_get_user_level_string (void)
nautilus_user_level_manager_get_user_level_as_string (void)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
char *user_level_string;
......
......@@ -46,8 +46,8 @@ guint nautilus_user_level_manager_get_num_user_levels
NautilusStringList *nautilus_user_level_manager_get_user_level_names (void);
char *nautilus_user_level_manager_make_current_gconf_key (const char *preference_name);
char *nautilus_user_level_manager_make_gconf_key (const char *preference_name,
int user_level);
char *nautilus_user_level_manager_get_user_level_string (void);
guint user_level);
char *nautilus_user_level_manager_get_user_level_as_string (void);
BEGIN_GNOME_DECLS
......
......@@ -291,7 +291,7 @@ nautilus_user_level_manager_get_user_level (void)
char *user_level_string;
gint index;
user_level_string = nautilus_user_level_manager_get_user_level_string ();
user_level_string = nautilus_user_level_manager_get_user_level_as_string ();
/* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if
* something's wrong.
......@@ -330,7 +330,7 @@ nautilus_user_level_manager_get_user_level_names (void)
char *
nautilus_user_level_manager_make_gconf_key (const char *preference_name,
int user_level)
guint user_level)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
......@@ -357,26 +357,12 @@ nautilus_user_level_manager_make_gconf_key (const char *preference_name,
char *
nautilus_user_level_manager_make_current_gconf_key (const char *preference_name)
{
char *key;
char *user_level_string;
g_return_val_if_fail (preference_name != NULL, NULL);
user_level_string = nautilus_user_level_manager_get_user_level_string ();
g_assert (user_level_string != NULL);
key = g_strdup_printf ("%s/%s/%s",
USER_LEVEL_PATH,
user_level_string,
preference_name);
g_free (user_level_string);
return key;
return nautilus_user_level_manager_make_gconf_key (preference_name,
nautilus_user_level_manager_get_user_level ());
}
char *
nautilus_user_level_manager_get_user_level_string (void)
nautilus_user_level_manager_get_user_level_as_string (void)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
char *user_level_string;
......
......@@ -46,8 +46,8 @@ guint nautilus_user_level_manager_get_num_user_levels
NautilusStringList *nautilus_user_level_manager_get_user_level_names (void);
char *nautilus_user_level_manager_make_current_gconf_key (const char *preference_name);
char *nautilus_user_level_manager_make_gconf_key (const char *preference_name,
int user_level);
char *nautilus_user_level_manager_get_user_level_string (void);
guint user_level);
char *nautilus_user_level_manager_get_user_level_as_string (void);
BEGIN_GNOME_DECLS
......
......@@ -291,7 +291,7 @@ nautilus_user_level_manager_get_user_level (void)
char *user_level_string;
gint index;
user_level_string = nautilus_user_level_manager_get_user_level_string ();
user_level_string = nautilus_user_level_manager_get_user_level_as_string ();
/* FIXME: Asserting based on something that's read from GConf
* seems like a bad idea. It means we core dump if
* something's wrong.
......@@ -330,7 +330,7 @@ nautilus_user_level_manager_get_user_level_names (void)
char *
nautilus_user_level_manager_make_gconf_key (const char *preference_name,
int user_level)
guint user_level)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
......@@ -357,26 +357,12 @@ nautilus_user_level_manager_make_gconf_key (const char *preference_name,
char *
nautilus_user_level_manager_make_current_gconf_key (const char *preference_name)
{
char *key;
char *user_level_string;
g_return_val_if_fail (preference_name != NULL, NULL);
user_level_string = nautilus_user_level_manager_get_user_level_string ();
g_assert (user_level_string != NULL);
key = g_strdup_printf ("%s/%s/%s",
USER_LEVEL_PATH,
user_level_string,
preference_name);
g_free (user_level_string);
return key;
return nautilus_user_level_manager_make_gconf_key (preference_name,
nautilus_user_level_manager_get_user_level ());
}
char *
nautilus_user_level_manager_get_user_level_string (void)
nautilus_user_level_manager_get_user_level_as_string (void)
{
NautilusUserLevelManager *manager = nautilus_user_level_manager_get ();
char *user_level_string;
......
......@@ -46,8 +46,8 @@ guint nautilus_user_level_manager_get_num_user_levels
NautilusStringList *nautilus_user_level_manager_get_user_level_names (void);
char *nautilus_user_level_manager_make_current_gconf_key (const char *preference_name);
char *nautilus_user_level_manager_make_gconf_key (const char *preference_name,
int user_level);
char *nautilus_user_level_manager_get_user_level_string (void);
guint user_level);
char *nautilus_user_level_manager_get_user_level_as_string (void);
BEGIN_GNOME_DECLS
......
......@@ -1217,7 +1217,7 @@ get_customize_user_level_string (void)
char *capitalized_user_level_string;
char *title;
user_level_string = nautilus_user_level_manager_get_user_level_string ();
user_level_string = nautilus_user_level_manager_get_user_level_as_string ();
g_assert (user_level_string != NULL);
capitalized_user_level_string = nautilus_str_capitalize (user_level_string);
......
......@@ -1217,7 +1217,7 @@ get_customize_user_level_string (void)
char *capitalized_user_level_string;
char *title;
user_level_string = nautilus_user_level_manager_get_user_level_string ();
user_level_string = nautilus_user_level_manager_get_user_level_as_string ();
g_assert (user_level_string != NULL);
capitalized_user_level_string = nautilus_str_capitalize (user_level_string);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment