Re: Valgrind bug report
Michael Schmitt wrote: enclosed please find some new (?) bug reports. Is QPreambleDialogBase.ui old cruft that should be removed??? Yes. -- Angus
Re: Cross-reference dialog: Return activates Goto label button
Michael Schmitt wrote: ... there is a very annoying bug in the cross-reference dialog. If you press Return, the Goto Label button is activated rather than OK. This is particularly confusing to users (like me) who are used to work with the keyboard rather than with the mouse. I guess it would be very trivial to fix this, right? Michael, it turns out that none of our dialogs bind the return key to the OK button. Instead all (well, current almost all) of the dialogs with an OK button bind the Alt-O accelerator to the OK button. So, I'm going to treat your request as INVALID (in bugzilla terminology). OK? Having said that, I did get a little busy. The attached patch to LyX 1.3.7cvs binds Alt-O to the OK buttons of the Citation, ERT, Graphics, Index and Sendto dialogs. All dialogs should behave consistently in this regard now. The patch also cleans up the behaviour of the OK button in the Reference dialog: * when the dialog is opened the Label: field is empty (because no reference has been selected). Currently this is so the first time that the dialog is fired up, but as soon as you have highlighted an entry in the browser, subsequent shows of the dialog always fill the Label: field with the first element in the browser. * the OK button cannot be pressed when the Label: field is empty. (Can't enter an empty reference.) Currently, the OK button can always be pressed. Jean-Marc, if this is OK with you, I'll commit this patch to the 1.3.x tree and prepare an equivalent patch for 1.4. Angus (retired really but using LyX 1.3.6 and getting a little irritated by the reference dialog ;-))Index: src/frontends/qt2/QRef.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRef.C,v retrieving revision 1.16.2.3 diff -u -p -r1.16.2.3 QRef.C --- src/frontends/qt2/QRef.C 7 Mar 2005 14:03:05 - 1.16.2.3 +++ src/frontends/qt2/QRef.C 22 Jul 2005 10:12:14 - @@ -85,6 +85,8 @@ void QRef::update_contents() dialog_-bufferCO-setCurrentItem(controller().getBufferNum()); updateRefs(); + + bc().invalid(); } Index: src/frontends/qt2/QRefDialog.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRefDialog.C,v retrieving revision 1.7.2.2 diff -u -p -r1.7.2.2 QRefDialog.C --- src/frontends/qt2/QRefDialog.C 7 Dec 2004 10:49:13 - 1.7.2.2 +++ src/frontends/qt2/QRefDialog.C 22 Jul 2005 10:12:14 - @@ -36,7 +36,8 @@ QRefDialog::QRefDialog(QRef * form) void QRefDialog::changed_adaptor() { - form_-changed(); + if (!referenceED-text().isEmpty()) + form_-changed(); } @@ -51,7 +52,13 @@ void QRefDialog::refHighlighted(const QS if (form_-readOnly()) return; - referenceED-setText(sel); + int const cur_item = refsLB-currentItem(); + bool const cur_item_selected = cur_item = 0 ? + refsLB-isSelected(cur_item) : false; + + if (cur_item_selected) + referenceED-setText(sel); + if (form_-at_ref_) form_-gotoRef(); gotoPB-setEnabled(true); Index: src/frontends/qt2/ui/QBibtexDialogBase.ui === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QBibtexDialogBase.ui,v retrieving revision 1.1.2.3 diff -u -p -r1.1.2.3 QBibtexDialogBase.ui --- src/frontends/qt2/ui/QBibtexDialogBase.ui 7 Mar 2005 14:03:05 - 1.1.2.3 +++ src/frontends/qt2/ui/QBibtexDialogBase.ui 22 Jul 2005 10:12:15 - @@ -13,7 +13,7 @@ rect x0/x y0/y -width317/width +width313/width height338/height /rect /property @@ -257,7 +257,7 @@ /property property stdset=1 nametext/name -stringOK/string +stringamp;OK/string /property property stdset=1 nameautoDefault/name Index: src/frontends/qt2/ui/QCitationDialogBase.ui === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QCitationDialogBase.ui,v retrieving revision 1.1.2.3 diff -u -p -r1.1.2.3 QCitationDialogBase.ui --- src/frontends/qt2/ui/QCitationDialogBase.ui 30 Mar 2005 13:58:35 - 1.1.2.3 +++ src/frontends/qt2/ui/QCitationDialogBase.ui 22 Jul 2005 10:12:16 - @@ -13,7 +13,7 @@ rect x0/x y0/y -width609/width +width605/width height416/height /rect /property @@ -89,7 +89,7 @@ /property property stdset=1 nametext/name -stringOK/string +stringamp;OK/string /property property stdset=1 nameautoDefault/name Index: src/frontends/qt2/ui/QERTDialogBase.ui
Re: [Bug 1656] command gnome-session-save kills lyx!
Hello Lars, You had a simple fix that avoids the crash, didn't you Stephan? yes I have. Yesterday I came back to Berlin and since today I'm online again... After a vacation of 2 weeks I have to do some real work. But I'll provide the patch shortly. In Paris I failed to compile the patched version because of an incomplete update or bad precompiled headers or whatever, I don't know. So I didn't check it in (with Michaels account). Now it compiles again and I send you the patch. Regards, Stephan -- Index: src/frontends/qt2/lyx_gui.C === RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/lyx_gui.C,v retrieving revision 1.86 diff -u -p -r1.86 lyx_gui.C --- src/frontends/qt2/lyx_gui.C 2005/07/16 15:55:35 1.86 +++ src/frontends/qt2/lyx_gui.C 2005/07/22 11:38:42 @@ -51,6 +51,7 @@ #endif #include qapplication.h +#include qsessionmanager.h #if QT_VERSION = 0x030100 #include qeventloop.h #endif @@ -114,6 +115,7 @@ class LQApplication : public QApplicatio public: LQApplication(int argc, char ** argv); ~LQApplication(); + void commitData(QSessionManager sm); #ifdef Q_WS_X11 bool x11EventFilter (XEvent * ev) { return lyxX11EventFilter(ev); } #endif @@ -140,6 +142,28 @@ LQApplication::~LQApplication() if (locked()) unlock(); #endif +} + + +void LQApplication::commitData(QSessionManager sm) +{ + /// Maybe someone should do something sensible here. + /// The implementation is required to avoid an application exit + /// when session state save is triggered by session manager. + /// The default implementation sends a close event to all + /// visible top level widgets when session managment allows + /// interaction. + /// + /// Following is a (currently not working) proposal... + /// The problem is a blocking application when + /// BufferList::quitWriteAll wants to open the question + /// alert message dialog. + /// Qt doesn't return from it and no box is opened. + /// if ( sm.allowsInteraction() ) { + /// if ( !bufferlist.quitWriteAll() ) { + /// sm.cancel(); + /// } + /// } }
Re: Cross-reference dialog: Return activates Goto label button
Angus Leeming wrote: Michael Schmitt wrote: ... there is a very annoying bug in the cross-reference dialog. If you press Return, the Goto Label button is activated rather than OK. This is particularly confusing to users (like me) who are used to work with the keyboard rather than with the mouse. I guess it would be very trivial to fix this, right? Michael, it turns out that none of our dialogs bind the return key to the OK button. Instead all (well, current almost all) of the dialogs with an OK button bind the Alt-O accelerator to the OK button. So, I'm going to treat your request as INVALID (in bugzilla terminology). OK? I continued to dig. It turns out that we have this: RefDialogBase.C:okPB-setDefault( TRUE ); which means that the return key *should* be bound to the OK button. Something is subverting this aim. Further investigation reveals this in RefDialogBase.C: connect( refsLB, SIGNAL( selected(const QString) ), this, SLOT( refSelected(const QString) ) ); Hitting the Return key once an entry in refsLB has been highlighted causes the signal to refSelected to be emitted. It's this that is toggling the goto behaviour. Given that the Goto button is already bound to the Alt-G shortcut, it seems reasonable to remove the connection above. Doing so, however, doesn't result in the Return key being bound to the OK button. In fact, the Return key has no discernible effect at all. I'm baffled by that, but suggest that the attached patch (removing the connection above) is a monotonic improvement over existing behaviour. Use Alt-G as a shortcut to the Goto button and Alt-O for the OK button. The patch also fixes multiply-defined shortcuts, as complained about by the Qt designer tool. Don't use Alt-C as a shortcut to the Close/Cancel button; use ESC. OK, JMarc? -- AngusIndex: src/frontends/qt2/QRef.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRef.C,v retrieving revision 1.16.2.3 diff -u -p -r1.16.2.3 QRef.C --- src/frontends/qt2/QRef.C 7 Mar 2005 14:03:05 - 1.16.2.3 +++ src/frontends/qt2/QRef.C 22 Jul 2005 12:06:38 - @@ -85,6 +85,8 @@ void QRef::update_contents() dialog_-bufferCO-setCurrentItem(controller().getBufferNum()); updateRefs(); + + bc().invalid(); } Index: src/frontends/qt2/QRefDialog.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRefDialog.C,v retrieving revision 1.7.2.2 diff -u -p -r1.7.2.2 QRefDialog.C --- src/frontends/qt2/QRefDialog.C 7 Dec 2004 10:49:13 - 1.7.2.2 +++ src/frontends/qt2/QRefDialog.C 22 Jul 2005 12:06:38 - @@ -36,7 +36,8 @@ QRefDialog::QRefDialog(QRef * form) void QRefDialog::changed_adaptor() { - form_-changed(); + if (!referenceED-text().isEmpty()) + form_-changed(); } @@ -51,7 +52,13 @@ void QRefDialog::refHighlighted(const QS if (form_-readOnly()) return; - referenceED-setText(sel); + int const cur_item = refsLB-currentItem(); + bool const cur_item_selected = cur_item = 0 ? + refsLB-isSelected(cur_item) : false; + + if (cur_item_selected) + referenceED-setText(sel); + if (form_-at_ref_) form_-gotoRef(); gotoPB-setEnabled(true); Index: src/frontends/qt2/ui/QBibtexDialogBase.ui === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QBibtexDialogBase.ui,v retrieving revision 1.1.2.3 diff -u -p -r1.1.2.3 QBibtexDialogBase.ui --- src/frontends/qt2/ui/QBibtexDialogBase.ui 7 Mar 2005 14:03:05 - 1.1.2.3 +++ src/frontends/qt2/ui/QBibtexDialogBase.ui 22 Jul 2005 12:06:39 - @@ -13,7 +13,7 @@ rect x0/x y0/y -width317/width +width313/width height338/height /rect /property @@ -257,7 +257,7 @@ /property property stdset=1 nametext/name -stringOK/string +stringamp;OK/string /property property stdset=1 nameautoDefault/name Index: src/frontends/qt2/ui/QCharacterDialogBase.ui === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QCharacterDialogBase.ui,v retrieving revision 1.2.2.1 diff -u -p -r1.2.2.1 QCharacterDialogBase.ui --- src/frontends/qt2/ui/QCharacterDialogBase.ui 25 Feb 2003 13:03:30 - 1.2.2.1 +++ src/frontends/qt2/ui/QCharacterDialogBase.ui 22 Jul 2005 12:06:40 - @@ -13,7 +13,7 @@ rect x0/x y0/y -width437/width +width433/width height368/height /rect /property @@ -513,7 +513,7 @@ /property property stdset=1 nametext/name -
Re: Cross-reference dialog: Return activates Goto label button
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Doing so, however, doesn't result in the Return key being bound Angus to the OK button. In fact, the Return key has no discernible Angus effect at all. I'm baffled by that, but suggest that the Angus attached patch (removing the connection above) is a monotonic Angus improvement over existing behaviour. Use Alt-G as a shortcut to Angus the Goto button and Alt-O for the OK button. Angus The patch also fixes multiply-defined shortcuts, as complained Angus about by the Qt designer tool. Don't use Alt-C as a shortcut to Angus the Close/Cancel button; use ESC. Angus OK, JMarc? Yes. JMarc
(Juergen) paper settings
Jürgen, didn't you do something with paper settings recently? I notice this when compiling 1.4: QGraphics.C: In member function `virtual void lyx::frontend::QGraphics::update_contents()': QGraphics.C:173: warning: enumeration value `PAPER_CUSTOM' not handled in switch QGraphics.C:173: warning: enumeration value `PAPER_B3' not handled in switch QGraphics.C:173: warning: enumeration value `PAPER_B4' not handled in switch -- Angus
Re: (Juergen) paper settings
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Jürgen, didn't you do something with paper settings recently? I Angus notice this when compiling 1.4: It was José. He's supposed to fix it eventually. There are other places where this happens, but it is believed to be harmless. JMarc
Re: (Juergen) paper settings
On Friday 22 July 2005 14:35, Jean-Marc Lasgouttes wrote: Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Jürgen, didn't you do something with paper settings recently? I Angus notice this when compiling 1.4: It was José. He's supposed to fix it eventually. There are other places where this happens, but it is believed to be harmless. That is true on both accounts. JMarc -- José Abílio
[PATCHES 14x, 13x] Various Qt UI tweaks
I've already got the OK from JMarc for the 1.3.x version of this, byt attach it and the 1.4.x equivalent for completeness sake. Committing now. -- Angus qt_13x.diff.bz2 Description: BZip2 compressed data qt_14x.diff.bz2 Description: BZip2 compressed data
Re: Cross-reference dialog: Return activates Goto label button
On Jul 22, 2005, at 8:17 AM, Angus Leeming wrote: I continued to dig. It turns out that we have this: RefDialogBase.C:okPB-setDefault( TRUE ); which means that the return key *should* be bound to the OK button. Something is subverting this aim. Further investigation reveals this in RefDialogBase.C: connect( refsLB, SIGNAL( selected(const QString) ), this, SLOT( refSelected(const QString) ) ); Hitting the Return key once an entry in refsLB has been highlighted causes the signal to refSelected to be emitted. It's this that is toggling the goto behaviour. Given that the Goto button is already bound to the Alt-G shortcut, it seems reasonable to remove the connection above. Doing so, however, doesn't result in the Return key being bound to the OK button. In fact, the Return key has no discernible effect at all. I'm baffled by that, but suggest that the attached patch (removing the connection above) is a monotonic improvement over existing behaviour. Use Alt-G as a shortcut to the Goto button and Alt-O for the OK button. The patch also fixes multiply-defined shortcuts, as complained about by the Qt designer tool. Don't use Alt-C as a shortcut to the Close/Cancel button; use ESC. This helps ... but not so much on the Mac. It fixes the problem of return being connected to the Goto button. However, the workaround fails: None of the Alt- shortcuts in any dialog box work for me. I can usually navigate from field to field with tab (when a sequence has been defined), and esc always cancels; moreover, I can sometimes (I think always when the dialog consists only of buttons, with no other fields -- such as the dialog that pops up when you try closing a document with unsaved changes) use the arrow keys and then return to select a different button than is selected by default. I believe this is a Qt/Mac problem, since it worked with earlier versions of Qt/Mac but appeared a year or so ago with one of their updates. Nonetheless, the trouble with the cross-reference dialog is that the OK button is highlighted, which should mean that pressing return selects it. I can't think of another dialog in which return does not select the highlighted button. Bennett
Re: TeX Info Patch
Juergen Spitzmueller wrote: Attached is the patch. I'll create the bug entry. So can I apply this? Jürgen
Re: Cross-reference dialog: Return activates Goto label button
Bennett Helm wrote: None of the Alt- shortcuts in any dialog box work for me. I believe this is a Qt/Mac problem, since it worked with earlier versions of Qt/Mac but appeared a year or so ago with one of their updates. Given that the Trolls have now released Qt4, they're unlikely to be too interested in fixing Qt3. However, you could always submit a bug report: http://www.trolltech.com/developer/tasktracker.html It doesn't show up anything when searching for Mac Alt. Nonetheless, the trouble with the cross-reference dialog is that the OK button is highlighted, which should mean that pressing return selects it. I can't think of another dialog in which return does not select the highlighted button. Sure. I'm irritated by it too. -- Angus
Re: [patch] bug 1938 (newlines in tabular)
Juergen Spitzmueller wrote: Assertion triggered in const LyXFont Paragraph::getFontSettings(const BufferParams, int) const by failing check pos = size() in file paragraph.C:309 It appears like the problem is in InsetText::setAutoBreakRows, where the newlines are being erased, but the cursor is not reset: // remove previously existing newlines ParagraphList::iterator it = paragraphs().begin(); ParagraphList::iterator end = paragraphs().end(); for (; it != end; ++it) for (int i = 0; i it-size(); ++i) if (it-isNewline(i)) it-erase(i); Should a LyXCursor be passed to setAutoBreakRows, or is there another solution? Jürgen
Re: lyx-devel lib/lyx2lyx/: ChangeLog LyX.py lyx_1_4.py
[EMAIL PROTECTED] wrote: Log message: remove wrong comments and add 1.3.6 to the list of releases Maybe a dumn question, but what happened to format 222? Ie, why not range(222,244)? /usr/bin/cvs -f diff -kk -u -r 1.19 -r 1.20 lib/lyx2lyx/LyX.py @@ -45,7 +45,7 @@ format_relation = [(0_10, [210], [0. (1_1_6, [217], [1.1.6,1.1.6fix1,1.1.6fix2,1.1]), (1_1_6fix3, [218], [1.1.6fix3,1.1.6fix4,1.1]), (1_2, [220], [1.2.0,1.2.1,1.2.3,1.2.4,1.2]), - (1_3, [221], [1.3.0,1.3.1,1.3.2,1.3.3,1.3.4,1.3.5,1.3]), + (1_3, [221], [1.3.0,1.3.1,1.3.2,1.3.3,1.3.4,1.3.5,1.3.6,1.3]), (1_4, range(223,244), [1.4.0cvs,1.4])] -- Angus
Re: lyx-devel lib/lyx2lyx/: ChangeLog LyX.py lyx_1_4.py
Angus Leeming wrote: Maybe a dumn question, but what happened to format 222? That is a question that I have asked myself, too. lyx2lyx pretends that 222 does not exist and that change tracking was added in 223. Georg
Re: lyx-devel lib/lyx2lyx/: ChangeLog LyX.py lyx_1_4.py
On Friday 22 July 2005 16:11, Angus Leeming wrote: [EMAIL PROTECTED] wrote: Log message: remove wrong comments and add 1.3.6 to the list of releases Maybe a dumn question, but what happened to format 222? Ie, why not range(222,244)? I asked this same question before. After reading development/FORMAT I think that format 222 was mainly used by John when inserting change tracking to lyx. Several other changes were made until 225. Since then we have been more carefull about the format changing. We have decide this in Chemnitz in 2003, so you can not pledge innocent here. This process became better and now everytime we have a file format change we have the appropriate lyx2lyx plugins. For historical correctness follows a patch attached. -- José Abílio ? l2ly_test.sh Index: LyX.py === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/LyX.py,v retrieving revision 1.20 diff -u -p -r1.20 LyX.py --- LyX.py 22 Jul 2005 15:03:44 - 1.20 +++ LyX.py 22 Jul 2005 15:51:19 - @@ -46,7 +46,7 @@ format_relation = [(0_10, [210], [0. (1_1_6fix3, [218], [1.1.6fix3,1.1.6fix4,1.1]), (1_2, [220], [1.2.0,1.2.1,1.2.3,1.2.4,1.2]), (1_3, [221], [1.3.0,1.3.1,1.3.2,1.3.3,1.3.4,1.3.5,1.3.6,1.3]), - (1_4, range(223,244), [1.4.0cvs,1.4])] + (1_4, range(222,244), [1.4.0cvs,1.4])] def formats_list(): Index: lyx_1_4.py === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyx_1_4.py,v retrieving revision 1.41 diff -u -p -r1.41 lyx_1_4.py --- lyx_1_4.py 22 Jul 2005 15:03:44 - 1.41 +++ lyx_1_4.py 22 Jul 2005 15:51:19 - @@ -1896,7 +1896,8 @@ def remove_paperpackage(file): # Convertion hub # -convert = [[223, [insert_tracking_changes, add_end_header, remove_color_default, +convert = [[222, [insert_tracking_changes]], + [223, [add_end_header, remove_color_default, convert_spaces, convert_bibtex, remove_insetparent]], [224, [convert_external, convert_comment]], [225, [add_end_layout, layout2begin_layout, convert_end_document, @@ -1943,8 +1944,8 @@ revert = [[242, []], [224, [rm_end_layout, begin_layout2layout, revert_end_document, revert_valignment_middle, convert_vspace, convert_frameless_box]], [223, [revert_external_2, revert_comment, revert_eqref]], - [221, [rm_end_header, revert_spaces, revert_bibtex, - rm_tracking_changes, rm_body_changes]]] + [222, [rm_end_header, revert_spaces, revert_bibtex]], + [221, [rm_tracking_changes, rm_body_changes]]] if __name__ == __main__:
[PATCHES 13x, 14x] XForms find replace dialog
Udo Müller has spotted a bug in the XForms find replace dialog which was trimming spaces from either end of the find and the replace strings: http://article.gmane.org/gmane.editors.lyx.general:23472 The attached patches squash the bug. Since they're trivial and squash an obvious bug, I'm committing now. -- AngusIndex: status.13x === RCS file: /usr/local/lyx/cvsroot/lyx-devel/Attic/status.13x,v retrieving revision 1.1.2.263 diff -u -p -B -b -w -r1.1.2.263 status.13x --- status.13x 22 Jul 2005 13:46:03 - 1.1.2.263 +++ status.13x 22 Jul 2005 16:43:55 - @@ -37,6 +37,9 @@ What's new - The Return key is no longer bound to the Goto button in the reference dialog. [Qt only]. +- Do not trim spaces from either end of the find and replace strings in + the Edit-Find Replace... dialog. [XForms only]. + * Configuration/Installation: - compile without STL compatibilty support, since some systems do that Index: src/frontends/xforms/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v retrieving revision 1.661.2.33 diff -u -p -B -b -w -r1.661.2.33 ChangeLog --- src/frontends/xforms/ChangeLog 4 Jul 2005 13:24:43 - 1.661.2.33 +++ src/frontends/xforms/ChangeLog 22 Jul 2005 16:44:00 - @@ -1,3 +1,7 @@ +2005-07-22 Angus Leeming [EMAIL PROTECTED] + + * FormSearch.C (input): do not trim the find and replace strings. + 2005-07-04 Jürgen Spitzmüller [EMAIL PROTECTED] * FormToc.C: consider gui name, not type, when trying to set the Index: src/frontends/xforms/FormSearch.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormSearch.C,v retrieving revision 1.21.2.1 diff -u -p -B -b -w -r1.21.2.1 FormSearch.C --- src/frontends/xforms/FormSearch.C 7 Dec 2004 10:49:21 - 1.21.2.1 +++ src/frontends/xforms/FormSearch.C 22 Jul 2005 16:44:01 - @@ -15,7 +15,6 @@ #include FormSearch.h #include forms/form_search.h #include Tooltips.h -#include xforms_helpers.h #include FORMS_H_LOCATION @@ -65,10 +64,24 @@ void FormSearch::update() } +namespace { + +string const getUntrimmedString(FL_OBJECT * ob) +{ + lyx::Assert(ob-objclass == FL_INPUT); + + char const * const tmp = fl_get_input(ob); + return tmp ? tmp : string(); +} + +} // namespace anon + + + ButtonPolicy::SMInput FormSearch::input(FL_OBJECT * ob, long) { if (ob == dialog_-button_findnext) { - controller().find(getString(dialog_-input_search), + controller().find(getUntrimmedString(dialog_-input_search), fl_get_button(dialog_-check_casesensitive), fl_get_button(dialog_-check_matchword), !fl_get_button(dialog_-check_searchbackwards)); @@ -76,8 +89,8 @@ ButtonPolicy::SMInput FormSearch::input( } else if (ob == dialog_-button_replace || ob == dialog_-button_replaceall) { bool const all = (ob == dialog_-button_replaceall); - controller().replace(getString(dialog_-input_search), - getString(dialog_-input_replace), + controller().replace(getUntrimmedString(dialog_-input_search), + getUntrimmedString(dialog_-input_replace), fl_get_button(dialog_-check_casesensitive), fl_get_button(dialog_-check_matchword), all); Index: src/frontends/xforms/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v retrieving revision 1.998 diff -u -p -B -b -w -r1.998 ChangeLog --- src/frontends/xforms/ChangeLog 20 Jul 2005 06:51:24 - 1.998 +++ src/frontends/xforms/ChangeLog 22 Jul 2005 16:43:41 - @@ -1,3 +1,7 @@ +2005-07-22 Angus Leeming [EMAIL PROTECTED] + + * FormSearch.C (input): do not trim the find and replace strings. + 2005-07-20 Jürgen Spitzmüller [EMAIL PROTECTED] * FormDocument.C: Index: src/frontends/xforms/FormSearch.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormSearch.C,v retrieving revision 1.31 diff -u -p -B -b -w -r1.31 FormSearch.C --- src/frontends/xforms/FormSearch.C 19 May 2004 15:11:36 - 1.31 +++ src/frontends/xforms/FormSearch.C 22 Jul 2005 16:43:42 - @@ -15,7 +15,6 @@ #include forms/form_search.h #include Tooltips.h -#include xforms_helpers.h #include xformsBC.h #include lyx_forms.h @@ -71,10 +70,24 @@ void FormSearch::update() } +namespace { + +string const getUntrimmedString(FL_OBJECT * ob) +{ + BOOST_ASSERT(ob-objclass == FL_INPUT); + + char const * const tmp = fl_get_input(ob); + return tmp ? tmp : string(); +} + +} // namespace anon + + + ButtonPolicy::SMInput FormSearch::input(FL_OBJECT * ob, long) { if (ob == dialog_-button_findnext) { - controller().find(getString(dialog_-input_search), + controller().find(getUntrimmedString(dialog_-input_search),
Re: [PATCHES 13x, 14x] XForms find replace dialog
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Udo Müller has spotted a bug in the XForms find replace Angus dialog which was trimming spaces from either end of the find Angus and the replace strings: Angus http://article.gmane.org/gmane.editors.lyx.general:23472 Angus The attached patches squash the bug. Since they're trivial and Angus squash an obvious bug, I'm committing now. Well, the patch does not fit opimally in the code ;), but it does indeed fix a bug. Why do we trim spaces in getString, anyway? This seems really weird... JMarc
Re: [PATCHES 13x, 14x] XForms find replace dialog
Jean-Marc Lasgouttes wrote: Well, the patch does not fit opimally in the code ;), Je ne te comprends pas. but it does indeed fix a bug. Why do we trim spaces in getString, anyway? This seems really weird... I think it's because I found myself always adding the call to trim manually. It seems to be a reasonable strategy, given that this is the first report we've had of a problem with it. -- Angus
Re: lyx-devel /: Tag: BRANCH_1_3_X status.13x src/frontends/qt ...
[EMAIL PROTECTED] wrote: CVSROOT:/usr/local/lyx/cvsroot Module name:lyx-devel Repository: lyx-devel/src/frontends/qt2/ui/ Changes by: [EMAIL PROTECTED] 05/07/22 15:46:05 Log message: Various Qt UI tweaks. Angus, you are just too fast for me to follow. Thanks a lot!!! Michael
Re: Valgrind bug report
Angus Leeming wrote: Is QPreambleDialogBase.ui old cruft that should be removed??? Yes. Ok, I will move it to the attic tomorrow. Michael
Re: Cross-reference dialog: Return activates "Goto label" button
Angus Leeming wrote: > Michael Schmitt wrote: >> ... there is a very annoying "bug" in the cross-reference dialog. If you >> press "Return", the "Goto Label" button is activated rather than "OK". >> This is particularly confusing to users (like me) who are used to work >> with the keyboard rather than with the mouse. > >> I guess it would be very trivial to fix this, right? > > Michael, it turns out that none of our dialogs bind the return key to the > OK button. Instead all (well, current almost all) of the dialogs with an > OK button bind the Alt-O accelerator to the OK button. So, I'm going to > treat your request as INVALID (in bugzilla terminology). OK? I continued to dig. It turns out that we have this: RefDialogBase.C:okPB->setDefault( TRUE ); which means that the return key *should* be bound to the OK button. Something is subverting this aim. Further investigation reveals this in RefDialogBase.C: connect( refsLB, SIGNAL( selected(const QString&) ), this, SLOT( refSelected(const QString&) ) ); Hitting the Return key once an entry in refsLB has been highlighted causes the signal to refSelected to be emitted. It's this that is toggling the goto behaviour. Given that the Goto button is already bound to the Alt-G shortcut, it seems reasonable to remove the connection above. Doing so, however, doesn't result in the Return key being bound to the OK button. In fact, the Return key has no discernible effect at all. I'm baffled by that, but suggest that the attached patch (removing the connection above) is a monotonic improvement over existing behaviour. Use Alt-G as a shortcut to the Goto button and Alt-O for the OK button. The patch also fixes multiply-defined shortcuts, as complained about by the Qt designer tool. Don't use Alt-C as a shortcut to the Close/Cancel button; use ESC. OK, JMarc? -- AngusIndex: src/frontends/qt2/QRef.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRef.C,v retrieving revision 1.16.2.3 diff -u -p -r1.16.2.3 QRef.C --- src/frontends/qt2/QRef.C 7 Mar 2005 14:03:05 - 1.16.2.3 +++ src/frontends/qt2/QRef.C 22 Jul 2005 12:06:38 - @@ -85,6 +85,8 @@ void QRef::update_contents() dialog_->bufferCO->setCurrentItem(controller().getBufferNum()); updateRefs(); + + bc().invalid(); } Index: src/frontends/qt2/QRefDialog.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRefDialog.C,v retrieving revision 1.7.2.2 diff -u -p -r1.7.2.2 QRefDialog.C --- src/frontends/qt2/QRefDialog.C 7 Dec 2004 10:49:13 - 1.7.2.2 +++ src/frontends/qt2/QRefDialog.C 22 Jul 2005 12:06:38 - @@ -36,7 +36,8 @@ QRefDialog::QRefDialog(QRef * form) void QRefDialog::changed_adaptor() { - form_->changed(); + if (!referenceED->text().isEmpty()) + form_->changed(); } @@ -51,7 +52,13 @@ void QRefDialog::refHighlighted(const QS if (form_->readOnly()) return; - referenceED->setText(sel); + int const cur_item = refsLB->currentItem(); + bool const cur_item_selected = cur_item >= 0 ? + refsLB->isSelected(cur_item) : false; + + if (cur_item_selected) + referenceED->setText(sel); + if (form_->at_ref_) form_->gotoRef(); gotoPB->setEnabled(true); Index: src/frontends/qt2/ui/QBibtexDialogBase.ui === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QBibtexDialogBase.ui,v retrieving revision 1.1.2.3 diff -u -p -r1.1.2.3 QBibtexDialogBase.ui --- src/frontends/qt2/ui/QBibtexDialogBase.ui 7 Mar 2005 14:03:05 - 1.1.2.3 +++ src/frontends/qt2/ui/QBibtexDialogBase.ui 22 Jul 2005 12:06:39 - @@ -13,7 +13,7 @@ 0 0 -317 +313 338 @@ -257,7 +257,7 @@ text -OK +OK autoDefault Index: src/frontends/qt2/ui/QCharacterDialogBase.ui === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QCharacterDialogBase.ui,v retrieving revision 1.2.2.1 diff -u -p -r1.2.2.1 QCharacterDialogBase.ui --- src/frontends/qt2/ui/QCharacterDialogBase.ui 25 Feb 2003 13:03:30 - 1.2.2.1 +++ src/frontends/qt2/ui/QCharacterDialogBase.ui 22 Jul 2005 12:06:40 - @@ -13,7 +13,7 @@ 0 0 -437 +433 368 @@ -513,7 +513,7 @@ text -Close +Close autoDefault Index: src/frontends/qt2/ui/QCitationDialogBase.ui
Re: Cross-reference dialog: Return activates "Goto label" button
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Doing so, however, doesn't result in the Return key being bound Angus> to the OK button. In fact, the Return key has no discernible Angus> effect at all. I'm baffled by that, but suggest that the Angus> attached patch (removing the connection above) is a monotonic Angus> improvement over existing behaviour. Use Alt-G as a shortcut to Angus> the Goto button and Alt-O for the OK button. Angus> The patch also fixes multiply-defined shortcuts, as complained Angus> about by the Qt designer tool. Don't use Alt-C as a shortcut to Angus> the Close/Cancel button; use ESC. Angus> OK, JMarc? Yes. JMarc
(Juergen) paper settings
Jürgen, didn't you do something with paper settings recently? I notice this when compiling 1.4: QGraphics.C: In member function `virtual void lyx::frontend::QGraphics::update_contents()': QGraphics.C:173: warning: enumeration value `PAPER_CUSTOM' not handled in switch QGraphics.C:173: warning: enumeration value `PAPER_B3' not handled in switch QGraphics.C:173: warning: enumeration value `PAPER_B4' not handled in switch -- Angus
Re: (Juergen) paper settings
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Jürgen, didn't you do something with paper settings recently? I Angus> notice this when compiling 1.4: It was José. He's supposed to fix it eventually. There are other places where this happens, but it is believed to be harmless. JMarc
Re: (Juergen) paper settings
On Friday 22 July 2005 14:35, Jean-Marc Lasgouttes wrote: > > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> Jürgen, didn't you do something with paper settings recently? I > Angus> notice this when compiling 1.4: > > It was José. He's supposed to fix it eventually. There are other > places where this happens, but it is believed to be harmless. That is true on both accounts. > JMarc -- José Abílio
[PATCHES 14x, 13x] Various Qt UI tweaks
I've already got the OK from JMarc for the 1.3.x version of this, byt attach it and the 1.4.x equivalent for completeness sake. Committing now. -- Angus qt_13x.diff.bz2 Description: BZip2 compressed data qt_14x.diff.bz2 Description: BZip2 compressed data
Re: Cross-reference dialog: Return activates "Goto label" button
On Jul 22, 2005, at 8:17 AM, Angus Leeming wrote: I continued to dig. It turns out that we have this: RefDialogBase.C:okPB->setDefault( TRUE ); which means that the return key *should* be bound to the OK button. Something is subverting this aim. Further investigation reveals this in RefDialogBase.C: connect( refsLB, SIGNAL( selected(const QString&) ), this, SLOT( refSelected(const QString&) ) ); Hitting the Return key once an entry in refsLB has been highlighted causes the signal to refSelected to be emitted. It's this that is toggling the goto behaviour. Given that the Goto button is already bound to the Alt-G shortcut, it seems reasonable to remove the connection above. Doing so, however, doesn't result in the Return key being bound to the OK button. In fact, the Return key has no discernible effect at all. I'm baffled by that, but suggest that the attached patch (removing the connection above) is a monotonic improvement over existing behaviour. Use Alt-G as a shortcut to the Goto button and Alt-O for the OK button. The patch also fixes multiply-defined shortcuts, as complained about by the Qt designer tool. Don't use Alt-C as a shortcut to the Close/Cancel button; use ESC. This helps ... but not so much on the Mac. It fixes the problem of being connected to the "Goto" button. However, the workaround fails: None of the Alt- shortcuts in any dialog box work for me. I can usually navigate from field to field with (when a sequence has been defined), and always cancels; moreover, I can sometimes (I think always when the dialog consists only of buttons, with no other fields -- such as the dialog that pops up when you try closing a document with unsaved changes) use the arrow keys and then to select a different button than is selected by default. I believe this is a Qt/Mac problem, since it worked with earlier versions of Qt/Mac but appeared a year or so ago with one of their updates. Nonetheless, the trouble with the cross-reference dialog is that the "OK" button is highlighted, which should mean that pressing selects it. I can't think of another dialog in which does not select the highlighted button. Bennett
Re: TeX Info Patch
Juergen Spitzmueller wrote: > Attached is the patch. I'll create the bug entry. So can I apply this? Jürgen
Re: Cross-reference dialog: Return activates "Goto label" button
Bennett Helm wrote: > None of the Alt- shortcuts in any dialog box work for me. > I believe this is a Qt/Mac problem, since it worked with earlier > versions of Qt/Mac but appeared a year or so ago with one of their > updates. Given that the Trolls have now released Qt4, they're unlikely to be too interested in fixing Qt3. However, you could always submit a bug report: http://www.trolltech.com/developer/tasktracker.html It doesn't show up anything when searching for "Mac Alt". > Nonetheless, the trouble with the cross-reference dialog is that the > "OK" button is highlighted, which should mean that pressing > selects it. I can't think of another dialog in which does not > select the highlighted button. Sure. I'm irritated by it too. -- Angus
Re: [patch] bug 1938 (newlines in tabular)
Juergen Spitzmueller wrote: > Assertion triggered in const LyXFont Paragraph::getFontSettings(const > BufferParams&, int) const by failing check "pos <= size()" in file > paragraph.C:309 It appears like the problem is in InsetText::setAutoBreakRows, where the newlines are being erased, but the cursor is not reset: // remove previously existing newlines ParagraphList::iterator it = paragraphs().begin(); ParagraphList::iterator end = paragraphs().end(); for (; it != end; ++it) for (int i = 0; i < it->size(); ++i) if (it->isNewline(i)) it->erase(i); Should a LyXCursor be passed to setAutoBreakRows, or is there another solution? Jürgen
Re: lyx-devel lib/lyx2lyx/: ChangeLog LyX.py lyx_1_4.py
[EMAIL PROTECTED] wrote: > Log message: > remove wrong comments and add 1.3.6 to the list of releases Maybe a dumn question, but what happened to format 222? Ie, why not "range(222,244)"? > /usr/bin/cvs -f diff -kk -u -r 1.19 -r 1.20 lib/lyx2lyx/LyX.py @@ -45,7 +45,7 @@ format_relation = [("0_10", [210], ["0. ("1_1_6", [217], ["1.1.6","1.1.6fix1","1.1.6fix2","1.1"]), ("1_1_6fix3", [218], ["1.1.6fix3","1.1.6fix4","1.1"]), ("1_2", [220], ["1.2.0","1.2.1","1.2.3","1.2.4","1.2"]), - ("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3"]), + ("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3"]), ("1_4", range(223,244), ["1.4.0cvs","1.4"])] -- Angus
Re: lyx-devel lib/lyx2lyx/: ChangeLog LyX.py lyx_1_4.py
Angus Leeming wrote: > Maybe a dumn question, but what happened to format 222? That is a question that I have asked myself, too. lyx2lyx pretends that 222 does not exist and that change tracking was added in 223. Georg
Re: lyx-devel lib/lyx2lyx/: ChangeLog LyX.py lyx_1_4.py
On Friday 22 July 2005 16:11, Angus Leeming wrote: > [EMAIL PROTECTED] wrote: > > Log message: > > remove wrong comments and add 1.3.6 to the list of releases > > Maybe a dumn question, but what happened to format 222? > Ie, why not "range(222,244)"? I asked this same question before. After reading development/FORMAT I think that format 222 was mainly used by John when inserting change tracking to lyx. Several other changes were made until 225. Since then we have been more carefull about the format changing. We have decide this in Chemnitz in 2003, so you can not pledge innocent here. This process became better and now everytime we have a file format change we have the appropriate lyx2lyx plugins. For historical correctness follows a patch attached. -- José Abílio ? l2ly_test.sh Index: LyX.py === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/LyX.py,v retrieving revision 1.20 diff -u -p -r1.20 LyX.py --- LyX.py 22 Jul 2005 15:03:44 - 1.20 +++ LyX.py 22 Jul 2005 15:51:19 - @@ -46,7 +46,7 @@ format_relation = [("0_10", [210], ["0. ("1_1_6fix3", [218], ["1.1.6fix3","1.1.6fix4","1.1"]), ("1_2", [220], ["1.2.0","1.2.1","1.2.3","1.2.4","1.2"]), ("1_3", [221], ["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3"]), - ("1_4", range(223,244), ["1.4.0cvs","1.4"])] + ("1_4", range(222,244), ["1.4.0cvs","1.4"])] def formats_list(): Index: lyx_1_4.py === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyx_1_4.py,v retrieving revision 1.41 diff -u -p -r1.41 lyx_1_4.py --- lyx_1_4.py 22 Jul 2005 15:03:44 - 1.41 +++ lyx_1_4.py 22 Jul 2005 15:51:19 - @@ -1896,7 +1896,8 @@ def remove_paperpackage(file): # Convertion hub # -convert = [[223, [insert_tracking_changes, add_end_header, remove_color_default, +convert = [[222, [insert_tracking_changes]], + [223, [add_end_header, remove_color_default, convert_spaces, convert_bibtex, remove_insetparent]], [224, [convert_external, convert_comment]], [225, [add_end_layout, layout2begin_layout, convert_end_document, @@ -1943,8 +1944,8 @@ revert = [[242, []], [224, [rm_end_layout, begin_layout2layout, revert_end_document, revert_valignment_middle, convert_vspace, convert_frameless_box]], [223, [revert_external_2, revert_comment, revert_eqref]], - [221, [rm_end_header, revert_spaces, revert_bibtex, - rm_tracking_changes, rm_body_changes]]] + [222, [rm_end_header, revert_spaces, revert_bibtex]], + [221, [rm_tracking_changes, rm_body_changes]]] if __name__ == "__main__":
[PATCHES 13x, 14x] XForms find & replace dialog
Udo Müller has spotted a bug in the XForms find & replace dialog which was trimming spaces from either end of the "find" and the "replace" strings: http://article.gmane.org/gmane.editors.lyx.general:23472 The attached patches squash the bug. Since they're trivial and squash an obvious bug, I'm committing now. -- AngusIndex: status.13x === RCS file: /usr/local/lyx/cvsroot/lyx-devel/Attic/status.13x,v retrieving revision 1.1.2.263 diff -u -p -B -b -w -r1.1.2.263 status.13x --- status.13x 22 Jul 2005 13:46:03 - 1.1.2.263 +++ status.13x 22 Jul 2005 16:43:55 - @@ -37,6 +37,9 @@ What's new - The Return key is no longer bound to the Goto button in the reference dialog. [Qt only]. +- Do not trim spaces from either end of the find and replace strings in + the Edit->Find & Replace... dialog. [XForms only]. + * Configuration/Installation: - compile without STL compatibilty support, since some systems do that Index: src/frontends/xforms/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v retrieving revision 1.661.2.33 diff -u -p -B -b -w -r1.661.2.33 ChangeLog --- src/frontends/xforms/ChangeLog 4 Jul 2005 13:24:43 - 1.661.2.33 +++ src/frontends/xforms/ChangeLog 22 Jul 2005 16:44:00 - @@ -1,3 +1,7 @@ +2005-07-22 Angus Leeming <[EMAIL PROTECTED]> + + * FormSearch.C (input): do not trim the find and replace strings. + 2005-07-04 Jürgen Spitzmüller <[EMAIL PROTECTED]> * FormToc.C: consider gui name, not type, when trying to set the Index: src/frontends/xforms/FormSearch.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormSearch.C,v retrieving revision 1.21.2.1 diff -u -p -B -b -w -r1.21.2.1 FormSearch.C --- src/frontends/xforms/FormSearch.C 7 Dec 2004 10:49:21 - 1.21.2.1 +++ src/frontends/xforms/FormSearch.C 22 Jul 2005 16:44:01 - @@ -15,7 +15,6 @@ #include "FormSearch.h" #include "forms/form_search.h" #include "Tooltips.h" -#include "xforms_helpers.h" #include FORMS_H_LOCATION @@ -65,10 +64,24 @@ void FormSearch::update() } +namespace { + +string const getUntrimmedString(FL_OBJECT * ob) +{ + lyx::Assert(ob->objclass == FL_INPUT); + + char const * const tmp = fl_get_input(ob); + return tmp ? tmp : string(); +} + +} // namespace anon + + + ButtonPolicy::SMInput FormSearch::input(FL_OBJECT * ob, long) { if (ob == dialog_->button_findnext) { - controller().find(getString(dialog_->input_search), + controller().find(getUntrimmedString(dialog_->input_search), fl_get_button(dialog_->check_casesensitive), fl_get_button(dialog_->check_matchword), !fl_get_button(dialog_->check_searchbackwards)); @@ -76,8 +89,8 @@ ButtonPolicy::SMInput FormSearch::input( } else if (ob == dialog_->button_replace || ob == dialog_->button_replaceall) { bool const all = (ob == dialog_->button_replaceall); - controller().replace(getString(dialog_->input_search), - getString(dialog_->input_replace), + controller().replace(getUntrimmedString(dialog_->input_search), + getUntrimmedString(dialog_->input_replace), fl_get_button(dialog_->check_casesensitive), fl_get_button(dialog_->check_matchword), all); Index: src/frontends/xforms/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v retrieving revision 1.998 diff -u -p -B -b -w -r1.998 ChangeLog --- src/frontends/xforms/ChangeLog 20 Jul 2005 06:51:24 - 1.998 +++ src/frontends/xforms/ChangeLog 22 Jul 2005 16:43:41 - @@ -1,3 +1,7 @@ +2005-07-22 Angus Leeming <[EMAIL PROTECTED]> + + * FormSearch.C (input): do not trim the find and replace strings. + 2005-07-20 Jürgen Spitzmüller <[EMAIL PROTECTED]> * FormDocument.C: Index: src/frontends/xforms/FormSearch.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormSearch.C,v retrieving revision 1.31 diff -u -p -B -b -w -r1.31 FormSearch.C --- src/frontends/xforms/FormSearch.C 19 May 2004 15:11:36 - 1.31 +++ src/frontends/xforms/FormSearch.C 22 Jul 2005 16:43:42 - @@ -15,7 +15,6 @@ #include "forms/form_search.h" #include "Tooltips.h" -#include "xforms_helpers.h" #include "xformsBC.h" #include "lyx_forms.h" @@ -71,10 +70,24 @@ void FormSearch::update() } +namespace { + +string const getUntrimmedString(FL_OBJECT * ob) +{ + BOOST_ASSERT(ob->objclass == FL_INPUT); + + char const * const tmp = fl_get_input(ob); + return tmp ? tmp : string(); +} + +} // namespace anon + + + ButtonPolicy::SMInput FormSearch::input(FL_OBJECT * ob, long) { if (ob == dialog_->button_findnext) { - controller().find(getString(dialog_->input_search), +
Re: [PATCHES 13x, 14x] XForms find & replace dialog
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Udo Müller has spotted a bug in the XForms find & replace Angus> dialog which was trimming spaces from either end of the "find" Angus> and the "replace" strings: Angus> http://article.gmane.org/gmane.editors.lyx.general:23472 Angus> The attached patches squash the bug. Since they're trivial and Angus> squash an obvious bug, I'm committing now. Well, the patch does not fit opimally in the code ;), but it does indeed fix a bug. Why do we trim spaces in getString, anyway? This seems really weird... JMarc
Re: [PATCHES 13x, 14x] XForms find & replace dialog
Jean-Marc Lasgouttes wrote: > Well, the patch does not fit opimally in the code ;), Je ne te comprends pas. > but it does indeed fix a bug. > Why do we trim spaces in getString, anyway? This seems really weird... I think it's because I found myself always adding the call to trim manually. It seems to be a reasonable strategy, given that this is the first report we've had of a problem with it. -- Angus
Re: lyx-devel /: Tag: BRANCH_1_3_X status.13x src/frontends/qt ...
[EMAIL PROTECTED] wrote: CVSROOT:/usr/local/lyx/cvsroot Module name:lyx-devel Repository: lyx-devel/src/frontends/qt2/ui/ Changes by: [EMAIL PROTECTED] 05/07/22 15:46:05 Log message: Various Qt UI tweaks. Angus, you are just too fast for me to follow. Thanks a lot!!! Michael
Re: Valgrind bug report
Angus Leeming wrote: Is QPreambleDialogBase.ui old cruft that should be removed??? Yes. Ok, I will move it to the attic tomorrow. Michael
Re: Valgrind bug report
Michael Schmitt wrote: > enclosed please find some new (?) bug reports. > Is QPreambleDialogBase.ui old cruft that should be removed??? Yes. -- Angus
Re: Cross-reference dialog: Return activates "Goto label" button
Michael Schmitt wrote: > ... there is a very annoying "bug" in the cross-reference dialog. If you > press "Return", the "Goto Label" button is activated rather than "OK". > This is particularly confusing to users (like me) who are used to work > with the keyboard rather than with the mouse. > I guess it would be very trivial to fix this, right? Michael, it turns out that none of our dialogs bind the return key to the OK button. Instead all (well, current almost all) of the dialogs with an OK button bind the Alt-O accelerator to the OK button. So, I'm going to treat your request as INVALID (in bugzilla terminology). OK? Having said that, I did get a little busy. The attached patch to LyX 1.3.7cvs binds Alt-O to the OK buttons of the Citation, ERT, Graphics, Index and Sendto dialogs. All dialogs should behave consistently in this regard now. The patch also cleans up the behaviour of the OK button in the Reference dialog: * when the dialog is opened the "Label:" field is empty (because no reference has been selected). Currently this is so the first time that the dialog is fired up, but as soon as you have highlighted an entry in the browser, subsequent shows of the dialog always fill the "Label:" field with the first element in the browser. * the OK button cannot be pressed when the "Label:" field is empty. (Can't enter an empty reference.) Currently, the OK button can always be pressed. Jean-Marc, if this is OK with you, I'll commit this patch to the 1.3.x tree and prepare an equivalent patch for 1.4. Angus (retired really but using LyX 1.3.6 and getting a little irritated by the reference dialog ;-))Index: src/frontends/qt2/QRef.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRef.C,v retrieving revision 1.16.2.3 diff -u -p -r1.16.2.3 QRef.C --- src/frontends/qt2/QRef.C 7 Mar 2005 14:03:05 - 1.16.2.3 +++ src/frontends/qt2/QRef.C 22 Jul 2005 10:12:14 - @@ -85,6 +85,8 @@ void QRef::update_contents() dialog_->bufferCO->setCurrentItem(controller().getBufferNum()); updateRefs(); + + bc().invalid(); } Index: src/frontends/qt2/QRefDialog.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QRefDialog.C,v retrieving revision 1.7.2.2 diff -u -p -r1.7.2.2 QRefDialog.C --- src/frontends/qt2/QRefDialog.C 7 Dec 2004 10:49:13 - 1.7.2.2 +++ src/frontends/qt2/QRefDialog.C 22 Jul 2005 10:12:14 - @@ -36,7 +36,8 @@ QRefDialog::QRefDialog(QRef * form) void QRefDialog::changed_adaptor() { - form_->changed(); + if (!referenceED->text().isEmpty()) + form_->changed(); } @@ -51,7 +52,13 @@ void QRefDialog::refHighlighted(const QS if (form_->readOnly()) return; - referenceED->setText(sel); + int const cur_item = refsLB->currentItem(); + bool const cur_item_selected = cur_item >= 0 ? + refsLB->isSelected(cur_item) : false; + + if (cur_item_selected) + referenceED->setText(sel); + if (form_->at_ref_) form_->gotoRef(); gotoPB->setEnabled(true); Index: src/frontends/qt2/ui/QBibtexDialogBase.ui === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QBibtexDialogBase.ui,v retrieving revision 1.1.2.3 diff -u -p -r1.1.2.3 QBibtexDialogBase.ui --- src/frontends/qt2/ui/QBibtexDialogBase.ui 7 Mar 2005 14:03:05 - 1.1.2.3 +++ src/frontends/qt2/ui/QBibtexDialogBase.ui 22 Jul 2005 10:12:15 - @@ -13,7 +13,7 @@ 0 0 -317 +313 338 @@ -257,7 +257,7 @@ text -OK +OK autoDefault Index: src/frontends/qt2/ui/QCitationDialogBase.ui === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QCitationDialogBase.ui,v retrieving revision 1.1.2.3 diff -u -p -r1.1.2.3 QCitationDialogBase.ui --- src/frontends/qt2/ui/QCitationDialogBase.ui 30 Mar 2005 13:58:35 - 1.1.2.3 +++ src/frontends/qt2/ui/QCitationDialogBase.ui 22 Jul 2005 10:12:16 - @@ -13,7 +13,7 @@ 0 0 -609 +605 416 @@ -89,7 +89,7 @@ text -OK +OK autoDefault Index: src/frontends/qt2/ui/QERTDialogBase.ui === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ui/QERTDialogBase.ui,v retrieving revision 1.2 diff -u -p -r1.2 QERTDialogBase.ui --- src/frontends/qt2/ui/QERTDialogBase.ui 23 Jan 2003 16:23:40 - 1.2 +++
Re: [Bug 1656] command "gnome-session-save" kills lyx!
Hello Lars, > You had a simple fix that avoids the crash, didn't you Stephan? yes I have. Yesterday I came back to Berlin and since today I'm online again... After a vacation of 2 weeks I have to do some real work. But I'll provide the patch shortly. In Paris I failed to compile the patched version because of an incomplete update or bad precompiled headers or whatever, I don't know. So I didn't check it in (with Michaels account). Now it compiles again and I send you the patch. Regards, Stephan -- Index: src/frontends/qt2/lyx_gui.C === RCS file: /cvs/lyx/lyx-devel/src/frontends/qt2/lyx_gui.C,v retrieving revision 1.86 diff -u -p -r1.86 lyx_gui.C --- src/frontends/qt2/lyx_gui.C 2005/07/16 15:55:35 1.86 +++ src/frontends/qt2/lyx_gui.C 2005/07/22 11:38:42 @@ -51,6 +51,7 @@ #endif #include +#include #if QT_VERSION >= 0x030100 #include #endif @@ -114,6 +115,7 @@ class LQApplication : public QApplicatio public: LQApplication(int & argc, char ** argv); ~LQApplication(); + void commitData(QSessionManager & sm); #ifdef Q_WS_X11 bool x11EventFilter (XEvent * ev) { return lyxX11EventFilter(ev); } #endif @@ -140,6 +142,28 @@ LQApplication::~LQApplication() if (locked()) unlock(); #endif +} + + +void LQApplication::commitData(QSessionManager & sm) +{ + /// Maybe someone should do something sensible here. + /// The implementation is required to avoid an application exit + /// when session state save is triggered by session manager. + /// The default implementation sends a close event to all + /// visible top level widgets when session managment allows + /// interaction. + /// + /// Following is a (currently not working) proposal... + /// The problem is a blocking application when + /// BufferList::quitWriteAll wants to open the question + /// alert message dialog. + /// Qt doesn't return from it and no box is opened. + /// if ( sm.allowsInteraction() ) { + /// if ( !bufferlist.quitWriteAll() ) { + /// sm.cancel(); + /// } + /// } }