]> git.lyx.org Git - features.git/commitdiff
* src/BufferView.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 24 Mar 2008 14:12:19 +0000 (14:12 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 24 Mar 2008 14:12:19 +0000 (14:12 +0000)
* src/Text3.cpp:
- fix LFUN_INSET_SETTINGS so that it also works at cursor position.

* LyXAction.cpp:
- doxy.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23923 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp
src/LyXAction.cpp
src/Text3.cpp

index 0a0a642003321422d841a00140c7fbe2133d2da5..a338a68b103285b51c802d5e900b2a632300055a 100644 (file)
@@ -948,6 +948,8 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
 
        case LFUN_INSET_SETTINGS: {
                InsetCode code = cur.inset().lyxCode();
+               if (cur.nextInset())
+                       code = cur.nextInset()->lyxCode();
                bool enable = false;
                switch (code) {
                        case TABULAR_CODE:
index 034c75fbb768ba285871da63478b36bbd981333e..ec6531e525d6d0f891abedab939d23f0a43e8407 100644 (file)
@@ -1088,7 +1088,25 @@ void LyXAction::init()
  */
                { LFUN_NEXT_INSET_MODIFY, "next-inset-modify", ReadOnly, Edit },
                { LFUN_INSET_DIALOG_UPDATE, "", Noop, Hidden },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_INSET_SETTINGS
+ * \li Action: Open the inset's properties dialog.
+ * \li Notion: Used for box, branch, ert, float, listings, note, tabular, wrap insets.
+ * \li Syntax: inset-settings
+ * \endvar
+ */
                { LFUN_INSET_SETTINGS, "inset-settings", ReadOnly, Edit },
+/*!
+ * \var lyx::FuncCode lyx::LFUN_NEXT_INSET_TOGGLE
+ * \li Action: Toggles the inset at cursor position. For collapsables, this means it will
+               be (un-)collapsed, in case of other insets, the editing widget (dialog) will
+               be entered. Also cf. #LFUN_INSET_SETTINGS.
+ * \li Notion: Used for label, floats, listings, box, branch, external, wrap
+               bibtex, ert, command, graphics, note, space, vspace, tabular,
+               bibitem, inlude, ref insets.
+ * \li Syntax: next-inset-toggle
+ * \endvar
+ */
                { LFUN_NEXT_INSET_TOGGLE, "next-inset-toggle", ReadOnly, Edit },
                { LFUN_INSET_TOGGLE, "inset-toggle", ReadOnly, Hidden },
                { LFUN_ALL_INSETS_TOGGLE, "all-insets-toggle", ReadOnly, Edit },
@@ -1299,7 +1317,7 @@ void LyXAction::init()
  * \li Action: Saves the current buffer to a temporary file.
  * \li Notion: Saves the current buffer to a file named "#filename#". This LFUN
                is called automatically by LyX, to "autosave" the current buffer.
      * \li Syntax: buffer-auto-save
+ * \li Syntax: buffer-auto-save
  * \endvar
  */
                { LFUN_BUFFER_AUTO_SAVE, "buffer-auto-save", Noop, Buffer },
index 86a7e8b99b151d7ad531c151c95c15e3960fd916..2ede8d0d5fa10e562cb046451c28af4c196a7803 100644 (file)
@@ -847,9 +847,17 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                needsUpdate |= dissolveInset(cur);
                break;
 
-       case LFUN_INSET_SETTINGS:
+       case LFUN_INSET_SETTINGS: {
+               // if there is an inset at cursor, access this
+               Inset * inset = cur.nextInset();
+               if (inset) {
+                       inset->showInsetDialog(bv);
+                       break;
+               }
+               // if not work, access the underlying inset.
                cur.inset().showInsetDialog(bv);
                break;
+       }
 
        case LFUN_SPACE_INSERT:
                if (cur.paragraph().layout().free_spacing)