]> git.lyx.org Git - lyx.git/commitdiff
minor changes
authorJohn Levon <levon@movementarian.org>
Sat, 13 Jul 2002 01:42:15 +0000 (01:42 +0000)
committerJohn Levon <levon@movementarian.org>
Sat, 13 Jul 2002 01:42:15 +0000 (01:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4629 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QtView.C
src/frontends/qt2/TODO
src/frontends/qt2/Toolbar_pimpl.C
src/frontends/qt2/lyx_gui.C

index 02d9e8989649c603fff2d96a5283e622f9139bfa..a70019723e9daa2012adce76bc7bd81062dd9709 100644 (file)
@@ -1,3 +1,11 @@
+2002-07-13  John Levon  <moz@compsoc.man.ac.uk>
+
+       * QtView.C: add a status bar
+       * Toolbar_pimpl.C: minor fixes 
+
+       * lyx_gui.C: implement hexname() 
+
 2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyx_gui.C: move init_graphics() to parse_init()
index d0828906cd772481e5815c82b04f85c6b9a6903d..3073605bbc659ee4716d693e7103f2e421a439e9 100644 (file)
@@ -34,6 +34,7 @@
 #include <qapplication.h>
 #include <qpixmap.h>
 #include <qmenubar.h>
+#include <qstatusbar.h>
  
 using std::endl;
 
@@ -57,6 +58,8 @@ QtView::QtView(unsigned int width, unsigned int height)
        toolbar_.reset(new Toolbar(this, *getDialogs(), 0, 0, toolbardefaults));
        toolbar_->set(true);
 
+       statusBar()->setSizeGripEnabled(false);
        minibuffer_.reset(new QMiniBuffer(this)); 
  
        bufferview_.reset(new BufferView(this, 0, 0, width, height));
index fc4da0d2dbb2344e114180e3ea913475ddff89e1..90b18a071cf17708cfc0d1e5b9221276c33bf245 100644 (file)
@@ -136,10 +136,9 @@ QtView
        - add autosave timeout
 
  
-Toolbar_pimpl (variously maybe *)
+Toolbar_pimpl
 
-       - mathed symbols
-       - openLayoutList() (?)
+       - mathed symbols (*) 
+       - openLayoutList() (remove ?)
        - ::set() ???
        - push() ??
-       - tooltips
index 9635bff6deb270dac84148c60c39263918c2fbc5..fdc7858f7d78cd7250a2352c398ef982d0a42aed 100644 (file)
@@ -43,7 +43,7 @@ extern LyXAction lyxaction;
 
 namespace {
  
-string const getPixmap(int action)
+QPixmap getIconPixmap(int action)
 {
        string arg;
        string xpm_name;
@@ -60,23 +60,20 @@ string const getPixmap(int action)
        if (!fullname.empty()) {
                lyxerr[Debug::GUI] << "Full icon name is `" 
                                       << fullname << "'" << endl;
-               return fullname;
+               return QPixmap(fullname.c_str());
        }
 
-#if 0 // FIXME 
        if (act == LFUN_INSERT_MATH && !arg.empty()) {
-               char const ** pixmap = get_pixmap_from_symbol(arg.c_str(),
-                                                       buttonwidth,
-                                                       height);
+#if 0 // FIXME: GUII
+               char const ** pixmap =
+                       get_pixmap_from_symbol(arg.c_str(), 30, 30);
                if (pixmap) {
                        lyxerr[Debug::GUI] << "Using mathed-provided icon"
                                           << endl;
-                       fl_set_pixmapbutton_data(obj,
-                                                const_cast<char **>(pixmap));
-                       return;
+                       return QPixmap(pixmap);
                }
-       }
 #endif
+       }
        
        lyxerr << "Unable to find icon `" << xpm_name << "'" << endl;
        fullname = LibFileSearch("images", "unknown", "xpm");
@@ -84,7 +81,7 @@ string const getPixmap(int action)
                lyxerr[Debug::GUI] << "Using default `unknown' icon" 
                                       << endl;
        }
-       return fullname;
+       return QPixmap(fullname.c_str());
 }
 
 } // namespace anon
@@ -255,17 +252,20 @@ void Toolbar::Pimpl::add(int action, bool)
                        proxy_.get(), SLOT(layout_selected(const QString &)));
                break;
        }
-       default:
+       default: {
+               char const * tooltip = _(lyxaction.helpText(action)).c_str();
                QToolButton * tb = 
-                       new QToolButton(QPixmap(getPixmap(action).c_str()),
-                       "FIXME", "FIXME", 
+                       new QToolButton(getIconPixmap(action),
+                       tooltip, tooltip,
                        proxy_.get(), SLOT(button_selected()), toolbars_.back());
 
                map_[tb] = action;
  
-               QToolTip::add(tb, _(lyxaction.helpText(action)).c_str());
+               QToolTip::add(tb, tooltip);
                break;
        }
+       }
 }
 
 
index 5ca81241ccbf8571c92026d3fab3fdc51c5ff1c5..9ca60f1c7ee555632aebcd976fd8ebb40cbaa1a5 100644 (file)
@@ -121,8 +121,8 @@ void lyx_gui::start(string const & batch, vector<string> files)
  
 string const lyx_gui::hexname(LColor::color col)
 {
-       // FIXME
-       return "";
+       QColor color(lcolor.getX11Name(col).c_str());
+       return color.name().latin1();
 }