[bug #20862] Conflicting shortcut for "Shell &Patroon gebruiken" in dutch i18n (nl.po)

2007-08-21 Thread dAniel hAhler

URL:
  

 Summary: Conflicting shortcut for "Shell &Patroon gebruiken"
in dutch i18n (nl.po)
 Project: GNU Midnight Commander
Submitted by: blueyed
Submitted on: Dienstag 21.08.2007 um 23:30
Category: Internationalization
Severity: 3 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
 Release: 4.6.1
Operating System: All

___

Details:

The access key for the translation of "&Using shell patterns" to "Shell
&Patroon gebruiken" conflicts with the input line history key .
Reproduce:  works on mc command line, but not in copy and move dialogs.

Reported in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/mc/+bug/5462



___

File Attachments:


---
Date: Dienstag 21.08.2007 um 23:30  Name: 62_nl.po.patch  Size: 411B   By:
blueyed
Patch against 4.6.1


___

Reply to this item at:

  

___
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[PATCH] Custom mc xterm title

2007-08-21 Thread yarodin
This patch will added possibility to configure xterm title through MC_XTITLE 
environment variable (like a zsh/bash promt)

%%    - percent '%' character                                 
%$,%# - '#' for root, '$' for normal user                    
%w,%d - working directory with edit/view filename                               
    
%W,%C - working directory (last component only) with edit/view filename
%p    - process id (pid)
%u,%n - username
%h,m  - hostname up to the first dot
%H,M  - hostname.domainname
%t,%y - tty connected to stdin without /dev/
%l    - tty connected to stdin without /dev/ and tty (if present)               
              
%V    - mc version

--- edit/editwidget.c.orig  Fri May 27 20:19:18 2005
+++ edit/editwidget.c   Thu Aug 16 12:59:49 2007
@@ -28,6 +28,9 @@
 #include "../src/widget.h" /* redraw_labels() */
 #include "../src/menu.h"   /* menubar_new() */
 #include "../src/key.h"/* is_idle() */
+#include "../src/main.h"   /* xterm_filename */
+#include "../src/win.h"/* xterm_flag */
+#include "../src/layout.h" /* xterm_title */
 
 WEdit *wedit;
 struct WMenu *edit_menubar;
@@ -168,6 +171,11 @@ edit_file (const char *_file, int line)
 static int made_directory = 0;
 Dlg_head *edit_dlg;
 WButtonBar *edit_bar;
+
+if (xterm_flag && xterm_title) {
+   xterm_filename = _file;
+update_xterm_title_path ();
+}
 
 if (option_backup_ext_int != -1) {
option_backup_ext = g_malloc (sizeof (int) + 1);
--- src/main.c.orig Sat Jul 23 22:52:02 2005
+++ src/main.c  Thu Aug 16 16:00:33 2007
@@ -279,6 +279,8 @@ char *mc_home = NULL;
 
 char cmd_buf[512];
 
+char *xterm_filename = NULL;
+
 static void
 reload_panelized (WPanel *panel)
 {
@@ -1600,22 +1602,159 @@ midnight_callback (struct Dlg_head *h, d
 
 #define xtoolkit_panel_setup()
 
-/* Show current directory in the xterm title */
+/* Show current directory in the xterm title 
+   Added possibility to configure xterm title through MC_XTITLE environment 
variable (like a zsh/bash promt).
+   %%- percent '%' character 
+   %$,%# - '#' for root, '$' for normal user
+   %w,%d - working directory with edit/view filename   

+   %W,%C - working directory (last component only) with edit/view filename
+   %p- process id (pid)
+   %u,%n - username
+   %h,m  - hostname up to the first dot
+   %H,M  - hostname.domainname
+   %t,%y - tty connected to stdin without /dev/
+   %l- tty connected to stdin without /dev/ and tty (if present)   
  
+   %V- mc version */
+
 void
 update_xterm_title_path (void)
 {
+int i = 0;
 unsigned char *p, *s;
+unsigned char title 
[BUF_MEDIUM+1],hostname[MAXHOSTNAMELEN+1],domainname[MAXHOSTNAMELEN+1],nametty[BUF_SMALL+1];
 
 if (xterm_flag && xterm_title) {
-   p = s = g_strdup (strip_home_and_password (current_panel->cwd));
+/* Use special environment variable to format title */
+if ((p = getenv ("MC_XTITLE")) == NULL) {
+p = "mc - [EMAIL PROTECTED]:%w";
+}
+ 
do {
+if (*p != '%') {
+title [i++] = *p;
+continue;
+}
+if (!*++p)
+break;
+ 
+/* Substitute '%' special characters
+ * (meaning the same as for bash, but preceded by '%', not '\')
+ */
+s = NULL;
+switch (*p) {
+case '%' : /* % - percent '%' character */
+title [i++] = '%';
+break;
+case '#' :
+case '$' : /* %$ or %# - '#' for root, '$' for normal user */
+title [i++] = (geteuid()==0 ? '#' : '$');
+break;
+case 'd' :
+case 'w' : /* %w or %d - working directory */
+   if (xterm_filename==NULL) {
+s = g_strdup (strip_home_and_password 
(current_panel->cwd));
+} else {
+if (view_one_file == NULL) {
+if (g_ascii_strcasecmp (strip_home_and_password 
(current_panel->cwd),"/")==0) {
+   s = g_strdup_printf("/%s",xterm_filename);
+} else {
+s = 
g_strdup_printf("%s/%s",strip_home_and_password 
(current_panel->cwd),xterm_filename);
+}
+} else {
+s = g_strdup_printf("%s",strip_home_and_password 
(xterm_filename));
+}
+}
+break;
+case 'C' :
+case 'W' : /* %W or %C- working directory (last component only) */
+if (xterm_filename==NULL) {
+   s = g_strdup (g_path_get_basename ((strip_home_and_password 
(current_panel->cwd;
+} else {
+if (view_o