[Git][gajim/gajim][master] Rework Bookmarks Dialog
Philipp Hörist
gitlab at dev.gajim.org
Mon Jul 16 19:44:49 CEST 2018
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
67d9b7a7 by Sophie Herold at 2018-07-16T19:44:38+02:00
Rework Bookmarks Dialog
- - - - -
5 changed files:
- gajim/common/app.py
- gajim/config.py
- gajim/data/gui/join_groupchat_window.ui
- gajim/data/gui/manage_bookmarks_window.ui
- gajim/data/style/gajim.css
Changes:
=====================================
gajim/common/app.py
=====================================
--- a/gajim/common/app.py
+++ b/gajim/common/app.py
@@ -389,20 +389,34 @@ def get_connected_accounts():
account_list.append(account)
return account_list
-def get_enabled_accounts_with_labels(exclude_local=True):
+def get_enabled_accounts_with_labels(exclude_local=True, connected_only=False,
+ private_storage_only=False):
"""
Returns a list with [account, account_label] entries.
Order by account_label
"""
accounts = []
for acc in connections:
- if not exclude_local or acc != 'Local':
- acc_label = config.get_per(
- 'accounts', acc, 'account_label') or acc
- accounts.append([acc, acc_label])
+ if exclude_local and account_is_zeroconf(acc):
+ continue
+ if connected_only and not account_is_connected(acc):
+ continue
+ if private_storage_only and not account_supports_private_storage(acc):
+ continue
+
+ acc_label = config.get_per(
+ 'accounts', acc, 'account_label') or acc
+ accounts.append([acc, acc_label])
+
accounts.sort(key=lambda xs: str.lower(xs[1]))
return accounts
+def account_is_zeroconf(account):
+ return connections[account].is_zeroconf
+
+def account_supports_private_storage(account):
+ return connections[account].private_storage_supported
+
def account_is_connected(account):
if account not in connections:
return False
=====================================
gajim/config.py
=====================================
--- a/gajim/config.py
+++ b/gajim/config.py
@@ -1886,19 +1886,14 @@ class ManageBookmarksWindow:
# Account-JID, RoomName, Room-JID, Autojoin, Minimize, Password, Nick,
# Show_Status
- self.treestore = Gtk.TreeStore(str, str, str, bool, bool, str, str, str)
+ self.treestore = Gtk.TreeStore(str, str, str, bool, bool, str, str, str, str)
self.treestore.set_sort_column_id(1, Gtk.SortType.ASCENDING)
# Store bookmarks in treeview.
- for account in app.connections:
- if app.connections[account].connected <= 1:
- continue
- if app.connections[account].is_zeroconf:
- continue
- if not app.connections[account].private_storage_supported:
- continue
+ for account, account_label in app.get_enabled_accounts_with_labels(
+ connected_only=True, private_storage_only=True):
iter_ = self.treestore.append(None, [None, account, None, None,
- None, None, None, None])
+ None, None, None, None, account_label])
con = app.connections[account]
bookmarks = con.get_module('Bookmarks').bookmarks
@@ -1927,7 +1922,8 @@ class ManageBookmarksWindow:
minimize,
bookmark['password'],
bookmark['nick'],
- print_status ])
+ print_status,
+ bookmark['name'] ])
self.print_status_combobox = self.xml.get_object('print_status_combobox')
model = Gtk.ListStore(str, str)
@@ -1935,9 +1931,8 @@ class ManageBookmarksWindow:
self.option_list = {'': _('Default'), 'all': Q_('?print_status:All'),
'in_and_out': _('Enter and leave only'),
'none': Q_('?print_status:None')}
- opts = sorted(self.option_list.keys())
- for opt in opts:
- model.append([self.option_list[opt], opt])
+ for opt, label in sorted(self.option_list.items()):
+ model.append([label, opt])
self.print_status_combobox.set_model(model)
self.print_status_combobox.set_active(1)
@@ -1947,7 +1942,7 @@ class ManageBookmarksWindow:
self.view.expand_all()
renderer = Gtk.CellRendererText()
- column = Gtk.TreeViewColumn('Bookmarks', renderer, text=1)
+ column = Gtk.TreeViewColumn('Bookmarks', renderer, text=8)
self.view.append_column(column)
self.selection = self.view.get_selection()
@@ -1968,6 +1963,8 @@ class ManageBookmarksWindow:
self.pass_entry.connect('changed', self.on_pass_entry_changed)
self.autojoin_checkbutton = self.xml.get_object('autojoin_checkbutton')
self.minimize_checkbutton = self.xml.get_object('minimize_checkbutton')
+ self.settings_box = self.xml.get_object('settings_box')
+ self.remove_bookmark_button = self.xml.get_object('remove_bookmark_button')
self.xml.connect_signals(self)
self.window.show_all()
@@ -2001,8 +1998,9 @@ class ManageBookmarksWindow:
account = model[add_to][1]
nick = app.nicks[account]
- iter_ = self.treestore.append(add_to, [account, _('New Group Chat'),
- '@', False, False, '', nick, 'in_and_out'])
+ label = _('New Group Chat')
+ iter_ = self.treestore.append(add_to, [account, label,
+ '@', False, False, '', nick, 'in_and_out', label])
self.view.expand_row(model.get_path(add_to), True)
self.view.set_cursor(model.get_path(iter_))
@@ -2023,6 +2021,7 @@ class ManageBookmarksWindow:
model.remove(iter_)
self.selection.unselect_all()
self.clear_fields()
+ self.set_sensitive_all(False)
self.ignore_events = False
def check_valid_bookmark(self):
@@ -2099,20 +2098,16 @@ class ManageBookmarksWindow:
# this will be None, so we will just:
return
- widgets = [ self.title_entry, self.nick_entry, self.room_entry,
- self.server_entry, self.pass_entry, self.autojoin_checkbutton,
- self.minimize_checkbutton, self.print_status_combobox]
+
if model.iter_parent(iter_):
# make the fields sensitive
- for field in widgets:
- field.set_sensitive(True)
+ self.set_sensitive_all(True)
else:
# Top-level has no data (it's the account fields)
# clear fields & make them insensitive
self.clear_fields()
- for field in widgets:
- field.set_sensitive(False)
+ self.set_sensitive_all(False)
return
# Fill in the data for childs
@@ -2238,7 +2233,7 @@ class ManageBookmarksWindow:
if iter_:
model[iter_][5] = self.pass_entry.get_text()
- def on_autojoin_checkbutton_toggled(self, widget):
+ def on_autojoin_checkbutton_toggled(self, widget, *args):
if self.ignore_events:
return
(model, iter_) = self.selection.get_selected()
@@ -2246,7 +2241,7 @@ class ManageBookmarksWindow:
model[iter_][3] = self.autojoin_checkbutton.get_active()
self.minimize_checkbutton.set_sensitive(model[iter_][3])
- def on_minimize_checkbutton_toggled(self, widget):
+ def on_minimize_checkbutton_toggled(self, widget, *args):
if self.ignore_events:
return
(model, iter_) = self.selection.get_selected()
@@ -2272,6 +2267,13 @@ class ManageBookmarksWindow:
self.minimize_checkbutton.set_active(False)
self.print_status_combobox.set_active(1)
+ def set_sensitive_all(self, sensitive):
+ widgets = [ self.title_entry, self.nick_entry, self.room_entry,
+ self.server_entry, self.pass_entry, self.settings_box,
+ self.remove_bookmark_button ]
+ for field in widgets:
+ field.set_sensitive(sensitive)
+
class AccountCreationWizardWindow:
def __init__(self):
self.xml = gtkgui_helpers.get_gtk_builder(
=====================================
gajim/data/gui/join_groupchat_window.ui
=====================================
--- a/gajim/data/gui/join_groupchat_window.ui
+++ b/gajim/data/gui/join_groupchat_window.ui
@@ -110,7 +110,7 @@
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="valign">center</property>
- <property name="label" translatable="yes">Autojoin</property>
+ <property name="label" translatable="yes">Auto Join</property>
<property name="justify">right</property>
<style>
<class name="dim-label"/>
=====================================
gajim/data/gui/manage_bookmarks_window.ui
=====================================
--- a/gajim/data/gui/manage_bookmarks_window.ui
+++ b/gajim/data/gui/manage_bookmarks_window.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.0 -->
<interface>
- <requires lib="gtk+" version="3.12"/>
+ <requires lib="gtk+" version="3.18"/>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name item -->
@@ -10,116 +10,124 @@
</object>
<object class="GtkWindow" id="manage_bookmarks_window">
<property name="can_focus">False</property>
- <property name="border_width">12</property>
- <property name="title" translatable="yes">Manage Bookmarks</property>
+ <property name="title" translatable="yes">Group Chat Bookmarks</property>
<property name="default_width">550</property>
<property name="default_height">300</property>
<property name="type_hint">dialog</property>
<signal name="key-press-event" handler="on_key_press_event" swapped="no"/>
<child>
- <object class="GtkBox" id="vbox86">
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
+ <property name="margin_left">18</property>
+ <property name="margin_right">18</property>
+ <property name="margin_top">18</property>
+ <property name="margin_bottom">18</property>
+ <property name="spacing">18</property>
<child>
- <object class="GtkBox" id="hbox2965">
+ <object class="GtkBox">
+ <property name="width_request">220</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">12</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkBox" id="vbox94">
+ <object class="GtkScrolledWindow" id="scrolledwindow37">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow37">
+ <object class="GtkTreeView" id="bookmarks_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="bookmarks_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection1"/>
- </child>
- </object>
+ <property name="headers_visible">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
</child>
+ <style>
+ <class name="space"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToolbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_arrow">False</property>
+ <property name="icon_size">1</property>
+ <child>
+ <object class="GtkToolButton" id="add_bookmark_button">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">list-add-symbolic</property>
+ <signal name="clicked" handler="on_add_bookmark_button_clicked" swapped="no"/>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="expand">False</property>
+ <property name="homogeneous">False</property>
</packing>
</child>
<child>
- <object class="GtkButtonBox" id="hbuttonbox25">
+ <object class="GtkToolButton" id="remove_bookmark_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
- <property name="layout_style">start</property>
- <child>
- <object class="GtkButton" id="add_bookmark_button">
- <property name="label">gtk-add</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_add_bookmark_button_clicked" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="remove_bookmark_button">
- <property name="label">gtk-remove</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_remove_bookmark_button_clicked" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="use_underline">True</property>
+ <property name="icon_name">list-remove-symbolic</property>
+ <signal name="clicked" handler="on_remove_bookmark_button_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="homogeneous">False</property>
</packing>
</child>
+ <style>
+ <class name="inline-toolbar"/>
+ </style>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">18</property>
<child>
- <object class="GtkGrid" id="grid1">
+ <object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="margin_left">6</property>
<property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label325">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Title:</property>
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">Name</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
<property name="left_attach">0</property>
@@ -127,51 +135,63 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label315">
+ <object class="GtkEntry" id="title_entry">
+ <property name="width_request">230</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Nickname:</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="tooltip_text" translatable="yes">Bookmark Name</property>
+ <property name="hexpand">True</property>
+ <property name="activates_default">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label316">
+ <object class="GtkLabel" id="label317">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Roo_m:</property>
+ <property name="halign">end</property>
+ <property name="margin_top">12</property>
+ <property name="label" translatable="yes">_Server</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label317">
+ <object class="GtkEntry" id="server_entry">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">_Server:</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="margin_top">12</property>
+ <property name="activates_default">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label318">
+ <object class="GtkLabel" id="label315">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">_Password:</property>
+ <property name="halign">end</property>
+ <property name="margin_top">12</property>
+ <property name="label" translatable="yes">_Nickname</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
<property name="left_attach">0</property>
@@ -179,143 +199,223 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="hbox1">
+ <object class="GtkEntry" id="nick_entry">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <child>
- <object class="GtkCheckButton" id="autojoin_checkbutton">
- <property name="label" translatable="yes">A_uto join</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes">If checked, Gajim will join this group chat on startup</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_autojoin_checkbutton_toggled" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="minimize_checkbutton">
- <property name="label" translatable="yes">Minimi_ze on Auto Join</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_minimize_checkbutton_toggled" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="margin_top">12</property>
+ <property name="activates_default">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
- <property name="width">2</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label326">
+ <object class="GtkLabel" id="label316">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Pr_int status:</property>
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">Roo_m</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">6</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="title_entry">
+ <object class="GtkEntry" id="room_entry">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
+ <property name="activates_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="nick_entry">
+ <object class="GtkLabel" id="label318">
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">_Password</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="room_entry">
+ <object class="GtkEntry" id="pass_entry">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ <property name="activates_default">True</property>
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkListBox" id="settings_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="selection_mode">none</property>
<child>
- <object class="GtkEntry" id="server_entry">
+ <object class="GtkListBoxRow">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Join chat when connected</property>
+ <property name="valign">center</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Auto Join</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="autojoin_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="halign">end</property>
+ <signal name="state-set" handler="on_autojoin_checkbutton_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
</child>
<child>
- <object class="GtkEntry" id="pass_entry">
+ <object class="GtkListBoxRow">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
- <property name="visibility">False</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Minimize on Auto Join</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSwitch" id="minimize_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="halign">end</property>
+ <signal name="state-set" handler="on_minimize_checkbutton_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- </packing>
</child>
<child>
- <object class="GtkComboBox" id="print_status_combobox">
+ <object class="GtkListBoxRow">
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <property name="model">liststore1</property>
- <signal name="changed" handler="on_print_status_combobox_changed" swapped="no"/>
+ <property name="can_focus">True</property>
<child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Status messages displayed in chat window</property>
+ <property name="valign">center</property>
+ <property name="spacing">18</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Status Messages</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="print_status_combobox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">liststore1</property>
+ <signal name="changed" handler="on_print_status_combobox_changed" swapped="no"/>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
</child>
</object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">6</property>
- </packing>
</child>
+ <style>
+ <class name="settings"/>
+ </style>
</object>
<packing>
<property name="expand">False</property>
@@ -323,49 +423,53 @@
<property name="position">1</property>
</packing>
</child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButtonBox" id="hbuttonbox20">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="cancel_button">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_cancel_button_clicked" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
<child>
- <object class="GtkButton" id="ok_button">
- <property name="label">gtk-ok</property>
+ <object class="GtkButtonBox">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_ok_button_clicked" swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="valign">end</property>
+ <property name="vexpand">True</property>
+ <property name="spacing">12</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancel_button">
+ <property name="label">Cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <signal name="clicked" handler="on_cancel_button_clicked" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok_button">
+ <property name="label">OK</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">False</property>
+ <signal name="clicked" handler="on_ok_button_clicked" swapped="no"/>
+ <style>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -377,5 +481,8 @@
</child>
</object>
</child>
+ <child type="titlebar">
+ <placeholder/>
+ </child>
</object>
</interface>
=====================================
gajim/data/style/gajim.css
=====================================
--- a/gajim/data/style/gajim.css
+++ b/gajim/data/style/gajim.css
@@ -74,6 +74,19 @@ popover#EmoticonPopover flowboxchild { padding-top: 5px; padding-bottom: 5px; }
.PopoverButtonListbox > list > row { padding: 10px 20px 10px 20px; }
.PopoverButtonListbox > list > row.activatable:active { box-shadow: none; background-color: @theme_selected_bg_color }
+/* Settings ListBox */
+
+list.settings {
+ border: @borders 1px solid;
+}
+list.settings > row:not(:last-child) {
+ border-bottom: @theme_unfocused_bg_color 1px solid;
+}
+list.settings row { min-height: 52px; }
+list.settings > row > box {
+ margin: 6px 18px;
+}
+
/* Accounts Window */
#AccountsWindow > box > stack { padding:30px 30px 30px 30px;}
#AccountsWindow scrolledwindow {border: none;}
@@ -102,6 +115,10 @@ popover#EmoticonPopover flowboxchild { padding-top: 5px; padding-bottom: 5px; }
.status-dnd { color: #e62e00;}
.status-online { color: #66bf10;}
+/* Treeview */
+
+treeview.space { padding: 6px; }
+
/*MessageWindow Notebook*/
.notebook-tab-label {min-width: 80px}
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/67d9b7a7eaa318945afede4bd4c82981131f8a6c
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/67d9b7a7eaa318945afede4bd4c82981131f8a6c
You're receiving this email because of your account on dev.gajim.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gajim.org/pipermail/commits/attachments/20180716/58850055/attachment-0001.html>
More information about the Commits
mailing list