Hi Kristina,
Thank you for the patch.
Would you mind please to re-submit it while splitting the patch in
two: one for diabling file transfer and seconfd one for priority.
This will simplify the review
I also recommend to use mercurial for development, so you'll be able
to submit patches uisng "hg email"
Thanks
Vadim
Le 11 mars 09 à 11:52, Kristina Kiehl a écrit :
> This patch adds 2 new options to qutecom:
>
> - Disable Filetransfer
> - Set process priority to "above normal"
> *** /qutecom-2-2-0c9ef25e8554/wengophone/src/presentation/qt/
> QtSystray.cpp
> --- /workspace/qutecom/wengophone/src/presentation/qt/QtSystray.cpp
> ***************
> *** 215,221 ****
> --- 215,222 ----
> _callMenu->addMenu(callSIPMenu);
> QtContactMenu::populateSipCallMenu(callSIPMenu, cWengoPhone);
> ///
> +
> + #ifndef DISABLE_FILETRANSFER
> //sendFileMenu
> QMenu * sendFileMenu = new QMenu(_qtWengoPhone->getWidget());
> sendFileMenu->setTitle(tr("Send File"));
> ***************
> *** 226,231 ****
> --- 227,234 ----
> //TODO: call a new method populateFreeCallMenu with contactId
> QtContactMenu::populateWengoUsersContactId(sendFileMenu,
> cWengoPhone);
> ///
> + #endif
> +
> }
> *** /qutecom-2-2-0c9ef25e8554/wengophone/src/presentation/qt/
> QtToolBar.cpp
> --- /workspace/qutecom/wengophone/src/presentation/qt/QtToolBar.cpp
> ***************
> *** 173,178 ****
> --- 173,182 ----
> _ui->actionSendSms->setVisible(false);
> #endif
>
> + #ifdef DISABLE_FILETRANSFER
> + _ui->actionShowFileTransfer->setVisible(false);
> + #endif
> +
> }
> *** /qutecom-2-2-0c9ef25e8554/wengophone/src/presentation/qt/
> QtWengoPhone.cpp
> --- /workspace/qutecom/wengophone/src/presentation/qt/
> QtWengoPhone.cpp
> ***************
> *** 163,172 ****
> _ui->actionShowWengoAccount->setVisible(false);
> #endif
>
> #ifdef OS_MACOSX
> fixMacOSXMenus();
> #endif
> !
> LANGUAGE_CHANGE(_wengoPhoneWindow);
>
> #ifdef OS_LINUX
> --- 163,176 ----
> _ui->actionShowWengoAccount->setVisible(false);
> #endif
>
> + #ifdef DISABLE_FILETRANSFER
> + _ui->actionShowFileTransfer->setVisible(false);
> + #endif
> +
> #ifdef OS_MACOSX
> fixMacOSXMenus();
> #endif
> !
> LANGUAGE_CHANGE(_wengoPhoneWindow);
>
> #ifdef OS_LINUX
> *** /qutecom-2-2-0c9ef25e8554/wengophone/src/presentation/qt/chat/
> QtChatWindow.cpp
> --- /workspace/qutecom/wengophone/src/presentation/qt/chat/
> QtChatWindow.cpp
> ***************
> *** 435,441 ****
> --- 435,444 ----
> _ui->actionCallContact-
> >setEnabled(contactProfile.hasCall()
> && contactProfile.isAvailable());
> _ui->actionSendSms->setEnabled(!
> contactProfile.getMobilePhone().empty());
> + #ifdef DISABLE_FILETRANSFER
> _ui->actionSendFile->setEnabled(widget-
> >canDoFileTransfer());
> + _ui->actionSendFile->setVisible(false);
> + #endif
>
> _ui->actionCreateChatConf->setEnabled(widget-
> >canDoMultiChat());
> _ui->actionContactInfo->setEnabled(true);
> *** /qutecom-2-2-0c9ef25e8554/wengophone/src/presentation/qt/chat/
> QtChatLogViewer.cpp
> --- /workspace/qutecom/wengophone/src/presentation/qt/chat/
> QtChatLogViewer.cpp
> ***************
> *** 202,211 ****
> --- 202,213 ----
> SAFE_CONNECT(_ui->actionActionRestartChat, SIGNAL(triggered()),
> SLOT(restartChat()));
> ////
>
> + #ifndef DISABLE_FILETRANSFER
> // setup "tools" menu
> copyQAction(toolBar, _ui->actionShowFileTransfer);
> SAFE_CONNECT_RECEIVER(_ui->actionShowFileTransfer,
> SIGNAL(triggered()), qtToolBar, SLOT(showFileTransferWindow()));
> ////
> + #endif
>
> // setup "help" menu
> copyQAction(toolBar, _ui->actionShowWengoForum);
> *** /qutecom-2-2-0c9ef25e8554/wengophone/src/presentation/qt/
> contactlist/QtContactManager.cpp
> --- /workspace/qutecom/wengophone/src/presentation/qt/contactlist/
> QtContactManager.cpp
> ***************
> *** 524,529 ****
> --- 524,532 ----
> if (!ul->hasFileTransfer(contactId)) {
> action->setEnabled(false);
> }
> + #ifdef DISABLE_FILETRANSFER
> + action ->setVisible(false);
> + #endif
>
> //FIXME Desactivated for the moment due to a crash
> //menu->addMenu(createConferenceMenu());
> *** /qutecom-2-2-0c9ef25e8554/wengophone/src/presentation/qt/
> contactlist/QtContactWidget.cpp
> --- /workspace/qutecom/wengophone/src/presentation/qt/contactlist/
> QtContactWidget.cpp
> ***************
> *** 87,92 ****
> --- 87,95 ----
> #ifdef DISABLE_SMS
> _ui->smsButton->hide();
> #endif
> + #ifdef DISABLE_FILETRANSFER
> + _ui->sendFileButton->hide();
> + #endif
> }
>
> QtContactWidget::~QtContactWidget() {
> *** /qutecom-2-2-0c9ef25e8554/DefineWengoOptions.cmake
> --- /workspace/qutecom/DefineWengoOptions.cmake
> ***************
> *** 51,56 ****
> --- 51,61 ----
>
> option(DISABLE_VOICE_MAIL "Disable voice mail by http support" ON)
>
> +
> + option(SET_PRIORITY_ABOVE_NORMAL "Set the WengoPhone Priority to
> ABOVE_NORMAL_PRIORITY_CLASS" OFF)
> +
> + option(DISABLE_FILETRANSFER "Disable file transfer option" 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)
> *** /qutecom-2-2-0c9ef25e8554/wengophone/src/presentation/qt/
> CMakeLists.txt
> --- /workspace/qutecom/wengophone/src/presentation/qt/CMakeLists.txt
> ***************
> *** 505,510 ****
> --- 505,524 ----
> message(STATUS "Sms deactivated")
> endif (DISABLE_SMS)
>
> + if (SET_PRIORITY_ABOVE_NORMAL)
> + ow_add_private_definitions(
> + -DSET_PRIORITY_ABOVE_NORMAL
> + )
> + message(STATUS "Set priority to above normal")
> + endif (SET_PRIORITY_ABOVE_NORMAL)
> +
> + if (DISABLE_FILETRANSFER)
> + ow_add_private_definitions(
> + -DDISABLE_FILETRANSFER
> + )
> + message(STATUS "Filetransfer deactivated")
> + endif (DISABLE_FILETRANSFER)
> +
> if (DISABLE_VOICE_MAIL)
> ow_add_private_definitions(
> -DDISABLE_VOICE_MAIL
> *** /qutecom-2-2-0c9ef25e8554/wengophone/src/presentation/main.cpp
> --- /workspace/qutecom/wengophone/src/presentation/main.cpp
> ***************
> *** 17,22 ****
> --- 17,24 ----
> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA
> */
>
> + #include <windows.h>
> +
> #include <system/Processes.h>
>
> #include <model/WengoPhone.h>
>
> ***************
> *** 94,99 ****
> --- 95,102 ----
>
> #include <buildconfig.h>
>
> + #include <crtdbg.h>
> +
> #if defined(OS_LINUX)
> #include <X11/Xlib.h>
> #endif
>
> ***************
> *** 229,234 ****
> --- 233,242 ----
> //Init presentation factories before parsing the command line so
> that Qt or
> //Gtk get a chance to parse their command line options ('-style'
> for Qt for
> //example)
> + #ifdef SET_PRIORITY_ABOVE_NORMAL
> + SetPriorityClass ( GetCurrentProcess(),
> ABOVE_NORMAL_PRIORITY_CLASS );
> + #endif
> +
> PFactory * pFactory = NULL;
> #if defined(OS_LINUX)
> XInitThreads();
> _______________________________________________
> 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