Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2022-10-02 20:53:22 +0300
committerPhilipp Hörist <philipp@hoerist.com>2022-10-02 20:53:22 +0300
commitc63aa71b0d66f23a130ae7b49b98ecbe537e7698 (patch)
tree2c2adb4e16ce2f0460b7ec198264afa5d530dcb9
parentc0b999e0e65d980576b3bf5b45829ad7e1308442 (diff)
refactor: ChatListRow: Remove unused code
-rw-r--r--gajim/common/const.py5
-rw-r--r--gajim/gtk/chat_list.py8
-rw-r--r--gajim/gtk/chat_list_row.py11
3 files changed, 2 insertions, 22 deletions
diff --git a/gajim/common/const.py b/gajim/common/const.py
index ae4e8a6fe..a851d0d0d 100644
--- a/gajim/common/const.py
+++ b/gajim/common/const.py
@@ -51,9 +51,8 @@ class Entity(NamedTuple):
class RowHeaderType(IntEnum):
- ACTIVE = 0
- CONVERSATIONS = 1
- PINNED = 2
+ CONVERSATIONS = 0
+ PINNED = 1
class AvatarSize(IntEnum):
diff --git a/gajim/gtk/chat_list.py b/gajim/gtk/chat_list.py
index dd6479231..ee79c338e 100644
--- a/gajim/gtk/chat_list.py
+++ b/gajim/gtk/chat_list.py
@@ -264,8 +264,6 @@ class ChatList(Gtk.ListBox, EventHelper):
if before is None:
if row.is_pinned:
row.header = RowHeaderType.PINNED
- # elif row.is_active():
- # row.header = RowHeaderType.ACTIVE
else:
row.header = None
else:
@@ -274,13 +272,7 @@ class ChatList(Gtk.ListBox, EventHelper):
row.header = None
else:
row.header = RowHeaderType.PINNED
- # elif row.is_active():
- # if before.is_active() and not before.is_pinned:
- # row.header = None
- # else:
- # row.header = RowHeaderType.ACTIVE
else:
- # if before.is_active() or before.is_pinned:
if before.is_pinned:
row.header = RowHeaderType.CONVERSATIONS
else:
diff --git a/gajim/gtk/chat_list_row.py b/gajim/gtk/chat_list_row.py
index 2c81faa4a..84152d88e 100644
--- a/gajim/gtk/chat_list_row.py
+++ b/gajim/gtk/chat_list_row.py
@@ -78,7 +78,6 @@ class ChatListRow(Gtk.ListBoxRow):
self.type = type_
self.position = position
- self.active_label = ActiveHeader()
self.conversations_label = ConversationsHeader()
self.pinned_label = PinnedHeader()
@@ -229,8 +228,6 @@ class ChatListRow(Gtk.ListBoxRow):
self.set_header(None)
elif type_ is RowHeaderType.PINNED:
self.set_header(self.pinned_label)
- elif type_ == RowHeaderType.ACTIVE:
- self.set_header(self.active_label)
else:
self.set_header(self.conversations_label)
@@ -525,14 +522,6 @@ class BaseHeader(Gtk.Box):
self.show_all()
-class ActiveHeader(BaseHeader):
-
- def __init__(self):
- BaseHeader.__init__(self,
- RowHeaderType.ACTIVE,
- _('Active'))
-
-
class ConversationsHeader(BaseHeader):
def __init__(self):