Re: question to maintainers
- From: "Andrew V. Samoilov" <kai cmail ru>
- To: Walery Studennikov <despair sama ru>
- Cc: mc-devel gnome org
- Subject: Re: question to maintainers
- Date: Thu, 8 Nov 2001 16:02:06 +0200
Hi, Walery!
>
> I'm asking maintainers about my patch,
> that adds support for multiple editors and multiple viewers at once,
> that has been posted a MONTHS ago.
> This patch was extensively tested by me and I use its benefits every day.
> Also that was reports that it works very well for other people.
> This patch almost does not affect stability of MC if its features
> are not used by users.
>
> I'm wondered why there is no single report
> about this patch from maintainers at all. Still.
> Even no report that they have seen it.
> I can imagine two possible reasons for that:
>
> 1) They have no time at all to apply and test this.
It is true. And another reason is a lot of pending stability
issues in current mc. Also there are many documented but not or
poorly implemented features. Smbfs is only one of these features.
Cpiofs does not understand old ascii cpio archives.
Uploaded files data is copied to temporary files and only after this
is transfered to destionation. Ftpfs is not nice. Editor cannot
find and replace regexps.
> In this case I can supply some screenshots ;)
>
> 2) They think that this feature is not useful and even harmful.
It seems to be interesting feature, but there is a lot of
ways to crush mc now. And it will be pity to crush after many hours
of editing.
> Well, in this case they have to argue their POVs.
> (Also MC are used by too many people, so
> its future cannot be controlled by its maintainers exclusively,
> according to only their POVs.)
What is POV?
Well, I spent some hours to apply your patch to cvs version of mc.
Where are some number of rejected hunks, but as a rule it is possible
rewrite this patch to be compatible with mc-4.5.55 and CVS. It is not
good idea change lines near $Id tag. And why do you export run_dlg
and finish view anyway?
Ok, I have a patch for your patch.
I don't know what compiler do you use, but egcs-1.1.2 can't
use union without name ;-( Also g_snprintf is used instead of
sprintf. In two files <glib.h> excluded - it already included from
other places.
Regards,
Andrew.
--- mc-multiscreen+b+c-patch-0.5-orig Sat Sep 8 07:03:34 2001
+++ mc-multiscreen+b+c-patch-0.5 Thu Nov 8 15:17:54 2001
@@ -137,17 +135,9 @@
/*
Process a block through a shell command: CK_Pipe_Block(i) executes shell_cmd[i].
diff -ruNbB -x ChangeLog -x Makefile -x *CVS* -x .* -x *.hlp mc-4.5.55-orig/gtkedit/editmenu.c mc-4.5.55/gtkedit/editmenu.c
--- mc-4.5.55-orig/gtkedit/editmenu.c Sun Aug 12 14:02:56 2001
+++ mc-4.5.55/gtkedit/editmenu.c Fri Sep 7 23:41:56 2001
-@@ -34,6 +34,7 @@
-
- #ifdef MIDNIGHT
-
-+#include <glib.h>
- #include "../src/mad.h"
-
- extern int edit_key_emulation;
@@ -122,6 +123,15 @@
void menu_user_menu_cmd (void) { menu_key (KEY_F (11)); }
@@ -490,17 +481,6 @@
diff -ruNbB -x ChangeLog -x Makefile -x *CVS* -x .* -x *.hlp mc-4.5.55-orig/src/dialog.c mc-4.5.55/src/dialog.c
--- mc-4.5.55-orig/src/dialog.c Tue Aug 22 18:50:14 2000
+++ mc-4.5.55/src/dialog.c Fri Sep 7 23:08:11 2001
-@@ -32,6 +32,10 @@
- #include "dlg.h" /* draw_box, yes I know, it's silly */
- #include "fileopctx.h"
-
-+#ifdef MC_DEBUG
-+#include <glib.h>
-+#endif
-+
- /* "$Id: dialog.c,v 1.8 2000/08/22 22:50:14 proskin Exp $" */
-
- Refresh *refresh_list = 0;
@@ -46,6 +50,9 @@
new->parameter = parameter;
new->flags = flags;
@@ -588,7 +568,7 @@
+ WButtonBar *edit_bar;
+ WMenu *edit_menubar;
+ } editor_data;
-+ };
++ } u;
+} MC_Dialog;
+
+/* List of (background) dialogs: filemanagers, editors, viewers */
@@ -670,8 +650,8 @@
+ return g_strdup_printf( _("View: %s"), mcdlg->filename );
+ case DLG_EDITOR: {
+ int modified =
-+ mcdlg->editor_data.wedit
-+ ? mcdlg->editor_data.wedit->modified
++ mcdlg->u.editor_data.wedit
++ ? mcdlg->u.editor_data.wedit->modified
+ : 0;
+ return g_strdup_printf(
+ _("Edit: %s%s"),
@@ -735,8 +715,8 @@
+ int *move_dir_p, WView *wview )
+{
+ dlglist_add_dialog( dlg, DLG_VIEWER, filename );
-+ current_mcdlg->viewer_data.move_dir_p = move_dir_p;
-+ current_mcdlg->viewer_data.wview = wview;
++ current_mcdlg->u.viewer_data.move_dir_p = move_dir_p;
++ current_mcdlg->u.viewer_data.wview = wview;
+}
+
+void dlglist_add_editor(
@@ -744,9 +724,9 @@
+ WEdit *wedit, WButtonBar *edit_bar, WMenu *edit_menubar )
+{
+ dlglist_add_dialog( edit_dlg, DLG_EDITOR, filename );
-+ current_mcdlg->editor_data.wedit = wedit;
-+ current_mcdlg->editor_data.edit_bar = edit_bar;
-+ current_mcdlg->editor_data.edit_menubar = edit_menubar;
++ current_mcdlg->u.editor_data.wedit = wedit;
++ current_mcdlg->u.editor_data.edit_bar = edit_bar;
++ current_mcdlg->u.editor_data.edit_menubar = edit_menubar;
+}
+
+void dlglist_dialog_switch( Direction direction, int dlgnum )
@@ -816,15 +796,15 @@
+ if (current_mcdlg->dlg_type == DLG_VIEWER)
+ {
+ run_view( current_mcdlg->dlg,
-+ current_mcdlg->viewer_data.move_dir_p,
-+ current_mcdlg->viewer_data.wview );
++ current_mcdlg->u.viewer_data.move_dir_p,
++ current_mcdlg->u.viewer_data.wview );
+ }
+ else if (current_mcdlg->dlg_type == DLG_EDITOR)
+ {
+ run_edit( current_mcdlg->dlg,
-+ current_mcdlg->editor_data.wedit,
-+ current_mcdlg->editor_data.edit_bar,
-+ current_mcdlg->editor_data.edit_menubar );
++ current_mcdlg->u.editor_data.wedit,
++ current_mcdlg->u.editor_data.edit_bar,
++ current_mcdlg->u.editor_data.edit_menubar );
+ } else {
+ g_error( "dlglist_process_pending_dialog: "
+ "DLG_MANAGER can't be 'pending' dialog!" );
@@ -909,7 +889,7 @@
+ char *dlgtitle, buffer[255];
+ MC_Dialog *cur_mcdlg = (MC_Dialog*) cur_node->data;
+ dlgtitle = dlglist_get_dialog_title( cur_mcdlg );
-+ sprintf( buffer, "%c %s", get_hot_key(i), dlgtitle );
++ g_snprintf( buffer, sizeof (buffer), "%c %s", get_hot_key(i), dlgtitle );
+ g_free( dlgtitle );
+
+ LISTBOX_APPEND_TEXT( listbox, get_hot_key(i), buffer, NULL );
@@ -1017,14 +997,14 @@
+#endif
+
+ finish_view( current_mcdlg->dlg,
-+ current_mcdlg->viewer_data.move_dir_p,
-+ current_mcdlg->viewer_data.wview );
++ current_mcdlg->u.viewer_data.move_dir_p,
++ current_mcdlg->u.viewer_data.wview );
+
+ } else if (cur_mcdlg->dlg_type == DLG_EDITOR) {
+
+ current_mcdlg = cur_mcdlg;
+
-+ if (! current_mcdlg->editor_data.wedit->modified) {
++ if (! current_mcdlg->u.editor_data.wedit->modified) {
+ /* Kill unmodified editors */
+#ifdef MC_DEBUG
+ {
@@ -1036,9 +1016,9 @@
+#endif
+ finish_edit(
+ current_mcdlg->dlg,
-+ current_mcdlg->editor_data.wedit,
-+ current_mcdlg->editor_data.edit_bar,
-+ current_mcdlg->editor_data.edit_menubar );
++ current_mcdlg->u.editor_data.wedit,
++ current_mcdlg->u.editor_data.edit_bar,
++ current_mcdlg->u.editor_data.edit_menubar );
+ } else {
+ /* Activate modified editor, so user can save file */
+#ifdef MC_DEBUG
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]