1999-02-04 Jonathan Blandford <jrb@redhat.com>

* gnome-file-property-dialog.c (apply_uid_group_change): Bug fix.
	(apply_metadata_change): Another bug fix.
This commit is contained in:
Jonathan Blandford 1999-02-04 18:53:25 +00:00
parent 3d3e5f97a1
commit fc0a9456a0
2 changed files with 69 additions and 55 deletions

View File

@ -1,3 +1,8 @@
1999-02-04 Jonathan Blandford <jrb@redhat.com>
* gnome-file-property-dialog.c (apply_uid_group_change): Bug fix.
(apply_metadata_change): Another bug fix.
1999-02-03 Federico Mena Quintero <federico@nuclecu.unam.mx> 1999-02-03 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdnd.c (gdnd_validate_action): Show the correct feedback when * gdnd.c (gdnd_validate_action): Show the correct feedback when

View File

@ -139,7 +139,7 @@ create_general_properties (GnomeFilePropertyDialog *fp_dlg)
direc = g_strdup (fp_dlg->file_name); direc = g_strdup (fp_dlg->file_name);
strrchr (direc, '/')[0] = '\0'; strrchr (direc, '/')[0] = '\0';
fe = file_entry_from_file (fp_dlg->file_name); fe = file_entry_from_file (fp_dlg->file_name);
fp_dlg->im = gicon_get_icon_for_file (direc, fe); fp_dlg->im = gicon_get_icon_for_file_speed (direc, fe, FALSE);
g_free (direc); g_free (direc);
icon = gnome_pixmap_new_from_imlib (fp_dlg->im); icon = gnome_pixmap_new_from_imlib (fp_dlg->im);
gtk_box_pack_start (GTK_BOX (vbox), icon, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), icon, FALSE, FALSE, 0);
@ -385,6 +385,7 @@ generate_icon_sel (GnomeFilePropertyDialog *fp_dlg)
icon = gicon_image_to_name (fp_dlg->im); icon = gicon_image_to_name (fp_dlg->im);
if (!icon || !icon[0]) if (!icon || !icon[0])
return retval; return retval;
g_print ("icon:%s:\n",icon);
gnome_icon_entry_set_icon (GNOME_ICON_ENTRY (retval), icon); gnome_icon_entry_set_icon (GNOME_ICON_ENTRY (retval), icon);
return retval; return retval;
} }
@ -1027,6 +1028,9 @@ apply_uid_group_change (GnomeFilePropertyDialog *fpd)
} }
/* now we check the group */ /* now we check the group */
/* We are only a combo if we are sensitive, and we only want to check if we are
* sensitive. */
if (GTK_WIDGET_IS_SENSITIVE (fpd->group_entry))
new_group_name = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (fpd->group_entry)->entry)); new_group_name = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (fpd->group_entry)->entry));
if (fpd->group_name && new_group_name && strcmp (fpd->group_name, new_group_name)) { if (fpd->group_name && new_group_name && strcmp (fpd->group_name, new_group_name)) {
@ -1087,6 +1091,10 @@ apply_metadata_change (GnomeFilePropertyDialog *fpd)
gchar *text; gchar *text;
gchar *icon_name; gchar *icon_name;
/* If we don't have an open_cbox, that means we have no metadata
* to set.
*/
if (fpd->open_cbox != NULL) {
if (!GTK_TOGGLE_BUTTON (fpd->open_cbox)->active) { if (!GTK_TOGGLE_BUTTON (fpd->open_cbox)->active) {
text = gtk_entry_get_text (GTK_ENTRY (fpd->open_entry)); text = gtk_entry_get_text (GTK_ENTRY (fpd->open_entry));
if (text && text[0]) if (text && text[0])
@ -1150,10 +1158,11 @@ apply_metadata_change (GnomeFilePropertyDialog *fpd)
"edit"); "edit");
} }
} }
}
if (!fpd->can_set_icon) if (!fpd->can_set_icon)
return 1; return 1;
/* And finally, we set the metadata on the icon filename */ /* And finally, we set the metadata on the icon filename */
text = gtk_entry_get_text (GTK_ENTRY (gnome_icon_entry_gtk_entry (GNOME_ICON_ENTRY (fpd->button)))); text = gnome_icon_entry_get_filename (GNOME_ICON_ENTRY (fpd->button)); /*gtk_entry_get_text (GTK_ENTRY (gnome_icon_entry_gtk_entry (GNOME_ICON_ENTRY (fpd->button))));*/
icon_name = gicon_image_to_name (fpd->im); icon_name = gicon_image_to_name (fpd->im);
if (text) { if (text) {
if (strcmp (text, icon_name)) if (strcmp (text, icon_name))