]> git.lyx.org Git - features.git/commitdiff
Fixes to get Gnome FE to compile again.
authorBaruch Even <baruch@lyx.org>
Mon, 16 Jul 2001 12:11:27 +0000 (12:11 +0000)
committerBaruch Even <baruch@lyx.org>
Mon, 16 Jul 2001 12:11:27 +0000 (12:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2246 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gnome/ChangeLog
src/frontends/gnome/Dialogs.C
src/frontends/gnome/FileDialog.C
src/frontends/gnome/Makefile.am
src/frontends/gnome/Menubar_pimpl.C
src/frontends/gnome/Menubar_pimpl.h
src/frontends/gnome/mainapp.C
src/frontends/gnome/mainapp.h

index 862757d95b3287e3e01f51b6e69fa419270b5715..2724218e5496eb69bda83d6195c387a1a8e66f2f 100644 (file)
@@ -1,3 +1,15 @@
+2001-07-16  Baruch Even  <baruch@lyx.org>
+
+       * Makefile.am:
+       * Dialogs.C: Removed Citation and Copyright dialogs from build. Left them
+       in repository until they get redone as About Dialog.
+       
+       * FileDialog.C:
+       * Menubar_pimpl.C:
+       * Menubar_pimpl.h:
+       * mainapp.C:
+       * mainapp.h: Various fixed to get Gnome FE (FrontEnd) to compile again.
+
 2001-07-13  Angus Leeming  <a.leeming@ic.ac.uk>
 
        Consistent use of Lsstream.h:
index 8ba830fcc9d791a81f294b3c612d25973396e924..79955a58a68371614e5a5e33d1f8c740ba238a5d 100644 (file)
@@ -24,8 +24,6 @@
 #include "ControlBibtex.h"
 #include "ControlCharacter.h"
 #include "ControlCitation.h"
-#include "ControlCopyright.h"
-#include "ControlCredits.h"
 #include "ControlError.h"
 #include "ControlInclude.h"
 #include "ControlLog.h"
@@ -35,8 +33,6 @@
 #include "GUI.h"
 
 #include "FormUrl.h"
-#include "FormCredits.h"
-#include "FormCopyright.h"
 #include "FormError.h"
 #include "FormTabularCreate.h"
 /*
@@ -74,8 +70,6 @@ SigC::Signal0<void> Dialogs::redrawGUI;
 Dialogs::Dialogs(LyXView * lv)
 {
        add(new GUIUrl<FormUrl, gnomeBC>(*lv, *this));
-       add(new GUICredits<FormCredits, gnomeBC>(*lv, *this));
-       add(new GUICopyright<FormCopyright, gnomeBC>(*lv, *this));
        add(new GUIError<FormError, gnomeBC>(*lv, *this));
        add(new GUITabularCreate<FormTabularCreate, gnomeBC>(*lv, *this));
 
index 7f3d78957dc2d22914f324fdc2bf673c482c2013..162d49723f5bd598c1822bd4b55f416c52ee46c1 100644 (file)
@@ -116,9 +116,9 @@ FileDialog::Select(string const & path, string const & mask,
        private_->set_complete(mask);
        private_->set_filename(path+suggested);
        
-       ProhibitInput(lv_->view());
+       lv_->prohibitInput();
        string const filename = private_->exec();
-       AllowInput(lv_->view());
+       lv_->allowInput();
 
        // Collect the info and return it for synchronous dialog.
        return FileDialog::Result(Chosen, filename);
index b16440fb4d0613bb77adcf5a956505a1cb6c5440..2d0a97679674c1141f821807d157d05a77b14641 100644 (file)
@@ -79,12 +79,8 @@ libgnome_la_SOURCES = \
        GnomeBase.h \
        GUIRunTime.C \
        FileDialog.C \
-       FormCopyright.C \
-       FormCopyright.h \
        FormTabularCreate.C \
        FormTabularCreate.h \
-       FormCredits.C \
-       FormCredits.h \
        FormError.C \
        FormError.h \
        FormUrl.C \
@@ -94,6 +90,10 @@ libgnome_la_SOURCES = \
        Timeout_pimpl.C \
        Timeout_pimpl.h
 
+#      FormCopyright.C \
+#      FormCopyright.h \
+#      FormCredits.C \
+#      FormCredits.h \
 # These still have to be added. Sooner or later. ARRae-20000411
 #      GUI_defaults.C \
 #      GUI_initialize.C \
index e5eb7d8c8ce3e52d5f7be174e4f3a414f4211c8a..c7aa79153a14fc7981dc20fccd9c9efed0e144eb 100644 (file)
@@ -22,6 +22,7 @@
 #include "debug.h"
 #include "LyXAction.h"
 #include "lyxfunc.h"
+#include "func_status.h"
 #include "kbmap.h"
 #include "bufferlist.h"
 #include "lastfiles.h"
@@ -232,7 +233,7 @@ void Menubar::Pimpl::composeUIInfo(string const & menu_name, vector<Gnome::UI::I
        if (label.find(item.shortcut()) != string::npos)
          label.insert(label.find(item.shortcut()), "_");
 
-       LyXFunc::func_status flag = owner_->getLyXFunc()->getStatus(item.action());
+       func_status::value_type flag = owner_->getLyXFunc()->getStatus(item.action());
 
        Gnome::UI::Info gitem;
        SigC::Slot0<void> cback = SigC::bind<int>(SigC::slot(this, &Menubar::Pimpl::callback),item.action());
@@ -307,12 +308,13 @@ void Menubar::Pimpl::composeUIInfo(string const & menu_name, vector<Gnome::UI::I
        }
 
        // first handle optional entries.
-       if (item.optional() && (flag & LyXFunc::Disabled)) {
+       if (item.optional() && (flag & func_status::Disabled)) {
            lyxerr[Debug::GUI] 
                << "Skipping optional item " << item.label() << endl; 
            break;
        }
-       if ((flag & LyXFunc::ToggleOn) || (flag & LyXFunc::ToggleOff))
+       if ((flag & func_status::ToggleOn) || 
+                       (flag & func_status::ToggleOff))
          gitem = Gnome::UI::ToggleItem(label, cback, lyxaction.helpText(item.action()));
 
        Menus.push_back(gitem);
@@ -384,19 +386,19 @@ void Menubar::Pimpl::update()
   for (vector<GtkWidgetToAction>::const_iterator i = wid_act_.begin(); i != end; ++i)
     {
       GtkWidgetToAction wa = (*i);
-      LyXFunc::func_status flag = owner_->getLyXFunc()->getStatus(wa.action_);
+      func_status::value_type flag = owner_->getLyXFunc()->getStatus(wa.action_);
 
-      if ( flag & (LyXFunc::Disabled | LyXFunc::Unknown) ) gtk_widget_set_sensitive(wa.widget_, false);
+      if ( flag & (func_status::Disabled | func_status::Unknown) ) gtk_widget_set_sensitive(wa.widget_, false);
       else gtk_widget_set_sensitive(wa.widget_, true);
 
-      if ( flag & LyXFunc::ToggleOn )
+      if ( flag & func_status::ToggleOn )
        {
          ignore_action_=true;
          gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(wa.widget_), true);
          ignore_action_=false;
        }
 
-      if ( flag & LyXFunc::ToggleOff )
+      if ( flag & func_status::ToggleOff )
        {
          ignore_action_=true;
          gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(wa.widget_), false);
index 694ce50c5207bf7c3f8a29787cb125144f91957d..215aa4b7ede75a28f4268c7c30e6698cb0589df5 100644 (file)
@@ -19,6 +19,7 @@
 #include "gettext.h"
 #include "LString.h"
 #include <gnome--/app.h>
+#include <gnome--/app-helper.h>
 #include "frontends/Menubar.h"
 #include "commandtags.h"
 #include "buffer.h"
@@ -80,7 +81,7 @@ protected:
   /// lists (toc, lof, lot, loa)
   struct ListsHolder {
     string path;
-    Gnome::UI::Array lst;
+    Gnome::UI::Array<Gnome::UI::Info> lst;
 
     ListsHolder () { }
     ListsHolder (const ListsHolder & a) { path = a.path; lst = a.lst; }
@@ -95,7 +96,7 @@ private:
   MenuBackend const * menubackend_;
   ///
   string current_menu_name_;
-  Gnome::UI::Array Menu_;
+  Gnome::UI::Array<Gnome::UI::Info> Menu_;
 
   ///
   bool ignore_action_;
index 8ed6deb1451a6b5b36691bb8c2937e117b05601f..a0d7887638df4d934e0b29aaebae9a48c58401b2 100644 (file)
@@ -53,7 +53,7 @@ void GLyxAppWin::init()
   fm.push_back(Gnome::MenuItems::Open());
   menus.push_back(Gnome::Menus::File(fm));
 
-  Gnome::UI::Array menu = menus;
+  GLyxAppWin::Array menu = menus;
   gnome_app_create_menus(this->gtkobj(),
                         menu.gtkobj());
 
@@ -86,7 +86,7 @@ void GLyxAppWin::init()
 }
 
 
-void GLyxAppWin::set_menu(Gnome::UI::Array &menu)
+void GLyxAppWin::set_menu(Array &menu)
 {
   // clean up and install new menus
   gnome_app_remove_menus(this->gtkobj(),"/",menusize_);
@@ -95,7 +95,7 @@ void GLyxAppWin::set_menu(Gnome::UI::Array &menu)
   menusize_ = menu.size();
 }
 
-void GLyxAppWin::update_menu(string path, int noelms, Gnome::UI::Array &menu)
+void GLyxAppWin::update_menu(string path, int noelms, Array &menu)
 {
   // remove "noelms" items and install new items from "menu"
   gnome_app_remove_menus(this->gtkobj(),path.c_str(),noelms);
index 8aeab39dc7d8a5bd10261b1567e5eaad119e610c..a2833948812830d4d4652347025a4f0eff03541e 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <gnome--/app.h>
 #include <gnome--/appbar.h>
+#include <gnome--/app-helper.h>
 #include <gtk--/frame.h>
 #include <gtk--/accelgroup.h>
 
 class GLyxAppWin: public Gnome::App
 {
  public:
+  ///
+  typedef Gnome::UI::Array<Gnome::UI::Info> Array;
+  
   GLyxAppWin();
   ~GLyxAppWin();
 
   /// set menu of the window
-  void set_menu(Gnome::UI::Array &);
+  void set_menu(Array &);
   /// update menu
   void update_menu(string path,
                   int noelms,
-                  Gnome::UI::Array &);
+                  Array &);
   /// add action area
   void add_action(Gtk::Container &, string title, bool expand=false, Gtk::AccelGroup * acgr=0);
   /// remove action area