]> git.lyx.org Git - lyx.git/blobdiff - src/filedlg.C
More fixes to insettabular/text (and some missing features added).
[lyx.git] / src / filedlg.C
index aa2293747d2637a609b6deec84868d293005bee6..2b6949034aca2fe0d77ff25169b6e593bbee7622 100644 (file)
@@ -27,6 +27,7 @@ using std::sort;
 #include "support/FileInfo.h"
 #include "support/lyxlib.h"
 #include "gettext.h"
+#include "frontends/Dialogs.h"
 
 #ifdef HAVE_ERRNO_H
 #include <cerrno>
@@ -71,6 +72,10 @@ extern "C" int gettimeofday(struct timeval *, struct timezone *);
 #include "support/filetools.h"
 #include "filedlg.h"
 
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::slot;
+#endif
+
 // six months, in seconds
 static const long SIX_MONTH_SEC = 6L * 30L * 24L * 60L * 60L;
 static const long ONE_HOUR_SEC = 60L * 60L;
@@ -81,8 +86,7 @@ class UserCache {
 public:
        /// seeks user name from group ID
        string const & find(uid_t ID) const {
-               // We really want to use const_iterator. (Lgb)
-               Users::iterator cit = users.find(ID);
+               Users::const_iterator cit = users.find(ID);
                if (cit == users.end()) {
                        add(ID);
                        return users[ID];
@@ -133,8 +137,7 @@ private:
 
 string const & GroupCache::find(gid_t ID) const 
 {
-       // We really want to use const_iterator. (Lgb)
-       Groups::iterator cit = groups.find(ID);
+       Groups::const_iterator cit = groups.find(ID);
        if (cit == groups.end()) {
                add(ID);
                return groups[ID];
@@ -411,6 +414,21 @@ LyXFileDlg::LyXFileDlg()
        }
        fl_hide_object(pFileDlgForm->User1);
        fl_hide_object(pFileDlgForm->User2);
+
+       r_ = Dialogs::redrawGUI.connect(slot(this, &LyXFileDlg::redraw));
+}
+
+
+LyXFileDlg::~LyXFileDlg()
+{
+       r_.disconnect();
+}
+
+
+void LyXFileDlg::redraw()
+{
+       if (pFileDlgForm->FileDlg && pFileDlgForm->FileDlg->visible)
+               fl_redraw_form(pFileDlgForm->FileDlg);
 }