Philipp Hörist pushed to branch gajim_1.2 at gajim / gajim
Commits:
-
dc9a2085
by André Apitzsch at 2020-06-20T13:47:24+02:00
-
1261fdb3
by lovetox at 2020-06-20T13:47:24+02:00
-
31076874
by Daniel Brötzmann at 2020-06-20T13:47:24+02:00
-
d3de5585
by Daniel Brötzmann at 2020-06-20T13:47:24+02:00
-
0ba59983
by Daniel Brötzmann at 2020-06-20T13:47:24+02:00
-
607ef6e5
by lovetox at 2020-06-20T13:47:24+02:00
-
0a501031
by lovetox at 2020-06-20T13:47:24+02:00
10 changed files:
- gajim/application.py
- gajim/common/config.py
- gajim/data/gui/preferences_window.ui
- gajim/data/gui/start_chat_dialog.ui
- gajim/data/style/gajim-dark.css
- gajim/data/style/gajim.css
- gajim/gtk/accounts.py
- gajim/gtk/preferences.py
- gajim/gtk/start_chat.py
- gajim/gui_interface.py
Changes:
| ... | ... | @@ -152,21 +152,6 @@ class GajimApplication(Gtk.Application): |
| 152 | 152 |
GLib.OptionArg.NONE,
|
| 153 | 153 |
_('Start a new chat'))
|
| 154 | 154 |
|
| 155 |
- self.add_main_option(
|
|
| 156 |
- 'simulate-network-lost',
|
|
| 157 |
- 0,
|
|
| 158 |
- GLib.OptionFlags.NONE,
|
|
| 159 |
- GLib.OptionArg.NONE,
|
|
| 160 |
- _('Simulate loss of connectivity'))
|
|
| 161 |
- |
|
| 162 |
- self.add_main_option(
|
|
| 163 |
- 'simulate-network-connected',
|
|
| 164 |
- 0,
|
|
| 165 |
- GLib.OptionFlags.NONE,
|
|
| 166 |
- GLib.OptionArg.NONE,
|
|
| 167 |
- _('Simulate regaining connectivity'))
|
|
| 168 |
- |
|
| 169 |
- |
|
| 170 | 155 |
self.add_main_option_entries(self._get_remaining_entry())
|
| 171 | 156 |
|
| 172 | 157 |
self.connect('handle-local-options', self._handle_local_options)
|
| ... | ... | @@ -327,14 +312,6 @@ class GajimApplication(Gtk.Application): |
| 327 | 312 |
self.activate_action(cmd)
|
| 328 | 313 |
return 0
|
| 329 | 314 |
|
| 330 |
- if options.contains('simulate-network-lost'):
|
|
| 331 |
- app.interface.network_status_changed(None, False)
|
|
| 332 |
- return 0
|
|
| 333 |
- |
|
| 334 |
- if options.contains('simulate-network-connected'):
|
|
| 335 |
- app.interface.network_status_changed(None, True)
|
|
| 336 |
- return 0
|
|
| 337 |
- |
|
| 338 | 315 |
if remaining is not None:
|
| 339 | 316 |
self._open_uris(remaining.unpack())
|
| 340 | 317 |
return 0
|
| ... | ... | @@ -249,6 +249,7 @@ class Config: |
| 249 | 249 |
'command_system_execute': [opt_bool, False, _('If enabled, Gajim will execute commands (/show, /sh, /execute, /exec).')],
|
| 250 | 250 |
'groupchat_roster_width': [opt_int, 210, _('Width of group chat roster in pixel')],
|
| 251 | 251 |
'dev_force_bookmark_2': [opt_bool, False, _('Force Bookmark 2 usage')],
|
| 252 |
+ 'show_help_start_chat': [opt_bool, True, _('Shows an info bar with helpful hints in the Start / Join Chat dialog')],
|
|
| 252 | 253 |
}, {}) # type: Tuple[Dict[str, List[Any]], Dict[Any, Any]]
|
| 253 | 254 |
|
| 254 | 255 |
__options_per_key = {
|
| 1 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
-<!-- Generated with glade 3.22.2 -->
|
|
| 2 |
+<!-- Generated with glade 3.36.0 -->
|
|
| 3 | 3 |
<interface>
|
| 4 | 4 |
<requires lib="gtk+" version="3.22"/>
|
| 5 | 5 |
<object class="GtkAdjustment" id="adjustment_status_auto_away">
|
| ... | ... | @@ -2529,7 +2529,6 @@ to discover one from the server. (Example: stun.iptel.org)</property> |
| 2529 | 2529 |
<property name="use_underline">True</property>
|
| 2530 | 2530 |
<property name="justify">right</property>
|
| 2531 | 2531 |
<property name="mnemonic_widget">proxies_combobox</property>
|
| 2532 |
- <property name="angle">0.01</property>
|
|
| 2533 | 2532 |
<style>
|
| 2534 | 2533 |
<class name="dim-label"/>
|
| 2535 | 2534 |
</style>
|
| ... | ... | @@ -2652,6 +2651,23 @@ to discover one from the server. (Example: stun.iptel.org)</property> |
| 2652 | 2651 |
<property name="position">2</property>
|
| 2653 | 2652 |
</packing>
|
| 2654 | 2653 |
</child>
|
| 2654 |
+ <child>
|
|
| 2655 |
+ <object class="GtkButton" id="reset_help">
|
|
| 2656 |
+ <property name="label" translatable="yes">_Reset Hints</property>
|
|
| 2657 |
+ <property name="visible">True</property>
|
|
| 2658 |
+ <property name="can_focus">True</property>
|
|
| 2659 |
+ <property name="receives_default">True</property>
|
|
| 2660 |
+ <property name="tooltip_text" translatable="yes">In order to introduce you to features, Gajim displays some hints. This button will reset all these hints.</property>
|
|
| 2661 |
+ <property name="halign">start</property>
|
|
| 2662 |
+ <property name="use_underline">True</property>
|
|
| 2663 |
+ <signal name="clicked" handler="_on_reset_help_clicked" swapped="no"/>
|
|
| 2664 |
+ </object>
|
|
| 2665 |
+ <packing>
|
|
| 2666 |
+ <property name="expand">False</property>
|
|
| 2667 |
+ <property name="fill">True</property>
|
|
| 2668 |
+ <property name="position">3</property>
|
|
| 2669 |
+ </packing>
|
|
| 2670 |
+ </child>
|
|
| 2655 | 2671 |
</object>
|
| 2656 | 2672 |
</child>
|
| 2657 | 2673 |
<child type="label">
|
| 1 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
-<!-- Generated with glade 3.22.1 -->
|
|
| 2 |
+<!-- Generated with glade 3.36.0 -->
|
|
| 3 | 3 |
<interface>
|
| 4 |
- <requires lib="gtk+" version="3.20"/>
|
|
| 4 |
+ <requires lib="gtk+" version="3.22"/>
|
|
| 5 | 5 |
<object class="GtkListStore" id="account_store">
|
| 6 | 6 |
<columns>
|
| 7 | 7 |
<!-- column-name icon -->
|
| ... | ... | @@ -17,55 +17,68 @@ |
| 17 | 17 |
<property name="can_focus">False</property>
|
| 18 | 18 |
<signal name="notify::visible-child-name" handler="_on_page_changed" swapped="no"/>
|
| 19 | 19 |
<child>
|
| 20 |
- <object class="GtkBox" id="box">
|
|
| 20 |
+ <object class="GtkBox">
|
|
| 21 | 21 |
<property name="visible">True</property>
|
| 22 | 22 |
<property name="can_focus">False</property>
|
| 23 |
- <property name="border_width">18</property>
|
|
| 24 | 23 |
<property name="orientation">vertical</property>
|
| 25 |
- <property name="spacing">6</property>
|
|
| 26 | 24 |
<child>
|
| 27 |
- <object class="GtkBox">
|
|
| 25 |
+ <object class="GtkInfoBar" id="infobar">
|
|
| 28 | 26 |
<property name="visible">True</property>
|
| 29 | 27 |
<property name="can_focus">False</property>
|
| 30 |
- <property name="spacing">6</property>
|
|
| 31 |
- <child>
|
|
| 32 |
- <object class="GtkSearchEntry" id="search_entry">
|
|
| 33 |
- <property name="visible">True</property>
|
|
| 34 |
- <property name="can_focus">True</property>
|
|
| 35 |
- <property name="has_focus">True</property>
|
|
| 36 |
- <property name="is_focus">True</property>
|
|
| 37 |
- <property name="hexpand">True</property>
|
|
| 38 |
- <property name="primary_icon_name">edit-find-symbolic</property>
|
|
| 39 |
- <property name="primary_icon_activatable">False</property>
|
|
| 40 |
- <property name="primary_icon_sensitive">False</property>
|
|
| 28 |
+ <property name="homogeneous">True</property>
|
|
| 29 |
+ <property name="show_close_button">True</property>
|
|
| 30 |
+ <signal name="response" handler="_on_infobar_response" swapped="no"/>
|
|
| 31 |
+ <child internal-child="action_area">
|
|
| 32 |
+ <object class="GtkButtonBox">
|
|
| 33 |
+ <property name="can_focus">False</property>
|
|
| 34 |
+ <property name="layout_style">end</property>
|
|
| 35 |
+ <child>
|
|
| 36 |
+ <placeholder/>
|
|
| 37 |
+ </child>
|
|
| 41 | 38 |
</object>
|
| 42 | 39 |
<packing>
|
| 43 | 40 |
<property name="expand">False</property>
|
| 44 |
- <property name="fill">True</property>
|
|
| 41 |
+ <property name="fill">False</property>
|
|
| 45 | 42 |
<property name="position">0</property>
|
| 46 | 43 |
</packing>
|
| 47 | 44 |
</child>
|
| 48 |
- <child>
|
|
| 49 |
- <object class="GtkToggleButton" id="global_search_toggle">
|
|
| 50 |
- <property name="visible">True</property>
|
|
| 51 |
- <property name="can_focus">True</property>
|
|
| 52 |
- <property name="receives_default">True</property>
|
|
| 53 |
- <property name="tooltip_text" translatable="yes">Global Group Chat Search</property>
|
|
| 54 |
- <property name="halign">end</property>
|
|
| 55 |
- <property name="relief">half</property>
|
|
| 56 |
- <signal name="toggled" handler="_on_global_search_toggle" swapped="no"/>
|
|
| 45 |
+ <child internal-child="content_area">
|
|
| 46 |
+ <object class="GtkBox">
|
|
| 47 |
+ <property name="can_focus">False</property>
|
|
| 48 |
+ <property name="spacing">6</property>
|
|
| 57 | 49 |
<child>
|
| 58 | 50 |
<object class="GtkImage">
|
| 59 | 51 |
<property name="visible">True</property>
|
| 60 | 52 |
<property name="can_focus">False</property>
|
| 61 |
- <property name="icon_name">feather-globe-symbolic</property>
|
|
| 53 |
+ <property name="icon_name">dialog-information-symbolic</property>
|
|
| 54 |
+ <property name="icon_size">3</property>
|
|
| 55 |
+ </object>
|
|
| 56 |
+ <packing>
|
|
| 57 |
+ <property name="expand">False</property>
|
|
| 58 |
+ <property name="fill">True</property>
|
|
| 59 |
+ <property name="position">0</property>
|
|
| 60 |
+ </packing>
|
|
| 61 |
+ </child>
|
|
| 62 |
+ <child>
|
|
| 63 |
+ <object class="GtkLabel">
|
|
| 64 |
+ <property name="visible">True</property>
|
|
| 65 |
+ <property name="can_focus">False</property>
|
|
| 66 |
+ <property name="label" translatable="yes">Start a new chat, join a group chat or search for new group chats globally. You can also enter an XMPP address.</property>
|
|
| 67 |
+ <property name="wrap">True</property>
|
|
| 68 |
+ <property name="max_width_chars">46</property>
|
|
| 69 |
+ <property name="xalign">0</property>
|
|
| 62 | 70 |
</object>
|
| 71 |
+ <packing>
|
|
| 72 |
+ <property name="expand">False</property>
|
|
| 73 |
+ <property name="fill">True</property>
|
|
| 74 |
+ <property name="position">1</property>
|
|
| 75 |
+ </packing>
|
|
| 63 | 76 |
</child>
|
| 64 | 77 |
</object>
|
| 65 | 78 |
<packing>
|
| 66 | 79 |
<property name="expand">False</property>
|
| 67 |
- <property name="fill">True</property>
|
|
| 68 |
- <property name="position">1</property>
|
|
| 80 |
+ <property name="fill">False</property>
|
|
| 81 |
+ <property name="position">0</property>
|
|
| 69 | 82 |
</packing>
|
| 70 | 83 |
</child>
|
| 71 | 84 |
</object>
|
| ... | ... | @@ -76,25 +89,91 @@ |
| 76 | 89 |
</packing>
|
| 77 | 90 |
</child>
|
| 78 | 91 |
<child>
|
| 79 |
- <object class="GtkScrolledWindow" id="scrolledwindow">
|
|
| 92 |
+ <object class="GtkBox" id="box">
|
|
| 80 | 93 |
<property name="visible">True</property>
|
| 81 |
- <property name="can_focus">True</property>
|
|
| 82 |
- <property name="hscrollbar_policy">never</property>
|
|
| 83 |
- <property name="shadow_type">in</property>
|
|
| 94 |
+ <property name="can_focus">False</property>
|
|
| 95 |
+ <property name="border_width">18</property>
|
|
| 96 |
+ <property name="orientation">vertical</property>
|
|
| 97 |
+ <property name="spacing">6</property>
|
|
| 84 | 98 |
<child>
|
| 85 |
- <object class="GtkViewport">
|
|
| 99 |
+ <object class="GtkBox">
|
|
| 86 | 100 |
<property name="visible">True</property>
|
| 87 | 101 |
<property name="can_focus">False</property>
|
| 102 |
+ <property name="spacing">6</property>
|
|
| 103 |
+ <child>
|
|
| 104 |
+ <object class="GtkSearchEntry" id="search_entry">
|
|
| 105 |
+ <property name="visible">True</property>
|
|
| 106 |
+ <property name="can_focus">True</property>
|
|
| 107 |
+ <property name="has_focus">True</property>
|
|
| 108 |
+ <property name="is_focus">True</property>
|
|
| 109 |
+ <property name="hexpand">True</property>
|
|
| 110 |
+ <property name="primary_icon_name">edit-find-symbolic</property>
|
|
| 111 |
+ <property name="primary_icon_activatable">False</property>
|
|
| 112 |
+ <property name="primary_icon_sensitive">False</property>
|
|
| 113 |
+ </object>
|
|
| 114 |
+ <packing>
|
|
| 115 |
+ <property name="expand">False</property>
|
|
| 116 |
+ <property name="fill">True</property>
|
|
| 117 |
+ <property name="position">0</property>
|
|
| 118 |
+ </packing>
|
|
| 119 |
+ </child>
|
|
| 120 |
+ <child>
|
|
| 121 |
+ <object class="GtkToggleButton" id="global_search_toggle">
|
|
| 122 |
+ <property name="visible">True</property>
|
|
| 123 |
+ <property name="can_focus">True</property>
|
|
| 124 |
+ <property name="receives_default">True</property>
|
|
| 125 |
+ <property name="tooltip_text" translatable="yes">Global Group Chat Search</property>
|
|
| 126 |
+ <property name="halign">end</property>
|
|
| 127 |
+ <property name="relief">half</property>
|
|
| 128 |
+ <signal name="toggled" handler="_on_global_search_toggle" swapped="no"/>
|
|
| 129 |
+ <child>
|
|
| 130 |
+ <object class="GtkImage">
|
|
| 131 |
+ <property name="visible">True</property>
|
|
| 132 |
+ <property name="can_focus">False</property>
|
|
| 133 |
+ <property name="icon_name">feather-globe-symbolic</property>
|
|
| 134 |
+ </object>
|
|
| 135 |
+ </child>
|
|
| 136 |
+ </object>
|
|
| 137 |
+ <packing>
|
|
| 138 |
+ <property name="expand">False</property>
|
|
| 139 |
+ <property name="fill">True</property>
|
|
| 140 |
+ <property name="position">1</property>
|
|
| 141 |
+ </packing>
|
|
| 142 |
+ </child>
|
|
| 143 |
+ </object>
|
|
| 144 |
+ <packing>
|
|
| 145 |
+ <property name="expand">False</property>
|
|
| 146 |
+ <property name="fill">True</property>
|
|
| 147 |
+ <property name="position">1</property>
|
|
| 148 |
+ </packing>
|
|
| 149 |
+ </child>
|
|
| 150 |
+ <child>
|
|
| 151 |
+ <object class="GtkScrolledWindow" id="scrolledwindow">
|
|
| 152 |
+ <property name="visible">True</property>
|
|
| 153 |
+ <property name="can_focus">True</property>
|
|
| 154 |
+ <property name="hscrollbar_policy">never</property>
|
|
| 155 |
+ <property name="shadow_type">in</property>
|
|
| 88 | 156 |
<child>
|
| 89 |
- <object class="GtkListBox" id="listbox">
|
|
| 90 |
- <property name="name">StartChatListBox</property>
|
|
| 157 |
+ <object class="GtkViewport">
|
|
| 91 | 158 |
<property name="visible">True</property>
|
| 92 | 159 |
<property name="can_focus">False</property>
|
| 93 |
- <property name="selection_mode">browse</property>
|
|
| 94 |
- <property name="activate_on_single_click">False</property>
|
|
| 160 |
+ <child>
|
|
| 161 |
+ <object class="GtkListBox" id="listbox">
|
|
| 162 |
+ <property name="name">StartChatListBox</property>
|
|
| 163 |
+ <property name="visible">True</property>
|
|
| 164 |
+ <property name="can_focus">False</property>
|
|
| 165 |
+ <property name="selection_mode">browse</property>
|
|
| 166 |
+ <property name="activate_on_single_click">False</property>
|
|
| 167 |
+ </object>
|
|
| 168 |
+ </child>
|
|
| 95 | 169 |
</object>
|
| 96 | 170 |
</child>
|
| 97 | 171 |
</object>
|
| 172 |
+ <packing>
|
|
| 173 |
+ <property name="expand">True</property>
|
|
| 174 |
+ <property name="fill">True</property>
|
|
| 175 |
+ <property name="position">2</property>
|
|
| 176 |
+ </packing>
|
|
| 98 | 177 |
</child>
|
| 99 | 178 |
</object>
|
| 100 | 179 |
<packing>
|
| 1 | 1 |
/* Gajim Dark Application CSS File */
|
| 2 |
+ |
|
| 3 |
+/* InfoBar */
|
|
| 4 |
+infobar.info > revealer > box {
|
|
| 5 |
+ color: #D9EDF7;
|
|
| 6 |
+ background-color: #3A87AD;
|
|
| 7 |
+}
|
|
| 8 |
+infobar.question > revealer > box {
|
|
| 9 |
+ color: #D9EDF7;
|
|
| 10 |
+ background-color: #295A72;
|
|
| 11 |
+}
|
|
| 12 |
+infobar.warning > revealer > box {
|
|
| 13 |
+ color: #FCF8E3;
|
|
| 14 |
+ background-color: #D2822B;
|
|
| 15 |
+}
|
|
| 16 |
+infobar.error > revealer > box {
|
|
| 17 |
+ color: #FCE5D5;
|
|
| 18 |
+ background-color: #D64937;
|
|
| 19 |
+}
|
| ... | ... | @@ -101,6 +101,24 @@ list.settings > row > box { |
| 101 | 101 |
margin: 6px 18px;
|
| 102 | 102 |
}
|
| 103 | 103 |
|
| 104 |
+/* InfoBar */
|
|
| 105 |
+infobar.info > revealer > box {
|
|
| 106 |
+ color: #3A87AD;
|
|
| 107 |
+ background-color: #D9EDF7;
|
|
| 108 |
+}
|
|
| 109 |
+infobar.question > revealer > box {
|
|
| 110 |
+ color: #295A72;
|
|
| 111 |
+ background-color: #AFDAF0;
|
|
| 112 |
+}
|
|
| 113 |
+infobar.warning > revealer > box {
|
|
| 114 |
+ color: #D06821;
|
|
| 115 |
+ background-color: #FFEBC0;
|
|
| 116 |
+}
|
|
| 117 |
+infobar.error > revealer > box {
|
|
| 118 |
+ color: #B94A48;
|
|
| 119 |
+ background-color: #F2DEDE;
|
|
| 120 |
+}
|
|
| 121 |
+ |
|
| 104 | 122 |
/*SendFileDialog*/
|
| 105 | 123 |
#SendFileDialog grid list > row { padding: 10px 20px 10px 10px; }
|
| 106 | 124 |
|
| ... | ... | @@ -61,6 +61,9 @@ class AccountsWindow(Gtk.ApplicationWindow): |
| 61 | 61 |
self.add(box)
|
| 62 | 62 |
|
| 63 | 63 |
for account in app.get_accounts_sorted():
|
| 64 |
+ if account == 'Local':
|
|
| 65 |
+ # Disable zeroconf support until its working again
|
|
| 66 |
+ continue
|
|
| 64 | 67 |
self.add_account(account, initial=True)
|
| 65 | 68 |
|
| 66 | 69 |
self._menu.connect('menu-activated', self._on_menu_activated)
|
| ... | ... | @@ -615,8 +618,10 @@ class GeneralPage(GenericSettingPage): |
| 615 | 618 |
SettingType.ACTION, '-import-contacts',
|
| 616 | 619 |
props={'account': account}),
|
| 617 | 620 |
|
| 618 |
- Setting(SettingKind.DIALOG, _('Client Certificate'),
|
|
| 619 |
- SettingType.DIALOG, props={'dialog': CertificateDialog}),
|
|
| 621 |
+ # Currently not supported by nbxmpp
|
|
| 622 |
+ #
|
|
| 623 |
+ # Setting(SettingKind.DIALOG, _('Client Certificate'),
|
|
| 624 |
+ # SettingType.DIALOG, props={'dialog': CertificateDialog}),
|
|
| 620 | 625 |
|
| 621 | 626 |
Setting(SettingKind.SWITCH, _('Connect on startup'),
|
| 622 | 627 |
SettingType.ACCOUNT_CONFIG, 'autoconnect'),
|
| ... | ... | @@ -1059,5 +1059,13 @@ class Preferences(Gtk.ApplicationWindow): |
| 1059 | 1059 |
def _on_debug_folder_clicked(self, _widget):
|
| 1060 | 1060 |
open_file(configpaths.get('DEBUG'))
|
| 1061 | 1061 |
|
| 1062 |
+ def _on_reset_help_clicked(self, widget):
|
|
| 1063 |
+ widget.set_sensitive(False)
|
|
| 1064 |
+ helping_hints = [
|
|
| 1065 |
+ 'start_chat',
|
|
| 1066 |
+ ]
|
|
| 1067 |
+ for hint in helping_hints:
|
|
| 1068 |
+ app.config.set('show_help_%s' % hint, True)
|
|
| 1069 |
+ |
|
| 1062 | 1070 |
def on_open_advanced_editor_button_clicked(self, _widget):
|
| 1063 | 1071 |
open_window('AdvancedConfig')
|
| ... | ... | @@ -52,7 +52,7 @@ class StartChatDialog(Gtk.ApplicationWindow): |
| 52 | 52 |
self.set_application(app.app)
|
| 53 | 53 |
self.set_position(Gtk.WindowPosition.CENTER)
|
| 54 | 54 |
self.set_show_menubar(False)
|
| 55 |
- self.set_title(_('Start New Conversation'))
|
|
| 55 |
+ self.set_title(_('Start / Join Chat'))
|
|
| 56 | 56 |
self.set_default_size(-1, 400)
|
| 57 | 57 |
self.ready_to_destroy = False
|
| 58 | 58 |
self._parameter_form = None
|
| ... | ... | @@ -96,6 +96,8 @@ class StartChatDialog(Gtk.ApplicationWindow): |
| 96 | 96 |
self._muc_info_box = GroupChatInfoScrolled()
|
| 97 | 97 |
self._ui.info_box.add(self._muc_info_box)
|
| 98 | 98 |
|
| 99 |
+ self._ui.infobar.set_revealed(app.config.get('show_help_start_chat'))
|
|
| 100 |
+ |
|
| 99 | 101 |
self.connect('key-press-event', self._on_key_press)
|
| 100 | 102 |
self.connect('destroy', self._destroy)
|
| 101 | 103 |
|
| ... | ... | @@ -259,6 +261,11 @@ class StartChatDialog(Gtk.ApplicationWindow): |
| 259 | 261 |
self._ui.search_entry.grab_focus_without_selecting()
|
| 260 | 262 |
return Gdk.EVENT_PROPAGATE
|
| 261 | 263 |
|
| 264 |
+ def _on_infobar_response(self, _widget, response):
|
|
| 265 |
+ if response == Gtk.ResponseType.CLOSE:
|
|
| 266 |
+ self._ui.infobar.set_revealed(False)
|
|
| 267 |
+ app.config.set('show_help_start_chat', False)
|
|
| 268 |
+ |
|
| 262 | 269 |
def _start_new_chat(self, row):
|
| 263 | 270 |
if row.new:
|
| 264 | 271 |
try:
|
| ... | ... | @@ -370,15 +377,17 @@ class StartChatDialog(Gtk.ApplicationWindow): |
| 370 | 377 |
return box == Search.GLOBAL
|
| 371 | 378 |
|
| 372 | 379 |
def _on_global_search_toggle(self, button):
|
| 373 |
- self._ui.search_entry.set_text('')
|
|
| 374 | 380 |
self._ui.search_entry.grab_focus()
|
| 375 | 381 |
image_style_context = button.get_children()[0].get_style_context()
|
| 376 | 382 |
if button.get_active():
|
| 377 | 383 |
image_style_context.add_class('selected-color')
|
| 378 | 384 |
self._set_listbox(self._global_search_listbox)
|
| 385 |
+ if self._ui.search_entry.get_text():
|
|
| 386 |
+ self._start_search()
|
|
| 379 | 387 |
self._remove_new_jid_row()
|
| 380 | 388 |
self._ui.listbox.invalidate_filter()
|
| 381 | 389 |
else:
|
| 390 |
+ self._ui.search_entry.set_text('')
|
|
| 382 | 391 |
image_style_context.remove_class('selected-color')
|
| 383 | 392 |
self._set_listbox(self._ui.listbox)
|
| 384 | 393 |
self._global_search_listbox.remove_all()
|
| ... | ... | @@ -1969,10 +1969,10 @@ class Interface: |
| 1969 | 1969 |
self.register_core_handlers()
|
| 1970 | 1970 |
|
| 1971 | 1971 |
self.create_zeroconf_default_config()
|
| 1972 |
- if app.config.get_per('accounts', app.ZEROCONF_ACC_NAME, 'active') \
|
|
| 1973 |
- and app.is_installed('ZEROCONF'):
|
|
| 1974 |
- app.connections[app.ZEROCONF_ACC_NAME] = \
|
|
| 1975 |
- connection_zeroconf.ConnectionZeroconf(app.ZEROCONF_ACC_NAME)
|
|
| 1972 |
+ # if app.config.get_per('accounts', app.ZEROCONF_ACC_NAME, 'active') \
|
|
| 1973 |
+ # and app.is_installed('ZEROCONF'):
|
|
| 1974 |
+ # app.connections[app.ZEROCONF_ACC_NAME] = \
|
|
| 1975 |
+ # connection_zeroconf.ConnectionZeroconf(app.ZEROCONF_ACC_NAME)
|
|
| 1976 | 1976 |
|
| 1977 | 1977 |
for account in app.config.get_per('accounts'):
|
| 1978 | 1978 |
if not app.config.get_per('accounts', account, 'is_zeroconf') and\
|