mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
* chmod.c: Fix includes for cross-compiler. Add gettext N_()
and _() calls.
This commit is contained in:
parent
5f2c090d3e
commit
4d54921e9d
@ -1,3 +1,8 @@
|
||||
2001-11-28 Franco Bez <franco.bez@web.de>
|
||||
|
||||
* chmod.c: Fix includes for cross-compiler. Add gettext N_()
|
||||
and _() calls.
|
||||
|
||||
2001-11-28 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* regex.c: Add temporarily to fix the build.
|
||||
|
55
pc/chmod.c
55
pc/chmod.c
@ -31,8 +31,8 @@
|
||||
#include <stdio.h>
|
||||
/* for chmod and stat */
|
||||
#include <io.h>
|
||||
#include <sys\types.h>
|
||||
#include <sys\stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "../src/tty.h"
|
||||
#include "../src/mad.h"
|
||||
#include "../src/util.h"
|
||||
@ -82,6 +82,7 @@ struct Dlg_head *ch_dlg;
|
||||
#define B_SETMRK B_USER+2
|
||||
#define B_CLRMRK B_USER+3
|
||||
|
||||
|
||||
int mode_change, need_update;
|
||||
int c_file, end_chmod;
|
||||
|
||||
@ -103,16 +104,16 @@ struct {
|
||||
} check_perm[PERMISSIONS] = {
|
||||
|
||||
{
|
||||
FILE_ARCHIVED, "Archive", 0, 0,
|
||||
FILE_ARCHIVED, N_("Archive"), 0, 0,
|
||||
},
|
||||
{
|
||||
FILE_READONLY, "Read Only", 0, 0,
|
||||
FILE_READONLY, N_("Read Only"), 0, 0,
|
||||
},
|
||||
{
|
||||
FILE_HIDDEN, "Hidden", 0, 0,
|
||||
FILE_HIDDEN, N_("Hidden"), 0, 0,
|
||||
},
|
||||
{
|
||||
FILE_SYSTEM, "System", 0, 0,
|
||||
FILE_SYSTEM, N_("System"), 0, 0,
|
||||
},
|
||||
};
|
||||
|
||||
@ -122,22 +123,22 @@ struct {
|
||||
} chmod_but[BUTTONS] = {
|
||||
|
||||
{
|
||||
B_CANCEL, NORMAL_BUTTON, 2, 33, "&Cancel",
|
||||
B_CANCEL, NORMAL_BUTTON, 2, 33, N_("&Cancel"),
|
||||
},
|
||||
{
|
||||
B_ENTER, DEFPUSH_BUTTON, 2, 17, "&Set",
|
||||
B_ENTER, DEFPUSH_BUTTON, 2, 17, N_("&Set"),
|
||||
},
|
||||
{
|
||||
B_CLRMRK, NORMAL_BUTTON, 0, 42, "C&lear marked",
|
||||
B_CLRMRK, NORMAL_BUTTON, 0, 42, N_("C&lear marked"),
|
||||
},
|
||||
{
|
||||
B_SETMRK, NORMAL_BUTTON, 0, 27, "S&et marked",
|
||||
B_SETMRK, NORMAL_BUTTON, 0, 27, N_("S&et marked"),
|
||||
},
|
||||
{
|
||||
B_MARKED, NORMAL_BUTTON, 0, 12, "&Marked all",
|
||||
B_MARKED, NORMAL_BUTTON, 0, 12, N_("&Marked all"),
|
||||
},
|
||||
{
|
||||
B_ALL, NORMAL_BUTTON, 0, 0, "Set &all",
|
||||
B_ALL, NORMAL_BUTTON, 0, 0, N_("Set &all"),
|
||||
},
|
||||
};
|
||||
|
||||
@ -163,32 +164,32 @@ static void chmod_refresh (void)
|
||||
draw_box (ch_dlg, FY, FX, 10, 25);
|
||||
|
||||
dlg_move (ch_dlg, FY + 1, FX + 2);
|
||||
addstr ("Name");
|
||||
addstr (_("Name"));
|
||||
dlg_move (ch_dlg, FY + 3, FX + 2);
|
||||
addstr ("Permissions (Octal)");
|
||||
addstr (_("Permissions (Octal)"));
|
||||
dlg_move (ch_dlg, FY + 5, FX + 2);
|
||||
addstr ("Owner name");
|
||||
addstr (_("Owner name"));
|
||||
dlg_move (ch_dlg, FY + 7, FX + 2);
|
||||
addstr ("Group name");
|
||||
addstr (_("Group name"));
|
||||
|
||||
attrset (title_color);
|
||||
dlg_move (ch_dlg, 1, 28);
|
||||
addstr (" Chmod command ");
|
||||
addstr (_(" Chmod command "));
|
||||
dlg_move (ch_dlg, PY, PX + 1);
|
||||
addstr (" Permission ");
|
||||
addstr (_(" Permission "));
|
||||
dlg_move (ch_dlg, FY, FX + 1);
|
||||
addstr (" File ");
|
||||
addstr (_(" File "));
|
||||
|
||||
attrset (selection_color);
|
||||
|
||||
dlg_move (ch_dlg, TY, TX);
|
||||
addstr ("Use SPACE to change");
|
||||
addstr (_("Use SPACE to change"));
|
||||
dlg_move (ch_dlg, TY + 1, TX);
|
||||
addstr ("an option, ARROW KEYS");
|
||||
addstr (_("an option, ARROW KEYS"));
|
||||
dlg_move (ch_dlg, TY + 2, TX);
|
||||
addstr ("to move between options");
|
||||
addstr (_("to move between options"));
|
||||
dlg_move (ch_dlg, TY + 3, TX);
|
||||
addstr ("and T or INS to mark");
|
||||
addstr (_("and T or INS to mark"));
|
||||
}
|
||||
|
||||
static int chmod_callback (Dlg_head *h, int Par, int Msg)
|
||||
@ -241,9 +242,9 @@ static void init_chmod (void)
|
||||
}
|
||||
|
||||
ch_dlg = create_dlg (0, 0, 22 - single_set, 70, dialog_colors,
|
||||
chmod_callback, "[Chmod]", "chmod", DLG_CENTER);
|
||||
chmod_callback, _("[Chmod]"), _("chmod"), DLG_CENTER);
|
||||
|
||||
x_set_dialog_title (ch_dlg, "Chmod command");
|
||||
x_set_dialog_title (ch_dlg, _("Chmod command"));
|
||||
|
||||
#define XTRACT(i) BY+chmod_but[i].y-single_set, BX+chmod_but[i].x, \
|
||||
chmod_but[i].ret_cmd, chmod_but[i].flags, chmod_but[i].text, 0, 0, NULL
|
||||
@ -416,9 +417,9 @@ void chmod_cmd (void)
|
||||
/* Set the labels */
|
||||
c_fname = name_trunc (fname, 21);
|
||||
add_widget (ch_dlg, label_new (FY+2, FX+2, c_fname, NULL));
|
||||
c_fown = "unknown";
|
||||
c_fown = _("unknown");
|
||||
add_widget (ch_dlg, label_new (FY+6, FX+2, c_fown, NULL));
|
||||
c_fgrp = "unknown";
|
||||
c_fgrp = _("unknown");
|
||||
add_widget (ch_dlg, label_new (FY+8, FX+2, c_fgrp, NULL));
|
||||
sprintf (buffer, "%o", c_stat);
|
||||
statl = label_new (FY+4, FX+2, buffer, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user