gajim.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2026
October
September
August
July
June
May
April
March
February
January
2025
December
November
October
September
August
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
List overview
Download
Commits
January 2021
----- 2026 -----
October 2026
September 2026
August 2026
July 2026
June 2026
May 2026
April 2026
March 2026
February 2026
January 2026
----- 2025 -----
December 2025
November 2025
October 2025
September 2025
August 2025
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
commits@gajim.org
1 participants
109 discussions
Start a n
N
ew thread
[Git][gajim/gajim][mainwindow] AccountSideBar: Improve styling
by Daniel Brötzmann
24 Jan '21
24 Jan '21
Daniel Brötzmann pushed to branch mainwindow at gajim / gajim Commits: 600d4462 by wurstsalat at 2021-01-24T13:38:49+01:00 AccountSideBar: Improve styling - - - - - 2 changed files: - gajim/data/style/gajim.css - gajim/gtk/account_side_bar.py Changes: ===================================== gajim/data/style/gajim.css ===================================== @@ -37,12 +37,16 @@ .chatlist-left-grid { border-right: 1px solid @unfocused_borders; } - +.account-identifier-bar { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} /* Account sidebar */ .account-sidebar { - background: transparent; + background: transparent; + padding-top: 3px; + border-top: 1px solid @borders; } - .account-sidebar-item { padding-top: 3px; padding-bottom: 3px; @@ -50,12 +54,10 @@ .account-sidebar-item:selected { background-color: @borders; } -.account-sidebar-item .account-identifier-bar { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; -} .account-sidebar-item image { - padding: 6px; + margin-left: 3px; + margin-right: 3px; + padding: 3px; background-color: @theme_unfocused_bg_color; box-shadow: inset 0 0 6px @borders; border-radius: 6px; @@ -133,10 +135,6 @@ .chatlist-row overlay > box { padding: 6px; } -.chatlist-row .account-identifier-bar { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; -} /* VCardWindow */ .VCard-GtkLinkButton { padding-left: 5px; border-left: none; } ===================================== gajim/gtk/account_side_bar.py ===================================== @@ -2,6 +2,7 @@ from gi.repository import Gtk from gajim.common.const import AvatarSize from gajim.common import app +from gajim.common.i18n import _ class AccountSideBar(Gtk.ListBox): @@ -44,7 +45,9 @@ def __init__(self, account): account_color_bar.get_style_context().add_class( 'account-identifier-bar') - account_box = Gtk.Box(spacing=6) + account_box = Gtk.Box() + account_box.set_tooltip_text( + _('Account: %s') % app.get_account_label(account)) account_box.add(account_color_bar) account_box.add(self._image) View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/600d4462ec28c3c52ec36d5aa18dde6e…
-- View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/600d4462ec28c3c52ec36d5aa18dde6e…
You're receiving this email because of your account on
dev.gajim.org
.
1
0
0
0
[Git][gajim/gajim][mainwindow] Add transparent backgrounds
by Philipp Hörist
24 Jan '21
24 Jan '21
Philipp Hörist pushed to branch mainwindow at gajim / gajim Commits: e7f24db4 by lovetox at 2021-01-24T13:17:14+01:00 Add transparent backgrounds - - - - - 3 changed files: - gajim/data/style/gajim.css - gajim/gtk/account_side_bar.py - gajim/gtk/workspace_side_bar.py Changes: ===================================== gajim/data/style/gajim.css ===================================== @@ -37,7 +37,12 @@ .chatlist-left-grid { border-right: 1px solid @unfocused_borders; } + /* Account sidebar */ +.account-sidebar { + background: transparent; +} + .account-sidebar-item { padding-top: 3px; padding-bottom: 3px; @@ -57,6 +62,11 @@ border: 1px solid @borders; } /* Workspace sidebar */ + +.workspace-sidebar { + background: transparent; +} + .workspace-sidebar-item { padding-top: 3px; padding-bottom: 3px; ===================================== gajim/gtk/account_side_bar.py ===================================== @@ -9,6 +9,7 @@ def __init__(self): Gtk.ListBox.__init__(self) self.set_vexpand(True) self.set_valign(Gtk.Align.END) + self.get_style_context().add_class('account-sidebar') self._accounts = list(app.connections.keys()) for account in self._accounts: ===================================== gajim/gtk/workspace_side_bar.py ===================================== @@ -15,6 +15,7 @@ def __init__(self): self.set_vexpand(True) self.set_valign(Gtk.Align.START) self.set_sort_func(self._sort_func) + self.get_style_context().add_class('workspace-sidebar') self.add(AddWorkspace('add')) self.connect('button-press-event', self._on_button_press) self.connect('row-activated', self._on_row_activated) View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/e7f24db4ae9bf422b2daeaa2f4b9424f…
-- View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/e7f24db4ae9bf422b2daeaa2f4b9424f…
You're receiving this email because of your account on
dev.gajim.org
.
1
0
0
0
[Git][gajim/gajim][mainwindow] Allow to add chats to different workspaces
by Philipp Hörist
23 Jan '21
23 Jan '21
Philipp Hörist pushed to branch mainwindow at gajim / gajim Commits: 00407e29 by lovetox at 2021-01-23T22:42:34+01:00 Allow to add chats to different workspaces - - - - - 3 changed files: - gajim/gtk/chat_list_stack.py - gajim/gtk/main.py - gajim/gtk/workspace_side_bar.py Changes: ===================================== gajim/gtk/chat_list_stack.py ===================================== @@ -39,6 +39,15 @@ def add_chat_list(self, workspace_id): self.add_named(chat_list, workspace_id) return chat_list + def remove_chat_list(self, workspace_id): + chat_list = self._chat_lists[workspace_id] + self.remove(chat_list) + for account, jid in chat_list.get_open_chats(): + self.remove_chat(workspace_id, account, jid) + + self._chat_lists.pop(workspace_id) + chat_list.destroy() + def _on_row_selected(self, _chat_list, row): if row is None: self._chat_stack.clear() ===================================== gajim/gtk/main.py ===================================== @@ -52,6 +52,7 @@ def _add_actions(self): actions = [ ('add-workspace', 's', self.add_workspace), ('remove-workspace', 's', self.remove_workspace), + ('activate-workspace', 's', self.activate_workspace), ('remove-chat', 'as', self.remove_chat), ] @@ -78,21 +79,27 @@ def get_active_jid(self, *args): pass def get_active_workspace(self): - # TODO - return app.settings.get_workspaces()[0] + return self._workspace_side_bar.get_active_workspace() def add_workspace(self, _action, param): name = param.get_string() workspace_id = app.settings.add_workspace(name) self._workspace_side_bar.add_workspace(workspace_id) + self._chat_list_stack.add_chat_list(workspace_id) def remove_workspace(self, _action, param): workspace_id = param.get_string() self._workspace_side_bar.remove_workspace(workspace_id) + self._chat_list_stack.remove_chat_list(workspace_id) app.settings.remove_workspace(workspace_id) + def activate_workspace(self, _action, param): + workspace_id = param.get_string() + self._workspace_side_bar.activate_workspace(workspace_id) + self._chat_list_stack.show_chat_list(workspace_id) + def add_chat(self, account, jid): - workspace_id = self.get_active_workspace() + workspace_id = self._workspace_side_bar.get_active_workspace() self.add_chat_for_workspace(workspace_id, account, jid) def add_chat_for_workspace(self, workspace_id, account, jid): @@ -113,6 +120,7 @@ def get_control(self, account, jid): def _load_chats(self): for workspace_id in app.settings.get_workspaces(): self._workspace_side_bar.add_workspace(workspace_id) + self._chat_list_stack.add_chat_list(workspace_id) open_chats = app.settings.get_workspace_setting(workspace_id, 'open_chats') for account, jid in open_chats: ===================================== gajim/gtk/workspace_side_bar.py ===================================== @@ -19,6 +19,8 @@ def __init__(self): self.connect('button-press-event', self._on_button_press) self.connect('row-activated', self._on_row_activated) + self._workspaces = {} + @staticmethod def _sort_func(child1, child2): if child1.sort_index < child2.sort_index: @@ -44,13 +46,27 @@ def _on_row_activated(self, _listbox, row): 'activate-workspace', GLib.Variant('s', row.workspace_id)) def add_workspace(self, workspace_id): - self.add(Workspace(workspace_id)) + row = Workspace(workspace_id) + self._workspaces[workspace_id] = row + self.add(row) def remove_workspace(self, workspace_id): - for row in self.get_children(): - if row.workspace_id == workspace_id: - self.remove(row) - break + row = self._workspaces.pop(workspace_id) + self.remove(row) + + def activate_workspace(self, workspace_id): + row = self.get_selected_row() + if row is not None and row.workspace_id == workspace_id: + return + + row = self._workspaces[workspace_id] + self.select_row(row) + + def get_active_workspace(self): + row = self.get_selected_row() + if row is None: + return None + return row.workspace_id class CommonWorkspace(Gtk.ListBoxRow): View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/00407e2901e789c3e3db32297a9c8eb0…
-- View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/00407e2901e789c3e3db32297a9c8eb0…
You're receiving this email because of your account on
dev.gajim.org
.
1
0
0
0
[Git][gajim/gajim][mainwindow] Add/Remove Workspaces
by Philipp Hörist
23 Jan '21
23 Jan '21
Philipp Hörist pushed to branch mainwindow at gajim / gajim Commits: eb737c71 by lovetox at 2021-01-23T21:53:24+01:00 Add/Remove Workspaces - - - - - 8 changed files: - gajim/common/app.py - gajim/data/gui/main.ui - gajim/data/style/gajim.css - gajim/gtk/chat_list.py - gajim/gtk/chat_list_stack.py - gajim/gtk/chat_stack.py - gajim/gtk/main.py - gajim/gtk/workspace_side_bar.py Changes: ===================================== gajim/common/app.py ===================================== @@ -63,6 +63,7 @@ bob_cache = {} # type: Dict[str, bytes] ipython_window = None app = None # Gtk.Application +window = None # MainWindow ged = ged_module.GlobalEventsDispatcher() # Global Events Dispatcher nec = cast(NetworkEventsControllerT, None) ===================================== gajim/data/gui/main.ui ===================================== @@ -1,18 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.2 --> +<!-- Generated with glade 3.36.0 --> <interface> <requires lib="gtk+" version="3.22"/> - <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="main_grid"> <property name="visible">True</property> - <property name="can-focus">False</property> + <property name="can_focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <child> - <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="right_grid"> <property name="visible">True</property> - <property name="can-focus">False</property> + <property name="can_focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <child> @@ -44,49 +42,47 @@ </child> </object> <packing> - <property name="left-attach">2</property> - <property name="top-attach">0</property> + <property name="left_attach">2</property> + <property name="top_attach">0</property> </packing> </child> <child> - <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="middle_grid"> <property name="visible">True</property> - <property name="can-focus">False</property> + <property name="can_focus">False</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> <child> - <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="column-spacing">6</property> + <property name="can_focus">False</property> + <property name="column_spacing">6</property> <child> <object class="GtkSearchEntry" id="search_entry"> - <property name="width-request">200</property> + <property name="width_request">200</property> <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="primary-icon-name">edit-find-symbolic</property> - <property name="primary-icon-activatable">False</property> - <property name="primary-icon-sensitive">False</property> - <property name="placeholder-text" translatable="yes">Search…</property> + <property name="can_focus">True</property> + <property name="primary_icon_name">edit-find-symbolic</property> + <property name="primary_icon_activatable">False</property> + <property name="primary_icon_sensitive">False</property> + <property name="placeholder_text" translatable="yes">Search…</property> </object> <packing> - <property name="left-attach">1</property> - <property name="top-attach">0</property> + <property name="left_attach">1</property> + <property name="top_attach">0</property> </packing> </child> <child> <object class="GtkButton" id="start_chat_button"> <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">True</property> - <property name="tooltip-text" translatable="yes">Start Chat</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="tooltip_text" translatable="yes">Start Chat</property> <child> <object class="GtkImage"> <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="icon-name">list-add-symbolic</property> + <property name="can_focus">False</property> + <property name="icon_name">list-add-symbolic</property> </object> </child> <style> @@ -94,8 +90,8 @@ </style> </object> <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> + <property name="left_attach">0</property> + <property name="top_attach">0</property> </packing> </child> <style> @@ -103,97 +99,66 @@ </style> </object> <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> + <property name="left_attach">0</property> + <property name="top_attach">0</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> <packing> - <property name="left-attach">1</property> - <property name="top-attach">0</property> + <property name="left_attach">1</property> + <property name="top_attach">0</property> </packing> </child> <child> - <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="left_grid"> <property name="visible">True</property> - <property name="can-focus">False</property> + <property name="can_focus">False</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> + <object class="GtkScrolledWindow" id="workspace_scrolled"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="vexpand">True</property> + <property name="hscrollbar_policy">never</property> + <property name="shadow_type">in</property> + <property name="propagate_natural_height">True</property> + <child> + <placeholder/> + </child> + <style> + <class name="no-border"/> + </style> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> </child> <child> - <placeholder/> + <object class="GtkBox" id="account_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">end</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> </child> + <style> + <class name="chatlist-left-grid"/> + </style> </object> <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> + <property name="left_attach">0</property> + <property name="top_attach">0</property> </packing> </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> </object> </interface> ===================================== gajim/data/style/gajim.css ===================================== @@ -6,6 +6,7 @@ border: none; } +.no-border { border: none; } .scrolled-no-border { border: none; } .no-scroll-indicator undershoot.top, undershoot.bottom { background-image: none; } .scrollbar-style scrollbar trough {background-color:@theme_base_color; } ===================================== gajim/gtk/chat_list.py ===================================== @@ -4,7 +4,7 @@ from gi.repository import Gdk from gi.repository import Gtk from gi.repository import Pango -from gi.repository import GObject +from gi.repository import GLib from gajim.common import app from gajim.common.const import AvatarSize @@ -18,19 +18,12 @@ class ChatList(Gtk.ListBox): - - __gsignals__ = { - 'chat-closed': ( - GObject.SignalFlags.RUN_LAST, - None, - (Gtk.ListBoxRow,) - )} - - def __init__(self): + def __init__(self, workspace_id): Gtk.ListBox.__init__(self) self._chats = {} self._current_filter_text = '' + self._workspace_id = workspace_id self.set_size_request(250, -1) self.show_all() @@ -51,7 +44,7 @@ def add_chat(self, account, jid): # Chat is already in the List return - row = ChatRow(account, jid) + row = ChatRow(self._workspace_id, account, jid) self._chats[(account, jid)] = row self.add(row) @@ -72,11 +65,12 @@ def get_open_chats(self): class ChatRow(Gtk.ListBoxRow): - def __init__(self, account, jid): + def __init__(self, workspace_id, account, jid): Gtk.ListBoxRow.__init__(self) self.account = account self.jid = jid + self.workspace_id = workspace_id self._unread_count = 0 self.get_style_context().add_class('chatlist-row') @@ -201,7 +195,9 @@ def _on_state_flags_changed(self, _listboxrow, *args): self._revealer.set_reveal_child(False) def _on_close_button_clicked(self, _button): - self.get_parent().emit('chat-closed', self) + self.get_toplevel().activate_action( + 'remove-chat', + GLib.Variant('as', [self.workspace_id, self.account, self.jid])) def set_unread(self, count): log.info('Set unread count: %s (%s)', self.jid, count) ===================================== gajim/gtk/chat_list_stack.py ===================================== @@ -32,9 +32,8 @@ def _on_search_changed(self, search_entry): chat_list.set_filter_text(search_entry.get_text()) def add_chat_list(self, workspace_id): - chat_list = ChatList() + chat_list = ChatList(workspace_id) chat_list.connect('row-selected', self._on_row_selected) - chat_list.connect('chat-closed', self._on_chat_closed, workspace_id) self._chat_lists[workspace_id] = chat_list self.add_named(chat_list, workspace_id) @@ -46,9 +45,6 @@ def _on_row_selected(self, _chat_list, row): return self._chat_stack.show_chat(row.account, row.jid) - def _on_chat_closed(self, _chat_list, row, workspace_id): - self.remove_chat(workspace_id, row.account, row.jid) - def show_chat_list(self, workspace_id): self.set_visible_child_name(workspace_id) ===================================== gajim/gtk/chat_stack.py ===================================== @@ -1,5 +1,4 @@ -from collections import defaultdict from gi.repository import Gtk ===================================== gajim/gtk/main.py ===================================== @@ -1,5 +1,7 @@ from gi.repository import Gtk +from gi.repository import GLib +from gi.repository import Gio from gajim.common import app from gajim.gui.util import get_builder @@ -33,13 +35,10 @@ def __init__(self): self._chat_list_stack = ChatListStack(self._ui, self._chat_stack) self._account_side_bar = AccountSideBar() self._workspace_side_bar = WorkspaceSideBar() - self._ui.left_grid.get_style_context().add_class('chatlist-left-grid') - self._ui.left_grid.add(self._workspace_side_bar) - account_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6) - account_box.set_valign(Gtk.Align.END) - account_box.add(Gtk.Separator()) - account_box.add(self._account_side_bar) - self._ui.left_grid.add(account_box) + self._ui.workspace_scrolled.add(self._workspace_side_bar) + + self._ui.account_box.add(self._account_side_bar) + self._ui.middle_grid.add(self._chat_list_stack) self._ui.right_grid.add(self._chat_stack) self._ui.connect_signals(self) @@ -47,6 +46,21 @@ def __init__(self): self.show_all() self._load_chats() + self._add_actions() + + def _add_actions(self): + actions = [ + ('add-workspace', 's', self.add_workspace), + ('remove-workspace', 's', self.remove_workspace), + ('remove-chat', 'as', self.remove_chat), + ] + + for action in actions: + action_name, variant, func = action + variant = GLib.VariantType.new(variant) + act = Gio.SimpleAction.new(action_name, variant) + act.connect('activate', func) + self.add_action(act) def get_widget(self, name): return getattr(self._ui, name) @@ -67,6 +81,16 @@ def get_active_workspace(self): # TODO return app.settings.get_workspaces()[0] + def add_workspace(self, _action, param): + name = param.get_string() + workspace_id = app.settings.add_workspace(name) + self._workspace_side_bar.add_workspace(workspace_id) + + def remove_workspace(self, _action, param): + workspace_id = param.get_string() + self._workspace_side_bar.remove_workspace(workspace_id) + app.settings.remove_workspace(workspace_id) + def add_chat(self, account, jid): workspace_id = self.get_active_workspace() self.add_chat_for_workspace(workspace_id, account, jid) @@ -79,7 +103,8 @@ def add_chat_for_workspace(self, workspace_id, account, jid): self._chat_list_stack.select_chat(workspace_id, account, jid) self._chat_list_stack.store_open_chats(workspace_id) - def remove_chat(self, workspace_id, account, jid): + def remove_chat(self, _action, param): + workspace_id, account, jid = param.unpack() self._chat_list_stack.remove_chat(workspace_id, account, jid) def get_control(self, account, jid): ===================================== gajim/gtk/workspace_side_bar.py ===================================== @@ -1,8 +1,11 @@ from gi.repository import Gtk +from gi.repository import GLib from gajim.common.const import AvatarSize from gajim.common import app +from gajim.common.i18n import _ + from gajim.gui.avatar import generate_default_avatar @@ -11,27 +14,108 @@ def __init__(self): Gtk.ListBox.__init__(self) self.set_vexpand(True) self.set_valign(Gtk.Align.START) + self.set_sort_func(self._sort_func) + self.add(AddWorkspace('add')) + self.connect('button-press-event', self._on_button_press) + self.connect('row-activated', self._on_row_activated) + + @staticmethod + def _sort_func(child1, child2): + if child1.sort_index < child2.sort_index: + return -1 + + if child1.sort_index == child2.sort_index: + return 0 + return 1 + + def _on_button_press(self, _listbox, button_event): + if button_event.button != 3: + return + row = self.get_row_at_y(button_event.y) + WorspaceMenu(row) + + def _on_row_activated(self, _listbox, row): + main_window = self.get_toplevel() + if row.workspace_id == 'add': + main_window.activate_action( + 'add-workspace', GLib.Variant('s', 'test')) + else: + main_window.activate_action( + 'activate-workspace', GLib.Variant('s', row.workspace_id)) def add_workspace(self, workspace_id): self.add(Workspace(workspace_id)) def remove_workspace(self, workspace_id): - pass + for row in self.get_children(): + if row.workspace_id == workspace_id: + self.remove(row) + break -class Workspace(Gtk.ListBoxRow): +class CommonWorkspace(Gtk.ListBoxRow): def __init__(self, workspace_id): Gtk.ListBoxRow.__init__(self) self.get_style_context().add_class('workspace-sidebar-item') - self._workspace_id = workspace_id + self.workspace_id = workspace_id + + +class Workspace(CommonWorkspace): + def __init__(self, workspace_id): + CommonWorkspace.__init__(self, workspace_id) + + self.sort_index = 0 + name = app.settings.get_workspace_setting(workspace_id, 'name') letter = name[:2] scale = self.get_scale_factor() surface = generate_default_avatar( letter, name, AvatarSize.WORKSPACE, scale) - self._image = Gtk.Image.new_from_surface(surface) - self._image.set_halign(Gtk.Align.CENTER) - self.add(self._image) + image = Gtk.Image.new_from_surface(surface) + image.set_halign(Gtk.Align.CENTER) + self.add(image) self.show_all() + + +class AddWorkspace(CommonWorkspace): + def __init__(self, workspace_id): + CommonWorkspace.__init__(self, workspace_id) + + self.set_selectable(False) + + self.sort_index = 10000 + + image = Gtk.Image.new_from_icon_name('list-add-symbolic', + Gtk.IconSize.DND) + image.set_halign(Gtk.Align.CENTER) + self.add(image) + self.show_all() + + +class WorspaceMenu(Gtk.Popover): + def __init__(self, row): + Gtk.Popover.__init__(self) + entries = [ + (_('Remove'), 'remove-workspace'), + ] + + self._workspace_id = row.workspace_id + + box = Gtk.Box() + for label, action in entries: + button = Gtk.Button(label=label) + button.connect('clicked', self._on_click, action) + box.add(button) + box.show_all() + + self.add(box) + self.set_relative_to(row) + self.popup() + + def _on_click(self, _button, action): + self.popdown() + self.set_relative_to(None) + app.window.activate_action(action, + GLib.Variant('s', self._workspace_id)) View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/eb737c7128046a5391d044a66cb90065…
-- View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/eb737c7128046a5391d044a66cb90065…
You're receiving this email because of your account on
dev.gajim.org
.
1
0
0
0
[Git][gajim/gajim][mainwindow] Store chatlist on remove
by Philipp Hörist
23 Jan '21
23 Jan '21
Philipp Hörist pushed to branch mainwindow at gajim / gajim Commits: 480fd92d by lovetox at 2021-01-23T08:16:03+01:00 Store chatlist on remove - - - - - 4 changed files: - gajim/gtk/chat_list.py - gajim/gtk/chat_list_stack.py - gajim/gtk/chat_stack.py - gajim/gtk/main.py Changes: ===================================== gajim/gtk/chat_list.py ===================================== @@ -4,6 +4,7 @@ from gi.repository import Gdk from gi.repository import Gtk from gi.repository import Pango +from gi.repository import GObject from gajim.common import app from gajim.common.const import AvatarSize @@ -17,11 +18,17 @@ class ChatList(Gtk.ListBox): - def __init__(self, ui, chat_stack): + + __gsignals__ = { + 'chat-closed': ( + GObject.SignalFlags.RUN_LAST, + None, + (Gtk.ListBoxRow,) + )} + + def __init__(self): Gtk.ListBox.__init__(self) - self._ui = ui - self._chat_stack = chat_stack self._chats = {} self._current_filter_text = '' self.set_size_request(250, -1) @@ -29,7 +36,6 @@ def __init__(self, ui, chat_stack): self.show_all() self.set_filter_func(self._filter_func) - self.connect('row-selected', self._on_row_selected) def _filter_func(self, row): if not self._current_filter_text: @@ -41,10 +47,9 @@ def set_filter_text(self, text): self.invalidate_filter() def add_chat(self, account, jid): - for _row_account, row_jid in self.get_open_chats(): - if row_jid == jid: - self.select_chat(account, jid) - return + if self._chats.get((account, jid)) is not None: + # Chat is already in the List + return row = ChatRow(account, jid) self._chats[(account, jid)] = row @@ -59,11 +64,8 @@ def remove_chat(self, account, jid): self.remove(row) row.destroy() - def _on_row_selected(self, _listbox, row): - if row is None: - self._chat_stack.clear() - return - self._chat_stack.show_chat(row.account, row.jid) + def contains_chat(self, account, jid): + return self._chats.get((account, jid)) is not None def get_open_chats(self): return list(self._chats.keys()) @@ -199,7 +201,7 @@ def _on_state_flags_changed(self, _listboxrow, *args): self._revealer.set_reveal_child(False) def _on_close_button_clicked(self, _button): - self.get_parent().remove_chat(self.account, self.jid) + self.get_parent().emit('chat-closed', self) def set_unread(self, count): log.info('Set unread count: %s (%s)', self.jid, count) ===================================== gajim/gtk/chat_list_stack.py ===================================== @@ -32,11 +32,23 @@ def _on_search_changed(self, search_entry): chat_list.set_filter_text(search_entry.get_text()) def add_chat_list(self, workspace_id): - chat_list = ChatList(self._ui, self._chat_stack) + chat_list = ChatList() + chat_list.connect('row-selected', self._on_row_selected) + chat_list.connect('chat-closed', self._on_chat_closed, workspace_id) + self._chat_lists[workspace_id] = chat_list self.add_named(chat_list, workspace_id) return chat_list + def _on_row_selected(self, _chat_list, row): + if row is None: + self._chat_stack.clear() + return + self._chat_stack.show_chat(row.account, row.jid) + + def _on_chat_closed(self, _chat_list, row, workspace_id): + self.remove_chat(workspace_id, row.account, row.jid) + def show_chat_list(self, workspace_id): self.set_visible_child_name(workspace_id) @@ -60,3 +72,13 @@ def store_open_chats(self, workspace_id): def remove_chat(self, workspace_id, account, jid): chat_list = self._chat_lists[workspace_id] chat_list.remove_chat(account, jid) + self.store_open_chats(workspace_id) + + if self._find_chat(account, jid) is None: + self._chat_stack.remove_chat(account, jid) + + def _find_chat(self, account, jid): + for chat_list in self._chat_lists.values(): + if chat_list.contains_chat(account, jid): + return chat_list + return None ===================================== gajim/gtk/chat_stack.py ===================================== @@ -17,26 +17,30 @@ def __init__(self): self.add_named(Gtk.Box(), 'empty') self.show_all() - self._controls = defaultdict(dict) + self._controls = {} def get_control(self, account, jid): try: - return self._controls[account][jid] + return self._controls[(account, jid)] except KeyError: return None def add_chat(self, account, jid): + if self._controls.get((account, jid)) is not None: + # Control is already in the Stack + return + mw = self.get_toplevel() contact = app.contacts.create_contact(jid, account) chat_control = ChatControl(mw, contact, account, None, None) - self._controls[account][jid] = chat_control + self._controls[(account, jid)] = chat_control self.add_named(chat_control.widget, f'{account}:{jid}') chat_control.widget.show_all() def remove_chat(self, account, jid): - control = self._controls[account].pop(jid) + control = self._controls.pop((account, jid)) + self.remove(control.widget) control.shutdown() - self.remove(control) def show_chat(self, account, jid): self.set_visible_child_name(f'{account}:{jid}') ===================================== gajim/gtk/main.py ===================================== @@ -80,9 +80,7 @@ def add_chat_for_workspace(self, workspace_id, account, jid): self._chat_list_stack.store_open_chats(workspace_id) def remove_chat(self, workspace_id, account, jid): - self._chat_stack.remove_chat(account, jid) self._chat_list_stack.remove_chat(workspace_id, account, jid) - self._chat_list_stack.store_open_chats(workspace_id) def get_control(self, account, jid): return self._chat_stack.get_control(account, jid) View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/480fd92d7bc93418e90f8fcdd11147d7…
-- View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/480fd92d7bc93418e90f8fcdd11147d7…
You're receiving this email because of your account on
dev.gajim.org
.
1
0
0
0
[Git][gajim/gajim][mainwindow] Improve styling for Sidebar and ChatList
by Daniel Brötzmann
22 Jan '21
22 Jan '21
Daniel Brötzmann pushed to branch mainwindow at gajim / gajim Commits: 6709a3d8 by wurstsalat at 2021-01-22T23:40:36+01:00 Improve styling for Sidebar and ChatList - - - - - 6 changed files: - gajim/data/gui/main.ui - gajim/data/style/gajim.css - gajim/gtk/account_side_bar.py - gajim/gtk/chat_list.py - gajim/gtk/chat_list_stack.py - gajim/gtk/main.py Changes: ===================================== gajim/data/gui/main.ui ===================================== @@ -63,6 +63,7 @@ <property name="column-spacing">6</property> <child> <object class="GtkSearchEntry" id="search_entry"> + <property name="width-request">200</property> <property name="visible">True</property> <property name="can-focus">True</property> <property name="primary-icon-name">edit-find-symbolic</property> ===================================== gajim/data/style/gajim.css ===================================== @@ -33,38 +33,54 @@ .link-button { min-height: 0px; } /* ChatList with Workspace and Account sidebars */ +.chatlist-left-grid { + border-right: 1px solid @unfocused_borders; +} /* Account sidebar */ .account-sidebar-item { - padding-top: 2px; - padding-bottom: 2px; + padding-top: 3px; + padding-bottom: 3px; +} +.account-sidebar-item:selected { + background-color: @borders; } -.account-sidebar-item box { +.account-sidebar-item .account-identifier-bar { border-top-right-radius: 6px; border-bottom-right-radius: 6px; } .account-sidebar-item image { padding: 6px; background-color: @theme_unfocused_bg_color; - box-shadow: inset 4px 4px 6px @borders; + box-shadow: inset 0 0 6px @borders; border-radius: 6px; + border: 1px solid @borders; } /* Workspace sidebar */ .workspace-sidebar-item { padding-top: 3px; padding-bottom: 3px; } +.workspace-sidebar-item:selected { + background-color: @borders; +} .workspace-sidebar-item image { - padding: 6px; + padding: 6px; background-color: @theme_unfocused_bg_color; - box-shadow: inset 4px 4px 6px @borders; + box-shadow: inset 0 0 6px @borders; border-radius: 6px; + border: 1px solid @borders; } /* ChatList */ .small-label { font-size: small; } .chatlist-top-bar { - padding: 6px; + padding: 12px; + border-right: 1px solid @unfocused_borders; + border-bottom: 1px solid @unfocused_borders; +} +.chatlist-stack { + border-right: 1px solid @unfocused_borders; } .revealer-close-button { padding: 0px; @@ -78,9 +94,9 @@ background-color: rgb(22, 100, 169); } .chatlist-row { - padding: 8px; border-top: 1px solid @theme_unfocused_bg_color; transition: none; + padding: 0px; } .chatlist-row:active { box-shadow: none; @@ -103,6 +119,13 @@ .chatlist-row:selected button:hover { border-color: @insensitive_fg_color; } +.chatlist-row overlay > box { + padding: 6px; +} +.chatlist-row .account-identifier-bar { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} /* VCardWindow */ .VCard-GtkLinkButton { padding-left: 5px; border-left: none; } ===================================== gajim/gtk/account_side_bar.py ===================================== @@ -40,6 +40,8 @@ def __init__(self, account): account_color_bar.set_size_request(6, -1) account_class = app.css_config.get_dynamic_class(account) account_color_bar.get_style_context().add_class(account_class) + account_color_bar.get_style_context().add_class( + 'account-identifier-bar') account_box = Gtk.Box(spacing=6) account_box.add(account_color_bar) ===================================== gajim/gtk/chat_list.py ===================================== @@ -81,6 +81,16 @@ def __init__(self, account, jid): self.connect('state-flags-changed', self._on_state_flags_changed) + account_bar = Gtk.Box() + account_bar.set_size_request(6, -1) + account_bar.set_no_show_all(True) + account_class = app.css_config.get_dynamic_class(account) + account_bar.get_style_context().add_class(account_class) + account_bar.get_style_context().add_class( + 'account-identifier-bar') + if len(app.get_enabled_accounts_with_labels()) > 1: + account_bar.show() + contact = app.contacts.get_contact(account, jid) if contact: @@ -170,6 +180,7 @@ def __init__(self, account, jid): text_box.add(last_message_box) main_box = Gtk.Box(spacing=12) + main_box.pack_start(account_bar, False, True, 0) main_box.pack_start(avatar_image, False, True, 0) main_box.pack_start(text_box, True, True, 0) ===================================== gajim/gtk/chat_list_stack.py ===================================== @@ -10,6 +10,7 @@ class ChatListStack(Gtk.Stack): def __init__(self, ui, chat_stack): Gtk.Stack.__init__(self) + self.get_style_context().add_class('chatlist-stack') self.set_vexpand(True) ===================================== gajim/gtk/main.py ===================================== @@ -33,8 +33,13 @@ def __init__(self): self._chat_list_stack = ChatListStack(self._ui, self._chat_stack) self._account_side_bar = AccountSideBar() self._workspace_side_bar = WorkspaceSideBar() + self._ui.left_grid.get_style_context().add_class('chatlist-left-grid') self._ui.left_grid.add(self._workspace_side_bar) - self._ui.left_grid.add(self._account_side_bar) + account_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6) + account_box.set_valign(Gtk.Align.END) + account_box.add(Gtk.Separator()) + account_box.add(self._account_side_bar) + self._ui.left_grid.add(account_box) self._ui.middle_grid.add(self._chat_list_stack) self._ui.right_grid.add(self._chat_stack) self._ui.connect_signals(self) View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/6709a3d8f84a816dbc5a72e0bfdd1c4f…
-- View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/6709a3d8f84a816dbc5a72e0bfdd1c4f…
You're receiving this email because of your account on
dev.gajim.org
.
1
0
0
0
[Git][gajim/gajim][mainwindow] 3 commits: ChatList: Add basic elements
by Daniel Brötzmann
22 Jan '21
22 Jan '21
Daniel Brötzmann pushed to branch mainwindow at gajim / gajim Commits: da61662d by wurstsalat at 2021-01-22T18:49:46+01:00 ChatList: Add basic elements - - - - - 544f0b18 by wurstsalat at 2021-01-22T18:50:53+01:00 ChatListStack: Add Start Chat - - - - - 173227f7 by wurstsalat at 2021-01-22T20:44:29+01:00 Add basic Sidebar styling - - - - - 9 changed files: - gajim/common/storage/archive.py - gajim/data/gui/main.ui - gajim/data/style/gajim.css - gajim/gtk/account_side_bar.py - gajim/gtk/chat_list.py - gajim/gtk/chat_list_stack.py - gajim/gtk/main.py - gajim/gtk/util.py - gajim/gtk/workspace_side_bar.py Changes: ===================================== gajim/common/storage/archive.py ===================================== @@ -466,6 +466,37 @@ def get_last_conversation_lines(self, account, jid, pending): messages.reverse() return messages + @timeit + def get_last_conversation_line(self, account, jid): + """ + Load the last line of a conversation with jid for account. + Loads messages, but no status messages or error messages. + + :param account: The account + + :param jid: The jid for which we request the conversation + + returns a list of namedtuples + """ + jids = self._get_family_jids(account, jid) + account_id = self.get_account_id(account) + + kinds = map(str, [KindConstant.STATUS, + KindConstant.GCSTATUS, + KindConstant.ERROR]) + + sql = ''' + SELECT contact_name, time, kind, message + FROM logs NATURAL JOIN jids WHERE jid IN ({jids}) + AND account_id = {account_id} + AND kind NOT IN ({kinds}) + ORDER BY time DESC + '''.format(jids=', '.join('?' * len(jids)), + account_id=account_id, + kinds=', '.join(kinds)) + + return self._con.execute(sql, tuple(jids)).fetchone() + @timeit def get_conversation_for_date(self, account, jid, date): """ ===================================== gajim/data/gui/main.ui ===================================== @@ -1,16 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.38.2 --> <interface> <requires lib="gtk+" version="3.22"/> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="main_grid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <child> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="right_grid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <child> @@ -42,67 +44,103 @@ </child> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> + <property name="left-attach">2</property> + <property name="top-attach">0</property> </packing> </child> <child> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="middle_grid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> <child> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> + <property name="column-spacing">6</property> <child> <object class="GtkSearchEntry" id="search_entry"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="primary_icon_name">edit-find-symbolic</property> - <property name="primary_icon_activatable">False</property> - <property name="primary_icon_sensitive">False</property> + <property name="can-focus">True</property> + <property name="primary-icon-name">edit-find-symbolic</property> + <property name="primary-icon-activatable">False</property> + <property name="primary-icon-sensitive">False</property> + <property name="placeholder-text" translatable="yes">Search…</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> - <object class="GtkButton"> + <object class="GtkButton" id="start_chat_button"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes">Start Chat</property> <child> <object class="GtkImage"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">list-add-symbolic</property> + <property name="can-focus">False</property> + <property name="icon-name">list-add-symbolic</property> </object> </child> + <style> + <class name="suggested-action"/> + </style> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> + <style> + <class name="chatlist-top-bar"/> + </style> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="left_grid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> <child> @@ -111,11 +149,50 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> </interface> ===================================== gajim/data/style/gajim.css ===================================== @@ -32,6 +32,78 @@ .link-button { min-height: 0px; } +/* ChatList with Workspace and Account sidebars */ +/* Account sidebar */ +.account-sidebar-item { + padding-top: 2px; + padding-bottom: 2px; +} +.account-sidebar-item box { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} +.account-sidebar-item image { + padding: 6px; + background-color: @theme_unfocused_bg_color; + box-shadow: inset 4px 4px 6px @borders; + border-radius: 6px; +} +/* Workspace sidebar */ +.workspace-sidebar-item { + padding-top: 3px; + padding-bottom: 3px; +} +.workspace-sidebar-item image { + padding: 6px; + background-color: @theme_unfocused_bg_color; + box-shadow: inset 4px 4px 6px @borders; + border-radius: 6px; +} +/* ChatList */ +.small-label { + font-size: small; +} +.chatlist-top-bar { + padding: 6px; +} +.revealer-close-button { + padding: 0px; +} +.unread-counter { + color: rgb(242, 242, 242); + padding-left: 6px; + padding-right: 6px; + border-radius: 10px; + font-size: 80%; + background-color: rgb(22, 100, 169); +} +.chatlist-row { + padding: 8px; + border-top: 1px solid @theme_unfocused_bg_color; + transition: none; +} +.chatlist-row:active { + box-shadow: none; +} +.chatlist-row:selected:active { + box-shadow: none; +} +.chatlist-row:hover { + background-color: @theme_unfocused_bg_color; +} +.chatlist-row:selected { + background-color: @theme_unfocused_bg_color; +} +.chatlist-row:selected label { + color: @theme_text_color; +} +.chatlist-row:selected button { + color: @theme_fg_color; +} +.chatlist-row:selected button:hover { + border-color: @insensitive_fg_color; +} + /* VCardWindow */ .VCard-GtkLinkButton { padding-left: 5px; border-left: none; } ===================================== gajim/gtk/account_side_bar.py ===================================== @@ -24,6 +24,7 @@ def remove_account(self, account): class Account(Gtk.ListBoxRow): def __init__(self, account): Gtk.ListBoxRow.__init__(self) + self.get_style_context().add_class('account-sidebar-item') self._account = account self._jid = app.get_jid_from_account(account) @@ -34,5 +35,15 @@ def __init__(self, account): AvatarSize.ACCOUNT_SIDE_BAR, scale) self._image = Gtk.Image.new_from_surface(surface) - self.add(self._image) + + account_color_bar = Gtk.Box() + account_color_bar.set_size_request(6, -1) + account_class = app.css_config.get_dynamic_class(account) + account_color_bar.get_style_context().add_class(account_class) + + account_box = Gtk.Box(spacing=6) + account_box.add(account_color_bar) + account_box.add(self._image) + + self.add(account_box) self.show_all() ===================================== gajim/gtk/chat_list.py ===================================== @@ -1,6 +1,19 @@ +import logging +from datetime import datetime +from gi.repository import Gdk from gi.repository import Gtk +from gi.repository import Pango +from gajim.common import app +from gajim.common.const import AvatarSize +from gajim.common.const import KindConstant +from gajim.common.i18n import _ + +from .util import convert_rgba_to_hex +from .util import text_to_color + +log = logging.getLogger('gajim.gtk.chatlist') class ChatList(Gtk.ListBox): @@ -11,6 +24,7 @@ def __init__(self, ui, chat_stack): self._chat_stack = chat_stack self._chats = {} self._current_filter_text = '' + self.set_size_request(250, -1) self.show_all() @@ -27,6 +41,11 @@ def set_filter_text(self, text): self.invalidate_filter() def add_chat(self, account, jid): + for _row_account, row_jid in self.get_open_chats(): + if row_jid == jid: + self.select_chat(account, jid) + return + row = ChatRow(account, jid) self._chats[(account, jid)] = row self.add(row) @@ -56,7 +75,126 @@ def __init__(self, account, jid): self.account = account self.jid = jid - - label = Gtk.Label(jid) - self.add(label) + self._unread_count = 0 + + self.get_style_context().add_class('chatlist-row') + + self.connect('state-flags-changed', self._on_state_flags_changed) + + contact = app.contacts.get_contact(account, jid) + + if contact: + avatar = app.contacts.get_avatar(account, + contact.jid, + AvatarSize.ROSTER, + self.get_scale_factor(), + contact.show) + name = contact.get_shown_name() + else: + avatar = app.contacts.get_avatar(account, + jid, + AvatarSize.ROSTER, + self.get_scale_factor()) + name = jid + + avatar_image = Gtk.Image.new_from_surface(avatar) + rgba = Gdk.RGBA(*text_to_color(jid)) + name_color = convert_rgba_to_hex(rgba) + chat_name_label = Gtk.Label() + chat_name_label.set_halign(Gtk.Align.START) + chat_name_label.set_xalign(0) + chat_name_label.set_max_width_chars(18) + chat_name_label.set_ellipsize(Pango.EllipsizeMode.END) + chat_name_label.set_markup( + f'<span foreground="{name_color}">{name}</span>') + + last_message_label = Gtk.Label() + last_message_label.set_halign(Gtk.Align.START) + last_message_label.set_xalign(0) + last_message_label.set_max_width_chars(20) + last_message_label.set_ellipsize(Pango.EllipsizeMode.END) + last_message_label.get_style_context().add_class('small-label') + + timestamp_label = Gtk.Label() + timestamp_label.set_halign(Gtk.Align.END) + timestamp_label.set_valign(Gtk.Align.END) + timestamp_label.get_style_context().add_class('small-label') + timestamp_label.get_style_context().add_class('dim-label') + + # Get last chat message from archive + line = app.storage.archive.get_last_conversation_line(account, jid) + last_message_box = Gtk.Box(spacing=3) + if line is not None and line.message is not None: + last_message_label.set_text(line.message) + nick_label = Gtk.Label(label=_('Me:')) + nick_label.set_halign(Gtk.Align.START) + nick_label.get_style_context().add_class('small-label') + nick_label.get_style_context().add_class('dim-label') + if line.kind in (KindConstant.CHAT_MSG_SENT, + KindConstant.SINGLE_MSG_SENT): + last_message_box.add(nick_label) + # TODO: MUC nick + # TODO: file transfers have to be displayed differently + + # TODO: Calculate user friendly timestamp for yesterday, etc. + date_time = datetime.fromtimestamp(line.time) + timestamp = date_time.strftime('%H:%M') + timestamp_label.set_text(timestamp) + last_message_box.add(last_message_label) + + self._unread_label = Gtk.Label() + self._unread_label.set_no_show_all(True) + self._unread_label.set_halign(Gtk.Align.END) + self._unread_label.get_style_context().add_class('unread-counter') + + close_button = Gtk.Button.new_from_icon_name( + 'window-close-symbolic', Gtk.IconSize.BUTTON) + close_button.set_valign(Gtk.Align.CENTER) + close_button.set_tooltip_text(_('Close')) + close_button.get_style_context().add_class('revealer-close-button') + close_button.get_style_context().add_class('flat') + close_button.connect('clicked', self._on_close_button_clicked) + self._revealer = Gtk.Revealer() + self._revealer.set_transition_type( + Gtk.RevealerTransitionType.CROSSFADE) + self._revealer.set_halign(Gtk.Align.END) + self._revealer.add(close_button) + + meta_box = Gtk.Box(spacing=6) + meta_box.pack_start(chat_name_label, False, True, 0) + meta_box.pack_end(self._unread_label, False, True, 0) + meta_box.pack_end(timestamp_label, False, True, 0) + + text_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + text_box.add(meta_box) + text_box.add(last_message_box) + + main_box = Gtk.Box(spacing=12) + main_box.pack_start(avatar_image, False, True, 0) + main_box.pack_start(text_box, True, True, 0) + + overlay = Gtk.Overlay() + overlay.add(main_box) + overlay.add_overlay(self._revealer) + + self.add(overlay) self.show_all() + + def _on_state_flags_changed(self, _listboxrow, *args): + state = self.get_state_flags() + if (state & Gtk.StateFlags.PRELIGHT) != 0: + self._revealer.set_reveal_child(True) + else: + self._revealer.set_reveal_child(False) + + def _on_close_button_clicked(self, _button): + self.get_parent().remove_chat(self.account, self.jid) + + def set_unread(self, count): + log.info('Set unread count: %s (%s)', self.jid, count) + self._unread_count = count + if not count: + self._unread_label.hide() + else: + self._unread_label.set_text(str(count)) + self._unread_label.show() ===================================== gajim/gtk/chat_list_stack.py ===================================== @@ -1,4 +1,5 @@ +from gi.repository import GLib from gi.repository import Gtk from gajim.common import app @@ -17,7 +18,13 @@ def __init__(self, ui, chat_stack): self._chat_lists = {} self.show_all() - self._ui.search_entry.connect('search-changed', self._on_search_changed) + self._ui.start_chat_button.connect( + 'clicked', self._on_start_chat_clicked) + self._ui.search_entry.connect( + 'search-changed', self._on_search_changed) + + def _on_start_chat_clicked(self, _button): + app.app.activate_action('start-chat', GLib.Variant('s', '')) def _on_search_changed(self, search_entry): chat_list = self.get_visible_child() ===================================== gajim/gtk/main.py ===================================== @@ -15,6 +15,7 @@ def __init__(self): self.set_application(app.app) self.set_position(Gtk.WindowPosition.CENTER) self.set_title('Gajim') + self.set_default_size(800, 500) # Compatibility with ChatControl self.window = self ===================================== gajim/gtk/util.py ===================================== @@ -437,17 +437,20 @@ def gtk_month(month: int) -> int: return month - 1 -def convert_rgb_to_hex(rgb_string: str) -> str: - rgb = Gdk.RGBA() - rgb.parse(rgb_string) - rgb.to_color() - - red = int(rgb.red * 255) - green = int(rgb.green * 255) - blue = int(rgb.blue * 255) +def convert_rgba_to_hex(rgba: Gdk.RGBA) -> str: + red = int(rgba.red * 255) + green = int(rgba.green * 255) + blue = int(rgba.blue * 255) return '#%02x%02x%02x' % (red, green, blue) +def convert_rgb_to_hex(rgb_string: str) -> str: + rgba = Gdk.RGBA() + rgba.parse(rgb_string) + rgba.to_color() + return convert_rgba_to_hex(rgba) + + @lru_cache(maxsize=1024) def convert_rgb_string_to_float(rgb_string: str) -> Tuple[float, float, float]: rgba = Gdk.RGBA() ===================================== gajim/gtk/workspace_side_bar.py ===================================== @@ -22,6 +22,7 @@ def remove_workspace(self, workspace_id): class Workspace(Gtk.ListBoxRow): def __init__(self, workspace_id): Gtk.ListBoxRow.__init__(self) + self.get_style_context().add_class('workspace-sidebar-item') self._workspace_id = workspace_id name = app.settings.get_workspace_setting(workspace_id, 'name') @@ -31,5 +32,6 @@ def __init__(self, workspace_id): surface = generate_default_avatar( letter, name, AvatarSize.WORKSPACE, scale) self._image = Gtk.Image.new_from_surface(surface) + self._image.set_halign(Gtk.Align.CENTER) self.add(self._image) self.show_all() View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/26ad5efb4801028f7e7f52bce58a75f…
-- View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/26ad5efb4801028f7e7f52bce58a75f…
You're receiving this email because of your account on
dev.gajim.org
.
1
0
0
0
[Git][gajim/gajim][master] 2 commits: DOAP: Add XEP-0245
by Daniel Brötzmann
22 Jan '21
22 Jan '21
Daniel Brötzmann pushed to branch master at gajim / gajim Commits: c70dc103 by Daniel Brötzmann at 2021-01-22T17:17:14+01:00 DOAP: Add XEP-0245 - - - - - 304c9af1 by Daniel Brötzmann at 2021-01-22T17:18:19+01:00 DOAP: Use correct RFC strings - - - - - 1 changed file: - data/gajim.doap Changes: ===================================== data/gajim.doap ===================================== @@ -42,8 +42,8 @@ <implements rdf:resource="
https://xmpp.org/rfcs/rfc6120.html
" /> <implements rdf:resource="
https://xmpp.org/rfcs/rfc6121.html
" /> <implements rdf:resource="
https://xmpp.org/rfcs/rfc6122.html
" /> - <implements rdf:resource="
https://tools.ietf.org/html/rfc7395
" /> - <implements rdf:resource="
https://tools.ietf.org/html/rfc7590
" /> + <implements rdf:resource="
https://xmpp.org/rfcs/rfc7395.html
" /> + <implements rdf:resource="
https://xmpp.org/rfcs/rfc7590.html
" /> <implements> <xmpp:SupportedXep> <xmpp:xep rdf:resource="
https://xmpp.org/extensions/xep-0004.html
" /> @@ -456,6 +456,13 @@ <xmpp:version>1.2</xmpp:version> </xmpp:SupportedXep> </implements> + <implements> + <xmpp:SupportedXep> + <xmpp:xep rdf:resource="
https://xmpp.org/extensions/xep-0245.html
" /> + <xmpp:status>complete</xmpp:status> + <xmpp:version>1.0</xmpp:version> + </xmpp:SupportedXep> + </implements> <implements> <xmpp:SupportedXep> <xmpp:xep rdf:resource="
https://xmpp.org/extensions/xep-0249.html
" /> View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/b42a3ed43c555f8487380a5ebeee161…
-- View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/b42a3ed43c555f8487380a5ebeee161…
You're receiving this email because of your account on
dev.gajim.org
.
1
0
0
0
[Git][gajim/gajim][gajim_1.3] Update translations
by Philipp Hörist
20 Jan '21
20 Jan '21
Philipp Hörist pushed to branch gajim_1.3 at gajim / gajim Commits: 0dd1b796 by Weblate at 2021-01-20T21:34:56+01:00 Update translations - - - - - 4 changed files: - po/de.po - po/eo.po - po/fr.po - po/ja.po The diff was not included because it is too large. View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/0dd1b79669a9e078f88875ad4399e79f…
-- View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/0dd1b79669a9e078f88875ad4399e79f…
You're receiving this email because of your account on
dev.gajim.org
.
1
0
0
0
[Git][gajim/gajim][gajim_1.3] 13 commits: Add --gdebug option
by Philipp Hörist
20 Jan '21
20 Jan '21
Philipp Hörist pushed to branch gajim_1.3 at gajim / gajim Commits: 87ae4bf7 by lovetox at 2021-01-20T21:24:45+01:00 Add --gdebug option Sets the G_MESSAGES_DEBUG env var so GLib debug messages are printed - - - - - 95a21a65 by lovetox at 2021-01-20T21:24:45+01:00 Fix typo - - - - - 23804ac3 by Daniel Brötzmann at 2021-01-20T21:24:45+01:00 DOAP: Add XEP-0222 - - - - - 68332e91 by lovetox at 2021-01-20T21:24:45+01:00 Profile: Correctly handle not existing vcard - - - - - a1bf5b77 by zak333 at 2021-01-20T21:24:45+01:00 Update Muclumbus API endpoint - - - - - 10734a3e by André Apitzsch at 2021-01-20T21:24:45+01:00 Update year - - - - - 058d1ea1 by lovetox at 2021-01-20T21:24:45+01:00 PEPConfig: Raise default size - - - - - 8055d2fa by Daniel Brötzmann at 2021-01-20T21:24:45+01:00 AV: Fix closing chat window while in call - - - - - 0fbbaf77 by lovetox at 2021-01-20T21:24:45+01:00 GroupchatCreation: Make it a dialog and raise size - - - - - 30b24198 by André Apitzsch at 2021-01-20T21:24:45+01:00 Search also in user data dir for translations Translation wasn't available if Gajim is installed in a user's home directory only." - - - - - ef2e8dff by lovetox at 2021-01-20T21:24:45+01:00 ChatControlBase: Don’t unselect text after key press This clears the SELECTION Clipboard for example when pressing ALT + TAB - - - - - 89172708 by lovetox at 2021-01-20T21:24:45+01:00 Windows: Fix build MSYS removed python2 support - - - - - 1e2c0a6e by lovetox at 2021-01-20T21:24:45+01:00 RemoveAccounts: Fix race condition when removing an account disable_account() closes all account related dialogs. RemoveAccount is such a dialog but should not be closed mid processing the account removal. Fixes #10401 - - - - - 18 changed files: - README.md - data/gajim-history-manager.1 - data/gajim-remote.1 - data/gajim.1 - data/gajim.doap - data/org.gajim.Gajim.appdata.xml.in - gajim/application.py - gajim/chat_control.py - gajim/chat_control_base.py - gajim/common/config.py - gajim/common/i18n.py - gajim/common/setting_values.py - gajim/gtk/about.py - gajim/gtk/groupchat_creation.py - gajim/gtk/pep_config.py - gajim/gtk/profile.py - gajim/gui_interface.py - win/_base.sh Changes: ===================================== README.md ===================================== @@ -88,7 +88,7 @@ #### Links That is all, **enjoy**! -(C) 2003-2020 +(C) 2003-2021 The Gajim Team [
https://gajim.org](https://gajim.org)
===================================== data/gajim-history-manager.1 ===================================== @@ -46,7 +46,7 @@ and .Pa THANKS , for a complete list. .Sh COPYRIGHT -Copyright (C) 2003-2020 Gajim Team +Copyright (C) 2003-2021 Gajim Team .Pp .Nm is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 only. ===================================== data/gajim-remote.1 ===================================== @@ -79,7 +79,7 @@ and .Pa THANKS , for a complete list. .Sh COPYRIGHT -Copyright (C) 2003-2020 Gajim Team +Copyright (C) 2003-2021 Gajim Team .Pp .Nm is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 only. ===================================== data/gajim.1 ===================================== @@ -93,7 +93,7 @@ and with contributions and patches merged from many individuals around the world. See the About Dialog for a complete list. .Sh COPYRIGHT -Copyright (C) 2003-2020 Gajim Team +Copyright (C) 2003-2021 Gajim Team .Pp .Nm is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 only. ===================================== data/gajim.doap ===================================== @@ -3,7 +3,6 @@ <rdf:RDF xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#
"> <Project xmlns="
http://usefulinc.com/ns/doap#
" xmlns:xmpp="
https://linkmauve.fr/ns/xmpp-doap#
" - xmlns:foaf="
http://xmlns.com/foaf/0.1/
" xmlns:schema="
https://schema.org/
"> <name>Gajim</name> <short-name>gajim</short-name> @@ -414,6 +413,13 @@ <xmpp:note>Images only.</xmpp:note> </xmpp:SupportedXep> </implements> + <implements> + <xmpp:SupportedXep> + <xmpp:xep rdf:resource="
https://xmpp.org/extensions/xep-0222.html
" /> + <xmpp:status>complete</xmpp:status> + <xmpp:version>1.0</xmpp:version> + </xmpp:SupportedXep> + </implements> <implements> <xmpp:SupportedXep> <xmpp:xep rdf:resource="
https://xmpp.org/extensions/xep-0223.html
" /> ===================================== data/org.gajim.Gajim.appdata.xml.in ===================================== @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2017-2020 Gajim Team --> +<!-- Copyright 2017-2021 Gajim Team --> <component type="desktop-application"> <id>org.gajim.Gajim</id> <metadata_license>CC-BY-SA-3.0</metadata_license> ===================================== gajim/application.py ===================================== @@ -33,6 +33,7 @@ # You should have received a copy of the GNU General Public License # along with Gajim. If not, see <
http://www.gnu.org/licenses/
>. +import os import time import sys from datetime import datetime @@ -140,6 +141,14 @@ def __init__(self): GLib.OptionArg.NONE, _('Open IPython shell')) + self.add_main_option( + 'gdebug', + 0, + GLib.OptionFlags.NONE, + GLib.OptionArg.NONE, + _('Sets an environment variable so ' + 'GLib debug messages are printed')) + self.add_main_option( 'show-next-pending-event', 0, @@ -346,6 +355,9 @@ def _handle_local_options(self, configpaths.init() + if options.contains('gdebug'): + os.environ['G_MESSAGES_DEBUG'] = 'all' + if app.get_debug_mode(): # Redirect has to happen before logging init self._cleanup_debug_logs() ===================================== gajim/chat_control.py ===================================== @@ -25,6 +25,7 @@ from typing import ClassVar # pylint: disable=unused-import from typing import Type # pylint: disable=unused-import +from typing import Optional # pylint: disable=unused-import import os import time @@ -908,7 +909,8 @@ def stop_jingle(self, sid=None, reason=None): if video_sid and sid in (video_sid, None): self.close_jingle_content('video') - def close_jingle_content(self, jingle_type: str) -> None: + def close_jingle_content(self, jingle_type: str, + shutdown: Optional[bool] = False) -> None: jingle = self.jingle[jingle_type] if not jingle.sid: return @@ -921,9 +923,10 @@ def close_jingle_content(self, jingle_type: str) -> None: if content: session.remove_content(content.creator, content.name) - jingle.sid = None - jingle.state = JingleState.NULL - jingle.update() + if not shutdown: + jingle.sid = None + jingle.state = JingleState.NULL + jingle.update() def _on_end_call_clicked(self, _widget): self.close_jingle_content('audio') @@ -1213,7 +1216,7 @@ def shutdown(self): con.get_module('Chatstate').set_chatstate(self.contact, Chatstate.GONE) for jingle_type in ('audio', 'video'): - self.close_jingle_content(jingle_type) + self.close_jingle_content(jingle_type, shutdown=True) self.jingle.clear() # disconnect self from session ===================================== gajim/chat_control_base.py ===================================== @@ -294,7 +294,6 @@ def _on_conv_textview_key_press_event(self, textview, event): return Gdk.EVENT_PROPAGATE # Focus the Message Input and resend the event - textview.unselect() self.msg_textview.grab_focus() self.msg_textview.get_toplevel().propagate_key_event(event) return Gdk.EVENT_STOP ===================================== gajim/common/config.py ===================================== @@ -231,7 +231,7 @@ class Config: 'send_chatstate_default': [opt_str, 'composing_only', _('Chat state notifications that are sent to contacts. Possible values: all, composing_only, disabled')], 'send_chatstate_muc_default': [opt_str, 'composing_only', _('Chat state notifications that are sent to the group chat. Possible values: \'all\', \'composing_only\', \'disabled\'')], 'muclumbus_api_jid': [opt_str, 'rodrigo.de.mucobedo(a)dreckshal.de'], - 'muclumbus_api_http_uri': [opt_str, '
https://search.jabbercat.org/api/1.0/search
'], + 'muclumbus_api_http_uri': [opt_str, '
https://search.jabber.network/api/1.0/search
'], 'muclumbus_api_pref': [opt_str, 'http', _('API Preferences. Possible values: \'http\', \'iq\'')], 'command_system_execute': [opt_bool, False, _('If enabled, Gajim will execute commands (/show, /sh, /execute, /exec).')], 'groupchat_roster_width': [opt_int, 210, _('Width of group chat roster in pixel')], ===================================== gajim/common/i18n.py ===================================== @@ -24,6 +24,7 @@ import gettext import unicodedata from pathlib import Path +from gi.repository import GLib DOMAIN = 'gajim' LANG = 'en' @@ -45,10 +46,8 @@ def get_locale_dirs(): # Check if we run as flatpak return [Path('/app/share/')] - data_dirs = os.getenv('XDG_DATA_DIRS') - if data_dirs: - return list(map(Path, data_dirs.split(':'))) - return [Path('/usr/local/share/'), Path('/usr/share/')] + data_dirs = [GLib.get_user_data_dir()] + GLib.get_system_data_dirs() + return [Path(dir_) for dir_ in data_dirs] def iter_locale_dirs(): ===================================== gajim/common/setting_values.py ===================================== @@ -1,4 +1,3 @@ - from gajim.common.i18n import _ class _DEFAULT: @@ -172,7 +171,7 @@ class _ACCOUNT_DEFAULT: 'show_chatstate_in_tabs': True, 'show_chatstate_in_banner': True, 'muclumbus_api_jid': 'rodrigo.de.mucobedo(a)dreckshal.de', - 'muclumbus_api_http_uri': '
https://search.jabbercat.org/api/1.0/search
', + 'muclumbus_api_http_uri': '
https://search.jabber.network/api/1.0/search
', 'muclumbus_api_pref': 'http', 'command_system_execute': False, 'groupchat_roster_width': 210, ===================================== gajim/gtk/about.py ===================================== @@ -34,7 +34,7 @@ def __init__(self): self.set_transient_for(app.interface.roster.window) self.set_name('Gajim') self.set_version(app.version) - self.set_copyright('Copyright © 2003-2020 Gajim Team') + self.set_copyright('Copyright © 2003-2021 Gajim Team') self.set_license_type(Gtk.License.GPL_3_0_ONLY) self.set_website('
https://gajim.org/
') ===================================== gajim/gtk/groupchat_creation.py ===================================== @@ -40,6 +40,8 @@ def __init__(self, account): self.set_name('CreateGroupchat') self.set_application(app.app) self.set_position(Gtk.WindowPosition.CENTER) + self.set_type_hint(Gdk.WindowTypeHint.DIALOG) + self.set_default_size(500, -1) self.set_show_menubar(False) self.set_resizable(True) self.set_title(_('Create Group Chat')) ===================================== gajim/gtk/pep_config.py ===================================== @@ -38,7 +38,7 @@ def __init__(self, account): self.set_position(Gtk.WindowPosition.CENTER) self.set_show_menubar(False) self.set_name('PEPConfig') - self.set_default_size(300, 350) + self.set_default_size(500, 350) self.set_resizable(True) self.set_transient_for(app.interface.roster.window) ===================================== gajim/gtk/profile.py ===================================== @@ -140,6 +140,9 @@ def _on_vcard_received(self, task): log.info('Error loading VCard: %s', error) self._current_vcard = VCard() + if self._current_vcard is None: + self._current_vcard = VCard() + self._load_avatar() self._vcard_grid.set_vcard(self._current_vcard.copy()) self._ui.profile_stack.set_visible_child_name('profile') ===================================== gajim/gui_interface.py ===================================== @@ -1722,7 +1722,10 @@ def disable_account(self, account): ctrl.shutdown() for win in get_app_windows(account): - # Close all account specific windows + # Close all account specific windows, except the RemoveAccount + # dialog. It shows if the removal was successful. + if type(win).__name__ == 'RemoveAccount': + continue win.destroy() if account == app.ZEROCONF_ACC_NAME: ===================================== win/_base.sh ===================================== @@ -57,8 +57,11 @@ function build_compileall { function install_pre_deps { pacman -S --needed --noconfirm p7zip \ - mingw-w64-"${ARCH}"-nsis wget intltool mingw-w64-"${ARCH}"-toolchain \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}" + wget \ + intltool \ + mingw-w64-"${ARCH}"-nsis \ + mingw-w64-"${ARCH}"-toolchain \ + mingw-w64-"${ARCH}"-python } function create_root { @@ -73,9 +76,9 @@ function create_root { } function install_deps { - build_pacman --noconfirm -S mingw-w64-"${ARCH}"-"${PYTHON_ID}" \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-gobject \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-pip \ + build_pacman --noconfirm -S mingw-w64-"${ARCH}"-python \ + mingw-w64-"${ARCH}"-python-gobject \ + mingw-w64-"${ARCH}"-python-pip \ mingw-w64-"${ARCH}"-adwaita-icon-theme \ mingw-w64-"${ARCH}"-libwebp \ mingw-w64-"${ARCH}"-sqlite3 \ @@ -83,13 +86,13 @@ function install_deps { mingw-w64-"${ARCH}"-gspell \ mingw-w64-"${ARCH}"-hunspell \ mingw-w64-"${ARCH}"-libsoup \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-setuptools \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-pillow \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-setuptools-scm \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-pyopenssl \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-certifi \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-six \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-pygments + mingw-w64-"${ARCH}"-python-setuptools \ + mingw-w64-"${ARCH}"-python-pillow \ + mingw-w64-"${ARCH}"-python-setuptools-scm \ + mingw-w64-"${ARCH}"-python-pyopenssl \ + mingw-w64-"${ARCH}"-python-certifi \ + mingw-w64-"${ARCH}"-python-six \ + mingw-w64-"${ARCH}"-python-pygments build_pip install precis-i18n @@ -173,7 +176,7 @@ function install_gajim { function cleanup_install { build_pacman --noconfirm -Rdd mingw-w64-"${ARCH}"-shared-mime-info \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-pip mingw-w64-"${ARCH}"-ncurses || true + mingw-w64-"${ARCH}"-python-pip mingw-w64-"${ARCH}"-ncurses || true build_pacman --noconfirm -Rdd mingw-w64-"${ARCH}"-tk || true build_pacman --noconfirm -Rdd mingw-w64-"${ARCH}"-tcl || true View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/b060fab577ce8ef5adceab1b8145b58…
-- View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/b060fab577ce8ef5adceab1b8145b58…
You're receiving this email because of your account on
dev.gajim.org
.
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
11
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
Results per page:
10
25
50
100
200