mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Modified form of John Levon's icon title patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3277 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8aa3b4fc77
commit
ce2ec24b67
@ -1,3 +1,14 @@
|
||||
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.
|
||||
|
@ -222,6 +222,7 @@ void LyXView::updateWindowTitle()
|
||||
{
|
||||
static string last_title = "LyX";
|
||||
string title = "LyX";
|
||||
string icon_title = "LyX";
|
||||
|
||||
if (view()->available()) {
|
||||
string const cur_title = buffer()->fileName();
|
||||
@ -231,13 +232,14 @@ void LyXView::updateWindowTitle()
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -123,7 +123,7 @@ private:
|
||||
///
|
||||
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) */
|
||||
|
@ -212,9 +212,10 @@ void XFormsView::init()
|
||||
}
|
||||
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,8 +49,8 @@ public:
|
||||
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.
|
||||
|
@ -255,7 +255,7 @@ SearchResult SearchForward(BufferView * bv, LyXText * text, string const & str,
|
||||
} 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 @@ SearchResult SearchBackward(BufferView * bv, LyXText * text,
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user