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.
This commit is contained in:
parent
b6d4dc7a76
commit
fd4a762d01
4 changed files with 20 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue