1
1

1999-01-17 Miguel de Icaza <miguel@nuclecu.unam.mx>

* gpageprop.c (item_properties): Use the metadata information for this.
	(item_properties): Set the icon-filename metadata bit
Этот коммит содержится в:
Miguel de Icaza 1999-01-18 18:04:41 +00:00
родитель 9f2f16a96b
Коммит 66eb02ef08
3 изменённых файлов: 27 добавлений и 9 удалений

Просмотреть файл

@ -1,3 +1,8 @@
1999-01-17 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gpageprop.c (item_properties): Use the metadata information for this.
(item_properties): Set the icon-filename metadata bit
1999-01-15 Miguel de Icaza <miguel@nuclecu.unam.mx>
* glayout.c (create_new_menu_from): Handle both the system dir and

Просмотреть файл

@ -66,6 +66,9 @@ item_properties (GtkWidget *parent, char *fname, DesktopIconInfo *dii)
char *new_title;
char *new_name;
char *base;
char *icon_filename;
int size;
struct stat s;
int retval = 0;
@ -84,14 +87,14 @@ item_properties (GtkWidget *parent, char *fname, DesktopIconInfo *dii)
/* Create the property widgets */
mc_stat (fname, &s);
base = x_basename (fname);
vbox = gtk_vbox_new (FALSE, 6);
name = gprop_filename_new (fname, base);
gtk_box_pack_start (GTK_BOX (vbox), name->top, FALSE, FALSE, 0);
if (dii) {
gene = gprop_general_new(fname, base);
gnome_metadata_get (fname, "icon-filename", &size, &icon_filename);
gene = gprop_general_new(fname, icon_filename);
gtk_box_pack_start (GTK_BOX (vbox), gene->top, FALSE, FALSE, 0);
}
@ -133,6 +136,7 @@ item_properties (GtkWidget *parent, char *fname, DesktopIconInfo *dii)
if (prop_dialog_result != 0) {
gtk_widget_destroy (GTK_WIDGET (toplevel));
g_free (icon_filename);
return 0; /* nothing changed */
}
@ -222,7 +226,13 @@ item_properties (GtkWidget *parent, char *fname, DesktopIconInfo *dii)
/* Check and change title and icon -- change is handled by caller */
if (dii) {
gprop_general_get_data (gene, &new_title, NULL);
char *new_icon;
gprop_general_get_data (gene, &new_title, &new_icon);
if (strcmp (new_icon, icon_filename) != 0)
gnome_metadata_set (fname, "icon-filename", strlen (new_icon)+1, new_icon);
desktop_icon_set_text(DESKTOP_ICON(dii->dicon), new_title);
g_free(new_title);
@ -230,5 +240,6 @@ item_properties (GtkWidget *parent, char *fname, DesktopIconInfo *dii)
}
gtk_widget_destroy (GTK_WIDGET (toplevel));
g_free (icon_filename);
return retval;
}

Просмотреть файл

@ -483,7 +483,9 @@ gprop_general_new (char *title, char *icon_filename)
GtkWidget *entry;
g_return_val_if_fail (title != NULL, NULL);
g_return_val_if_fail (icon_filename != NULL, NULL);
if (!icon_filename)
icon_filename = ICONDIR "i-regular.png";
gp = g_new (GpropGeneral, 1);