mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-24 12:12:19 +03:00
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:
parent
3d3e5f97a1
commit
fc0a9456a0
@ -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
|
||||||
|
@ -139,12 +139,12 @@ 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);
|
||||||
|
|
||||||
/* we set the file part */
|
/* we set the file part */
|
||||||
gen_string = g_strconcat (_("Full Name: "), fp_dlg->file_name, NULL);
|
gen_string = g_strconcat (_("Full Name: "), fp_dlg->file_name, NULL);
|
||||||
label = gtk_label_new (gen_string);
|
label = gtk_label_new (gen_string);
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||||
@ -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,7 +1028,10 @@ apply_uid_group_change (GnomeFilePropertyDialog *fpd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* now we check the group */
|
/* now we check the group */
|
||||||
new_group_name = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (fpd->group_entry)->entry));
|
/* 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));
|
||||||
|
|
||||||
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)) {
|
||||||
g = getgrnam (new_group_name);
|
g = getgrnam (new_group_name);
|
||||||
@ -1087,73 +1091,78 @@ apply_metadata_change (GnomeFilePropertyDialog *fpd)
|
|||||||
gchar *text;
|
gchar *text;
|
||||||
gchar *icon_name;
|
gchar *icon_name;
|
||||||
|
|
||||||
if (!GTK_TOGGLE_BUTTON (fpd->open_cbox)->active) {
|
/* If we don't have an open_cbox, that means we have no metadata
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (fpd->open_entry));
|
* to set.
|
||||||
if (text && text[0])
|
*/
|
||||||
gnome_metadata_set (fpd->file_name,
|
if (fpd->open_cbox != NULL) {
|
||||||
"fm-open",
|
if (!GTK_TOGGLE_BUTTON (fpd->open_cbox)->active) {
|
||||||
strlen (text) + 1,
|
text = gtk_entry_get_text (GTK_ENTRY (fpd->open_entry));
|
||||||
text);
|
|
||||||
else
|
|
||||||
gnome_metadata_remove (fpd->file_name,
|
|
||||||
"fm-open");
|
|
||||||
} else {
|
|
||||||
if (fpd->fm_open)
|
|
||||||
gnome_metadata_remove (fpd->file_name,
|
|
||||||
"fm-open");
|
|
||||||
}
|
|
||||||
if (fpd->executable) {
|
|
||||||
if (!GTK_TOGGLE_BUTTON (fpd->prop1_cbox)->active) {
|
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (fpd->prop1_entry));
|
|
||||||
if (text && text[0])
|
if (text && text[0])
|
||||||
gnome_metadata_set (fpd->file_name,
|
gnome_metadata_set (fpd->file_name,
|
||||||
"drop-target",
|
"fm-open",
|
||||||
strlen (text) + 1,
|
strlen (text) + 1,
|
||||||
text);
|
text);
|
||||||
else
|
else
|
||||||
gnome_metadata_remove (fpd->file_name,
|
gnome_metadata_remove (fpd->file_name,
|
||||||
"drop-target");
|
"fm-open");
|
||||||
} else {
|
} else {
|
||||||
if (fpd->drop_target)
|
if (fpd->fm_open)
|
||||||
gnome_metadata_remove (fpd->file_name,
|
gnome_metadata_remove (fpd->file_name,
|
||||||
"drop-target");
|
"fm-open");
|
||||||
}
|
}
|
||||||
} else {
|
if (fpd->executable) {
|
||||||
if (!GTK_TOGGLE_BUTTON (fpd->prop1_cbox)->active) {
|
if (!GTK_TOGGLE_BUTTON (fpd->prop1_cbox)->active) {
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (fpd->prop1_entry));
|
text = gtk_entry_get_text (GTK_ENTRY (fpd->prop1_entry));
|
||||||
if (text && text[0])
|
if (text && text[0])
|
||||||
gnome_metadata_set (fpd->file_name,
|
gnome_metadata_set (fpd->file_name,
|
||||||
"fm-view",
|
"drop-target",
|
||||||
strlen (text) + 1,
|
strlen (text) + 1,
|
||||||
text);
|
text);
|
||||||
else
|
else
|
||||||
gnome_metadata_remove (fpd->file_name,
|
gnome_metadata_remove (fpd->file_name,
|
||||||
"fm-view");
|
"drop-target");
|
||||||
|
} else {
|
||||||
|
if (fpd->drop_target)
|
||||||
|
gnome_metadata_remove (fpd->file_name,
|
||||||
|
"drop-target");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (fpd->fm_view)
|
if (!GTK_TOGGLE_BUTTON (fpd->prop1_cbox)->active) {
|
||||||
gnome_metadata_remove (fpd->file_name,
|
text = gtk_entry_get_text (GTK_ENTRY (fpd->prop1_entry));
|
||||||
"fm-view");
|
if (text && text[0])
|
||||||
}
|
gnome_metadata_set (fpd->file_name,
|
||||||
if (!GTK_TOGGLE_BUTTON (fpd->prop2_cbox)->active) {
|
"fm-view",
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (fpd->prop2_entry));
|
strlen (text) + 1,
|
||||||
if (text && text[0])
|
text);
|
||||||
gnome_metadata_set (fpd->file_name,
|
else
|
||||||
"edit",
|
gnome_metadata_remove (fpd->file_name,
|
||||||
strlen (text) + 1,
|
"fm-view");
|
||||||
text);
|
} else {
|
||||||
else
|
if (fpd->fm_view)
|
||||||
gnome_metadata_remove (fpd->file_name,
|
gnome_metadata_remove (fpd->file_name,
|
||||||
"edit");
|
"fm-view");
|
||||||
} else {
|
}
|
||||||
if (fpd->edit)
|
if (!GTK_TOGGLE_BUTTON (fpd->prop2_cbox)->active) {
|
||||||
gnome_metadata_remove (fpd->file_name,
|
text = gtk_entry_get_text (GTK_ENTRY (fpd->prop2_entry));
|
||||||
"edit");
|
if (text && text[0])
|
||||||
|
gnome_metadata_set (fpd->file_name,
|
||||||
|
"edit",
|
||||||
|
strlen (text) + 1,
|
||||||
|
text);
|
||||||
|
else
|
||||||
|
gnome_metadata_remove (fpd->file_name,
|
||||||
|
"edit");
|
||||||
|
} else {
|
||||||
|
if (fpd->edit)
|
||||||
|
gnome_metadata_remove (fpd->file_name,
|
||||||
|
"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))
|
||||||
|
Loading…
Reference in New Issue
Block a user