User forums > General (but related to Code::Blocks)
"file updated" dialogue bug
thomas:
Just looked what we do there. It's using a wxMessageDialog which should "know" the correct size. Additionally, the dialog may be centered on the main window (if you have enabled the smart placing feature), which again only calls the standard wxWidgets CentreOnWindow function under all non-Windows platforms.
The only time the dialog's size can modified at all is if you have enabled the smart placement functionality in constraint mode, and if your screen is so small that the dialog would not fit. However, you cannot even do that any more, since someone removed this option from the settings panel 8)
So... clueless as to what happens there with you.
dmoore:
I have also had this problem on ubuntu feisty
Jenna:
The following patch fixes the bug.
--- Code: ------ codeblocks-1.0svn.orig/src/sdk/resources/confirm_replace.xrc 2007-09-28 13:55:10.000000000 +0000
+++ codeblocks-1.0svn.work/src/sdk/resources/confirm_replace.xrc 2007-11-06 13:28:21.000000000 +0000
@@ -12,6 +12,7 @@
</object>
<flag>wxALL|wxGROW</flag>
<border>8</border>
+ <option>1</option>
</object>
<object class="sizeritem">
<object class="wxBoxSizer">
--- codeblocks-1.0svn.orig/src/sdk/resources/confirm_replace_multiple.xrc 2007-09-28 13:55:10.000000000 +0000
+++ codeblocks-1.0svn.work/src/sdk/resources/confirm_replace_multiple.xrc 2007-11-06 13:31:14.000000000 +0000
@@ -11,6 +11,7 @@
</object>
<flag>wxALL|wxGROW</flag>
<border>8</border>
+ <option>1</option>
</object>
<object class="sizeritem">
<object class="wxBoxSizer">
--- End code ---
I added the line "<option>1</option>" to "confirm_replace_multiple.xrc" also, eve if it is not used by the fileupdate-Dlg, to make both behave identical.
If you confirm the patch, I can post it at berlios.
On windows the problem with extremly long file-name (-paths) is different, because the line is not wrapped there, and a part of it get cut by the Dialog-Border.
thomas:
--- Quote from: jens on November 06, 2007, 06:46:03 pm ---The following patch fixes the bug.
--- End quote ---
Are you sure? The "reload file?" box uses no xrc at all.
Your patch seems to address something different (search/replace). Apparently those dialogs are too small on our system too?
Jenna:
--- Quote from: thomas on November 07, 2007, 09:28:22 am ---
--- Quote from: jens on November 06, 2007, 06:46:03 pm ---The following patch fixes the bug.
--- End quote ---
Are you sure? The "reload file?" box uses no xrc at all.
Your patch seems to address something different (search/replace). Apparently those dialogs are too small on our system too?
--- End quote ---
Yes, I'm sure !
The "cbMessageBox" is used when a file is deleted or moved :
editormanager.cpp (line 988s to 992)
--- Code: --- msg.Printf(_("%s has been deleted, or is no longer available.\n"
"Do you wish to keep the file open?\n"
"Yes to keep the file, No to close it."), ed->GetFilename().c_str());
if (cbMessageBox(msg, _("File changed!"), wxICON_QUESTION | wxYES_NO) == wxID_YES)
ed->SetModified(true);
--- End code ---
If a file gets modified outside the editor, this code is used :
editormanager.cpp (lines 1036 to 1038)
--- Code: --- msg.Printf(_("File %s is modified outside the IDE...\nDo you want to reload it (you will lose any unsaved work)?"),
ed->GetFilename().c_str());
ConfirmReplaceDlg dlg(Manager::Get()->GetAppWindow(), false, msg);
--- End code ---
The bug (I think it is a bug) only happens for me if I use very long file-/pathnames. I tested it.
The code with the "cbMessageBox" works for me, even with really deep nested paths.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version