Various typo fixes in gnome-file-property-dialog.c. nd in gdialogs.c.
It does not look as it was tested a lot. Miguel v
Этот коммит содержится в:
родитель
4299dbe798
Коммит
cae3f1b9ab
@ -1,3 +1,18 @@
|
|||||||
|
1999-02-12 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gdialogs.c (file_mask_dialog): Renaming files was not working
|
||||||
|
due to having the "file-must-exist" bit turned on.
|
||||||
|
|
||||||
|
* gnome-file-property-dialog.c (apply_metadata_change): Metadata
|
||||||
|
rename the file.
|
||||||
|
|
||||||
|
Change fpd->file_name to point to the new name so that any
|
||||||
|
metadat changes take effect on the new name, not the old name.
|
||||||
|
|
||||||
|
Test return value from move_file_file.
|
||||||
|
|
||||||
|
(init_metadata): Fixed typo.
|
||||||
|
|
||||||
1999-02-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
1999-02-12 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* mc.metadata.in: Added a regexp for EPS files.
|
* mc.metadata.in: Added a regexp for EPS files.
|
||||||
|
@ -629,7 +629,7 @@ file_mask_dialog (FileOpContext *ctx, FileOperation operation, char *text, char
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dest_dir = gnome_file_entry_get_full_path(GNOME_FILE_ENTRY (fentry), TRUE);
|
dest_dir = gnome_file_entry_get_full_path(GNOME_FILE_ENTRY (fentry), FALSE);
|
||||||
gtk_widget_destroy (fmd_win);
|
gtk_widget_destroy (fmd_win);
|
||||||
easy_patterns = 1;
|
easy_patterns = 1;
|
||||||
if (!dest_dir || !*dest_dir)
|
if (!dest_dir || !*dest_dir)
|
||||||
|
@ -147,6 +147,7 @@ dialog_key_pressed (GtkWidget *win, GdkEventKey *event, Dlg_head *h)
|
|||||||
|
|
||||||
if (i->editing)
|
if (i->editing)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,12 +16,13 @@
|
|||||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
#include <config.h>
|
||||||
|
#include "dir.h"
|
||||||
|
#include "util.h"
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "gnome-file-property-dialog.h"
|
#include "gnome-file-property-dialog.h"
|
||||||
#include "dir.h"
|
|
||||||
#include "gdesktop.h"
|
#include "gdesktop.h"
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
@ -32,7 +33,6 @@
|
|||||||
#include "../vfs/vfs.h"
|
#include "../vfs/vfs.h"
|
||||||
#include "gicon.h"
|
#include "gicon.h"
|
||||||
#include "dialog.h"
|
#include "dialog.h"
|
||||||
#include "util.h"
|
|
||||||
|
|
||||||
static void gnome_file_property_dialog_init (GnomeFilePropertyDialog *file_property_dialog);
|
static void gnome_file_property_dialog_init (GnomeFilePropertyDialog *file_property_dialog);
|
||||||
static void gnome_file_property_dialog_class_init (GnomeFilePropertyDialogClass *klass);
|
static void gnome_file_property_dialog_class_init (GnomeFilePropertyDialogClass *klass);
|
||||||
@ -980,7 +980,7 @@ init_metadata (GnomeFilePropertyDialog *fp_dlg)
|
|||||||
if (!fp_dlg->mime_fm_view)
|
if (!fp_dlg->mime_fm_view)
|
||||||
fp_dlg->mime_fm_view = gnome_mime_get_value (mime_type, "view");
|
fp_dlg->mime_fm_view = gnome_mime_get_value (mime_type, "view");
|
||||||
fp_dlg->mime_edit = gnome_mime_get_value (mime_type, "edit");
|
fp_dlg->mime_edit = gnome_mime_get_value (mime_type, "edit");
|
||||||
fp_dlg->mime_edit = gnome_mime_get_value (mime_type, "drop-target");
|
fp_dlg->mime_drop_target = gnome_mime_get_value (mime_type, "drop-target");
|
||||||
|
|
||||||
gnome_metadata_get (fp_dlg->file_name, "icon-filename", &size, &fp_dlg->icon_filename);
|
gnome_metadata_get (fp_dlg->file_name, "icon-filename", &size, &fp_dlg->icon_filename);
|
||||||
if (fp_dlg->icon_filename)
|
if (fp_dlg->icon_filename)
|
||||||
@ -1144,6 +1144,7 @@ apply_name_change (GnomeFilePropertyDialog *fpd)
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
char *p;
|
char *p;
|
||||||
|
int s;
|
||||||
|
|
||||||
/* create the files. */
|
/* create the files. */
|
||||||
base_name = g_strdup (fpd->file_name);
|
base_name = g_strdup (fpd->file_name);
|
||||||
@ -1157,9 +1158,14 @@ apply_name_change (GnomeFilePropertyDialog *fpd)
|
|||||||
|
|
||||||
ctx = file_op_context_new ();
|
ctx = file_op_context_new ();
|
||||||
file_op_context_create_ui (ctx, OP_MOVE, FALSE);
|
file_op_context_create_ui (ctx, OP_MOVE, FALSE);
|
||||||
move_file_file (ctx, fpd->file_name, full_target, &count, &bytes);
|
s = move_file_file (ctx, fpd->file_name, full_target, &count, &bytes);
|
||||||
file_op_context_destroy (ctx);
|
file_op_context_destroy (ctx);
|
||||||
g_free (full_target);
|
|
||||||
|
if (s == FILE_CONT){
|
||||||
|
g_free (fpd->file_name);
|
||||||
|
fpd->file_name = full_target;
|
||||||
|
} else
|
||||||
|
g_free (full_target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
@ -1169,6 +1175,7 @@ apply_metadata_change (GnomeFilePropertyDialog *fpd)
|
|||||||
{
|
{
|
||||||
gchar *text;
|
gchar *text;
|
||||||
gchar *icon_name;
|
gchar *icon_name;
|
||||||
|
char *filename;
|
||||||
|
|
||||||
/* If we don't have an open_cbox, that means we have no metadata
|
/* If we don't have an open_cbox, that means we have no metadata
|
||||||
* to set.
|
* to set.
|
||||||
@ -1282,6 +1289,7 @@ gint
|
|||||||
gnome_file_property_dialog_make_changes (GnomeFilePropertyDialog *file_property_dialog)
|
gnome_file_property_dialog_make_changes (GnomeFilePropertyDialog *file_property_dialog)
|
||||||
{
|
{
|
||||||
gint retval = 0;
|
gint retval = 0;
|
||||||
|
|
||||||
g_return_val_if_fail (file_property_dialog != NULL, 1);
|
g_return_val_if_fail (file_property_dialog != NULL, 1);
|
||||||
g_return_val_if_fail (GNOME_IS_FILE_PROPERTY_DIALOG (file_property_dialog), 1);
|
g_return_val_if_fail (GNOME_IS_FILE_PROPERTY_DIALOG (file_property_dialog), 1);
|
||||||
|
|
||||||
|
@ -75,10 +75,10 @@ struct _GnomeFilePropertyDialog
|
|||||||
gchar *fm_view;
|
gchar *fm_view;
|
||||||
gchar *drop_target;
|
gchar *drop_target;
|
||||||
gchar *edit;
|
gchar *edit;
|
||||||
gchar *mime_fm_open;
|
const gchar *mime_fm_open;
|
||||||
gchar *mime_fm_view;
|
const gchar *mime_fm_view;
|
||||||
gchar *mime_drop_target;
|
const gchar *mime_drop_target;
|
||||||
gchar *mime_edit;
|
const gchar *mime_edit;
|
||||||
gchar *icon_filename;
|
gchar *icon_filename;
|
||||||
gchar *desktop_url;
|
gchar *desktop_url;
|
||||||
gchar *caption;
|
gchar *caption;
|
||||||
|
10
po/mc.pot
10
po/mc.pot
@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 1999-02-11 20:35-0600\n"
|
"POT-Creation-Date: 1999-02-12 16:27-0600\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -1068,7 +1068,7 @@ msgstr ""
|
|||||||
#: gtkedit/editcmd.c:482 gtkedit/editcmd.c:801 gtkedit/editcmd.c:831
|
#: gtkedit/editcmd.c:482 gtkedit/editcmd.c:801 gtkedit/editcmd.c:831
|
||||||
#: gtkedit/editcmd.c:978 gtkedit/editcmd.c:1075 src/ext.c:294 src/file.c:606
|
#: gtkedit/editcmd.c:978 gtkedit/editcmd.c:1075 src/ext.c:294 src/file.c:606
|
||||||
#: src/help.c:318 src/main.c:665 src/screen.c:2064 src/subshell.c:700
|
#: src/help.c:318 src/main.c:665 src/screen.c:2064 src/subshell.c:700
|
||||||
#: src/subshell.c:726 src/utilunix.c:382 src/utilunix.c:386 src/utilunix.c:452
|
#: src/subshell.c:726 src/utilunix.c:386 src/utilunix.c:390 src/utilunix.c:456
|
||||||
#: vfs/mcfs.c:169
|
#: vfs/mcfs.c:169
|
||||||
msgid " Warning "
|
msgid " Warning "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -2279,7 +2279,7 @@ msgstr ""
|
|||||||
msgid "File exists but can not be stat-ed: %s %s"
|
msgid "File exists but can not be stat-ed: %s %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/dir.c:643
|
#: src/dir.c:647
|
||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -4125,11 +4125,11 @@ msgstr ""
|
|||||||
msgid "name_trunc: too big"
|
msgid "name_trunc: too big"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/utilunix.c:382
|
#: src/utilunix.c:386
|
||||||
msgid " Pipe failed "
|
msgid " Pipe failed "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/utilunix.c:386
|
#: src/utilunix.c:390
|
||||||
msgid " Dup failed "
|
msgid " Dup failed "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#ifndef OS2_NT
|
#ifndef HAS_NO_GRP_PWD_H
|
||||||
# include <grp.h>
|
# include <grp.h>
|
||||||
# include <pwd.h>
|
# include <pwd.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "treestore.h"
|
#include "treestore.h"
|
||||||
#include "../vfs/vfs.h"
|
#include "../vfs/vfs.h"
|
||||||
#ifdef OS2_NT
|
#ifdef NEEDS_IO_H
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if defined(__os2__) /* OS/2 need io.h! .ado */
|
#if defined(NEEDS_IO_H) /* OS/2 need io.h! .ado */
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -659,8 +659,12 @@ char *x_basename (char *s)
|
|||||||
void my_putenv (char *name, char *data)
|
void my_putenv (char *name, char *data)
|
||||||
{
|
{
|
||||||
char *full;
|
char *full;
|
||||||
|
char *len = strlen (name) + strlen (data) + 2;
|
||||||
|
|
||||||
full = g_strdup_printf ("%s=%s", name, data);
|
full = malloc (len);
|
||||||
|
strcpy (full, name);
|
||||||
|
strcat (full, "=");
|
||||||
|
strcat (full, data);
|
||||||
putenv (full);
|
putenv (full);
|
||||||
|
|
||||||
/* WARNING: NEVER FREE THE full VARIABLE!!!!!!!!!!!!!!!!!!!!!!!! */
|
/* WARNING: NEVER FREE THE full VARIABLE!!!!!!!!!!!!!!!!!!!!!!!! */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user