summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrédéric Brière <fbriere@fbriere.net>2016-10-04 20:09:22 -0400
committerFrédéric Brière <fbriere@fbriere.net>2016-10-05 20:34:39 -0400
commitb7a591acf16e18cf5258a70f3e0115d3318f8434 (patch)
treefc84640122cd8a86f5709273c2a631b84e7d51a4 /src
parent5d35f03d07a9849840561b8eefd29887799dce2d (diff)
downloadtwinkle-b7a591acf16e18cf5258a70f3e0115d3318f8434.tar
twinkle-b7a591acf16e18cf5258a70f3e0115d3318f8434.tar.gz
twinkle-b7a591acf16e18cf5258a70f3e0115d3318f8434.tar.lz
twinkle-b7a591acf16e18cf5258a70f3e0115d3318f8434.tar.xz
twinkle-b7a591acf16e18cf5258a70f3e0115d3318f8434.zip
Move (private) gui_cmd_call/show/hide() methods to their proper location
(This is just cut-and-paste, also removing some trailing whitespace.)
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 8d3a126..ac14edd 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -730,6 +730,44 @@ void t_gui::gui_do_user(const QString &profile_name)
}
}
+void t_gui::gui_cmd_call(const string &destination, bool immediate) {
+ string subject;
+ string dst_no_headers;
+ t_display_url du;
+
+ t_user *user = phone->ref_user_profile(
+ mainWindow->userComboBox->currentText().toStdString());
+ expand_destination(user, destination, du, subject, dst_no_headers);
+ if (!du.is_valid()) return;
+
+ if (immediate) {
+ mainWindow->do_phoneInvite(user, du.display.c_str(), du.url,
+ subject.c_str(), false);
+ } else {
+ mainWindow->phoneInvite(dst_no_headers.c_str(), subject.c_str(), false);
+ }
+}
+
+void t_gui::gui_cmd_show(void) {
+ if (mainWindow->isMinimized()) {
+ mainWindow->setWindowState((mainWindow->windowState() & ~Qt::WindowMinimized) |
+ Qt::WindowActive);
+ mainWindow->raise();
+ } else {
+ mainWindow->show();
+ mainWindow->raise();
+ mainWindow->activateWindow();
+ }
+}
+
+void t_gui::gui_cmd_hide(void) {
+ if (sys_config->get_gui_use_systray()) {
+ mainWindow->hide();
+ } else {
+ mainWindow->setWindowState(mainWindow->windowState() | Qt::WindowMinimized);
+ }
+}
+
/////////////////////////////////////////////////
// PUBLIC
/////////////////////////////////////////////////
@@ -2779,24 +2817,6 @@ void t_gui::cmd_call(const string &destination, bool immediate) {
Q_ARG(bool, immediate));
}
-void t_gui::gui_cmd_call(const string &destination, bool immediate) {
- string subject;
- string dst_no_headers;
- t_display_url du;
-
- t_user *user = phone->ref_user_profile(
- mainWindow->userComboBox->currentText().toStdString());
- expand_destination(user, destination, du, subject, dst_no_headers);
- if (!du.is_valid()) return;
-
- if (immediate) {
- mainWindow->do_phoneInvite(user, du.display.c_str(), du.url,
- subject.c_str(), false);
- } else {
- mainWindow->phoneInvite(dst_no_headers.c_str(), subject.c_str(), false);
- }
-}
-
void t_gui::cmd_quit(void) {
lock();
mainWindow->fileExit();
@@ -2807,30 +2827,10 @@ void t_gui::cmd_show(void) {
QMetaObject::invokeMethod(this, "gui_cmd_show");
}
-void t_gui::gui_cmd_show(void) {
- if (mainWindow->isMinimized()) {
- mainWindow->setWindowState((mainWindow->windowState() & ~Qt::WindowMinimized) |
- Qt::WindowActive);
- mainWindow->raise();
- } else {
- mainWindow->show();
- mainWindow->raise();
- mainWindow->activateWindow();
- }
-}
-
void t_gui::cmd_hide(void) {
QMetaObject::invokeMethod(this, "gui_cmd_hide");
}
-void t_gui::gui_cmd_hide(void) {
- if (sys_config->get_gui_use_systray()) {
- mainWindow->hide();
- } else {
- mainWindow->setWindowState(mainWindow->windowState() | Qt::WindowMinimized);
- }
-}
-
string t_gui::get_name_from_abook(t_user *user_config, const t_url &u) {
string name;