Commit 1fa8533c authored by Daniel Brötzmann's avatar Daniel Brötzmann

Preferences: Add Open Folder for debug logs

parent b3f938e2
Pipeline #4468 passed with stages
in 2 minutes and 36 seconds
......@@ -2505,16 +2505,50 @@ to discover one from the server. (Example: stun.iptel.org)</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="enable_logging">
<property name="label" translatable="yes">Enable _debug logging</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="tooltip_text" translatable="yes">If checked, Gajim will store a log file for debugging</property>
<property name="halign">start</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_enable_logging_toggled" swapped="no"/>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkCheckButton" id="enable_logging">
<property name="label" translatable="yes">Enable _debug logging (restart required)</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="no_show_all">True</property>
<property name="tooltip_text" translatable="yes">If checked, Gajim will store a log file for debugging</property>
<property name="halign">start</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_enable_logging_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="GtkButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Opens folder containing debug logs</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="_on_debug_folder_clicked" swapped="no"/>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">folder-symbolic</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
......
......@@ -19,6 +19,7 @@ from gi.repository import Gdk
from gi.repository import Pango
from gajim.common import app
from gajim.common import configpaths
from gajim.common import helpers
from gajim.common import config as c_config
from gajim.common import idle
......@@ -1079,6 +1080,10 @@ class Preferences(Gtk.ApplicationWindow):
def on_enable_logging_toggled(self, widget):
app.set_debug_mode(widget.get_active())
def _on_debug_folder_clicked(self, _widget):
debug_folder = configpaths.get('DEBUG')
helpers.launch_file_manager(debug_folder)
# Advanced Config Editor (ACE)
def on_open_advanced_editor_button_clicked(self, _widget):
window = app.get_app_window(AdvancedConfig)
......
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