Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
5ecf5a35 by wurstsalat at 2022-04-26T18:59:37+02:00
fix: Preferences: Show AV settings on Windows, add specific revealer text

- - - - -
feff2cfd by wurstsalat at 2022-04-26T19:00:06+02:00
fix: Disable starting AV calls on Windows

Establishing calls on Windows is not possible at the moment due to issues with 
libnice

- - - - -


4 changed files:

- gajim/data/gui/preferences.ui
- gajim/gtk/builder.pyi
- gajim/gtk/controls/chat.py
- gajim/gtk/preferences.py


Changes:

=====================================
gajim/data/gui/preferences.ui
=====================================
@@ -719,7 +719,7 @@
                         <property name="can-focus">False</property>
                         <property name="orientation">vertical</property>
                         <child>
-                          <object class="GtkInfoBar" id="audio_video_info_bar">
+                          <object class="GtkInfoBar" id="av_info_bar">
                             <property name="visible">True</property>
                             <property name="can-focus">False</property>
                             <property name="message-type">warning</property>
@@ -764,7 +764,7 @@
                                   <placeholder/>
                                 </child>
                                 <child>
-                                  <object class="GtkLabel">
+                                  <object class="GtkLabel" 
id="av_info_bar_label">
                                     <property name="visible">True</property>
                                     <property name="can-focus">False</property>
                                     <property name="label" 
translatable="yes">Missing dependencies for Audio/Video</property>


=====================================
gajim/gtk/builder.pyi
=====================================
@@ -697,8 +697,9 @@ class PreferencesBuilder(Builder):
     automatic_status: Gtk.Grid
     themes: Gtk.Grid
     emoji: Gtk.Grid
-    audio_video_info_bar: Gtk.InfoBar
+    av_info_bar: Gtk.InfoBar
     button1: Gtk.Button
+    av_info_bar_label: Gtk.Label
     server: Gtk.Grid
     audio: Gtk.Grid
     video: Gtk.Grid


=====================================
gajim/gtk/controls/chat.py
=====================================
@@ -31,6 +31,7 @@
 
 import time
 import logging
+import sys
 
 from gi.repository import Gtk
 from gi.repository import Gio
@@ -212,7 +213,8 @@ def update_actions(self) -> None:
         audio_available = self._call_widget.get_jingle_available('audio')
         video_available = self._call_widget.get_jingle_available('video')
         self._get_action('start-call-').set_enabled(
-            online and (audio_available or video_available))
+            online and (audio_available or video_available)
+            and sys.platform != 'win32')
 
         # Send message
         has_text = self.msg_textview.has_text()


=====================================
gajim/gtk/preferences.py
=====================================
@@ -104,7 +104,11 @@ def __init__(self) -> None:
         self._add_prefs(prefs)
         self._add_video_preview()
 
-        self._ui.audio_video_info_bar.set_revealed(not app.is_installed('AV'))
+        self._ui.av_info_bar.set_revealed(
+            not app.is_installed('AV') or sys.platform == 'win32')
+        if sys.platform == 'win32':
+            self._ui.av_info_bar_label.set_text(
+                _('Video calls are not available on Windows'))
 
         self.connect('key-press-event', self._on_key_press)
         self.connect('destroy', self._on_destroy)
@@ -120,16 +124,11 @@ def get_ui(self):
     def _add_prefs(self, prefs: list[tuple[str, Type[PreferenceBox]]]):
         for ui_name, klass in prefs:
             pref_box = getattr(self._ui, ui_name)
-            if ui_name == 'video' and sys.platform == 'win32':
-                continue
-
             pref = klass(self)
             pref_box.add(pref)
             self._prefs[ui_name] = pref
 
     def _add_video_preview(self) -> None:
-        if sys.platform == 'win32':
-            return
         self._video_preview = VideoPreview()
         self._ui.video.add(self._video_preview.widget)
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/2322857bf374920f16639d4735787d3db5808611...feff2cfdb6b1b01e0cfdc3918aedf44e66bafda6

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/2322857bf374920f16639d4735787d3db5808611...feff2cfdb6b1b01e0cfdc3918aedf44e66bafda6
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to