fix file name when dropping files on windows; remove debug output from the Prefs

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10308 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2005-07-18 00:29:12 +00:00
parent 6d8d1f3d62
commit fbd55b518a
3 changed files with 15 additions and 17 deletions

View File

@ -1,3 +1,11 @@
2005-07-18 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* QPrefsDialog.C (switch_copierLB, switch_copierCO): remove debug
information
* QWorkArea.C (dropEvent): convert file name to internal path
before loading it.
2005-07-17 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* QGraphics.C (update_contents): fix out of range access.

View File

@ -552,8 +552,6 @@ void QPrefsDialog::switch_copierLB(int nr)
{
std::string const browser_text =
fromqstr(copiersModule->AllCopiersLB->currentText());
lyxerr << "switch_copierLB(" << nr << ")\n"
<< "browser_text " << browser_text << std::endl;
Format const * fmt = getFormat(browser_text);
if (fmt == 0)
return;
@ -562,11 +560,6 @@ void QPrefsDialog::switch_copierLB(int nr)
string const & gui_name = fmt->prettyname();
string const & command = form_->movers().command(fmt_name);
lyxerr << "switch_copierLB(" << nr << ")\n"
<< "fmt_name " << fmt_name << '\n'
<< "gui_name " << gui_name << '\n'
<< "command " << command << std::endl;
copiersModule->copierED->clear();
int const combo_size = copiersModule->copierFormatCO->count();
for (int i = 0; i < combo_size; ++i) {
@ -575,7 +568,6 @@ void QPrefsDialog::switch_copierLB(int nr)
if (text == gui_name) {
copiersModule->copierFormatCO->setCurrentItem(i);
copiersModule->copierED->setText(toqstr(command));
lyxerr << "found combo item " << i << std::endl;
break;
}
}
@ -587,8 +579,6 @@ void QPrefsDialog::switch_copierCO(int nr)
{
std::string const combo_text =
fromqstr(copiersModule->copierFormatCO->currentText());
lyxerr << "switch_copierCO(" << nr << ")\n"
<< "combo_text " << combo_text << std::endl;
Format const * fmt = getFormat(combo_text);
if (fmt == 0)
return;
@ -597,11 +587,6 @@ void QPrefsDialog::switch_copierCO(int nr)
string const & gui_name = fmt->prettyname();
string const & command = form_->movers().command(fmt_name);
lyxerr << "switch_copierCO(" << nr << ")\n"
<< "fmt_name " << fmt_name << '\n'
<< "gui_name " << gui_name << '\n'
<< "command " << command << std::endl;
copiersModule->copierED->setText(toqstr(command));
int const index = copiersModule->AllCopiersLB->currentItem();

View File

@ -18,6 +18,7 @@
#include "debug.h"
#include "funcrequest.h"
#include "LColor.h"
#include "support/os.h"
#include <qapplication.h>
#include <qclipboard.h>
@ -37,6 +38,8 @@
using std::endl;
using std::string;
namespace os = lyx::support::os;
namespace {
QWorkArea const * wa_ptr = 0;
}
@ -225,7 +228,9 @@ void QWorkArea::dropEvent(QDropEvent* event)
lyxerr[Debug::GUI] << "QWorkArea::dropEvent: got URIs!"
<< endl;
for (QStringList::Iterator i = files.begin();
i!=files.end(); ++i)
dispatch(FuncRequest(LFUN_FILE_OPEN, fromqstr(*i)));
i!=files.end(); ++i) {
string const file = os::internal_path(fromqstr(*i));
dispatch(FuncRequest(LFUN_FILE_OPEN, file));
}
}
}