Commit 5fb23187 authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist

Use native GTK icons for audio and video

parent ba1f88a0
......@@ -165,16 +165,6 @@ class ChatControl(ChatControlBase):
id_ = widget.connect('released', self.on_num_button_released)
self.handlers[id_] = widget
self.dtmf_window = self.xml.get_object('dtmf_window')
self.dtmf_window.get_child().set_direction(Gtk.TextDirection.LTR)
id_ = self.dtmf_window.connect('focus-out-event',
self.on_dtmf_window_focus_out_event)
self.handlers[id_] = self.dtmf_window
widget = self.xml.get_object('dtmf_button')
id_ = widget.connect('clicked', self.on_dtmf_button_clicked)
self.handlers[id_] = widget
widget = self.xml.get_object('mic_hscale')
id_ = widget.connect('value_changed', self.on_mic_hscale_value_changed)
self.handlers[id_] = widget
......@@ -512,16 +502,16 @@ class ChatControl(ChatControlBase):
banner_image.show()
if state == self.JINGLE_STATE_CONNECTING:
banner_image.set_from_icon_name(
Gtk.STOCK_CONVERT, Gtk.IconSize.MENU)
'network-transmit-symbolic', Gtk.IconSize.MENU)
elif state == self.JINGLE_STATE_CONNECTION_RECEIVED:
banner_image.set_from_icon_name(
"network-workgroup", Gtk.IconSize.MENU)
'network-receive-symbolic', Gtk.IconSize.MENU)
elif state == self.JINGLE_STATE_CONNECTED:
banner_image.set_from_icon_name(
Gtk.STOCK_CONNECT, Gtk.IconSize.MENU)
'network-transmit-receive-symbolic', Gtk.IconSize.MENU)
elif state == self.JINGLE_STATE_ERROR:
banner_image.set_from_icon_name(
"dialog-warning", Gtk.IconSize.MENU)
'network-error-symbolic', Gtk.IconSize.MENU)
self.update_toolbar()
def update_audio(self):
......@@ -614,12 +604,6 @@ class ChatControl(ChatControlBase):
def on_num_button_released(self, released):
self._get_audio_content()._stop_dtmf()
def on_dtmf_button_clicked(self, widget):
self.dtmf_window.show_all()
def on_dtmf_window_focus_out_event(self, widget, event):
self.dtmf_window.hide()
def on_mic_hscale_value_changed(self, widget, value):
self._get_audio_content().set_mic_volume(value / 100)
# Save volume to config
......
......@@ -14,23 +14,13 @@
<property name="page_increment">10</property>
<property name="page_size">10</property>
</object>
<object class="GtkWindow" id="dtmf_window">
<object class="GtkPopover" id="dtmf_popover">
<property name="can_focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window_position">mouse</property>
<property name="type_hint">menu</property>
<property name="skip_taskbar_hint">True</property>
<property name="skip_pager_hint">True</property>
<property name="decorated">False</property>
<property name="deletable">False</property>
<child type="titlebar">
<placeholder/>
</child>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<child>
<object class="GtkButton" id="1_button">
<property name="visible">True</property>
......@@ -41,6 +31,7 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="label" translatable="yes">&lt;b&gt;1&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
......@@ -58,7 +49,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="xalign">0</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
......@@ -79,7 +69,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="xalign">0</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
......@@ -100,7 +89,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="xalign">0</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
......@@ -121,7 +109,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="xalign">0</property>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
......@@ -142,7 +129,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="xalign">0</property>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
......@@ -183,7 +169,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="xalign">0</property>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
......@@ -204,7 +189,6 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="xalign">0</property>
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
......@@ -725,11 +709,13 @@
<property name="has_tooltip">True</property>
<property name="relief">none</property>
<property name="orientation">vertical</property>
<property name="size">menu</property>
<property name="adjustment">adjustment1</property>
<property name="icons">audio-volume-muted
audio-volume-high
audio-volume-low
audio-volume-medium</property>
<property name="icons">audio-volume-muted-symbolic
audio-volume-low-symbolic
audio-volume-medium-symbolic
audio-volume-high-symbolic</property>
<property name="use_symbolic">False</property>
<child internal-child="plus_button">
<object class="GtkButton" id="volumebutton-plus_button1">
<property name="can_focus">False</property>
......@@ -742,6 +728,9 @@ audio-volume-medium</property>
<property name="receives_default">False</property>
</object>
</child>
<style>
<class name="chatcontrol-actionbar-button"/>
</style>
</object>
<packing>
<property name="expand">False</property>
......@@ -758,11 +747,13 @@ audio-volume-medium</property>
<property name="has_tooltip">True</property>
<property name="relief">none</property>
<property name="orientation">vertical</property>
<property name="size">menu</property>
<property name="adjustment">adjustment2</property>
<property name="icons">audio-mic-volume-muted
audio-mic-volume-high
audio-mic-volume-medium
audio-mic-volume-low</property>
<property name="icons">microphone-sensitivity-muted-symbolic
microphone-sensitivity-low-symbolic
microphone-sensitivity-medium-symbolic
microphone-sensitivity-high-symbolic</property>
<property name="use_symbolic">False</property>
<child internal-child="plus_button">
<object class="GtkButton" id="volumebutton-plus_button2">
<property name="can_focus">False</property>
......@@ -775,6 +766,9 @@ audio-mic-volume-low</property>
<property name="receives_default">False</property>
</object>
</child>
<style>
<class name="chatcontrol-actionbar-button"/>
</style>
</object>
<packing>
<property name="expand">False</property>
......@@ -783,17 +777,29 @@ audio-mic-volume-low</property>
</packing>
</child>
<child>
<object class="GtkButton" id="dtmf_button">
<property name="label" translatable="yes">#</property>
<object class="GtkMenuButton" id="dtmf_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="relief">none</property>
<property name="direction">up</property>
<property name="popover">dtmf_popover</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">input-dialpad-symbolic</property>
<property name="icon_size">1</property>
</object>
</child>
<style>
<class name="chatcontrol-actionbar-button"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">4</property>
</packing>
</child>
</object>
......
......@@ -1088,7 +1088,7 @@ class Interface:
event_type = _('Voice Chat Request')
app.notification.popup(
event_type, obj.fjid, account, 'jingle-incoming',
icon_name='gajim-mic_active', title=event_type, text=txt)
icon_name='call-start-symbolic', title=event_type, text=txt)
def handle_event_jingle_connected(self, obj):
# ('JINGLE_CONNECTED', account, (peerjid, sid, media))
......
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