diff options
author | Jacob Leach <jleach@src.gnome.org> | 2004-02-08 08:49:33 +0000 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2004-02-08 08:49:33 +0000 |
commit | fd4a762d01bdc1eb9417f81b447ce4e1ae89fe9c (patch) | |
tree | 2bb60daf9e3a18bc69a7826bdff55e56d84d2bb3 /capplets | |
parent | b6d4dc7a764bd772d5ff0fcb667add9e4302f786 (diff) | |
download | gnome-control-center-fd4a762d01bdc1eb9417f81b447ce4e1ae89fe9c.tar.gz |
Replace deprecated calls to g_basename and g_dirname with
g_path_get_(basename/dirname). From a patch by Kjartan Maraas,
a.k.a. THE MAN, bug #133174.
Diffstat (limited to 'capplets')
-rw-r--r-- | capplets/file-types/ChangeLog | 6 | ||||
-rw-r--r-- | capplets/file-types/file-types-icon-entry.c | 9 | ||||
-rw-r--r-- | capplets/url-properties/ChangeLog | 5 | ||||
-rw-r--r-- | capplets/url-properties/url-properties.c | 4 |
4 files changed, 20 insertions, 4 deletions
diff --git a/capplets/file-types/ChangeLog b/capplets/file-types/ChangeLog index 40ad5c7a8..82d6a6e73 100644 --- a/capplets/file-types/ChangeLog +++ b/capplets/file-types/ChangeLog @@ -1,3 +1,9 @@ +2004-02-08 Kjartan Maraas <kmaraas@gnome.org> + + * file-types-icon-entry.c: Replace deprecated calls + to g_dirname and g_basename. + (#133174, Kjartan Maraas) + 2004-01-20 Sivaiah Nallagatla <snallagatla@novell.com> * mime-edit-dialog.c (mime_add_dialog_new ) : do not try to set diff --git a/capplets/file-types/file-types-icon-entry.c b/capplets/file-types/file-types-icon-entry.c index 2e416f657..88aef59d7 100644 --- a/capplets/file-types/file-types-icon-entry.c +++ b/capplets/file-types/file-types-icon-entry.c @@ -252,7 +252,7 @@ nautilus_mime_type_show_icon_selection (NautilusMimeIconEntry *icon_entry) { GnomeFileEntry *fe; gchar *p; - gchar *curfile; + gchar *curfile, *filename; GtkWidget *tl; g_return_if_fail (icon_entry != NULL); @@ -281,7 +281,7 @@ nautilus_mime_type_show_icon_selection (NautilusMimeIconEntry *icon_entry) /* figure out the directory */ if (!g_file_test (p, G_FILE_TEST_IS_DIR)) { gchar *d; - d = g_dirname (p); + d = g_path_get_dirname (p); g_free (p); p = d; if (!g_file_test (p, G_FILE_TEST_IS_DIR)) { @@ -348,8 +348,11 @@ nautilus_mime_type_show_icon_selection (NautilusMimeIconEntry *icon_entry) gnome_icon_selection_show_icons(GNOME_ICON_SELECTION(iconsel)); if(curfile) + filename = g_path_get_basename(curfile); + + if(filename) gnome_icon_selection_select_icon(GNOME_ICON_SELECTION(iconsel), - g_basename(curfile)); + filename); /* FIXME: * OK button is handled by caller, Cancel button is handled here. diff --git a/capplets/url-properties/ChangeLog b/capplets/url-properties/ChangeLog index a2b457519..7b1bf6011 100644 --- a/capplets/url-properties/ChangeLog +++ b/capplets/url-properties/ChangeLog @@ -1,3 +1,8 @@ +2004-02-08 Kjartan Maraas <kmaraas@gnome.org> + + * url-properties.c: Replace deprecated call to g_basename. + (#133174, Kjartan Maraas) + 2004-01-14 Jody Goldberg <jody@gnome.org> * Release 2.5.2 diff --git a/capplets/url-properties/url-properties.c b/capplets/url-properties/url-properties.c index e5520dff9..2827a75af 100644 --- a/capplets/url-properties/url-properties.c +++ b/capplets/url-properties/url-properties.c @@ -177,6 +177,7 @@ void url_capplet_refill_clist(void) { GConfEntry *e = l->data; gchar *key = g_strdup (e->key); gchar *value = g_strdup (gconf_value_get_string (gconf_entry_get_value (e))); + gchar *filename = g_path_get_basename (key); int len = strlen(key); if (len > 5 && !strcmp(&key[len-5], "-show")) { @@ -184,7 +185,7 @@ void url_capplet_refill_clist(void) { gint id; /* it is a *-show key */ key[len-5] = '\0'; - row[0] = g_basename (key); + row[0] = filename; row[1] = value; id = gtk_clist_append(GTK_CLIST(clist), row); @@ -193,6 +194,7 @@ void url_capplet_refill_clist(void) { } g_free(key); g_free(value); + g_free(filename); gconf_entry_free (e); } gtk_clist_thaw(GTK_CLIST(clist)); |