Added options in the help menu to go to the logs and config folder

This commit is contained in:
Manuel Cortez 2019-02-13 16:48:00 -06:00
parent fb50f2783f
commit 942f9296a0
3 changed files with 14 additions and 0 deletions

View File

@ -2,6 +2,7 @@
## changes in this version ## changes in this version
* Added new options to open the config and logs folder, these options are located in the help menu and may be useful during error reporting.
* Added experimental support to "subscribers" buffer, inside frienship requests. This shows friend requests that have been declined by the current user. * Added experimental support to "subscribers" buffer, inside frienship requests. This shows friend requests that have been declined by the current user.
* Fixed an error in Socializer that was making it unable to detect unread messages properly. * Fixed an error in Socializer that was making it unable to detect unread messages properly.
* Socializer should save all tracebacks directly to error.log instead of displaying an error message during exit. ([#27,](https://code.manuelcortez.net/manuelcortez/socializer/issues/27)) * Socializer should save all tracebacks directly to error.log instead of displaying an error message during exit. ([#27,](https://code.manuelcortez.net/manuelcortez/socializer/issues/27))

View File

@ -2,6 +2,7 @@
import time import time
import os import os
import webbrowser import webbrowser
import subprocess
import logging import logging
import wx import wx
import widgetUtils import widgetUtils
@ -10,6 +11,7 @@ import presenters
import interactors import interactors
import views import views
import config import config
import paths
from vk_api.exceptions import LoginRequired, VkApiError from vk_api.exceptions import LoginRequired, VkApiError
from requests.exceptions import ConnectionError from requests.exceptions import ConnectionError
from pubsub import pub from pubsub import pub
@ -522,6 +524,8 @@ class Controller(object):
widgetUtils.connect_event(self.window, widgetUtils.MENU,self.remove_buffer, menuitem=self.window.remove_buffer_) widgetUtils.connect_event(self.window, widgetUtils.MENU,self.remove_buffer, menuitem=self.window.remove_buffer_)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.get_more_items, menuitem=self.window.load_previous_items) widgetUtils.connect_event(self.window, widgetUtils.MENU, self.get_more_items, menuitem=self.window.load_previous_items)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.changelog, menuitem=self.window.changelog) widgetUtils.connect_event(self.window, widgetUtils.MENU, self.changelog, menuitem=self.window.changelog)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.open_logs, menuitem=self.window.open_logs)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.open_config, menuitem=self.window.open_config)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.configuration, menuitem=self.window.settings_dialog) widgetUtils.connect_event(self.window, widgetUtils.MENU, self.configuration, menuitem=self.window.settings_dialog)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.new_timeline, menuitem=self.window.timeline) widgetUtils.connect_event(self.window, widgetUtils.MENU, self.new_timeline, menuitem=self.window.timeline)
widgetUtils.connect_event(self.window, widgetUtils.MENU, self.create_audio_album, menuitem=self.window.audio_album) widgetUtils.connect_event(self.window, widgetUtils.MENU, self.create_audio_album, menuitem=self.window.audio_album)
@ -619,6 +623,12 @@ class Controller(object):
""" Opens the global settings dialogue.""" """ Opens the global settings dialogue."""
presenter = presenters.configurationPresenter(session=self.session, view=views.configurationDialog(title=_("Preferences")), interactor=interactors.configurationInteractor()) presenter = presenters.configurationPresenter(session=self.session, view=views.configurationDialog(title=_("Preferences")), interactor=interactors.configurationInteractor())
def open_logs(self, *args, **kwargs):
subprocess.call(["explorer", paths.logs_path()])
def open_config(self, *args, **kwargs):
subprocess.call(["explorer", paths.config_path()])
def new_timeline(self, *args, **kwargs): def new_timeline(self, *args, **kwargs):
b = self.get_current_buffer() b = self.get_current_buffer()
# If executing this method from an empty buffer we should get the newsfeed buffer. # If executing this method from an empty buffer we should get the newsfeed buffer.

View File

@ -49,6 +49,9 @@ class mainWindow(wx.Frame):
self.documentation = help_.Append(wx.NewId(), _("Manual")) self.documentation = help_.Append(wx.NewId(), _("Manual"))
self.check_for_updates = help_.Append(wx.NewId(), _("Check for updates")) self.check_for_updates = help_.Append(wx.NewId(), _("Check for updates"))
self.changelog = help_.Append(wx.NewId(), _("Chan&gelog")) self.changelog = help_.Append(wx.NewId(), _("Chan&gelog"))
self.open_logs = help_.Append(wx.NewId(), _("Open logs directory"))
self.open_config = help_.Append(wx.NewId(), _("Open config directory"))
self.report = help_.Append(wx.NewId(), _("Report an error")) self.report = help_.Append(wx.NewId(), _("Report an error"))
mb.Append(player, _("Audio player")) mb.Append(player, _("Audio player"))
mb.Append(help_, _("Help")) mb.Append(help_, _("Help"))