[meld] De-dup previous commit message entries (bgo#699270)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] De-dup previous commit message entries (bgo#699270)
- Date: Fri, 3 May 2013 21:44:29 +0000 (UTC)
commit 15f1a57b84d086b301fd6291f9d36c8c04baee24
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat May 4 07:09:11 2013 +1000
De-dup previous commit message entries (bgo#699270)
meld/ui/historyentry.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/meld/ui/historyentry.py b/meld/ui/historyentry.py
index 52355ca..d7cebbe 100644
--- a/meld/ui/historyentry.py
+++ b/meld/ui/historyentry.py
@@ -230,6 +230,17 @@ class HistoryCombo(gtk.ComboBox, HistoryWidget):
if len(text) <= MIN_ITEM_LEN:
return
+ # Redefining here to key off the full text, not the first line
+ def _remove_item(store, text):
+ if text is None:
+ return False
+
+ for row in store:
+ if row[1] == text:
+ store.remove(row.iter)
+ return True
+ return False
+
store = self.get_model()
if not _remove_item(store, text):
_clamp_list_store(store, self._history_length - 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]