aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/qt/QtShark.pro6
-rw-r--r--ui/qt/main.cpp10
-rw-r--r--ui/qt/main_window.cpp7
-rw-r--r--ui/qt/main_window.h5
-rw-r--r--ui/qt/main_window_slots.cpp11
-rw-r--r--ui/qt/qtshark.rc1
-rw-r--r--ui/qt/wireshark_application.cpp11
-rw-r--r--ui/qt/wireshark_application.h1
8 files changed, 43 insertions, 9 deletions
diff --git a/ui/qt/QtShark.pro b/ui/qt/QtShark.pro
index 3b3f2bf208..26bfadd655 100644
--- a/ui/qt/QtShark.pro
+++ b/ui/qt/QtShark.pro
@@ -330,7 +330,8 @@ win32 {
$${guilibsdll} $${HHC_LIBS} \
-L../../epan -llibwireshark -L../../wsutil -llibwsutil -L../../wiretap -lwiretap-$${WTAP_VERSION} \
-L.. -llibui \
- -L$${GLIB_DIR}/lib -lglib-2.0 -lgmodule-2.0
+ -L$${GLIB_DIR}/lib -lglib-2.0 -lgmodule-2.0 \
+ -L$${WINSPARKLE_DIR} -lWinSparkle
!isEmpty(MSVCR_DLL) {
EXTRA_BINFILES += \"$${MSVCR_DLL}\"
@@ -357,6 +358,7 @@ win32 {
$${GNUTLS_DIR}/bin/libintl-8.dll $${SMI_DIR}/bin/libsmi-2.dll \
$${LUA_DIR}/lua5.1.dll \
$${GEOIP_DIR}/bin/libGeoIP-1.dll \
+ $${WINSPARKLE_DIR}/WinSparkle.dll \
../../colorfilters ../../dfilters ../../cfilters
wireshark_use_kfw {
@@ -395,7 +397,7 @@ TRANSLATIONS = \
ICON = ../../packaging/macosx/Resources/Wireshark.icns
-RC_FILE = qtshark.rc
+RC_FILE = ../../image/wireshark.rc
# http://lists.trolltech.com/qt-interest/2008-01/thread00516-0.html
# http://www.freehackers.org/thomas/2009/03/10/fixing-qmake-missing-rule-for-ts-qm/
diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp
index f898542890..eddb9ebf93 100644
--- a/ui/qt/main.cpp
+++ b/ui/qt/main.cpp
@@ -623,11 +623,11 @@ int main(int argc, char *argv[])
// xxx qtshark
#ifdef _WIN32
- /* Load wpcap if possible. Do this before collecting the run-time version information */
- load_wpcap();
+ /* Load wpcap if possible. Do this before collecting the run-time version information */
+ load_wpcap();
- /* ... and also load the packet.dll from wpcap */
- wpcap_packet_load();
+ /* ... and also load the packet.dll from wpcap */
+ wpcap_packet_load();
#ifdef HAVE_AIRPCAP
/* Load the airpcap.dll. This must also be done before collecting
@@ -789,7 +789,7 @@ int main(int argc, char *argv[])
}
#ifdef HAVE_LIBPCAP
- capture_callback_add(main_capture_callback, NULL);
+ capture_callback_add(main_capture_callback, NULL);
#endif
cf_callback_add(main_cf_callback, NULL);
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index d4205393e0..e42dbf5d24 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -139,6 +139,13 @@ MainWindow::MainWindow(QWidget *parent) :
main_ui_->goToCancel->setAttribute(Qt::WA_MacSmallSize, true);
#endif
+#ifdef HAVE_SOFTWARE_UPDATE
+ QAction *update_sep = main_ui_->menuHelp->insertSeparator(main_ui_->actionHelpAbout);
+ QAction *update_action = new QAction(tr("Check for Updates..."), main_ui_->menuHelp);
+ main_ui_->menuHelp->insertAction(update_sep, update_action);
+ connect(update_action, SIGNAL(triggered()), this, SLOT(on_actionHelpCheckForUpdates_triggered()));
+#endif
+
packet_splitter_ = new QSplitter(main_ui_->mainStack);
packet_splitter_->setObjectName(QString::fromUtf8("splitterV"));
packet_splitter_->setOrientation(Qt::Vertical);
diff --git a/ui/qt/main_window.h b/ui/qt/main_window.h
index ce74891672..e230eb88c5 100644
--- a/ui/qt/main_window.h
+++ b/ui/qt/main_window.h
@@ -263,6 +263,11 @@ private slots:
void on_actionHelpDownloads_triggered();
void on_actionHelpWiki_triggered();
void on_actionHelpSampleCaptures_triggered();
+
+#ifdef HAVE_SOFTWARE_UPDATE
+ void on_actionHelpCheckForUpdates_triggered();
+#endif
+
void on_goToCancel_clicked();
void on_goToGo_clicked();
void on_goToLineEdit_returnPressed();
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index fa07c9df72..c61e2a1483 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -62,6 +62,10 @@
#include "ui/preference_utils.h"
#include "ui/ssl_key_export.h"
+#ifdef HAVE_SOFTWARE_UPDATE
+#include "ui/software_update.h"
+#endif
+
#include "capture_file_dialog.h"
#include "export_object_dialog.h"
#include "time_shift_dialog.h"
@@ -1614,6 +1618,13 @@ void MainWindow::on_actionHelpSampleCaptures_triggered() {
wsApp->helpTopicAction(ONLINEPAGE_SAMPLE_FILES);
}
+#ifdef HAVE_SOFTWARE_UPDATE
+void MainWindow::on_actionHelpCheckForUpdates_triggered()
+{
+ software_update_check();
+}
+#endif
+
void MainWindow::on_actionGoGoToPacket_triggered() {
if (packet_list_->model()->rowCount() < 1) {
return;
diff --git a/ui/qt/qtshark.rc b/ui/qt/qtshark.rc
deleted file mode 100644
index e1f443ad26..0000000000
--- a/ui/qt/qtshark.rc
+++ /dev/null
@@ -1 +0,0 @@
- IDI_ICON1 ICON DISCARDABLE "../../image/wireshark.ico"
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp
index 7784cd3aaf..f79423dcd0 100644
--- a/ui/qt/wireshark_application.cpp
+++ b/ui/qt/wireshark_application.cpp
@@ -39,6 +39,7 @@
#include "recent_file_status.h"
#include "ui/capture_globals.h"
+#include "ui/software_update.h"
#ifdef _WIN32
# include "ui/win32/console_win32.h"
@@ -533,6 +534,11 @@ void WiresharkApplication::clearRecentItems() {
emit updateRecentItemStatus(NULL, 0, false);
}
+void WiresharkApplication::cleanup()
+{
+ software_update_cleanup();
+}
+
void WiresharkApplication::itemStatusFinished(const QString &filename, qint64 size, bool accessible) {
recent_item_status *ri;
RecentFileStatus *rf_status = qobject_cast<RecentFileStatus *>(QObject::sender());;
@@ -583,6 +589,8 @@ WiresharkApplication::WiresharkApplication(int &argc, char **argv) :
recent_timer_ = new QTimer(this);
connect(recent_timer_, SIGNAL(timeout()), this, SLOT(refreshRecentFiles()));
recent_timer_->start(2000);
+
+ connect(this, SIGNAL(aboutToQuit()), this, SLOT(cleanup()));
}
void WiresharkApplication::registerUpdate(register_action_e action, const char *message)
@@ -610,13 +618,14 @@ void WiresharkApplication::emitAppSignal(AppSignal signal)
}
void WiresharkApplication::allSystemsGo()
-{
+{
initialized_ = true;
emit appInitialized();
while (pending_open_files_.length() > 0) {
emit openCaptureFile(pending_open_files_.front());
pending_open_files_.pop_front();
}
+ software_update_init();
}
e_prefs * WiresharkApplication::readConfigurationFiles(char **gdp_path, char **dp_path)
diff --git a/ui/qt/wireshark_application.h b/ui/qt/wireshark_application.h
index 4713c5f586..f8ae3a89e0 100644
--- a/ui/qt/wireshark_application.h
+++ b/ui/qt/wireshark_application.h
@@ -134,6 +134,7 @@ public slots:
void clearRecentItems();
private slots:
+ void cleanup();
void itemStatusFinished(const QString &filename = "", qint64 size = 0, bool accessible = false);
void refreshRecentFiles(void);
};