kerberos: make use of &NT_errors_ext
[wireshark-sm.git] / ui / logray / logray_application.cpp
blobab0bc72257c8786c762e8870b90ffa5b62a28fc8
1 /* logray_application.cpp
3 * Logray - Event log analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #include "logray_application.h"
12 #include "extcap.h"
13 #include "ui/iface_lists.h"
14 #include "ui/ws_ui_util.h"
16 LograyApplication *lwApp;
18 LograyApplication::LograyApplication(int &argc, char **argv) :
19 MainApplication(argc, argv)
21 lwApp = this;
22 Q_INIT_RESOURCE(lricon);
23 setApplicationName("Logray");
24 setDesktopFileName(QStringLiteral("org.wireshark.Logray"));
27 LograyApplication::~LograyApplication()
29 lwApp = NULL;
32 void LograyApplication::refreshLocalInterfaces()
34 extcap_clear_interfaces();
36 #ifdef HAVE_LIBPCAP
37 free_interface_list(cached_if_list_);
38 cached_if_list_ = NULL;
40 GList * filter_list = NULL;
41 filter_list = g_list_append(filter_list, GUINT_TO_POINTER((unsigned) IF_EXTCAP));
43 // We don't need to (re)start the stats (which calls dumpcap) because
44 // Logray only uses extcaps now. If that changes, do the below instead.
45 #if 0
46 emit scanLocalInterfaces(filter_list);
47 #endif
49 scan_local_interfaces_filtered(filter_list, main_window_update);
51 g_list_free(filter_list);
53 emit localInterfaceListChanged();
54 #endif
57 void LograyApplication::initializeIcons()
59 // Do this as late as possible in order to allow time for
60 // MimeDatabaseInitThread to do its work.
61 QList<int> icon_sizes = QList<int>() << 16 << 24 << 32 << 48 << 64 << 128 << 256 << 512 << 1024;
62 foreach (int icon_size, icon_sizes) {
63 QString icon_path = QString(":/lricon/lricon%1.png").arg(icon_size);
64 normal_icon_.addFile(icon_path);
65 icon_path = QString(":/lricon/lriconcap%1.png").arg(icon_size);
66 capture_icon_.addFile(icon_path);