]> git.lyx.org Git - features.git/commitdiff
GTK compile fixes.
authorAngus Leeming <leeming@lyx.org>
Wed, 24 Mar 2004 17:03:02 +0000 (17:03 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 24 Mar 2004 17:03:02 +0000 (17:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8524 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gtk/ChangeLog
src/frontends/gtk/GMenubar.C
src/frontends/gtk/GToolbar.C
src/frontends/gtk/lyx_gui.C

index c85b401e9a663513f757b5c847e10bc55cdf23dd..6f7b26a4fb544541daacc214121cdecb58a3a66d 100644 (file)
@@ -1,3 +1,13 @@
+2004-03-24  Angus Leeming  <leeming@lyx.org>
+
+       * GMenubar.C (submenuDisabled, onSubMenuActivate): compile fixes
+       due to the changes in FuncStatus.
+
+       * GToolbar.C (update): ditto.
+
+       * lyx_gui.C (start): remove code to order buffers as it no longer
+       compiles and none of the other frontends do this anymore.
+
 2004-03-17  Angus Leeming  <leeming@lyx.org>
 
        * Makefile.am: remove mention of the forks dialog.
index 91c7c90022a46d2ad0bc3cd5d1949662ea73b791..85bcae0b513e672b9425578966c2a911095c411c 100644 (file)
@@ -140,7 +140,7 @@ bool GMenubar::submenuDisabled(MenuItem const * item)
                {
                        FuncStatus const flag =
                                view_->getLyXFunc().getStatus(i->func());
-                       if (!flag.disabled())
+                       if (flag.enabled())
                                return false;
                        break;
                }
@@ -206,7 +206,7 @@ void GMenubar::onSubMenuActivate(MenuItem const * item,
                        item.signal_activate().connect(
                                SigC::bind(SigC::slot(*this, &GMenubar::onCommandActivate),
                                           &(*i), &item));
-                       if (flag.disabled())
+                       if (!flag.enabled())
                                item.set_sensitive(false);
                        break;
                }
index 71949c4defa5568501bc3c277d879c898121095a..85559b7ff1305bedd713dc9945a86254f2369338 100644 (file)
@@ -211,13 +211,13 @@ void GToolbar::update()
                        if (item->first.action == ToolbarBackend::LAYOUTS) {
                                LyXFunc const & lf = view_->getLyXFunc();
                                bool const sensitive =
-                                       !lf.getStatus(FuncRequest(LFUN_LAYOUT)).disabled();
+                                       lf.getStatus(FuncRequest(LFUN_LAYOUT)).enabled();
                                widget->set_sensitive(sensitive);
                                continue;
                        }
                        FuncStatus const status = view_->
                                getLyXFunc().getStatus(item->first);
-                       bool sensitive = !status.disabled();
+                       bool sensitive = status.enabled();
                        widget->set_sensitive(sensitive);
                        if (it->get_type() != Gtk::TOOLBAR_CHILD_BUTTON)
                                return;
index 05a988d467aa544b654e3787e67e626c1c296e04..53bad5f3274eeb807563d749a1e7533515cf6856 100644 (file)
@@ -325,8 +325,6 @@ void lyx_gui::start(string const & batch, std::vector<string> const & files)
        view.show();
        view.init();
 
-       Buffer * last = 0;
-
        // FIXME: some code below needs moving
 
        lyxserver = new LyXServer(&view.getLyXFunc(), lyxrc.lyxpipes);
@@ -335,16 +333,8 @@ void lyx_gui::start(string const & batch, std::vector<string> const & files)
 
        std::vector<string>::const_iterator cit = files.begin();
        std::vector<string>::const_iterator end = files.end();
-       for (; cit != end; ++cit) {
-               Buffer * b = bufferlist.newBuffer(*cit);
-               if (loadLyXFile(b, *cit))
-                       last = b;
-       }
-
-       // switch to the last buffer successfully loaded
-       if (last) {
-               view.view()->buffer(last);
-       }
+       for (; cit != end; ++cit)
+               view.view()->loadLyXFile(*cit, true);
 
        // handle the batch commands the user asked for
        if (!batch.empty()) {