telepathyClient: Add history navigation to entry
This adds a non-saving history to each notification entry, like runDialog and lookingGlass. https://bugzilla.gnome.org/show_bug.cgi?id=642793
This commit is contained in:
parent
8c40c2086a
commit
79d9df9bb1
@ -11,6 +11,7 @@ const Tp = imports.gi.TelepathyGLib;
|
|||||||
const Gettext = imports.gettext.domain('gnome-shell');
|
const Gettext = imports.gettext.domain('gnome-shell');
|
||||||
const _ = Gettext.gettext;
|
const _ = Gettext.gettext;
|
||||||
|
|
||||||
|
const History = imports.misc.history;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const MessageTray = imports.ui.messageTray;
|
const MessageTray = imports.ui.messageTray;
|
||||||
|
|
||||||
@ -291,6 +292,8 @@ Notification.prototype = {
|
|||||||
this._oldMaxScrollAdjustment = adjustment.upper;
|
this._oldMaxScrollAdjustment = adjustment.upper;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this._inputHistory = new History.HistoryManager({ entry: this._responseEntry.clutter_text });
|
||||||
|
|
||||||
this._history = [];
|
this._history = [];
|
||||||
this._timestampTimeoutId = 0;
|
this._timestampTimeoutId = 0;
|
||||||
},
|
},
|
||||||
@ -392,6 +395,8 @@ Notification.prototype = {
|
|||||||
if (text == '')
|
if (text == '')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
this._inputHistory.addItem(text);
|
||||||
|
|
||||||
// Telepathy sends out the Sent signal for us.
|
// Telepathy sends out the Sent signal for us.
|
||||||
// see Source._messageSent
|
// see Source._messageSent
|
||||||
this._responseEntry.set_text('');
|
this._responseEntry.set_text('');
|
||||||
|
Loading…
Reference in New Issue
Block a user