Home » U++ Library support » FileSel&FileList, Path » Button OK label in SaveAs dialog
Button OK label in SaveAs dialog [message #8071] |
Tue, 06 February 2007 06:30 |
andrei-catalin
Messages: 62 Registered: May 2006 Location: Romania
|
Member |
|
|
When SaveAs dialog is called first time, Button OK label is "Open". And when select a folder is "Save".
To improve this situation I've made few modifications in source code:
void FileSel::FileUpdate() {
if(mode == SELECTDIR) {
ok.Enable(!IsNull(~dir));
return;
}
bool b = list.IsCursor() || !String(file).IsEmpty();
ok.Enable(b);
ok.SetLabel(t_("Open"));
//first modification
if(mode == SAVEAS &&
(list.IsCursor() && list[list.GetCursor()].isdir))
ok.SetLabel(t_("Open"));
else ok.SetLabel(t_("Save"));
}
and
bool FileSel::ExecuteSaveAs(const char *title) {
Title(title ? title : t_("Save as"));
//second modification
ok.SetLabel(t_("Save"));
return Execute(SAVEAS);
}
I am not sure that's the best solution.
Andrei
|
|
|
Goto Forum:
Current Time: Thu Mar 28 22:01:04 CET 2024
Total time taken to generate the page: 0.01246 seconds
|