Philipp Hörist pushed to branch master at gajim / gajim


Commits:
91c0dba2 by lovetox at 2022-06-17T18:46:38+02:00
feat: Preferences: Add D-Bus Interface setting

- - - - -
9fb23514 by lovetox at 2022-06-17T18:47:43+02:00
chore: Remove unused code

- - - - -


3 changed files:

- gajim/common/exceptions.py
- gajim/common/setting_values.py
- gajim/gtk/preferences.py


Changes:

=====================================
gajim/common/exceptions.py
=====================================
@@ -17,33 +17,6 @@
 # You should have received a copy of the GNU General Public License
 # along with Gajim. If not, see <http://www.gnu.org/licenses/>.
 
-from gajim.common.i18n import _
-
-
-class ServiceNotAvailable(Exception):
-    """
-    This exception is raised when we cannot use Gajim remotely'
-    """
-
-    def __init__(self) -> None:
-        Exception.__init__(self)
-
-    def __str__(self) -> str:
-        return _('Service not available: Gajim is not running, or 
remote_control is False')
-
-
-class SessionBusNotPresent(Exception):
-    """
-    This exception indicates that there is no session daemon
-    """
-
-    def __init__(self) -> None:
-        Exception.__init__(self)
-
-    def __str__(self) -> str:
-        return _('Session bus is not available.\nTry reading %(url)s') % \
-                {'url': 
'https://dev.gajim.org/gajim/gajim/wikis/help/GajimDBus'}
-
 
 class GajimGeneralException(Exception):
     """


=====================================
gajim/common/setting_values.py
=====================================
@@ -659,7 +659,6 @@ class WorkspaceSettings(TypedDict):
         'notify_on_all_muc_messages': '',
         'plugins_repository_enabled': _('If enabled, Gajim offers to download 
plugins hosted on gajim.org'),
         'remote_commands': _('If enabled, Gajim will execute XEP-0146 
Commands.'),
-        'remote_control': _('If checked, Gajim can be controlled remotely 
using gajim-remote.'),
         'restore_timeout': _('How far back in time (minutes) chat history is 
restored. -1 means no limit.'),
         'save_main_window_position': _('If enabled, Gajim will save the main 
window position when hiding it, and restore it when showing the window again.'),
         'search_engine': '',


=====================================
gajim/gtk/preferences.py
=====================================
@@ -1000,10 +1000,12 @@ def _purge() -> None:
                                text=_('_Purge'),
                                callback=_purge)]).show()
 
+
 class Advanced(PreferenceBox):
     def __init__(self, pref_window: Preferences) -> None:
 
         settings = [
+
             Setting(SettingKind.SWITCH,
                     _('Debug Logging'),
                     SettingType.VALUE,
@@ -1011,6 +1013,14 @@ def __init__(self, pref_window: Preferences) -> None:
                     props={'button-icon-name': 'folder-symbolic',
                            'button-callback': self._on_open_debug_logs},
                     callback=self._on_debug_logging),
+
+            Setting(SettingKind.SWITCH,
+                    _('D-Bus Interface'),
+                    SettingType.CONFIG,
+                    'remote_control',
+                    desc=_('Allow Gajim to broadcast useful information via '
+                           'D-Bus. It also allows other applications to '
+                           'control Gajim remotely.')),
         ]
 
         PreferenceBox.__init__(self, settings)



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/809674b33152bcf5b655be6a1a489938d7279acf...9fb23514a863ba399a02ba4b3608dbbe13fb8aa5

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/809674b33152bcf5b655be6a1a489938d7279acf...9fb23514a863ba399a02ba4b3608dbbe13fb8aa5
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to