+2002-01-03 Allan Rae <rae@lyx.org>
+
+ * LyXView.C (updateWindowTitle): Setup a short icon title of either
+ "LyX" or the filename of the current buffer if it has one. This is a
+ modified form of John Levon's patch.
+
+ * XFormsView.C (setWindowTitle): also set icon title.
+
+ * LyXView.h: (setWindowTitle): signature changed.
+ * XFormsView.h (setWindowTitle): ditto.
+
2002-01-02 Juergen Vigna <jug@sad.it>
* tabular.C (AppendColumn): hopefully fixed this memory access problem.
{
static string last_title = "LyX";
string title = "LyX";
+ string icon_title = "LyX";
if (view()->available()) {
string const cur_title = buffer()->fileName();
title += _(" (Changed)");
if (buffer()->isReadonly())
title += _(" (read only)");
+ /* Show only the filename if it's available. */
+ icon_title = OnlyFilename(cur_title);
}
}
if (title != last_title) {
- setWindowTitle(title);
+ setWindowTitle(title, icon_title);
last_title = title;
}
- last_title = title;
}
///
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) */
}
-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());
}
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.
} 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;
}
}
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;
}
}