Reflect the changes to make the recent-file code GUI-independent.
svn path=/trunk/; revision=40563
This commit is contained in:
parent
b5193096a9
commit
ee0089dfe7
|
@ -24,7 +24,7 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "qt_ui_utils.h"
|
||||
#include "ui/gtk/recent.h"
|
||||
#include "ui/recent.h"
|
||||
|
||||
#include "display_filter_edit.h"
|
||||
|
||||
|
@ -70,7 +70,7 @@ DisplayFilterCombo::DisplayFilterCombo(QWidget *parent) :
|
|||
completer()->setCompletionMode(QCompleter::PopupCompletion);
|
||||
}
|
||||
|
||||
void dfilter_recent_combo_write_all(FILE *rf) {
|
||||
extern "C" void dfilter_recent_combo_write_all(FILE *rf) {
|
||||
if (!cur_display_filter_combo)
|
||||
return;
|
||||
|
||||
|
@ -89,7 +89,7 @@ void DisplayFilterCombo::writeRecent(FILE *rf) {
|
|||
}
|
||||
}
|
||||
|
||||
gboolean dfilter_combo_add_recent(gchar *filter) {
|
||||
extern "C" gboolean dfilter_combo_add_recent(gchar *filter) {
|
||||
if (!cur_display_filter_combo)
|
||||
return FALSE;
|
||||
|
||||
|
@ -102,12 +102,12 @@ gboolean dfilter_combo_add_recent(gchar *filter) {
|
|||
// xxx - Move to an as-yet-to-be-written capture filter module along with ::addRecentCapture and ::writeRecentCapture
|
||||
QList<QString> cfilters;
|
||||
|
||||
gboolean cfilter_combo_add_recent(gchar *filter) {
|
||||
extern "C" gboolean cfilter_combo_add_recent(gchar *filter) {
|
||||
cfilters.append(filter);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void cfilter_combo_recent_write_all(FILE *rf) {
|
||||
extern "C" void cfilter_combo_recent_write_all(FILE *rf) {
|
||||
QString cfilter;
|
||||
|
||||
foreach (cfilter, cfilters) {
|
||||
|
|
|
@ -78,11 +78,10 @@
|
|||
|
||||
#include "ui/alert_box.h"
|
||||
#include "ui/main_statusbar.h"
|
||||
#include "ui/recent.h"
|
||||
#include "ui/simple_dialog.h"
|
||||
#include "ui/ui_util.h"
|
||||
|
||||
#include "ui/gtk/recent.h"
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
#include "capture_ui_utils.h"
|
||||
#include "capture-pcap-util.h"
|
||||
|
|
|
@ -42,10 +42,9 @@
|
|||
#include "qt_ui_utils.h"
|
||||
|
||||
#include "ui/main_statusbar.h"
|
||||
#include "ui/recent.h"
|
||||
#include "ui/ui_util.h"
|
||||
|
||||
#include "ui/gtk/recent.h"
|
||||
|
||||
#include <QTreeWidget>
|
||||
#include <QTabWidget>
|
||||
#include <QTextEdit>
|
||||
|
@ -375,7 +374,7 @@ void PacketList::clear() {
|
|||
cur_packet_list->sortByColumn(0, Qt::AscendingOrder);
|
||||
}
|
||||
|
||||
void new_packet_list_recent_write_all(FILE *rf) {
|
||||
extern "C" void new_packet_list_recent_write_all(FILE *rf) {
|
||||
if (!cur_packet_list)
|
||||
return;
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
|
||||
#include "qt_ui_utils.h"
|
||||
|
||||
#include "ui/gtk/recent.h"
|
||||
#include "ui/recent.h"
|
||||
#include "ui/ui_util.h"
|
||||
|
||||
// XXX - Copied from ui/gtk/gui_utils.c
|
||||
|
||||
|
@ -89,7 +90,7 @@ window_geom_load(const gchar *name, window_geometry_t *geom)
|
|||
|
||||
|
||||
/* read in a single key value pair from the recent file into the geometry hashtable */
|
||||
void
|
||||
extern "C" void
|
||||
window_geom_recent_read_pair(const char *name, const char *key, const char *value)
|
||||
{
|
||||
window_geometry_t geom;
|
||||
|
@ -145,7 +146,7 @@ window_geom_recent_read_pair(const char *name, const char *key, const char *valu
|
|||
}
|
||||
|
||||
/* write all geometry values of all windows from the hashtable to the recent file */
|
||||
void
|
||||
extern "C" void
|
||||
window_geom_recent_write_all(gpointer rf)
|
||||
{
|
||||
/* init hashtable, if not already done */
|
||||
|
|
|
@ -76,7 +76,7 @@ set_last_open_dir(const char *dirname)
|
|||
last_open_dir = new_last_open_dir;
|
||||
}
|
||||
|
||||
char *
|
||||
extern "C" char *
|
||||
get_last_open_dir(void)
|
||||
{
|
||||
return last_open_dir;
|
||||
|
@ -90,7 +90,7 @@ get_last_open_dir(void)
|
|||
* XXX - We might want to call SHAddToRecentDocs under Windows 7:
|
||||
* http://stackoverflow.com/questions/437212/how-do-you-register-a-most-recently-used-list-with-windows-in-preparation-for-win
|
||||
*/
|
||||
void
|
||||
extern "C" void
|
||||
add_menu_recent_capture_file(gchar *cf_name) {
|
||||
QString normalized_cf_name = QString::fromUtf8(cf_name);
|
||||
// QDir cf_path;
|
||||
|
@ -130,7 +130,7 @@ add_menu_recent_capture_file(gchar *cf_name) {
|
|||
}
|
||||
|
||||
/* write all capture filenames of the menu to the user's recent file */
|
||||
void menu_recent_file_write_all(FILE *rf) {
|
||||
extern "C" void menu_recent_file_write_all(FILE *rf) {
|
||||
|
||||
/* we have to iterate backwards through the children's list,
|
||||
* so we get the latest item last in the file.
|
||||
|
|
Loading…
Reference in New Issue