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 + + * file-types-icon-entry.c: Replace deprecated calls + to g_dirname and g_basename. + (#133174, Kjartan Maraas) + 2004-01-20 Sivaiah Nallagatla * 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 + + * url-properties.c: Replace deprecated call to g_basename. + (#133174, Kjartan Maraas) + 2004-01-14 Jody Goldberg * 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));