Re: Inconsistent behaviour of Options

2006-03-10 Thread Pavel Tsekov
On Thu, 9 Mar 2006, Pavel Roskin wrote:

 On Thu, 2006-03-09 at 23:14 +0100, Leonard den Ottolander wrote:
  Hi Jindrich,
 
  On Thu, 2006-03-09 at 13:48 +0100, Jindrich Novy wrote:
   1. Ok sets the parameters only for the current session and won't touch
   the ini file.
 
  Ok is equivalent to save if auto save setup is set.

 ... and if you exit from mc rather than e.g. close the xterm window.
 And if you don't have another mc running that would overwrite those
 settings if you exit from it properly.

 I think that auto save setup is something that cannot be implemented
 reliably in mc unless you make Ok work exactly like Save and save
 changes immediately.

I think this is a reasonable approch. If we go that way we can safely
remove Save setup and auto_save_setup.

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


Re: Inconsistent behaviour of Options

2006-03-10 Thread Pavel Tsekov
On Thu, 9 Mar 2006, Leonard den Ottolander wrote:

  2. Ok sets the parameters to ini file for all the dialogs, so that
  it's needed to remove Save button from the Layout and Configuration
  options to make it consistent.

 Actually I think we miss a save button in the confirmation
 dialog :-) . I assume the global save setup saves the settings for all
 these sections. I don't think we should drop the fine grained save
 buttons in the other dialogs.

There is no such thing as finer grained saving - every sections is saved
by the Save buttons.

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


Re: Inconsistent behaviour of Options

2006-03-10 Thread Pavel Tsekov
On Fri, 10 Mar 2006, wwp wrote:

 Hello Pavel,


 On Fri, 10 Mar 2006 10:59:25 +0200 Pavel Tsekov [EMAIL PROTECTED] wrote:

  On Thu, 9 Mar 2006, Pavel Roskin wrote:
 
   On Thu, 2006-03-09 at 23:14 +0100, Leonard den Ottolander wrote:
Hi Jindrich,
   
On Thu, 2006-03-09 at 13:48 +0100, Jindrich Novy wrote:
 1. Ok sets the parameters only for the current session and won't
 touch the ini file.
   
Ok is equivalent to save if auto save setup is set.
  
   ... and if you exit from mc rather than e.g. close the xterm window.
   And if you don't have another mc running that would overwrite those
   settings if you exit from it properly.
  
   I think that auto save setup is something that cannot be implemented
   reliably in mc unless you make Ok work exactly like Save and save
   changes immediately.
 
  I think this is a reasonable approch. If we go that way we can safely
  remove Save setup and auto_save_setup.

 That means that you would not be able to modify some options w/o saving them
 (and thus, affect all further instances)?

Hmm... This is a strong indication that those options do not belong to the
Options menu, IMO.
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Inconsistent behaviour of Options

2006-03-09 Thread Jindrich Novy
Hi mc-devel,

there are two types of dialogs in Options menu. The first type contains
three buttons: Ok, Save, Cancel and the second only Ok and Cancel.

There's a default action in the dialogs with only Ok and Cancel that Ok
saves the configuration globally so that it's written to ini file just
after finishing the dialog.

If you try to configure with Options/Configuration... and
Options/Layout... you see Ok, Save, Cancel. If you press either Ok or
Save the settings are written to ini file so that the settings will be
set again when new mc is launched and not only for the current session.

The question is whether to fix the bug in the way that:

1. Ok sets the parameters only for the current session and won't touch
the ini file. Save saves the configuration to ini file so that it's
needed to add the Save button to the rest of the Options dialog
entries to make it consistent.

2. Ok sets the parameters to ini file for all the dialogs, so that
it's needed to remove Save button from the Layout and Configuration
options to make it consistent.

What's your opinion?

Jindrich


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


Re: Inconsistent behaviour of Options

2006-03-09 Thread Jindrich Novy
Hello Pavel,

On Thu, 2006-03-09 at 15:14 +0200, Pavel Tsekov wrote:
  The question is whether to fix the bug in the way that:
 
  1. Ok sets the parameters only for the current session and won't touch
  the ini file. Save saves the configuration to ini file so that it's
  needed to add the Save button to the rest of the Options dialog
  entries to make it consistent.
 
  2. Ok sets the parameters to ini file for all the dialogs, so that
  it's needed to remove Save button from the Layout and Configuration
  options to make it consistent.
 
  What's your opinion?
 
 I think solution number 2 is better. After all we have Options - Save
 setup so the Save buttons are somewhat redundant. There is also the
 auto_save_setup option which saves the ini file on exit.

I also prefer this solution as the implementation of the Save button is
kind of strange because the Save button is handled by B_EXIT action in
init_layout() and layout_cmd() and is rather useless in general ;-)

Jindrich

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


Re: Inconsistent behaviour of Options

2006-03-09 Thread Leonard den Ottolander
Hi Jindrich,

On Thu, 2006-03-09 at 13:48 +0100, Jindrich Novy wrote:
 1. Ok sets the parameters only for the current session and won't touch
 the ini file.

Ok is equivalent to save if auto save setup is set. If auto save
setup is unset ok and save do differ in their behaviour.  This
actually *is* consistent. As I hardly change options I had sort of
forgotten about the auto save behaviour and I'm afraid I might have
confused you because of that :) .

 2. Ok sets the parameters to ini file for all the dialogs, so that
 it's needed to remove Save button from the Layout and Configuration
 options to make it consistent.

Actually I think we miss a save button in the confirmation
dialog :-) . I assume the global save setup saves the settings for all
these sections. I don't think we should drop the fine grained save
buttons in the other dialogs.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research


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


Re: Inconsistent behaviour of Options

2006-03-09 Thread Pavel Roskin
Hello!

On Thu, 2006-03-09 at 23:14 +0100, Leonard den Ottolander wrote:
 Hi Jindrich,
 
 On Thu, 2006-03-09 at 13:48 +0100, Jindrich Novy wrote:
  1. Ok sets the parameters only for the current session and won't touch
  the ini file.
 
 Ok is equivalent to save if auto save setup is set.

... and if you exit from mc rather than e.g. close the xterm window.
And if you don't have another mc running that would overwrite those
settings if you exit from it properly.

I think that auto save setup is something that cannot be implemented
reliably in mc unless you make Ok work exactly like Save and save
changes immediately.

-- 
Regards,
Pavel Roskin

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


Re: Inconsistent behaviour of Options

2006-03-09 Thread Leonard den Ottolander
Hello Pavel,

On Thu, 2006-03-09 at 17:31 -0500, Pavel Roskin wrote:
 ... and if you exit from mc rather than e.g. close the xterm window.
 And if you don't have another mc running that would overwrite those
 settings if you exit from it properly.

The latter would still be a problem with direct saves. And that auto
save setup only works on normal programme termination should be
obvious.

 I think that auto save setup is something that cannot be implemented
 reliably in mc unless you make Ok work exactly like Save and save
 changes immediately.

But then the option auto save setup would be redundant... Unless you
mean that the behaviour of Ok should be changed based on the current
auto save setting.

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research


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


Re: Inconsistent behaviour of Options

2006-03-09 Thread Pavel Roskin
On Thu, 2006-03-09 at 23:40 +0100, Leonard den Ottolander wrote:
 Hello Pavel,
 
 On Thu, 2006-03-09 at 17:31 -0500, Pavel Roskin wrote:
  ... and if you exit from mc rather than e.g. close the xterm window.
  And if you don't have another mc running that would overwrite those
  settings if you exit from it properly.
 
 The latter would still be a problem with direct saves.

I don't understand which scenario you have in mind.  If you mean saving
settings from two mc instances, that would be a problem, but it's a
counter-intuitive thing for users to do.

  And that auto
 save setup only works on normal programme termination should be
 obvious.

Remember, users can be distracted, and they are generally assumed to
have a short attention span.  You cannot expect a user to remember to
exit from mc correctly to save settings.  There may be thousands of
things between changing the configuration and ending mc, and some of
them can kill mc, e.g. as X crash due to some other software, closing a
wrong window, reboot due to urgent security upgrade etc.

I actually find it more natural that once the dialog has been dismissed
by any button, I don't have to remember to do anything.  I'm accustomed
to software that doesn't use my memory too much.

Also, programs that save anything on exit try to protect against killing
until that data has been saved.  That's why SIGKILL is the last resort.
mc doesn't do anything like that, as it would lose the unsaved
configuration even on SIGHUP.

  I think that auto save setup is something that cannot be implemented
  reliably in mc unless you make Ok work exactly like Save and save
  changes immediately.
 
 But then the option auto save setup would be redundant... Unless you
 mean that the behaviour of Ok should be changed based on the current
 auto save setting.

I think auto save setup is redundant, but I never had time to remove
it.  Besides, it would open a huge can of worms.

Some users rely on auto save setup to have mc remember the last
directories.  Sure, such users have a different mental model of mc, they
try not to kill mc, and I guess they run one copy of mc at most (so it's
more a DOS/Norton Commander like model).

Another group of users likes to edit configuration files manually.  If
mc defaults not to save the configuration, the configuration files are
not created first time mc is run.  Somebody would complain.

-- 
Regards,
Pavel Roskin

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


Re: Inconsistent behaviour of Options

2006-03-09 Thread Oswald Buddenhagen
On Thu, Mar 09, 2006 at 05:31:27PM -0500, Pavel Roskin wrote:
 On Thu, 2006-03-09 at 23:14 +0100, Leonard den Ottolander wrote:
  On Thu, 2006-03-09 at 13:48 +0100, Jindrich Novy wrote:
   1. Ok sets the parameters only for the current session and won't
   touch the ini file.
  
  Ok is equivalent to save if auto save setup is set.
 
 ... and if you exit from mc rather than e.g. close the xterm window.

just closing xterm is generally a stupid idea. and forgetting it at
session exit ... my wish for supporting xsmp still stands.

 And if you don't have another mc running that would overwrite those
 settings if you exit from it properly.
 
KConfig rescans the config and merges the changes into the just read
config on saving. i think it wouldn't be that hard to implement in mc,
too. of course this doesn't help with conflicting changes, but that's
obvious and part of the mental model.

 I think that auto save setup is something that cannot be implemented
 reliably in mc unless you make Ok work exactly like Save and save
 changes immediately.
 
this is what both kde and gnome do, so i think it's safe to assume it is
a reasonable approach.

as far as remembering the last directory is concerned: that's sort of
poor man's session management, not option management. it's basically the
same as remembering the last position in the viewer and editor. i.e.,
there should be a separate option for enabling it.

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel