Commit a21c05f9 authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Daniel Brötzmann

StartChat: Add infobar

parent 4cd448de
......@@ -249,6 +249,7 @@ class Config:
'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')],
'dev_force_bookmark_2': [opt_bool, False, _('Force Bookmark 2 usage')],
'show_help_start_chat': [opt_bool, True, _('Shows an info bar with helpful hints in the Start / Join Chat dialog')],
}, {}) # type: Tuple[Dict[str, List[Any]], Dict[Any, Any]]
__options_per_key = {
......
This diff is collapsed.
......@@ -52,7 +52,7 @@ class StartChatDialog(Gtk.ApplicationWindow):
self.set_application(app.app)
self.set_position(Gtk.WindowPosition.CENTER)
self.set_show_menubar(False)
self.set_title(_('Start New Conversation'))
self.set_title(_('Start / Join Chat'))
self.set_default_size(-1, 400)
self.ready_to_destroy = False
self._parameter_form = None
......@@ -96,6 +96,8 @@ class StartChatDialog(Gtk.ApplicationWindow):
self._muc_info_box = GroupChatInfoScrolled()
self._ui.info_box.add(self._muc_info_box)
self._ui.infobar.set_revealed(app.config.get('show_help_start_chat'))
self.connect('key-press-event', self._on_key_press)
self.connect('destroy', self._destroy)
......@@ -259,6 +261,11 @@ class StartChatDialog(Gtk.ApplicationWindow):
self._ui.search_entry.grab_focus_without_selecting()
return Gdk.EVENT_PROPAGATE
def _on_infobar_response(self, _widget, response):
if response == Gtk.ResponseType.CLOSE:
self._ui.infobar.set_revealed(False)
app.config.set('show_help_start_chat', False)
def _start_new_chat(self, row):
if row.new:
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment