Change new message dialog to new conversation and make possible to do voip call.
authorXavier Claessens <xclaesse@src.gnome.org>
Fri, 8 Feb 2008 21:09:59 +0000 (21:09 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 8 Feb 2008 21:09:59 +0000 (21:09 +0000)
svn path=/trunk/; revision=608

libempathy-gtk/empathy-chat-window.c
libempathy-gtk/empathy-contact-list-view.c
libempathy-gtk/empathy-main-window.glade
libempathy-gtk/empathy-new-message-dialog.c
libempathy-gtk/empathy-new-message-dialog.glade
libempathy-gtk/empathy-status-icon.glade
libempathy/empathy-utils.c
libempathy/empathy-utils.h
python/pyempathy/pyempathy.defs

index 444616039c5292600f5f97ee8a375704958049fe..a30265edc1ee624248320cba3d175682e0eedca4 100644 (file)
@@ -873,7 +873,7 @@ chat_window_call_activate_cb (GtkWidget         *menuitem,
                chat = EMPATHY_PRIVATE_CHAT (priv->current_chat);
                contact = empathy_private_chat_get_contact (chat);
 
-               empathy_call_contact (contact);
+               empathy_call_with_contact (contact);
        }
 }
 
index 78ac3980cd1f0248430e34a9c7f45907c239f096..1aea4dce4dacbc4e47417c87dbe558d738c356b1 100644 (file)
@@ -1497,6 +1497,6 @@ static void
 contact_list_view_voip_activated (EmpathyContactListView *view,
                                  EmpathyContact         *contact)
 {
-       empathy_call_contact (contact);
+       empathy_call_with_contact (contact);
 }
 
index c997f38cd829820ab5b0d57760b7c4f1ad16fbc1..02f69a38dee3fc3a66474c4fb37f7294902907d3 100644 (file)
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
 <glade-interface>
-
-<widget class="GtkWindow" id="main_window">
-  <property name="title" translatable="yes">Contact List</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="default_width">225</property>
-  <property name="default_height">325</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-
-  <child>
-    <widget class="GtkVBox" id="main_vbox">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child>
-       <widget class="GtkMenuBar" id="menubar2">
-         <property name="visible">True</property>
-         <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
-         <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
-
-         <child>
-           <widget class="GtkMenuItem" id="chat">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Chat</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="chat_menu">
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="chat_new_message">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_New Message...</property>
-                     <property name="use_underline">True</property>
-                     <accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image885">
-                         <property name="visible">True</property>
-                         <property name="icon_size">1</property>
-                         <property name="icon_name">im-message-new</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="chat_history">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_View Previous Conversations</property>
-                     <property name="use_underline">True</property>
-                     <accelerator key="F3" modifiers="0" signal="activate"/>
-
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image886">
-                         <property name="visible">True</property>
-                         <property name="icon_name">document-open-recent</property>
-                         <property name="icon_size">1</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separator5">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="chat_add_contact">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_Add Contact...</property>
-                     <property name="use_underline">True</property>
-
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image887">
-                         <property name="visible">True</property>
-                         <property name="stock">gtk-add</property>
-                         <property name="icon_size">1</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separator3">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkCheckMenuItem" id="chat_show_offline">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Show _Offline Contacts</property>
-                     <property name="use_underline">True</property>
-                     <property name="active">False</property>
-                     <accelerator key="H" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separator6">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="chat_quit">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_Quit</property>
-                     <property name="use_underline">True</property>
-                     <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image888">
-                         <property name="visible">True</property>
-                         <property name="stock">gtk-quit</property>
-                         <property name="icon_size">1</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="edit">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Edit</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="edit_menu">
-
-                 <child>
-                   <widget class="GtkMenuItem" id="edit_context">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Context</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="edit_context_separator">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="edit_accounts">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_Accounts</property>
-                     <property name="use_underline">True</property>
-                     <accelerator key="F4" modifiers="0" signal="activate"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="edit_personal_information">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_Personal Information</property>
-                     <property name="use_underline">True</property>
-                     
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image894">
-                         <property name="visible">True</property>
-                         <property name="icon_name">user-info</property>
-                         <property name="icon_size">1</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="separator2">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="edit_preferences">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_Preferences</property>
-                     <property name="use_underline">True</property>
-
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image891">
-                         <property name="visible">True</property>
-                         <property name="stock">gtk-preferences</property>
-                         <property name="icon_size">1</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="room">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Room</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="room_menu">
-
-                 <child>
-                   <widget class="GtkMenuItem" id="room_join_new">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Join _New...</property>
-                     <property name="use_underline">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkMenuItem" id="room_join_favorites">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Join _Favorites</property>
-                     <property name="use_underline">True</property>
-                     <accelerator key="F5" modifiers="0" signal="activate"/>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="room_sep">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkSeparatorMenuItem" id="room_sep2">
-                     <property name="visible">True</property>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="room_manage_favorites">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">Manage Favorites</property>
-                     <property name="use_underline">True</property>
-
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image890">
-                         <property name="visible">True</property>
-                         <property name="icon_size">1</property>
-                         <property name="icon_name">system-users</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-
-         <child>
-           <widget class="GtkMenuItem" id="help">
-             <property name="visible">True</property>
-             <property name="label" translatable="yes">_Help</property>
-             <property name="use_underline">True</property>
-
-             <child>
-               <widget class="GtkMenu" id="help_menu">
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="help_contents">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_Contents</property>
-                     <property name="use_underline">True</property>
-                     <accelerator key="F1" modifiers="0" signal="activate"/>
-
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image892">
-                         <property name="visible">True</property>
-                         <property name="stock">gtk-help</property>
-                         <property name="icon_size">1</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-
-                 <child>
-                   <widget class="GtkImageMenuItem" id="help_about">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes">_About</property>
-                     <property name="use_underline">True</property>
-
-                     <child internal-child="image">
-                       <widget class="GtkImage" id="image893">
-                         <property name="visible">True</property>
-                         <property name="stock">gtk-about</property>
-                         <property name="icon_size">1</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                     </child>
-                   </widget>
-                 </child>
-               </widget>
-             </child>
-           </widget>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkToolbar" id="presence_toolbar">
-         <property name="visible">True</property>
-         <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
-         <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
-         <property name="tooltips">True</property>
-         <property name="show_arrow">True</property>
-
-         <child>
-           <placeholder/>
-         </child>
-
-         <child>
-           <placeholder/>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkVBox" id="errors_vbox">
-         <property name="homogeneous">False</property>
-         <property name="spacing">0</property>
-
-         <child>
-           <placeholder/>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">False</property>
-         <property name="fill">False</property>
-       </packing>
-      </child>
-
-      <child>
-       <widget class="GtkScrolledWindow" id="roster_scrolledwindow">
-         <property name="visible">True</property>
-         <property name="can_focus">True</property>
-         <property name="has_focus">True</property>
-         <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-         <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-         <property name="shadow_type">GTK_SHADOW_IN</property>
-         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-         <child>
-           <placeholder/>
-         </child>
-       </widget>
-       <packing>
-         <property name="padding">0</property>
-         <property name="expand">True</property>
-         <property name="fill">True</property>
-       </packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
+  <widget class="GtkWindow" id="main_window">
+    <property name="title" translatable="yes">Contact List</property>
+    <property name="default_width">225</property>
+    <property name="default_height">325</property>
+    <child>
+      <widget class="GtkVBox" id="main_vbox">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkMenuBar" id="menubar2">
+            <property name="visible">True</property>
+            <child>
+              <widget class="GtkMenuItem" id="chat">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Chat</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="chat_menu">
+                    <child>
+                      <widget class="GtkImageMenuItem" id="chat_new_message">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_New Conversation...</property>
+                        <property name="use_underline">True</property>
+                        <accelerator key="N" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image885">
+                            <property name="visible">True</property>
+                            <property name="icon_size">1</property>
+                            <property name="icon_name">im-message-new</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="chat_history">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_View Previous Conversations</property>
+                        <property name="use_underline">True</property>
+                        <accelerator key="F3" modifiers="" signal="activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image886">
+                            <property name="visible">True</property>
+                            <property name="icon_size">1</property>
+                            <property name="icon_name">document-open-recent</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separator5">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="chat_add_contact">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Add Contact...</property>
+                        <property name="use_underline">True</property>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image887">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-add</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separator3">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckMenuItem" id="chat_show_offline">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Show _Offline Contacts</property>
+                        <property name="use_underline">True</property>
+                        <accelerator key="H" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separator6">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="chat_quit">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Quit</property>
+                        <property name="use_underline">True</property>
+                        <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image888">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-quit</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="edit">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Edit</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="edit_menu">
+                    <child>
+                      <widget class="GtkMenuItem" id="edit_context">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Context</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="edit_context_separator">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkMenuItem" id="edit_accounts">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Accounts</property>
+                        <property name="use_underline">True</property>
+                        <accelerator key="F4" modifiers="" signal="activate"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="edit_personal_information">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Personal Information</property>
+                        <property name="use_underline">True</property>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image894">
+                            <property name="visible">True</property>
+                            <property name="icon_size">1</property>
+                            <property name="icon_name">user-info</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separator2">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="edit_preferences">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Preferences</property>
+                        <property name="use_underline">True</property>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image891">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-preferences</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="room">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Room</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="room_menu">
+                    <child>
+                      <widget class="GtkMenuItem" id="room_join_new">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Join _New...</property>
+                        <property name="use_underline">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkMenuItem" id="room_join_favorites">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Join _Favorites</property>
+                        <property name="use_underline">True</property>
+                        <accelerator key="F5" modifiers="" signal="activate"/>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="room_sep">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="room_sep2">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="room_manage_favorites">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Manage Favorites</property>
+                        <property name="use_underline">True</property>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image890">
+                            <property name="visible">True</property>
+                            <property name="icon_size">1</property>
+                            <property name="icon_name">system-users</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkMenuItem" id="help">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Help</property>
+                <property name="use_underline">True</property>
+                <child>
+                  <widget class="GtkMenu" id="help_menu">
+                    <child>
+                      <widget class="GtkImageMenuItem" id="help_contents">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_Contents</property>
+                        <property name="use_underline">True</property>
+                        <accelerator key="F1" modifiers="" signal="activate"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image892">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-help</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="help_about">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">_About</property>
+                        <property name="use_underline">True</property>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image893">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-about</property>
+                            <property name="icon_size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkToolbar" id="presence_toolbar">
+            <property name="visible">True</property>
+            <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkVBox" id="errors_vbox">
+            <child>
+              <placeholder/>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkScrolledWindow" id="roster_scrolledwindow">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="has_focus">True</property>
+            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+            <property name="shadow_type">GTK_SHADOW_IN</property>
+            <child>
+              <placeholder/>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">3</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>
index 80e3b611ccf4716228c12534d0058510b8b5c218..0213b06769a0eb80ab3d4b1f9f775533493660fa 100644 (file)
@@ -47,8 +47,8 @@ typedef struct {
        GtkWidget *table_contact;
        GtkWidget *account_chooser;
        GtkWidget *entry_id;
-       GtkWidget *button_validate;
-       GtkWidget *button_voip;
+       GtkWidget *button_chat;
+       GtkWidget *button_call;
 } EmpathyNewMessageDialog;
 
 static void
@@ -69,27 +69,11 @@ new_message_dialog_response_cb (GtkWidget               *widget,
                return;
        }
 
-       if (response == GTK_RESPONSE_OK) {
-               empathy_chat_with_contact_id (account, id);
+       if (response == 1) {
+               empathy_call_with_contact_id (account, id);
        }       
-       else if (response == 3) {
-               EmpathyContactFactory *factory;
-               EmpathyContact        *contact = NULL;
-
-               factory = empathy_contact_factory_new ();
-               contact = empathy_contact_factory_get_from_id (factory,
-                                                              account,
-                                                              id);
-               if (contact) {
-                       empathy_call_contact (contact);
-               } else {
-                       empathy_debug (DEBUG_DOMAIN,
-                                      "Contact ID %s does not exists",
-                                      id);
-               }
-
-               g_object_unref (contact);
-               g_object_unref (factory);
+       else if (response == 2) {
+               empathy_chat_with_contact_id (account, id);
        }
 
        g_object_unref (account);
@@ -106,8 +90,8 @@ new_message_change_state_button_cb  (GtkEditable             *editable,
        id = gtk_entry_get_text (GTK_ENTRY (editable));
        sensitive = !G_STR_EMPTY (id);
        
-       gtk_widget_set_sensitive(dialog->button_validate, sensitive);
-       gtk_widget_set_sensitive(dialog->button_voip, sensitive);
+       gtk_widget_set_sensitive (dialog->button_chat, sensitive);
+       gtk_widget_set_sensitive (dialog->button_call, sensitive);
 }
 
 static void
@@ -131,21 +115,21 @@ empathy_new_message_dialog_show (GtkWindow *parent)
        dialog = g_new0 (EmpathyNewMessageDialog, 1);
 
        glade = empathy_glade_get_file ("empathy-new-message-dialog.glade",
-                                      "new_message_dialog",
-                                      NULL,
-                                      "new_message_dialog", &dialog->dialog,
-                                      "table_contact", &dialog->table_contact,
-                                      "entry_id", &dialog->entry_id,
-                                       "button_validate", &dialog->button_validate,
-                                       "button_voip",&dialog->button_voip,
-                                      NULL);
+                                       "new_message_dialog",
+                                       NULL,
+                                       "new_message_dialog", &dialog->dialog,
+                                       "table_contact", &dialog->table_contact,
+                                       "entry_id", &dialog->entry_id,
+                                       "button_chat", &dialog->button_chat,
+                                       "button_call",&dialog->button_call,
+                                       NULL);
 
        empathy_glade_connect (glade,
-                             dialog,
-                             "new_message_dialog", "destroy", new_message_dialog_destroy_cb,
-                             "new_message_dialog", "response", new_message_dialog_response_cb,
-                             "entry_id", "changed", new_message_change_state_button_cb,
-                             NULL);
+                              dialog,
+                              "new_message_dialog", "destroy", new_message_dialog_destroy_cb,
+                              "new_message_dialog", "response", new_message_dialog_response_cb,
+                              "entry_id", "changed", new_message_change_state_button_cb,
+                              NULL);
 
        g_object_add_weak_pointer (G_OBJECT (dialog->dialog), (gpointer) &dialog);
 
@@ -166,8 +150,12 @@ empathy_new_message_dialog_show (GtkWindow *parent)
                                              GTK_WINDOW (parent));
        }
 
-       gtk_widget_set_sensitive(dialog->button_validate, FALSE);
-       gtk_widget_set_sensitive(dialog->button_voip, FALSE);
+       gtk_widget_set_sensitive (dialog->button_chat, FALSE);
+       gtk_widget_set_sensitive (dialog->button_call, FALSE);
+
+#ifndef HAVE_VOIP
+       gtk_widget_hide (dialog->button_call);
+#endif
 
        gtk_widget_show (dialog->dialog);
 
index 4fb18bd88a7978f7dc90d5c1ff9613a61a9f8063..25f4b22541d16d7b86d92901707a448c2bb81b54 100644 (file)
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.0 on Fri Nov 30 23:14:21 2007 -->
+<!--*- mode: xml -*-->
 <glade-interface>
   <widget class="GtkDialog" id="new_message_dialog">
     <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="title" translatable="yes">New message</property>
+    <property name="title" translatable="yes">New Conversation</property>
     <property name="resizable">False</property>
     <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
     <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
     <child internal-child="vbox">
       <widget class="GtkVBox" id="dialog-vbox1">
         <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="spacing">2</property>
         <child>
           <widget class="GtkTable" id="table_contact">
             <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="n_rows">2</property>
             <property name="n_columns">2</property>
             <property name="column_spacing">6</property>
             <property name="row_spacing">6</property>
+            <child>
+              <placeholder/>
+            </child>
             <child>
               <widget class="GtkEntry" id="entry_id">
                 <property name="visible">True</property>
             <child>
               <widget class="GtkLabel" id="label2">
                 <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="xalign">0</property>
                 <property name="label" translatable="yes">Contact ID:</property>
               </widget>
               <packing>
                 <property name="top_attach">1</property>
                 <property name="bottom_attach">2</property>
-                <property name="x_options">GTK_FILL</property>
+                <property name="x_options"></property>
               </packing>
             </child>
             <child>
               <widget class="GtkLabel" id="label1">
                 <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="xalign">0</property>
                 <property name="label" translatable="yes">Account:</property>
               </widget>
               <packing>
-                <property name="x_options">GTK_FILL</property>
+                <property name="x_options"></property>
               </packing>
             </child>
-            <child>
-              <placeholder/>
-            </child>
           </widget>
           <packing>
             <property name="position">1</property>
         <child internal-child="action_area">
           <widget class="GtkHButtonBox" id="dialog-action_area1">
             <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="layout_style">GTK_BUTTONBOX_END</property>
             <child>
               <widget class="GtkButton" id="button1">
                 <property name="visible">True</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="label">gtk-cancel</property>
                 <property name="use_stock">True</property>
                 <property name="response_id">-6</property>
               </widget>
             </child>
             <child>
-              <widget class="GtkButton" id="button2">
+              <widget class="GtkButton" id="button_call">
                 <property name="visible">True</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="label">gtk-ok</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">-5</property>
+                <property name="can_default">True</property>
+                <property name="response_id">1</property>
+                <child>
+                  <widget class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <widget class="GtkHBox" id="hbox1">
+                        <property name="visible">True</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <widget class="GtkImage" id="image1">
+                            <property name="visible">True</property>
+                            <property name="icon_name">gnome-stock-mic</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Call</property>
+                            <property name="use_underline">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
               </widget>
               <packing>
                 <property name="position">1</property>
               </packing>
             </child>
+            <child>
+              <widget class="GtkButton" id="button_chat">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="response_id">2</property>
+                <child>
+                  <widget class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="xscale">0</property>
+                    <property name="yscale">0</property>
+                    <child>
+                      <widget class="GtkHBox" id="hbox2">
+                        <property name="visible">True</property>
+                        <property name="spacing">2</property>
+                        <child>
+                          <widget class="GtkImage" id="image2">
+                            <property name="visible">True</property>
+                            <property name="icon_name">im-message-new</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="label4">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Chat</property>
+                            <property name="use_underline">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
           </widget>
           <packing>
             <property name="expand">False</property>
index eb7d02a358a2f474085accd7b5fe2d67132f6d7f..ab0f09f8436de628fe5cb77970b79217a567dda6 100644 (file)
@@ -1,78 +1,59 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
 <glade-interface>
-
-<widget class="GtkMenu" id="tray_menu">
-
-  <child>
-    <widget class="GtkCheckMenuItem" id="tray_show_list">
-      <property name="visible">True</property>
-      <property name="label" translatable="yes">_Show Contact List</property>
-      <property name="use_underline">True</property>
-      <property name="active">False</property>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkSeparatorMenuItem" id="avskiljare5">
-      <property name="visible">True</property>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkImageMenuItem" id="tray_new_message">
-      <property name="visible">True</property>
-      <property name="label" translatable="yes">_New Message...</property>
-      <property name="use_underline">True</property>
-
-      <child internal-child="image">
-       <widget class="GtkImage" id="image599">
-         <property name="visible">True</property>
-         <property name="icon_size">1</property>
-         <property name="icon_name">im-message-new</property>
-         <property name="xalign">0.5</property>
-         <property name="yalign">0.5</property>
-         <property name="xpad">0</property>
-         <property name="ypad">0</property>
-       </widget>
-      </child>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkMenuItem" id="tray_status">
-      <property name="visible">True</property>
-      <property name="label" translatable="yes">Status</property>
-      <property name="use_underline">True</property>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkSeparatorMenuItem" id="avskiljare6">
-      <property name="visible">True</property>
-    </widget>
-  </child>
-
-  <child>
-    <widget class="GtkImageMenuItem" id="tray_quit">
-      <property name="visible">True</property>
-      <property name="label" translatable="yes">_Quit</property>
-      <property name="use_underline">True</property>
-
-      <child internal-child="image">
-       <widget class="GtkImage" id="image600">
-         <property name="visible">True</property>
-         <property name="stock">gtk-quit</property>
-         <property name="icon_size">1</property>
-         <property name="xalign">0.5</property>
-         <property name="yalign">0.5</property>
-         <property name="xpad">0</property>
-         <property name="ypad">0</property>
-       </widget>
-      </child>
-    </widget>
-  </child>
-</widget>
-
+  <widget class="GtkMenu" id="tray_menu">
+    <child>
+      <widget class="GtkCheckMenuItem" id="tray_show_list">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes">_Show Contact List</property>
+        <property name="use_underline">True</property>
+      </widget>
+    </child>
+    <child>
+      <widget class="GtkSeparatorMenuItem" id="avskiljare5">
+        <property name="visible">True</property>
+      </widget>
+    </child>
+    <child>
+      <widget class="GtkImageMenuItem" id="tray_new_message">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes">_New Conversation...</property>
+        <property name="use_underline">True</property>
+        <child internal-child="image">
+          <widget class="GtkImage" id="image599">
+            <property name="visible">True</property>
+            <property name="icon_size">1</property>
+            <property name="icon_name">im-message-new</property>
+          </widget>
+        </child>
+      </widget>
+    </child>
+    <child>
+      <widget class="GtkMenuItem" id="tray_status">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes">Status</property>
+        <property name="use_underline">True</property>
+      </widget>
+    </child>
+    <child>
+      <widget class="GtkSeparatorMenuItem" id="avskiljare6">
+        <property name="visible">True</property>
+      </widget>
+    </child>
+    <child>
+      <widget class="GtkImageMenuItem" id="tray_quit">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes">_Quit</property>
+        <property name="use_underline">True</property>
+        <child internal-child="image">
+          <widget class="GtkImage" id="image600">
+            <property name="visible">True</property>
+            <property name="stock">gtk-quit</property>
+            <property name="icon_size">1</property>
+          </widget>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>
index c810f9cca509d237cc5dfd0cceaaaabbe9d1444e..796d23ddf1675b2b30b64d05d145be97b8d22a6c 100644 (file)
@@ -397,61 +397,36 @@ empathy_inspect_handle (McAccount *account,
 }
 
 void
-empathy_call_contact (EmpathyContact *contact)
+empathy_call_with_contact (EmpathyContact  *contact)
 {
 #ifdef HAVE_VOIP
        MissionControl *mc;
-       McAccount      *account;
-       TpConn         *tp_conn;
-       gchar          *object_path;
-       const gchar    *bus_name;
-       TpChan         *new_chan;
-       EmpathyTpGroup *group;
-       GError         *error = NULL;
-
-       g_return_if_fail (EMPATHY_IS_CONTACT (contact));
-
-       /* StreamedMedia channels must have handle=0 and handle_type=none.
-        * To call a contact we have to add him in the group interface of the
-        * channel. MissionControl will detect the channel creation and 
-        * dispatch it to the VoIP chandler automatically. */
 
        mc = empathy_mission_control_new ();
-       account = empathy_contact_get_account (contact);
-       tp_conn = mission_control_get_connection (mc, account, NULL);
-       /* FIXME: Should be async */
-       if (!tp_conn_request_channel (DBUS_G_PROXY (tp_conn),
-                                     TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA,
-                                     TP_HANDLE_TYPE_NONE,
-                                     0,
-                                     FALSE,
-                                     &object_path,
-                                     &error)) {
-               empathy_debug (DEBUG_DOMAIN, 
-                             "Couldn't request channel: %s",
-                             error ? error->message : "No error given");
-               g_clear_error (&error);
-               g_object_unref (mc);
-               g_object_unref (tp_conn);
-               return;
-       }
-
-       bus_name = dbus_g_proxy_get_bus_name (DBUS_G_PROXY (tp_conn));
-       new_chan = tp_chan_new (tp_get_bus (),
-                               bus_name,
-                               object_path,
-                               TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA,
-                               TP_HANDLE_TYPE_NONE,
-                               0);
+       mission_control_request_channel (mc,
+                                        empathy_contact_get_account (contact),
+                                        TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA,
+                                        empathy_contact_get_handle (contact),
+                                        TP_HANDLE_TYPE_CONTACT,
+                                        NULL, NULL);
+       g_object_unref (mc);
+#endif
+}
 
-       group = empathy_tp_group_new (account, new_chan);
-       empathy_tp_group_add_member (group, contact, "");
+void
+empathy_call_with_contact_id (McAccount *account, const gchar *contact_id)
+{
+#ifdef HAVE_VOIP
+       MissionControl *mc;
 
-       g_object_unref (group);
+       mc = empathy_mission_control_new ();
+       mission_control_request_channel_with_string_handle (mc,
+                                                           account,
+                                                           TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA,
+                                                           contact_id,
+                                                           TP_HANDLE_TYPE_CONTACT,
+                                                           NULL, NULL);
        g_object_unref (mc);
-       g_object_unref (tp_conn);
-       g_object_unref (new_chan);
-       g_free (object_path);
 #endif
 }
 
@@ -485,7 +460,6 @@ empathy_chat_with_contact_id (McAccount *account, const gchar *contact_id)
        g_object_unref (mc);
 }
 
-
 const gchar *
 empathy_presence_get_default_message (McPresence presence)
 {
index 875128c1e05ab123a1f8b74a90342efaf7a0ccb2..cafc3db10f6be54256cd7933ee35d16b8c2ca87d 100644 (file)
@@ -88,7 +88,9 @@ gchar *      empathy_inspect_handle                 (McAccount       *account,
                                                     guint            handle_type);
 gchar *      empathy_inspect_channel                (McAccount       *account,
                                                     TpChan          *tp_chan);
-void         empathy_call_contact                   (EmpathyContact  *contact);
+void         empathy_call_with_contact              (EmpathyContact  *contact);
+void         empathy_call_with_contact_id           (McAccount       *account,
+                                                    const gchar     *contact_id);
 void         empathy_chat_with_contact              (EmpathyContact  *contact);
 void         empathy_chat_with_contact_id           (McAccount       *account,
                                                     const gchar     *contact_id);
index 7f7381fa7a3c4bc69529793c0fb2bcde537bfaa2..0c22ab6cc2f5b3903bd0f43ec3dbb92edb4a0a11 100644 (file)
   )
 )
 
-(define-function empathy_call_contact
-  (c-name "empathy_call_contact")
+(define-function empathy_call_with_contact
+  (c-name "empathy_call_with_contact")
   (return-type "none")
   (parameters
     '("EmpathyContact*" "contact")