On Wed, Jan 02, 2002 at 02:48:03PM +0100, Juergen Vigna wrote:

> > This way it is easier to recognize what active-document is iconized.
> > The LyX-prefix is also redundant because the LyX icon itself
> > is sufficient.
> 
> Well I don't know how to realize this

like this.

Rob, I can't test it, please do so

thanks
john


Index: src/LyXView.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LyXView.C,v
retrieving revision 1.61
diff -u -r1.61 LyXView.C
--- src/LyXView.C       2001/12/10 20:06:55     1.61
+++ src/LyXView.C       2002/01/02 14:05:50
@@ -222,6 +222,7 @@
 {
        static string last_title = "LyX";
        string title = "LyX";
+       string icon_title = "LyX";
 
        if (view()->available()) {
                string const cur_title = buffer()->fileName();
@@ -232,9 +233,10 @@
                        if (buffer()->isReadonly())
                                title += _(" (read only)");
                }
+               icon_title += OnlyFilename(buffer()->fileName());
        }
        if (title != last_title) {
-               setWindowTitle(title);
+               setWindowTitle(title, icon_title);
                last_title = title;
        }
        last_title = title;
Index: src/LyXView.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LyXView.h,v
retrieving revision 1.36
diff -u -r1.36 LyXView.h
--- src/LyXView.h       2001/11/29 17:12:17     1.36
+++ src/LyXView.h       2002/01/02 14:05:50
@@ -123,7 +123,7 @@
        ///
        Dialogs * dialogs_;
        ///
-       virtual void setWindowTitle(string const &) = 0;
+       virtual void setWindowTitle(string const &, string const &) = 0;
        /** The last textclass layout list in the layout choice selector
          This should probably be moved to the toolbar, but for now it's
        here. (Asger) */
Index: src/XFormsView.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/XFormsView.C,v
retrieving revision 1.4
diff -u -r1.4 XFormsView.C
--- src/XFormsView.C    2001/11/05 17:07:22     1.4
+++ src/XFormsView.C    2002/01/02 14:05:52
@@ -212,9 +212,10 @@
 }
 
 
-void XFormsView::setWindowTitle(string const & title)
+void XFormsView::setWindowTitle(string const & title, string const & icon_title)
 {
        fl_set_form_title(form_, title.c_str());
+       fl_winicontitle(form_->window, icon_title.c_str());
 }
 
 
Index: src/XFormsView.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/XFormsView.h,v
retrieving revision 1.2
diff -u -r1.2 XFormsView.h
--- src/XFormsView.h    2001/12/20 15:11:50     1.2
+++ src/XFormsView.h    2002/01/02 14:05:52
@@ -49,8 +49,8 @@
          window manager. */
        static int atCloseMainFormCB(FL_FORM *, void *);
 private:
-       ///
-       virtual void setWindowTitle(string const &);
+       /// pass the title, and the iconified title
+       virtual void setWindowTitle(string const &, string const &);
        /// makes the main form.
        void create_form_form_main(int width, int height);
        /// A pointer to the form.      
Index: src/lyxfind.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxfind.C,v
retrieving revision 1.21
diff -u -r1.21 lyxfind.C
--- src/lyxfind.C       2001/12/20 15:11:50     1.21
+++ src/lyxfind.C       2002/01/02 14:05:53
@@ -255,7 +255,7 @@
        } else {
                // make sure we end up at the end of the text,
                // not the start point of the last search
-               text->setCursor(bv, prev_par, prev_par->size());
+               text->setCursor(bv, prev_par, prev_par->size());
                return SR_NOT_FOUND;
        }
 }
@@ -303,7 +303,7 @@
                return SR_FOUND;
        } else {
                // go to the last part of the unsuccessful search
-               text->setCursor(bv, prev_par, 0);
+               text->setCursor(bv, prev_par, 0);
                return SR_NOT_FOUND;
        }
 }

Reply via email to