Merge local changes.
This commit is contained in:
commit
acf06b4470
|
@ -37,7 +37,7 @@ Gajim is a GTK+ app that loves GNOME. You can do 'make' so you don't require gno
|
|||
<li>gnome-python-desktop (for GnomeKeyring support)</li>
|
||||
<li>notification-daemon or notify-python (and D-Bus) to get cooler popups</li>
|
||||
<li>D-Bus running to have gajim-remote working. Some distributions split dbus-x11, which is needed for dbus to work with Gajim. Version >= 0.80 is required.</li>
|
||||
<li>python-dbus bindings (>=0.80)</li>
|
||||
<li>python-dbus bindings (>=0.81)</li>
|
||||
<li>python-sexy to have clickable URLs in chat windows</li>
|
||||
<li>python-kerberos to use GSSAPI authentification. Note: version1.1 or higher is required</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<glade-interface>
|
||||
<!-- interface-requires gtk+ 2.14 -->
|
||||
<!-- interface-requires gtk+ 2.16 -->
|
||||
<!-- interface-naming-policy toplevel-contextual -->
|
||||
<widget class="GtkWindow" id="message_window">
|
||||
<property name="default_width">480</property>
|
||||
|
@ -18,7 +18,15 @@
|
|||
<widget class="GtkVBox" id="chat_child_vbox">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">3</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">1</property>
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox3">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment">
|
||||
<property name="visible">True</property>
|
||||
|
@ -48,6 +56,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="banner_name_label">
|
||||
<property name="visible">True</property>
|
||||
|
@ -171,6 +180,7 @@
|
|||
<child>
|
||||
<widget class="GtkVBox" id="vbox106">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="conversation_scrolledwindow">
|
||||
<property name="height_request">60</property>
|
||||
|
@ -193,8 +203,8 @@
|
|||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="authentication_button">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="relief">none</property>
|
||||
|
@ -245,9 +255,10 @@
|
|||
<child>
|
||||
<widget class="GtkButton" id="emoticons_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Show a list of emoticons (Alt+M)</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
|
@ -268,9 +279,10 @@
|
|||
<child>
|
||||
<widget class="GtkButton" id="formattings_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Show a list of formattings</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
|
@ -291,6 +303,7 @@
|
|||
<widget class="GtkVSeparator" id="vseparator1">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -303,6 +316,7 @@
|
|||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Add this contact to roster (Ctrl+D)</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
|
@ -323,9 +337,10 @@
|
|||
<child>
|
||||
<widget class="GtkButton" id="send_file_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Send a file (Ctrl+F)</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
|
@ -346,6 +361,7 @@
|
|||
<widget class="GtkToggleButton" id="audio_togglebutton">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Toggle audio session</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
|
@ -365,6 +381,7 @@
|
|||
<widget class="GtkToggleButton" id="video_togglebutton">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Toggle video session</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
|
@ -383,9 +400,10 @@
|
|||
<child>
|
||||
<widget class="GtkButton" id="convert_to_gc_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Invite contacts to the conversation (Ctrl+G)</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
|
@ -406,9 +424,10 @@
|
|||
<child>
|
||||
<widget class="GtkButton" id="contact_information_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Show the contact's profile (Ctrl+I)</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
|
@ -429,9 +448,10 @@
|
|||
<child>
|
||||
<widget class="GtkButton" id="history_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Browse the chat history (Ctrl+H)</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
|
@ -453,6 +473,7 @@
|
|||
<widget class="GtkVSeparator" id="vseparator3">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -462,9 +483,10 @@
|
|||
<child>
|
||||
<widget class="GtkButton" id="message_window_actions_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="tooltip" translatable="yes">Show a menu of advanced functions (Alt+D)</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="focus_on_click">False</property>
|
||||
|
@ -498,7 +520,7 @@
|
|||
<widget class="GtkButton" id="send_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="receives_default">True</property>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment102">
|
||||
<property name="visible">True</property>
|
||||
|
@ -548,6 +570,257 @@
|
|||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="audio_vbox">
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkTable" id="table1">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">4</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkButton" id="1_button">
|
||||
<property name="label" translatable="yes">1</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="2_button">
|
||||
<property name="label" translatable="yes">2</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="3_button">
|
||||
<property name="label" translatable="yes">3</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="4_button">
|
||||
<property name="label" translatable="yes">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="5_button">
|
||||
<property name="label" translatable="yes">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="6_button">
|
||||
<property name="label" translatable="yes">6</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="7_button">
|
||||
<property name="label" translatable="yes">7</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="8_button">
|
||||
<property name="label" translatable="yes">8</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="9_button">
|
||||
<property name="label" translatable="yes">9</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="*_button">
|
||||
<property name="label" translatable="yes">*</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="0_button">
|
||||
<property name="label" translatable="yes">0</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="#_button">
|
||||
<property name="label" translatable="yes">#</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Sound volume:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHScale" id="sound_hscale">
|
||||
<property name="width_request">110</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="adjustment">0 0 110 1 10 10</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="value_pos">bottom</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Mic volume:</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkHScale" id="mic_hscale">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="adjustment">0 0 110 1 10 10</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="value_pos">bottom</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkEventBox" id="chat_tab_ebox">
|
||||
|
@ -614,6 +887,7 @@
|
|||
<widget class="GtkVBox" id="muc_child_vbox">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="border_width">3</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment103">
|
||||
<property name="visible">True</property>
|
||||
|
@ -643,6 +917,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="banner_name_label">
|
||||
<property name="visible">True</property>
|
||||
|
@ -683,10 +958,12 @@
|
|||
<widget class="GtkVBox" id="vbox108">
|
||||
<property name="width_request">0</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox109">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="conversation_scrolledwindow">
|
||||
|
|
|
@ -1375,6 +1375,21 @@ class ChatControl(ChatControlBase):
|
|||
self.on_avatar_eventbox_button_press_event)
|
||||
self.handlers[id_] = widget
|
||||
|
||||
for key in ('1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#'):
|
||||
widget = self.xml.get_widget(key + '_button')
|
||||
id_ = widget.connect('pressed', self.on_num_button_pressed, key)
|
||||
self.handlers[id_] = widget
|
||||
id_ = widget.connect('released', self.on_num_button_released)
|
||||
self.handlers[id_] = widget
|
||||
|
||||
widget = self.xml.get_widget('mic_hscale')
|
||||
id_ = widget.connect('value_changed', self.on_mic_hscale_value_changed)
|
||||
self.handlers[id_] = widget
|
||||
|
||||
widget = self.xml.get_widget('sound_hscale')
|
||||
id_ = widget.connect('value_changed', self.on_sound_hscale_value_changed)
|
||||
self.handlers[id_] = widget
|
||||
|
||||
if not session:
|
||||
# Don't use previous session if we want to a specific resource
|
||||
# and it's not the same
|
||||
|
@ -1505,27 +1520,35 @@ class ChatControl(ChatControlBase):
|
|||
if jingle_type not in ('audio', 'video'):
|
||||
return
|
||||
banner_image = getattr(self, '_' + jingle_type + '_banner_image')
|
||||
if getattr(self, jingle_type + '_state') in (
|
||||
self.JINGLE_STATE_NOT_AVAILABLE, self.JINGLE_STATE_AVAILABLE):
|
||||
state = getattr(self, jingle_type + '_state')
|
||||
if state in (self.JINGLE_STATE_NOT_AVAILABLE,
|
||||
self.JINGLE_STATE_AVAILABLE):
|
||||
banner_image.hide()
|
||||
else:
|
||||
banner_image.show()
|
||||
if self.audio_state == self.JINGLE_STATE_CONNECTING:
|
||||
if state == self.JINGLE_STATE_CONNECTING:
|
||||
banner_image.set_from_stock(
|
||||
gtk.STOCK_CONVERT, 1)
|
||||
elif self.audio_state == self.JINGLE_STATE_CONNECTION_RECEIVED:
|
||||
elif state == self.JINGLE_STATE_CONNECTION_RECEIVED:
|
||||
banner_image.set_from_stock(
|
||||
gtk.STOCK_NETWORK, 1)
|
||||
elif self.audio_state == self.JINGLE_STATE_CONNECTED:
|
||||
elif state == self.JINGLE_STATE_CONNECTED:
|
||||
banner_image.set_from_stock(
|
||||
gtk.STOCK_CONNECT, 1)
|
||||
elif self.audio_state == self.JINGLE_STATE_ERROR:
|
||||
elif state == self.JINGLE_STATE_ERROR:
|
||||
banner_image.set_from_stock(
|
||||
gtk.STOCK_DIALOG_WARNING, 1)
|
||||
self.update_toolbar()
|
||||
|
||||
def update_audio(self):
|
||||
self._update_jingle('audio')
|
||||
vbox = self.xml.get_widget('audio_vbox')
|
||||
if self.audio_state == self.JINGLE_STATE_CONNECTED:
|
||||
vbox.set_no_show_all(False)
|
||||
vbox.show_all()
|
||||
else:
|
||||
vbox.set_no_show_all(True)
|
||||
vbox.hide()
|
||||
|
||||
def update_video(self):
|
||||
self._update_jingle('video')
|
||||
|
@ -1589,6 +1612,24 @@ class ChatControl(ChatControlBase):
|
|||
def set_video_state(self, state, sid=None, reason=None):
|
||||
self._set_jingle_state('video', state, sid=sid, reason=reason)
|
||||
|
||||
def _get_audio_content(self):
|
||||
session = gajim.connections[self.account].get_jingle_session(
|
||||
self.contact.get_full_jid(), self.audio_sid)
|
||||
return session.get_content('audio')
|
||||
|
||||
def on_num_button_pressed(self, widget, num):
|
||||
self._get_audio_content()._start_dtmf(num)
|
||||
|
||||
def on_num_button_released(self, released):
|
||||
self._get_audio_content()._stop_dtmf()
|
||||
|
||||
def on_mic_hscale_value_changed(self, widget):
|
||||
value = widget.get_value()
|
||||
self._get_audio_content().set_mic_volume(value / 100)
|
||||
|
||||
def on_sound_hscale_value_changed(self, widget):
|
||||
pass
|
||||
|
||||
def on_avatar_eventbox_enter_notify_event(self, widget, event):
|
||||
"""
|
||||
Enter the eventbox area so we under conditions add a timeout to show a
|
||||
|
@ -1790,7 +1831,7 @@ class ChatControl(ChatControlBase):
|
|||
banner_name_label.set_tooltip_text(label_tooltip)
|
||||
|
||||
def on_jingle_button_toggled(self, widget, jingle_type):
|
||||
img_name = '%s_%s' % ({'audio': 'mic', 'video': 'cam'}[jingle_type],
|
||||
img_name = 'gajim-%s_%s' % ({'audio': 'mic', 'video': 'cam'}[jingle_type],
|
||||
{True: 'active', False: 'inactive'}[widget.get_active()])
|
||||
path_to_img = gtkgui_helpers.get_icon_path(img_name)
|
||||
|
||||
|
|
|
@ -578,8 +578,6 @@ class CommonConnection:
|
|||
self.dispatch('STANZA_SENT', unicode(data))
|
||||
|
||||
def change_status(self, show, msg, auto=False):
|
||||
if not show in ['offline', 'online', 'chat', 'away', 'xa', 'dnd']:
|
||||
return -1
|
||||
if not msg:
|
||||
msg = ''
|
||||
sign_msg = False
|
||||
|
@ -598,8 +596,9 @@ class CommonConnection:
|
|||
self.USE_GPG = True
|
||||
self.gpg = GnuPG.GnuPG(gajim.config.get('use_gpg_agent'))
|
||||
self.connect_and_init(show, msg, sign_msg)
|
||||
return
|
||||
|
||||
elif show == 'offline':
|
||||
if show == 'offline':
|
||||
self.connected = 0
|
||||
if self.connection:
|
||||
p = common.xmpp.Presence(typ = 'unavailable')
|
||||
|
@ -612,14 +611,17 @@ class CommonConnection:
|
|||
self.connection.start_disconnect()
|
||||
else:
|
||||
self._on_disconnected()
|
||||
return
|
||||
|
||||
elif show != 'offline' and self.connected > 0:
|
||||
if show != 'offline' and self.connected > 0:
|
||||
# dont'try to connect, when we are in state 'connecting'
|
||||
if self.connected == 1:
|
||||
return
|
||||
if show == 'invisible':
|
||||
self._change_to_invisible(msg)
|
||||
return
|
||||
if show not in ['offline', 'online', 'chat', 'away', 'xa', 'dnd']:
|
||||
return -1
|
||||
was_invisible = self.connected == gajim.SHOW_LIST.index('invisible')
|
||||
self.connected = gajim.SHOW_LIST.index(show)
|
||||
if was_invisible:
|
||||
|
|
|
@ -2714,6 +2714,8 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream,
|
|||
if show == 'invisible':
|
||||
self.send_invisible_presence(msg, signed, True)
|
||||
return
|
||||
if show not in ['offline', 'online', 'chat', 'away', 'xa', 'dnd']:
|
||||
return
|
||||
priority = gajim.get_priority(self.name, sshow)
|
||||
our_jid = helpers.parse_jid(gajim.get_jid_from_account(self.name))
|
||||
vcard = self.get_cached_vcard(our_jid)
|
||||
|
|
|
@ -23,7 +23,7 @@ def get_jingle_content(node):
|
|||
return contents[namespace](node)
|
||||
|
||||
|
||||
class FailedApplication(Exception):
|
||||
class JingleContentSetupException(Exception):
|
||||
"""
|
||||
Exception that should be raised when a content fails to setup.
|
||||
"""
|
||||
|
|
|
@ -24,7 +24,7 @@ from glib import GError
|
|||
import gajim
|
||||
|
||||
from jingle_transport import JingleTransportICEUDP
|
||||
from jingle_content import contents, JingleContent, FailedApplication
|
||||
from jingle_content import contents, JingleContent, JingleContentSetupException
|
||||
|
||||
|
||||
class JingleRTPContent(JingleContent):
|
||||
|
@ -89,16 +89,17 @@ class JingleRTPContent(JingleContent):
|
|||
and self.p2psession.get_property('codecs-ready'))
|
||||
|
||||
def make_bin_from_config(self, config_key, pipeline, text):
|
||||
pipeline = pipeline % gajim.config.get(config_key)
|
||||
try:
|
||||
bin = gst.parse_bin_from_description(pipeline
|
||||
% gajim.config.get(config_key), True)
|
||||
bin = gst.parse_bin_from_description(pipeline, True)
|
||||
return bin
|
||||
except GError, error_str:
|
||||
self.session.connection.dispatch('ERROR',
|
||||
(_("%s configuration error") % text.capitalize(),
|
||||
_("Couldn't setup %s. Check your configuration.\n\nError was:\n%s")
|
||||
% (text, error_str)))
|
||||
raise FailedApplication
|
||||
_("Couldn't setup %s. Check your configuration.\n\n"
|
||||
"Pipeline was:\n%s\n\n"
|
||||
"Error was:\n%s") % (text, pipeline, error_str)))
|
||||
raise JingleContentSetupException
|
||||
|
||||
def add_remote_candidates(self, candidates):
|
||||
JingleContent.add_remote_candidates(self, candidates)
|
||||
|
@ -257,6 +258,12 @@ class JingleAudio(JingleRTPContent):
|
|||
JingleRTPContent.__init__(self, session, 'audio', transport)
|
||||
self.setup_stream()
|
||||
|
||||
def set_mic_volume(self, vol):
|
||||
"""
|
||||
vol must be between 0 ans 1
|
||||
"""
|
||||
self.mic_volume.set_property('volume', vol)
|
||||
|
||||
def setup_stream(self):
|
||||
JingleRTPContent.setup_stream(self)
|
||||
|
||||
|
@ -281,7 +288,7 @@ class JingleAudio(JingleRTPContent):
|
|||
'audioconvert ! %s', _("audio output"))
|
||||
|
||||
self.mic_volume = src_bin.get_by_name('gajim_vol')
|
||||
self.mic_volume.set_property('volume', 1)
|
||||
self.set_mic_volume(0)
|
||||
|
||||
# link gst elements
|
||||
self.pipeline.add(self.sink, src_bin)
|
||||
|
@ -315,7 +322,7 @@ class JingleVideo(JingleRTPContent):
|
|||
#src_bin.link(caps)
|
||||
|
||||
self.sink = self.make_bin_from_config('video_output_device',
|
||||
'%s ! videoscale ! ffmpegcolorspace', _("video output"))
|
||||
'videoscale ! ffmpegcolorspace ! %s', _("video output"))
|
||||
self.pipeline.add(self.sink)
|
||||
|
||||
src_bin.get_pad('src').link(self.p2psession.get_property('sink-pad'))
|
||||
|
|
|
@ -29,7 +29,7 @@ Handles Jingle sessions (XEP 0166)
|
|||
import gajim #Get rid of that?
|
||||
import xmpp
|
||||
from jingle_transport import get_jingle_transport
|
||||
from jingle_content import get_jingle_content, FailedApplication
|
||||
from jingle_content import get_jingle_content, JingleContentSetupException
|
||||
|
||||
# FIXME: Move it to JingleSession.States?
|
||||
class JingleStates(object):
|
||||
|
@ -492,7 +492,7 @@ class JingleSession(object):
|
|||
else:
|
||||
reasons.add('unsupported-transports')
|
||||
contents_rejected.append((element['name'], 'peer'))
|
||||
except FailedApplication:
|
||||
except JingleContentSetupException:
|
||||
reasons.add('failed-application')
|
||||
else:
|
||||
contents_rejected.append((element['name'], 'peer'))
|
||||
|
|
12
src/gajim.py
12
src/gajim.py
|
@ -176,12 +176,12 @@ else:
|
|||
elif sysname in ('FreeBSD', 'OpenBSD', 'NetBSD'):
|
||||
libc.setproctitle('gajim')
|
||||
|
||||
if gtk.pygtk_version < (2, 12, 0):
|
||||
pritext = _('Gajim needs PyGTK 2.12 or above')
|
||||
sectext = _('Gajim needs PyGTK 2.12 or above to run. Quiting...')
|
||||
elif gtk.gtk_version < (2, 12, 0):
|
||||
pritext = _('Gajim needs GTK 2.12 or above')
|
||||
sectext = _('Gajim needs GTK 2.12 or above to run. Quiting...')
|
||||
if gtk.pygtk_version < (2, 16, 0):
|
||||
pritext = _('Gajim needs PyGTK 2.16 or above')
|
||||
sectext = _('Gajim needs PyGTK 2.16 or above to run. Quiting...')
|
||||
elif gtk.gtk_version < (2, 16, 0):
|
||||
pritext = _('Gajim needs GTK 2.16 or above')
|
||||
sectext = _('Gajim needs GTK 2.16 or above to run. Quiting...')
|
||||
|
||||
try:
|
||||
import gtk.glade # check if user has libglade (in pygtk and in gtk)
|
||||
|
|
|
@ -36,31 +36,11 @@ import pango
|
|||
import os
|
||||
import sys
|
||||
|
||||
import vcard
|
||||
import dialogs
|
||||
|
||||
import logging
|
||||
log = logging.getLogger('gajim.gtkgui_helpers')
|
||||
|
||||
|
||||
HAS_PYWIN32 = True
|
||||
if os.name == 'nt':
|
||||
try:
|
||||
import win32file
|
||||
import win32con
|
||||
import pywintypes
|
||||
except ImportError:
|
||||
HAS_PYWIN32 = False
|
||||
|
||||
from common import i18n
|
||||
from common import gajim
|
||||
from common import helpers
|
||||
|
||||
gtk.glade.bindtextdomain(i18n.APP, i18n.DIR)
|
||||
gtk.glade.textdomain(i18n.APP)
|
||||
|
||||
screen_w = gtk.gdk.screen_width()
|
||||
screen_h = gtk.gdk.screen_height()
|
||||
|
||||
gtk_icon_theme = gtk.icon_theme_get_default()
|
||||
gtk_icon_theme.append_search_path(gajim.ICONS_DIR)
|
||||
|
@ -82,6 +62,27 @@ def get_icon_path(icon_name, size=16):
|
|||
except gobject.GError, e:
|
||||
log.error("Unable to find icon %s: %s" % (icon_name, str(e)))
|
||||
|
||||
import vcard
|
||||
import dialogs
|
||||
|
||||
|
||||
HAS_PYWIN32 = True
|
||||
if os.name == 'nt':
|
||||
try:
|
||||
import win32file
|
||||
import win32con
|
||||
import pywintypes
|
||||
except ImportError:
|
||||
HAS_PYWIN32 = False
|
||||
|
||||
from common import helpers
|
||||
|
||||
gtk.glade.bindtextdomain(i18n.APP, i18n.DIR)
|
||||
gtk.glade.textdomain(i18n.APP)
|
||||
|
||||
screen_w = gtk.gdk.screen_width()
|
||||
screen_h = gtk.gdk.screen_height()
|
||||
|
||||
def add_image_to_menuitem(menuitem, icon_name):
|
||||
img = gtk.Image()
|
||||
path_img = get_icon_path(icon_name)
|
||||
|
|
Loading…
Reference in New Issue