This time the diff-file is made with mercurial.

I also added the option to disable this function and removed the unused "_actionTransfer" object.

Greetings
Kristina

Tarrisse Laurent schrieb:
Hello Kristna,

Do you realy need "QAction * _actionTransfer" object, because you don't use it !

PS: use mercurial to submit patch (hg export CHANGESET or hg diff >> DIFF_FLENAME)

Laurent

Kristina Kiehl a écrit :
Hi.

Karl Hoffmann did write about this already but something got wrong with posting the diff-file.

We want to manually forward a call. It's working but is still in early state (f.e. the caller doesn't see that his call was transfered to another number).

Here is the patch. Feedback is welcome.
------------------------------------------------------------------------

_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev

_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev




diff -r 9913c12e3bdf DefineWengoOptions.cmake
--- a/DefineWengoOptions.cmake  Mon Mar 30 15:05:45 2009 +0200
+++ b/DefineWengoOptions.cmake  Mon Mar 30 16:31:44 2009 +0200
@@ -55,6 +55,8 @@
 
 option(SET_PRIORITY_ABOVE_NORMAL "Set the WengoPhone Priority to 
ABOVE_NORMAL_PRIORITY_CLASS" ON)
 
+option(DISABLE_MANUAL_CALL_FORWARD "Disable the option to manually forward a 
call" OFF)
+
 if (WIN32)
        option(ENABLE_CONSOLE "Force generate of executable with Console Window 
enabled" OFF)
        option(FFMPEG_OLD_VERSION "Use the old version of ffmpeg" OFF)
diff -r 9913c12e3bdf wengophone/src/presentation/qt/CMakeLists.txt
--- a/wengophone/src/presentation/qt/CMakeLists.txt     Mon Mar 30 15:05:45 
2009 +0200
+++ b/wengophone/src/presentation/qt/CMakeLists.txt     Mon Mar 30 16:31:44 
2009 +0200
@@ -498,6 +498,13 @@
                message(STATUS "Call forward deactivated")
 endif (DISABLE_CALL_FORWARD)
 
+if (DISABLE_MANUAL_CALL_FORWARD)
+               ow_add_private_definitions(
+                       -DDISABLE_MANUAL_CALL_FORWARD
+               )
+               message(STATUS "Manual call forwarding deactivated")
+endif (DISABLE_MANUAL_CALL_FORWARD)
+
 if (DISABLE_SMS)
                ow_add_private_definitions(
                        -DDISABLE_SMS
diff -r 9913c12e3bdf wengophone/src/presentation/qt/phonecall/PhoneCallWidget.ui
--- a/wengophone/src/presentation/qt/phonecall/PhoneCallWidget.ui       Mon Mar 
30 15:05:45 2009 +0200
+++ b/wengophone/src/presentation/qt/phonecall/PhoneCallWidget.ui       Mon Mar 
30 16:31:44 2009 +0200
@@ -197,16 +197,7 @@
       <property name="spacing" >
        <number>6</number>
       </property>
-      <property name="leftMargin" >
-       <number>0</number>
-      </property>
-      <property name="topMargin" >
-       <number>0</number>
-      </property>
-      <property name="rightMargin" >
-       <number>0</number>
-      </property>
-      <property name="bottomMargin" >
+      <property name="margin" >
        <number>0</number>
       </property>
       <item>
@@ -283,16 +274,7 @@
      <property name="spacing" >
       <number>6</number>
      </property>
-     <property name="leftMargin" >
-      <number>0</number>
-     </property>
-     <property name="topMargin" >
-      <number>0</number>
-     </property>
-     <property name="rightMargin" >
-      <number>0</number>
-     </property>
-     <property name="bottomMargin" >
+     <property name="margin" >
       <number>0</number>
      </property>
      <item>
@@ -316,7 +298,7 @@
        <property name="orientation" >
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeHint" >
+       <property name="sizeHint" stdset="0" >
         <size>
          <width>0</width>
          <height>20</height>
@@ -338,16 +320,7 @@
      <property name="spacing" >
       <number>0</number>
      </property>
-     <property name="leftMargin" >
-      <number>0</number>
-     </property>
-     <property name="topMargin" >
-      <number>0</number>
-     </property>
-     <property name="rightMargin" >
-      <number>0</number>
-     </property>
-     <property name="bottomMargin" >
+     <property name="margin" >
       <number>0</number>
      </property>
      <item>
@@ -377,7 +350,7 @@
        <property name="orientation" >
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeHint" >
+       <property name="sizeHint" stdset="0" >
         <size>
          <width>0</width>
          <height>20</height>
@@ -409,16 +382,7 @@
        <property name="spacing" >
         <number>0</number>
        </property>
-       <property name="leftMargin" >
-        <number>0</number>
-       </property>
-       <property name="topMargin" >
-        <number>0</number>
-       </property>
-       <property name="rightMargin" >
-        <number>0</number>
-       </property>
-       <property name="bottomMargin" >
+       <property name="margin" >
         <number>0</number>
        </property>
        <item>
@@ -429,7 +393,7 @@
          <property name="sizeType" >
           <enum>QSizePolicy::Expanding</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>20</width>
            <height>40</height>
@@ -455,7 +419,7 @@
          <property name="sizeType" >
           <enum>QSizePolicy::Expanding</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>20</width>
            <height>40</height>
@@ -470,16 +434,7 @@
        <property name="spacing" >
         <number>0</number>
        </property>
-       <property name="leftMargin" >
-        <number>0</number>
-       </property>
-       <property name="topMargin" >
-        <number>0</number>
-       </property>
-       <property name="rightMargin" >
-        <number>0</number>
-       </property>
-       <property name="bottomMargin" >
+       <property name="margin" >
         <number>0</number>
        </property>
        <item>
@@ -487,7 +442,7 @@
          <property name="orientation" >
           <enum>Qt::Vertical</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>20</width>
            <height>40</height>
@@ -500,16 +455,7 @@
          <property name="spacing" >
           <number>6</number>
          </property>
-         <property name="leftMargin" >
-          <number>0</number>
-         </property>
-         <property name="topMargin" >
-          <number>0</number>
-         </property>
-         <property name="rightMargin" >
-          <number>0</number>
-         </property>
-         <property name="bottomMargin" >
+         <property name="margin" >
           <number>0</number>
          </property>
          <item>
@@ -517,7 +463,7 @@
            <property name="orientation" >
             <enum>Qt::Horizontal</enum>
            </property>
-           <property name="sizeHint" >
+           <property name="sizeHint" stdset="0" >
             <size>
              <width>40</width>
              <height>20</height>
@@ -549,7 +495,7 @@
            <property name="orientation" >
             <enum>Qt::Horizontal</enum>
            </property>
-           <property name="sizeHint" >
+           <property name="sizeHint" stdset="0" >
             <size>
              <width>40</width>
              <height>20</height>
@@ -567,7 +513,7 @@
          <property name="sizeType" >
           <enum>QSizePolicy::Expanding</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>20</width>
            <height>40</height>
@@ -601,16 +547,7 @@
        <property name="spacing" >
         <number>6</number>
        </property>
-       <property name="leftMargin" >
-        <number>0</number>
-       </property>
-       <property name="topMargin" >
-        <number>0</number>
-       </property>
-       <property name="rightMargin" >
-        <number>0</number>
-       </property>
-       <property name="bottomMargin" >
+       <property name="margin" >
         <number>0</number>
        </property>
        <item>
@@ -618,7 +555,7 @@
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>40</width>
            <height>20</height>
@@ -632,7 +569,8 @@
           <string>&amp;Accept</string>
          </property>
          <property name="icon" >
-          <iconset resource="../../../../resources/wengophone.qrc" 
>:/pics/actions/accept-phone.png</iconset>
+          <iconset resource="../../../../resources/wengophone.qrc" >
+           
<normaloff>:/pics/actions/accept-phone.png</normaloff>:/pics/actions/accept-phone.png</iconset>
          </property>
          <property name="default" >
           <bool>true</bool>
@@ -645,7 +583,8 @@
           <string>&amp;Reject</string>
          </property>
          <property name="icon" >
-          <iconset resource="../../../../resources/wengophone.qrc" 
>:/pics/actions/hangup-phone.png</iconset>
+          <iconset resource="../../../../resources/wengophone.qrc" >
+           
<normaloff>:/pics/actions/hangup-phone.png</normaloff>:/pics/actions/hangup-phone.png</iconset>
          </property>
         </widget>
        </item>
@@ -654,7 +593,7 @@
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>40</width>
            <height>20</height>
@@ -675,16 +614,7 @@
        <property name="spacing" >
         <number>6</number>
        </property>
-       <property name="leftMargin" >
-        <number>0</number>
-       </property>
-       <property name="topMargin" >
-        <number>0</number>
-       </property>
-       <property name="rightMargin" >
-        <number>0</number>
-       </property>
-       <property name="bottomMargin" >
+       <property name="margin" >
         <number>0</number>
        </property>
        <item>
@@ -692,7 +622,7 @@
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>0</width>
            <height>20</height>
@@ -706,7 +636,8 @@
           <string/>
          </property>
          <property name="icon" >
-          <iconset resource="../../../../resources/wengophone.qrc" 
>:/pics/actions/hangup-phone.png</iconset>
+          <iconset resource="../../../../resources/wengophone.qrc" >
+           
<normaloff>:/pics/actions/hangup-phone.png</normaloff>:/pics/actions/hangup-phone.png</iconset>
          </property>
         </widget>
        </item>
@@ -716,7 +647,19 @@
           <string/>
          </property>
          <property name="icon" >
-          <iconset resource="../../../../resources/wengophone.qrc" 
>:/pics/actions/hold-phone.png</iconset>
+          <iconset resource="../../../../resources/wengophone.qrc" >
+           
<normaloff>:/pics/actions/hold-phone.png</normaloff>:/pics/actions/hold-phone.png</iconset>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="forwardButton" >
+         <property name="text" >
+          <string/>
+         </property>
+         <property name="icon" >
+          <iconset resource="../../../../resources/wengophone.qrc" >
+           
<normaloff>:/pics/config/call-forward.png</normaloff>:/pics/config/call-forward.png</iconset>
          </property>
         </widget>
        </item>
@@ -726,7 +669,8 @@
           <string/>
          </property>
          <property name="icon" >
-          <iconset resource="../../../../resources/wengophone.qrc" 
>:/pics/actions/add-contact.png</iconset>
+          <iconset resource="../../../../resources/wengophone.qrc" >
+           
<normaloff>:/pics/actions/add-contact.png</normaloff>:/pics/actions/add-contact.png</iconset>
          </property>
         </widget>
        </item>
@@ -736,7 +680,8 @@
           <string/>
          </property>
          <property name="icon" >
-          <iconset resource="../../../../resources/wengophone.qrc" 
>:/pics/iconbar/conference.png</iconset>
+          <iconset resource="../../../../resources/wengophone.qrc" >
+           
<normaloff>:/pics/iconbar/conference.png</normaloff>:/pics/iconbar/conference.png</iconset>
          </property>
         </widget>
        </item>
@@ -749,7 +694,8 @@
           <string/>
          </property>
          <property name="icon" >
-          <iconset resource="../../../../resources/wengophone.qrc" 
>:/pics/dialpad/dialpad.png</iconset>
+          <iconset resource="../../../../resources/wengophone.qrc" >
+           
<normaloff>:/pics/dialpad/dialpad.png</normaloff>:/pics/dialpad/dialpad.png</iconset>
          </property>
          <property name="checkable" >
           <bool>true</bool>
@@ -765,7 +711,8 @@
           <string/>
          </property>
          <property name="icon" >
-          <iconset resource="../../../../resources/wengophone.qrc" 
>:/pics/dialpad/audiosmileys.png</iconset>
+          <iconset resource="../../../../resources/wengophone.qrc" >
+           
<normaloff>:/pics/dialpad/audiosmileys.png</normaloff>:/pics/dialpad/audiosmileys.png</iconset>
          </property>
          <property name="checkable" >
           <bool>true</bool>
@@ -777,7 +724,7 @@
          <property name="orientation" >
           <enum>Qt::Horizontal</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>0</width>
            <height>20</height>
@@ -799,8 +746,20 @@
    <container>1</container>
   </customwidget>
  </customwidgets>
+ <tabstops>
+  <tabstop>rejectButton</tabstop>
+  <tabstop>acceptButton</tabstop>
+  <tabstop>hangupButton</tabstop>
+  <tabstop>holdButton</tabstop>
+  <tabstop>forwardButton</tabstop>
+  <tabstop>addContactButton</tabstop>
+  <tabstop>createConf</tabstop>
+  <tabstop>dialpadButton</tabstop>
+  <tabstop>smileysButton</tabstop>
+ </tabstops>
  <resources>
   <include location="../../../../resources/wengophone.qrc" />
+  <include location="../../../../resources/wengophone.qrc" />
  </resources>
  <connections/>
 </ui>
diff -r 9913c12e3bdf wengophone/src/presentation/qt/phonecall/QtPhoneCall.cpp
--- a/wengophone/src/presentation/qt/phonecall/QtPhoneCall.cpp  Mon Mar 30 
15:05:45 2009 +0200
+++ b/wengophone/src/presentation/qt/phonecall/QtPhoneCall.cpp  Mon Mar 30 
16:31:44 2009 +0200
@@ -34,6 +34,7 @@
 
 #include <presentation/qt/QtWengoPhone.h>
 #include <presentation/qt/QtToolBar.h>
+#include <presentation/qt/callbar/QtCallbar.h>
 #include <presentation/qt/statusbar/QtStatusBar.h>
 #include <presentation/qt/contactlist/QtContactList.h>
 #include <presentation/qt/profile/QtProfileDetails.h>
@@ -69,6 +70,7 @@
 #include <QtCore/QTimer>
 
 #include <QtGui/QMenu>
+#include <QtGui/QMessageBox>
 #include <QtGui/QPainter>
 
 // If a PSTN number is shorter than this length, we assume it's a special sip
@@ -231,6 +233,11 @@
        _actionHold = new QAction(_phoneCallWidget);
        SAFE_CONNECT(_actionHold, SIGNAL(triggered()), SLOT(holdOrResume()));
 
+#ifndef DISABLE_MANUAL_CALL_FORWARD
+       //Call forward
+       SAFE_CONNECT(_ui->forwardButton, SIGNAL(clicked()), 
SLOT(callTransfer()) );
+#endif
+
        //Add contact
        _actionAddContact = new 
QAction(QIcon(":/pics/actions/add-contact.png"), tr("Add contact"), 
_phoneCallWidget);
        SAFE_CONNECT(_actionAddContact, SIGNAL(triggered()), 
SLOT(addContact()));
@@ -549,6 +556,22 @@
        }
 }
 
+//--start my dirty hack
+void QtPhoneCall::callTransfer() {
+
+       std::string forwardNumber = 
_qtWengoPhone->getQtCallBar().getPhoneComboBoxCurrentText();
+       if (forwardNumber.length()>0){
+               _cPhoneCall.blindTransfer(forwardNumber);
+               _qtWengoPhone->getQtCallBar().clearPhoneComboBoxEditText();
+       }
+       else {
+               QString titel = tr("QuteCom - Information");
+               QString message = tr("You must enter a phone number before 
forwarding");
+               QMessageBox::information(_qtWengoPhone->getWidget(), titel, 
message );
+       }
+}
+//-- end my dirty hack
+
 void QtPhoneCall::holdOrResume() {
        if (_hold) {
                _cPhoneCall.resume();
diff -r 9913c12e3bdf wengophone/src/presentation/qt/phonecall/QtPhoneCall.h
--- a/wengophone/src/presentation/qt/phonecall/QtPhoneCall.h    Mon Mar 30 
15:05:45 2009 +0200
+++ b/wengophone/src/presentation/qt/phonecall/QtPhoneCall.h    Mon Mar 30 
16:31:44 2009 +0200
@@ -95,6 +95,8 @@
 
        void rejectCall();
 
+       void callTransfer();
+
        void toggleFlipVideoImage();
 
 private Q_SLOTS:
_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev

Reply via email to