]> git.lyx.org Git - features.git/commitdiff
* Use open_buffers_in_tabs instead of single_window. The latter even confused me.
authorStefan Schimanski <sts@lyx.org>
Fri, 14 Mar 2008 23:27:31 +0000 (23:27 +0000)
committerStefan Schimanski <sts@lyx.org>
Fri, 14 Mar 2008 23:27:31 +0000 (23:27 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23737 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXFunc.cpp
src/LyXRC.cpp
src/LyXRC.h
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiPrefs.cpp
src/frontends/qt4/GuiView.cpp

index 07807ac030341345878b64d9f133f84b0b9615c2..355b99c8e4124f11e23aff2e9479e691ee7242e0 100644 (file)
@@ -1976,7 +1976,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
        case LyXRC::RC_SERVERPIPE:
        case LyXRC::RC_SET_COLOR:
        case LyXRC::RC_SHOW_BANNER:
-       case LyXRC::RC_SINGLE_WINDOW:
+       case LyXRC::RC_OPEN_BUFFERS_IN_TABS:
        case LyXRC::RC_SPELL_COMMAND:
        case LyXRC::RC_TEMPDIRPATH:
        case LyXRC::RC_TEMPLATEPATH:
index 7eed1d7f8a28bddadbc612d49c686c92d9c57e6a..a1c351a53ad4f5ffb7419c1d21741c5c27cf8b4f 100644 (file)
@@ -153,7 +153,7 @@ keyword_item lyxrcTags[] = {
        { "\\serverpipe", LyXRC::RC_SERVERPIPE },
        { "\\set_color", LyXRC::RC_SET_COLOR },
        { "\\show_banner", LyXRC::RC_SHOW_BANNER },
-       { "\\single_window", LyXRC::RC_SINGLE_WINDOW },
+       { "\\open_buffers_in_tabs", LyXRC::RC_OPEN_BUFFERS_IN_TABS },
        { "\\sort_layouts", LyXRC::RC_SORT_LAYOUTS },
        { "\\spell_command", LyXRC::RC_SPELL_COMMAND },
        { "\\tempdir_path", LyXRC::RC_TEMPDIRPATH },
@@ -294,9 +294,9 @@ void LyXRC::setDefaults() {
        user_name = to_utf8(support::user_name());
        user_email = to_utf8(support::user_email());
 #ifdef __APPLE_CC__
-       single_window = false;
+       open_buffers_in_tabs = false;
 #else
-       single_window = true;
+       open_buffers_in_tabs = true;
 #endif
 
        // Fullscreen settings
@@ -1302,9 +1302,9 @@ int LyXRC::read(Lexer & lexrc)
                        if (lexrc.next())
                                full_screen_width = lexrc.getInteger();
                        break;
-               case RC_SINGLE_WINDOW:
+               case RC_OPEN_BUFFERS_IN_TABS:
                        if (lexrc.next())
-                               single_window = lexrc.getBool();
+                               open_buffers_in_tabs = lexrc.getBool();
                                break;
 
                case RC_LAST: break; // this is just a dummy
@@ -1884,11 +1884,11 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
-       case RC_SINGLE_WINDOW:
+       case RC_OPEN_BUFFERS_IN_TABS:
                if (ignore_system_lyxrc ||
-                   single_window != system_lyxrc.single_window) {
-                       os << "\\single_window "
-                          << convert<string>(single_window)
+                   open_buffers_in_tabs != system_lyxrc.open_buffers_in_tabs) {
+                       os << "\\open_buffers_in_tabs "
+                          << convert<string>(open_buffers_in_tabs)
                           << '\n';
                }
                if (tag != RC_LAST)
index 96623b6ad55284c8deb4b5424b81ce6ec2203161..40b3647880cb9cafc244c11e2aea3f7991af4590 100644 (file)
@@ -138,7 +138,7 @@ public:
                RC_SERVERPIPE,
                RC_SET_COLOR,
                RC_SHOW_BANNER,
-               RC_SINGLE_WINDOW,
+               RC_OPEN_BUFFERS_IN_TABS,
                RC_SORT_LAYOUTS,
                RC_SPELL_COMMAND,
                RC_TEMPDIRPATH,
@@ -437,8 +437,8 @@ public:
        bool completion_popup_text;
        ///
        bool completion_popup_after_complete;
-       /// Open new buffers in the current window as tab.
-       bool single_window;
+       ///
+       bool open_buffers_in_tabs;
 };
 
 
index 457ce8c0149eedff3ae9def1cc470826da779c76..69b3f485227233ac36415f7c16f4bb56f15b7512 100644 (file)
@@ -318,14 +318,14 @@ bool GuiApplication::dispatch(FuncRequest const & cmd)
 
        case LFUN_BUFFER_NEW:
                if (viewCount() == 0
-                   || (!lyxrc.single_window && current_view_->buffer() != 0))
+                   || (!lyxrc.open_buffers_in_tabs && current_view_->buffer() != 0))
                        createView();
                current_view_->newDocument(to_utf8(cmd.argument()), false);
                break;
 
        case LFUN_BUFFER_NEW_TEMPLATE:
                if (viewCount() == 0 
-                   || (!lyxrc.single_window && current_view_->buffer() != 0)) {
+                   || (!lyxrc.open_buffers_in_tabs && current_view_->buffer() != 0)) {
                        createView();
                        current_view_->newDocument(to_utf8(cmd.argument()), true);
                        if (!current_view_->buffer())
@@ -336,7 +336,7 @@ bool GuiApplication::dispatch(FuncRequest const & cmd)
 
        case LFUN_FILE_OPEN:
                if (viewCount() == 0
-                   || (!lyxrc.single_window && current_view_->buffer() != 0)) {
+                   || (!lyxrc.open_buffers_in_tabs && current_view_->buffer() != 0)) {
                        createView();
                        current_view_->openDocument(to_utf8(cmd.argument()));
                        if (!current_view_->buffer())
index 3b56370af22713f457a6ca314bee97064910454e..e42209f9e48d8ab277f3ba1f6a2015f61bcc0fba 100644 (file)
@@ -1848,7 +1848,7 @@ void PrefUserInterface::apply(LyXRC & rc) const
        rc.full_screen_tabbar = toggleTabbarCB->isChecked();
        rc.full_screen_width = fullscreenWidthSB->value();
        rc.full_screen_limit = fullscreenLimitGB->isChecked();
-       rc.single_window = openDocumentsInTabsCB->isChecked();
+       rc.open_buffers_in_tabs = openDocumentsInTabsCB->isChecked();
 }
 
 
@@ -1875,7 +1875,7 @@ void PrefUserInterface::update(LyXRC const & rc)
        toggleTabbarCB->setChecked(rc.full_screen_tabbar);
        fullscreenWidthSB->setValue(rc.full_screen_width);
        fullscreenLimitGB->setChecked(rc.full_screen_limit);
-       openDocumentsInTabsCB->setChecked(rc.single_window);
+       openDocumentsInTabsCB->setChecked(rc.open_buffers_in_tabs);
 }
 
 
index 84a92d9f9ed1b3499865e2dd4a7bcd73443fbeb1..132ef9392c07bcc6ea4237b89e24a206088e6b5f 100644 (file)
@@ -543,7 +543,7 @@ void GuiView::on_lastWorkAreaRemoved()
 #ifdef Q_WS_MAC
        // On Mac close the view if there is no Tab open anymore,
        // but only if no splitter is visible
-       if (!lyxrc.single_window && d.splitter_->count() == 1) {
+       if (!lyxrc.open_buffers_in_tabs && d.splitter_->count() == 1) {
                TabWorkArea * twa = qobject_cast<TabWorkArea *>(d.splitter_->widget(0));
                if (twa && twa->count() == 0) {
                        // close the view, as no tab is open anymore