]> git.lyx.org Git - features.git/commitdiff
Fix up Alert::prompt for cancel button stuff
authorJohn Levon <levon@movementarian.org>
Sun, 27 Apr 2003 16:40:50 +0000 (16:40 +0000)
committerJohn Levon <levon@movementarian.org>
Sun, 27 Apr 2003 16:40:50 +0000 (16:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6863 a592a061-630c-0410-9148-cb99ea01b6c8

17 files changed:
src/ChangeLog
src/bufferlist.C
src/frontends/Alert.C
src/frontends/Alert.h
src/frontends/Alert_pimpl.h
src/frontends/ChangeLog
src/frontends/qt2/Alert_pimpl.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/QTabular.C
src/frontends/qt2/QTabularDialog.C
src/frontends/qt2/QTabularDialog.h
src/frontends/qt2/ui/QTabularDialogBase.ui
src/frontends/xforms/Alert_pimpl.C
src/frontends/xforms/ChangeLog
src/lyx_cb.C
src/lyxfunc.C
src/lyxvc.C

index 6ce644e56bbe210b5356fb164a08db172089f1c6..128e508289970c1421255d7ad508947a8e38febd 100644 (file)
@@ -1,3 +1,10 @@
+2003-04-27  John Levon  <levon@movementarian.org>
+
+       * bufferlist.C:
+       * lyx_cb.C:
+       * lyxfunc.C:
+       * lyxvc.C: specify cancel button in Alert::prompt
+
 2003-04-26  John Levon  <levon@movementarian.org>
 
        * text3.C:
index e735c5ba8eaaf4c1742e1c9af13177820bb04560..2ad51ee5d8d9cf870ae98fb0d31035663fd47ec1 100644 (file)
@@ -78,7 +78,7 @@ bool BufferList::quitWriteBuffer(Buffer * buf)
        text += file + _(" has unsaved changes.\n\nWhat do you want to do with it?");
 #endif
        int const ret = Alert::prompt(_("Save changed document?"),
-               text, 0, _("&Save"), _("&Discard"), _("&Cancel"));
+               text, 0, 2, _("&Save"), _("&Discard"), _("&Cancel"));
 
        if (ret == 0) {
                // FIXME: WriteAs can be asynch !
@@ -187,7 +187,7 @@ bool BufferList::close(Buffer * buf, bool ask)
        text += fname + _(" has unsaved changes.\n\nWhat do you want to do with it?");
 #endif
        int const ret = Alert::prompt(_("Save changed document?"),
-               text, 0, _("&Save"), _("&Discard"), _("&Cancel"));
+               text, 0, 2, _("&Save"), _("&Discard"), _("&Cancel"));
 
        if (ret == 0) {
                if (buf->isUnnamed()) {
@@ -368,7 +368,7 @@ Buffer * BufferList::readFile(string const & s, bool ronly)
                        text += file + _(" exists.\n\nRecover emergency save?");
 #endif
                        int const ret = Alert::prompt(_("Load emergency save?"),
-                               text, 0, _("&Recover"), _("&Load Original"));
+                               text, 0, 1, _("&Recover"), _("&Load Original"));
 
                        if (ret == 0) {
                                ts = e;
@@ -402,7 +402,7 @@ Buffer * BufferList::readFile(string const & s, bool ronly)
                                text += file + _(" is newer.\n\nLoad the backup instead?");
 #endif
                                int const ret = Alert::prompt(_("Load backup?"),
-                                       text, 0, _("&Load backup"), _("Load &original"));
+                                       text, 0, 1, _("&Load backup"), _("Load &original"));
 
                                if (ret == 0) {
                                        ts = a;
@@ -525,7 +525,7 @@ Buffer * BufferList::loadLyXFile(string const & filename, bool tolastfiles)
                text += file + _(" is already loaded.\n\nDo you want to revert to the saved version?");
 #endif
                int const ret = Alert::prompt(_("Revert to saved document?"),
-                       text, 1, _("&Revert"), _("&Switch to document"));
+                       text, 0, 1,  _("&Revert"), _("&Switch to document"));
 
                if (ret == 0) {
                        // FIXME: should be LFUN_REVERT
@@ -565,7 +565,7 @@ Buffer * BufferList::loadLyXFile(string const & filename, bool tolastfiles)
                        text += file + _(" from version control?");
 #endif
                        int const ret = Alert::prompt(_("Retrieve from version control?"),
-                               text, 0, _("&Retrieve"), _("&Cancel"));
+                               text, 0, 1, _("&Retrieve"), _("&Cancel"));
 
                        if (ret == 0) {
                                // How can we know _how_ to do the checkout?
@@ -585,7 +585,7 @@ Buffer * BufferList::loadLyXFile(string const & filename, bool tolastfiles)
                text += file + _(" does not yet exist.\n\nDo you want to create a new document?");
 #endif
                int const ret = Alert::prompt(_("Create new document?"),
-                       text, 0, _("&Create"), _("Cancel"));
+                       text, 0, 1, _("&Create"), _("Cancel"));
 
                if (ret == 0)
                        b = newFile(s, string(), true);
index a230557c8fe9204ef2eb0f34ce951d0d9793c06c..f11661a8aaa2a6dfacb1e6e87ddb090ba0f627c6 100644 (file)
@@ -22,11 +22,12 @@ using std::pair;
 using std::make_pair;
 
 int Alert::prompt(string const & title, string const & question,
-           int default_button,
+           int default_button, int escape_button,
           string const & b1, string const & b2, string const & b3)
 {
        if (lyx_gui::use_gui)
-               return prompt_pimpl(title, question, default_button, b1, b2, b3);
+               return prompt_pimpl(title, question,
+                       default_button, escape_button, b1, b2, b3);
 
        lyxerr << title << endl;
        lyxerr << "----------------------------------------" << endl;
index f49d1d587ce103a9b137b6883dea8758026f26c7..12847b2dc1a388c01f7d3a688e682657e23815be 100644 (file)
@@ -20,16 +20,17 @@ namespace Alert {
 
 /**
  * Prompt for a question. Returns 0-2 for the chosen button.
- * Set default_button to a reasonable value. b1-b3 should have
- * accelerators marked with an '&'. title should be a short summary.
- * Strings should be gettextised. Please think about the poor user.
+ * Set default_button and cancel_button to reasonable values. b1-b3
+ * should have accelerators marked with an '&'. title should be
+ * a short summary. Strings should be gettextised.
+ * Please think about the poor user.
  *
  * Remember to use boost::format. If you make any of these buttons
  * "Yes" or "No", I will personally come around to your house and
  * slap you with fish, and not in an enjoyable way either.
  */
 int prompt(string const & title, string const & question,
-           int default_button,
+           int default_button, int cancel_button,
           string const & b1, string const & b2, string const & b3 = string());
 
 /**
index 88becb95d647f39ccc6f77896137891f4edff3c5..7c500f2e1281f305829d96d9de4618a88790c4e9 100644 (file)
@@ -13,7 +13,7 @@
 // GUI-specific implementations
 
 int prompt_pimpl(string const & title, string const & question,
-           int default_button,
+           int default_button, int escape_button,
           string const & b1, string const & b2, string const & b3);
 
 void warning_pimpl(string const & title, string const & warning);
index ffd517a5ec6edbe84ae43d2ff262172646d79270..b8f3e1c6ed7b11f592a36ce6e0eac3decaf508b9 100644 (file)
@@ -1,3 +1,9 @@
+2003-04-27  John Levon  <levon@movementarian.org>
+
+       * Alert.h:
+       * Alert.C:
+       * Alert_pimpl.h: ::prompt() takes cancel_button
+
 2003-04-16  Alfredo Braunstein  <abraunst@libero.it>
 
        * screen.C (redraw): added a missing call to updateRowPositions
index 0cebcd0fdcd38aa60d039624b01d377c625bf7fe..9e4b3a38808045d8498a23e8a445cbef83184012 100644 (file)
@@ -30,7 +30,7 @@ using std::pair;
 using std::make_pair;
 
 int prompt_pimpl(string const & tit, string const & question,
-           int default_button,
+           int default_button, int cancel_button,
           string const & b1, string const & b2, string const & b3)
 {
 #if USE_BOOST_FORMAT
@@ -41,9 +41,14 @@ int prompt_pimpl(string const & tit, string const & question,
        string const title = _("LyX: ") + tit;
 #endif
 
-       return QMessageBox::information(0, toqstr(title), toqstr(formatted(question)),
+       int res = QMessageBox::information(0, toqstr(title), toqstr(formatted(question)),
                toqstr(b1), toqstr(b2), b3.empty() ? QString::null : toqstr(b3),
-               default_button);
+               default_button, cancel_button);
+
+       // Qt bug: can return -1 on cancel or WM close, despite the docs.
+       if (res == -1)
+               res = cancel_button;
+       return res;
 }
 
 
index dab7e66e592f11d370e6b42ac91b4dde4aa8a787..ded3ee2a400596c726e7d478df6f560ea8f016aa 100644 (file)
@@ -1,3 +1,12 @@
+2003-04-27  John Levon  <levon@movementarian.org>
+
+       * Alert_pimpl.C: handle cancel_button
+
+       * QTabular.C:
+       * QTabularDialog.C:
+       * QTabularDialog.h:
+       * ui/QTabularDialogBase.ui: ui fixes
+
 2003-04-23  John Levon  <levon@movementarian.org>
 
        * QCitationDialog.C: close dialog on return in listbox
index b151db08cab6c98044af2d6cf8a59627b2ad2d48..b158b984ed6803a25505b86f2d9f5664f3c8c061 100644 (file)
@@ -53,10 +53,6 @@ void QTabular::build_dialog()
        bcview().addReadOnly(dialog_->widthUnit);
        bcview().addReadOnly(dialog_->hAlignCB);
        bcview().addReadOnly(dialog_->vAlignCB);
-       bcview().addReadOnly(dialog_->columnAddPB);
-       bcview().addReadOnly(dialog_->columnDeletePB);
-       bcview().addReadOnly(dialog_->rowAddPB);
-       bcview().addReadOnly(dialog_->rowDeletePB);
        bcview().addReadOnly(dialog_->borderSetPB);
        bcview().addReadOnly(dialog_->borderUnsetPB);
        bcview().addReadOnly(dialog_->borders);
index f3e15092bb024f88dfe8cd16fd727795a8f06006..864c297bc5b815d2be082bd87da883d4394520be 100644 (file)
@@ -50,34 +50,12 @@ void QTabularDialog::closeEvent(QCloseEvent * e)
        e->accept();
 }
 
+
 void QTabularDialog::close_clicked()
 {
        form_->closeGUI();
 }
 
-void QTabularDialog::columnAppend_clicked()
-{
-       form_->controller().set(LyXTabular::APPEND_COLUMN);
-}
-
-
-void QTabularDialog::rowAppend_clicked()
-{
-       form_->controller().set(LyXTabular::APPEND_ROW);
-}
-
-
-void QTabularDialog::columnDelete_clicked()
-{
-       form_->controller().set(LyXTabular::DELETE_COLUMN);
-}
-
-
-void QTabularDialog::rowDelete_clicked()
-{
-       form_->controller().set(LyXTabular::DELETE_ROW);
-}
-
 
 void QTabularDialog::borderSet_clicked()
 {
@@ -86,6 +64,7 @@ void QTabularDialog::borderSet_clicked()
        form_->changed();
 }
 
+
 void QTabularDialog::borderUnset_clicked()
 {
        form_->controller().set(LyXTabular::UNSET_ALL_LINES);
index e9e7b64840772cf9aed4319bf48caeaebd521929..4a6fcb37ef673fc3859ecb6361c676987e63d6b9 100644 (file)
@@ -28,10 +28,6 @@ protected slots:
        virtual void change_adaptor();
 
        virtual void close_clicked();
-       virtual void columnAppend_clicked();
-       virtual void rowAppend_clicked();
-       virtual void columnDelete_clicked();
-       virtual void rowDelete_clicked();
        virtual void borderSet_clicked();
        virtual void borderUnset_clicked();
        virtual void leftBorder_changed();
index 0b6c4e128dd23b2867493f8858372c3744c3da94..a8724f59bffe2e28eea5d70f75095671f7924ecf 100644 (file)
@@ -13,8 +13,8 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>480</width>
-            <height>383</height>
+            <width>463</width>
+            <height>408</height>
         </rect>
     </property>
     <property stdset="1">
@@ -71,7 +71,7 @@
                         <name>spacing</name>
                         <number>6</number>
                     </property>
-                    <widget row="0"  column="0" >
+                    <widget row="0"  column="0"  rowspan="1"  colspan="2" >
                         <class>QLabel</class>
                         <property stdset="1">
                             <name>name</name>
                             <cstring>hAlignCB</cstring>
                         </property>
                     </widget>
-                    <widget row="0"  column="3" >
-                        <class>QCheckBox</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>multicolumnCB</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>text</name>
-                            <string>&amp;Multicolumn</string>
-                        </property>
-                        <property>
-                            <name>toolTip</name>
-                            <string>Merge cells</string>
-                        </property>
-                    </widget>
-                    <widget row="0"  column="1" >
+                    <widget row="0"  column="2" >
                         <class>QComboBox</class>
                         <item>
                             <property>
                             <string>Horizontal alignment in column</string>
                         </property>
                     </widget>
-                    <spacer row="0"  column="2" >
+                    <widget row="3"  column="0"  rowspan="1"  colspan="4" >
+                        <class>QCheckBox</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>rotateTabularCB</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>enabled</name>
+                            <bool>true</bool>
+                        </property>
+                        <property stdset="1">
+                            <name>text</name>
+                            <string>&amp;Rotate table 90 degrees</string>
+                        </property>
                         <property>
+                            <name>toolTip</name>
+                            <string>Rotate the table by 90 degrees</string>
+                        </property>
+                    </widget>
+                    <widget row="4"  column="0"  rowspan="1"  colspan="4" >
+                        <class>QCheckBox</class>
+                        <property stdset="1">
                             <name>name</name>
-                            <cstring>Spacer75</cstring>
+                            <cstring>rotateCellCB</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>text</name>
+                            <string>Rotate &amp;cell 90 degrees</string>
+                        </property>
+                        <property>
+                            <name>toolTip</name>
+                            <string>Rotate this cell by 90 degrees</string>
+                        </property>
+                    </widget>
+                    <widget row="5"  column="0"  rowspan="1"  colspan="2" >
+                        <class>QLabel</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>specialAlignmentLA</cstring>
+                        </property>
+                        <property stdset="1">
+                            <name>text</name>
+                            <string>LaTe&amp;X argument:</string>
+                        </property>
+                        <property>
+                            <name>buddy</name>
+                            <cstring>specialAlignmentED</cstring>
+                        </property>
+                    </widget>
+                    <widget row="5"  column="2"  rowspan="1"  colspan="2" >
+                        <class>QLineEdit</class>
+                        <property stdset="1">
+                            <name>name</name>
+                            <cstring>specialAlignmentED</cstring>
+                        </property>
+                        <property>
+                            <name>toolTip</name>
+                            <string>Custom column format (LaTeX)</string>
+                        </property>
+                    </widget>
+                    <spacer row="6"  column="2" >
+                        <property>
+                            <name>name</name>
+                            <cstring>Spacer5</cstring>
                         </property>
                         <property stdset="1">
                             <name>orientation</name>
-                            <enum>Horizontal</enum>
+                            <enum>Vertical</enum>
                         </property>
                         <property stdset="1">
                             <name>sizeType</name>
                             </size>
                         </property>
                     </spacer>
-                    <widget row="3"  column="2"  rowspan="1"  colspan="2" >
-                        <class>QGroupBox</class>
-                        <property stdset="1">
+                    <spacer row="0"  column="3" >
+                        <property>
                             <name>name</name>
-                            <cstring>GroupBox38</cstring>
+                            <cstring>Spacer75</cstring>
                         </property>
                         <property stdset="1">
-                            <name>title</name>
-                            <string>Column</string>
+                            <name>orientation</name>
+                            <enum>Horizontal</enum>
                         </property>
-                        <grid>
-                            <property stdset="1">
-                                <name>margin</name>
-                                <number>11</number>
-                            </property>
-                            <property stdset="1">
-                                <name>spacing</name>
-                                <number>6</number>
-                            </property>
-                            <widget row="0"  column="0" >
-                                <class>QPushButton</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>columnAddPB</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>A&amp;dd</string>
-                                </property>
-                                <property stdset="1">
-                                    <name>autoDefault</name>
-                                    <bool>false</bool>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Append column (right)</string>
-                                </property>
-                            </widget>
-                            <widget row="0"  column="1" >
-                                <class>QPushButton</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>columnDeletePB</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>De&amp;lete</string>
-                                </property>
-                                <property stdset="1">
-                                    <name>autoDefault</name>
-                                    <bool>false</bool>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Delete current column</string>
-                                </property>
-                            </widget>
-                        </grid>
-                    </widget>
-                    <widget row="3"  column="0"  rowspan="1"  colspan="2" >
-                        <class>QGroupBox</class>
+                        <property stdset="1">
+                            <name>sizeType</name>
+                            <enum>Expanding</enum>
+                        </property>
+                        <property>
+                            <name>sizeHint</name>
+                            <size>
+                                <width>20</width>
+                                <height>20</height>
+                            </size>
+                        </property>
+                    </spacer>
+                    <widget row="2"  column="0" >
+                        <class>QCheckBox</class>
                         <property stdset="1">
                             <name>name</name>
-                            <cstring>GroupBox39</cstring>
+                            <cstring>multicolumnCB</cstring>
                         </property>
                         <property stdset="1">
-                            <name>title</name>
-                            <string>Row</string>
+                            <name>text</name>
+                            <string>&amp;Multicolumn</string>
+                        </property>
+                        <property>
+                            <name>toolTip</name>
+                            <string>Merge cells</string>
                         </property>
-                        <hbox>
-                            <property stdset="1">
-                                <name>margin</name>
-                                <number>11</number>
-                            </property>
-                            <property stdset="1">
-                                <name>spacing</name>
-                                <number>6</number>
-                            </property>
-                            <widget>
-                                <class>QPushButton</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>rowAddPB</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>&amp;Add</string>
-                                </property>
-                                <property stdset="1">
-                                    <name>autoDefault</name>
-                                    <bool>false</bool>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Append row (below)</string>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QPushButton</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>rowDeletePB</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>Delete</string>
-                                </property>
-                                <property stdset="1">
-                                    <name>autoDefault</name>
-                                    <bool>false</bool>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Delete this row</string>
-                                </property>
-                            </widget>
-                        </hbox>
                     </widget>
-                    <widget row="2"  column="0"  rowspan="1"  colspan="3" >
+                    <widget row="1"  column="0"  rowspan="1"  colspan="4" >
                         <class>QGroupBox</class>
                         <property stdset="1">
                             <name>name</name>
                             </widget>
                         </grid>
                     </widget>
-                    <widget row="2"  column="3" >
-                        <class>QGroupBox</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>GroupBox21</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>title</name>
-                            <string>Rotate 90 degrees</string>
-                        </property>
-                        <vbox>
-                            <property stdset="1">
-                                <name>margin</name>
-                                <number>11</number>
-                            </property>
-                            <property stdset="1">
-                                <name>spacing</name>
-                                <number>6</number>
-                            </property>
-                            <widget>
-                                <class>QCheckBox</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>rotateTabularCB</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>enabled</name>
-                                    <bool>true</bool>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>&amp;Rotate Table</string>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Rotate the table by 90 degrees</string>
-                                </property>
-                            </widget>
-                            <widget>
-                                <class>QCheckBox</class>
-                                <property stdset="1">
-                                    <name>name</name>
-                                    <cstring>rotateCellCB</cstring>
-                                </property>
-                                <property stdset="1">
-                                    <name>text</name>
-                                    <string>Rotate &amp;Cell</string>
-                                </property>
-                                <property>
-                                    <name>toolTip</name>
-                                    <string>Rotate this cell by 90 degrees</string>
-                                </property>
-                            </widget>
-                        </vbox>
-                    </widget>
-                    <widget row="1"  column="1"  rowspan="1"  colspan="3" >
-                        <class>QLineEdit</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>specialAlignmentED</cstring>
-                        </property>
-                        <property>
-                            <name>toolTip</name>
-                            <string>Custom column format (LaTeX)</string>
-                        </property>
-                    </widget>
-                    <widget row="1"  column="0" >
-                        <class>QLabel</class>
-                        <property stdset="1">
-                            <name>name</name>
-                            <cstring>specialAlignmentLA</cstring>
-                        </property>
-                        <property stdset="1">
-                            <name>text</name>
-                            <string>LaTe&amp;X argument:</string>
-                        </property>
-                        <property>
-                            <name>buddy</name>
-                            <cstring>specialAlignmentED</cstring>
-                        </property>
-                    </widget>
                 </grid>
             </widget>
             <widget>
     </image>
 </images>
 <connections>
-    <connection>
-        <sender>columnAddPB</sender>
-        <signal>clicked()</signal>
-        <receiver>QTabularDialogBase</receiver>
-        <slot>columnAppend_clicked()</slot>
-    </connection>
-    <connection>
-        <sender>rowAddPB</sender>
-        <signal>clicked()</signal>
-        <receiver>QTabularDialogBase</receiver>
-        <slot>rowAppend_clicked()</slot>
-    </connection>
-    <connection>
-        <sender>columnDeletePB</sender>
-        <signal>clicked()</signal>
-        <receiver>QTabularDialogBase</receiver>
-        <slot>columnDelete_clicked()</slot>
-    </connection>
     <connection>
         <sender>borderSetPB</sender>
         <signal>clicked()</signal>
         <receiver>newpageCB</receiver>
         <slot>setEnabled(bool)</slot>
     </connection>
-    <connection>
-        <sender>rowDeletePB</sender>
-        <signal>clicked()</signal>
-        <receiver>QTabularDialogBase</receiver>
-        <slot>rowDelete_clicked()</slot>
-    </connection>
     <connection>
         <sender>hAlignCB</sender>
         <signal>activated(int)</signal>
     </connection>
     <slot access="protected">borderSet_clicked()</slot>
     <slot access="protected">borderUnset_clicked()</slot>
-    <slot access="protected">border_toggled()</slot>
     <slot access="protected">bottomBorder_changed()</slot>
-    <slot access="protected">change_adaptor()</slot>
     <slot access="protected">close_clicked()</slot>
-    <slot access="protected">columnAppend_clicked()</slot>
-    <slot access="protected">columnDelete_clicked()</slot>
     <slot access="protected">hAlign_changed(int)</slot>
     <slot access="protected">leftBorder_changed()</slot>
+    <slot access="public">longTabular()</slot>
     <slot access="protected">ltFirstHeaderBorderAbove_clicked()</slot>
     <slot access="protected">ltFirstHeaderBorderBelow_clicked()</slot>
     <slot access="protected">ltFirstHeaderEmpty_clicked()</slot>
     <slot access="protected">ltLastFooterStatus_clicked()</slot>
     <slot access="protected">ltNewpage_clicked()</slot>
     <slot access="protected">multicolumn_clicked()</slot>
-    <slot access="public">longTabular()</slot>
     <slot access="protected">rightBorder_changed()</slot>
     <slot access="protected">rotateCell()</slot>
     <slot access="protected">rotateTabular()</slot>
-    <slot access="protected">rowAppend_clicked()</slot>
-    <slot access="protected">rowDelete_clicked()</slot>
     <slot access="public">setEnabled(bool)</slot>
     <slot access="protected">specialAlignment_changed()</slot>
     <slot access="protected">topBorder_changed()</slot>
 </connections>
 <tabstops>
     <tabstop>TabWidget</tabstop>
-    <tabstop>specialAlignmentED</tabstop>
-    <tabstop>columnAddPB</tabstop>
-    <tabstop>columnDeletePB</tabstop>
-    <tabstop>rowAddPB</tabstop>
-    <tabstop>rowDeletePB</tabstop>
     <tabstop>hAlignCB</tabstop>
-    <tabstop>multicolumnCB</tabstop>
     <tabstop>widthED</tabstop>
     <tabstop>widthUnit</tabstop>
     <tabstop>vAlignCB</tabstop>
+    <tabstop>multicolumnCB</tabstop>
     <tabstop>rotateTabularCB</tabstop>
     <tabstop>rotateCellCB</tabstop>
-    <tabstop>closePB</tabstop>
+    <tabstop>specialAlignmentED</tabstop>
     <tabstop>borderSetPB</tabstop>
     <tabstop>borderUnsetPB</tabstop>
     <tabstop>longTabularCB</tabstop>
     <tabstop>headerStatusCB</tabstop>
-    <tabstop>firstheaderStatusCB</tabstop>
-    <tabstop>footerStatusCB</tabstop>
-    <tabstop>lastfooterStatusCB</tabstop>
     <tabstop>headerBorderAboveCB</tabstop>
+    <tabstop>headerBorderBelowCB</tabstop>
+    <tabstop>firstheaderStatusCB</tabstop>
     <tabstop>firstheaderBorderAboveCB</tabstop>
+    <tabstop>firstheaderBorderBelowCB</tabstop>
+    <tabstop>firstheaderNoContentsCB</tabstop>
+    <tabstop>footerStatusCB</tabstop>
     <tabstop>footerBorderAboveCB</tabstop>
+    <tabstop>footerBorderBelowCB</tabstop>
+    <tabstop>lastfooterStatusCB</tabstop>
     <tabstop>lastfooterBorderAboveCB</tabstop>
     <tabstop>lastfooterBorderBelowCB</tabstop>
-    <tabstop>footerBorderBelowCB</tabstop>
-    <tabstop>firstheaderBorderBelowCB</tabstop>
-    <tabstop>headerBorderBelowCB</tabstop>
     <tabstop>lastfooterNoContentsCB</tabstop>
-    <tabstop>firstheaderNoContentsCB</tabstop>
     <tabstop>newpageCB</tabstop>
+    <tabstop>closePB</tabstop>
 </tabstops>
 </UI>
index 79d5b28a15b2064d166cab003dc80f4fe05b5ba8..f7f58045ffd750fb6a4e22bafee6fe6d429bb401 100644 (file)
@@ -44,7 +44,7 @@ void information_pimpl(string const &, string const & message)
 
 
 int prompt_pimpl(string const &, string const & question,
-           int default_button,
+           int default_button, int /*escape_button*/,
           string const & b1, string const & b2, string const & b3)
 {
        string b1label, b1sc;
index 6ce4c244e55db64e962e916bc3498e8084eb5002..c3001d0207d3835b1787b14a41c814605fe73cc3 100644 (file)
@@ -1,3 +1,7 @@
+2003-04-27  John Levon  <levon@movementarian.org>
+
+       * Alert_pimpl.C: ignore cancel_button (for now)
+
 2003-04-15  John Levon  <levon@movementarian.org>
 
        * Toolbar_pimpl.C: ignore Minibuffer
index 3caa2689a60badcf2e2101ce78765044ba0a3a3c..2481bd6c895d55a492a724952fb6f637bef4a9ed 100644 (file)
@@ -96,7 +96,7 @@ bool MenuWrite(BufferView * bv, Buffer * buffer)
        text += file + _(" could not be saved.\n\nDo you want to rename the document and try again?");
 #endif
        int const ret = Alert::prompt(_("Rename and save?"),
-               text, 0, _("&Rename"), _("&Cancel"));
+               text, 0, 1, _("&Rename"), _("&Cancel"));
 
        if (ret == 0)
                return WriteAs(bv, buffer);
@@ -155,7 +155,7 @@ bool WriteAs(BufferView * bv, Buffer * buffer, string const & filename)
                text += file + _(" already exists.\n\nDo you want to over-write that document?");
 #endif
                int const ret = Alert::prompt(_("Over-write document?"),
-                       text, 1, _("&Over-write"), _("&Cancel"));
+                       text, 0, 1, _("&Over-write"), _("&Cancel"));
 
                if (ret == 1)
                        return false;
index 849ff725714279177a13bf394aab278811eb3c34..98c919c923dcb82d432cdd01425b2875d6bc4b1c 100644 (file)
@@ -1085,7 +1085,7 @@ void LyXFunc::dispatch(FuncRequest const & ev, bool verbose)
                text += file + _("?");
 #endif
                int const ret = Alert::prompt(_("Revert to saved document?"),
-                       text, 1, _("&Revert"), _("&Cancel"));
+                       text, 0, 1, _("&Revert"), _("&Cancel"));
 
                if (ret == 0)
                        view()->reload();
@@ -1935,7 +1935,7 @@ void LyXFunc::doImport(string const & argument)
                text += file + _(" already exists.\n\nDo you want to over-write that document?");
 #endif
                int const ret = Alert::prompt(_("Over-write document?"),
-                       text, 1, _("&Over-write"), _("&Cancel"));
+                       text, 0, 1, _("&Over-write"), _("&Cancel"));
 
                if (ret == 1) {
                        owner->message(_("Canceled."));
index 3def73dfec3b30ee5ec01075000fb8b01f9ff09c..e798317e6134975bf19c3af3360f9f1e80d837eb 100644 (file)
@@ -89,7 +89,7 @@ bool LyXVC::ensureClean()
        text += file + _(" has unsaved changes.\n\nDo you want to save the document?");
 #endif
        int const ret = Alert::prompt(_("Save changed document?"),
-               text, 0, _("&Save"), _("&Cancel"));
+               text, 0, 1, _("&Save"), _("&Cancel"));
 
        if (ret == 0) {
                vcs->owner()->getUser()->owner()->dispatch(FuncRequest(LFUN_MENUWRITE));
@@ -203,7 +203,7 @@ void LyXVC::revert()
        text += file + _(" will lose all current changes.\n\nDo you want to revert to the saved version?");
 #endif
        int const ret = Alert::prompt(_("Revert to stored version of document?"),
-               text, 1, _("&Revert"), _("&Cancel"));
+               text, 0, 1, _("&Revert"), _("&Cancel"));
 
        if (ret == 0)
                vcs->revert();