Restructure the recent file code so that recent.c is GUI-independent;
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 18 Jan 2012 19:38:34 +0000 (19:38 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 18 Jan 2012 19:38:34 +0000 (19:38 +0000)
move it to the top-level source directory for now, and move
ui/gtk/recent.h to the ui directory.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40561 f5534014-38df-0310-8fa8-9805f1628bb7

41 files changed:
Makefile.common
recent.c [moved from ui/gtk/recent.c with 98% similarity]
ui/gtk/Makefile.common
ui/gtk/about_dlg.c
ui/gtk/capture_dlg.c
ui/gtk/capture_dlg.h
ui/gtk/capture_file_dlg.c
ui/gtk/capture_if_dlg.c
ui/gtk/cfilter_combo_utils.c
ui/gtk/cfilter_combo_utils.h
ui/gtk/drag_and_drop.c
ui/gtk/export_sslkeys.c
ui/gtk/file_dlg.h
ui/gtk/firewall_dlg.c
ui/gtk/follow_stream.c
ui/gtk/font_utils.c
ui/gtk/graph_analysis.c
ui/gtk/gui_utils.c
ui/gtk/gui_utils.h
ui/gtk/iax2_analysis.c
ui/gtk/main.c
ui/gtk/main.h
ui/gtk/main_filter_toolbar.c
ui/gtk/main_menubar.c
ui/gtk/main_proto_draw.c
ui/gtk/main_statusbar.c
ui/gtk/main_toolbar.c
ui/gtk/main_welcome.c
ui/gtk/menus.h
ui/gtk/new_packet_list.c
ui/gtk/new_packet_list.h
ui/gtk/packet_win.c
ui/gtk/pixmap_save.c
ui/gtk/prefs_gui.c
ui/gtk/profile_dlg.c
ui/gtk/rtp_analysis.c
ui/gtk/rtp_stream_dlg.c
ui/gtk/wlan_stat_dlg.c
ui/qt/qt_ui_utils.h
ui/recent.h [moved from ui/gtk/recent.h with 96% similarity]
ui/ui_util.h

index e40308554935933bff59af4b9aa7d5c582ed8d7c..5fc71f32fb1e15bc438f62ca288e5d225c71239c 100644 (file)
@@ -158,6 +158,7 @@ wireshark_SOURCES = \
        g711.c \
        merge.c \
        proto_hier_stats.c      \
+       recent.c        \
        summary.c       \
        tempfile.c      \
        u3.c
@@ -178,6 +179,8 @@ wireshark_INCLUDES =        \
        ui/main_statusbar.h     \
        merge.h \
        ui/progress_dlg.h       \
+       ui/recent.h     \
+       ui/recent_utils.h       \
        proto_hier_stats.h      \
        ui/simple_dialog.h      \
        stat_menu.h     \
similarity index 98%
rename from ui/gtk/recent.c
rename to recent.c
index c1b62a72f6835df36f1598b6761e8c95238b7d66..02e6216ab74d09d3c1cc1e2b421823a850488421 100644 (file)
+++ b/recent.c
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
+
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
-
-#ifndef QT_GUI_LIB
-#include <gtk/gtk.h>
-#endif
+#include <errno.h>
 
 #include <epan/epan.h>
 #include <epan/filesystem.h>
 #include <epan/prefs.h>
 #include <epan/prefs-int.h>
 #include <epan/column.h>
+#include <epan/timestamp.h>
 
+#include "ui/last_open_dir.h"
+#include "ui/recent.h"
+#include "ui/recent_utils.h"
 #include "ui/simple_dialog.h"
-#include "../u3.h"
-#include <wsutil/file_util.h>
+#include "ui/ui_util.h"
 
-#include "ui/gtk/recent.h"
-#ifndef QT_GUI_LIB
-#include "ui/gtk/main.h"
-#include "ui/gtk/menus.h"
-#include "ui/gtk/gui_utils.h"
-#include "ui/gtk/new_packet_list.h"
-#include "ui/gtk/file_dlg.h"
-#include "ui/gtk/cfilter_combo_utils.h"
+#include "u3.h"
 
-#ifdef HAVE_PCAP_REMOTE
-#include "ui/gtk/capture_dlg.h"
-#endif
-#else /* QT_GUI_LIB */
-#include "qt_ui_utils.h"
-#include "../file.h"
-#endif /* QT_GUI_LIB */
+#include <wsutil/file_util.h>
 
 #define RECENT_KEY_MAIN_TOOLBAR_SHOW        "gui.toolbar_main_show"
 #define RECENT_KEY_FILTER_TOOLBAR_SHOW      "gui.filter_toolbar_show"
index 3e19ee8eeaf50ccf2730b7f55efae7f0cd87bca7..d50c7d3a7427b5102c17c5450f997ac4e6b36a5d 100644 (file)
@@ -131,7 +131,6 @@ WIRESHARK_GTK_SRC = \
        proto_help.c    \
        proto_hier_stats_dlg.c  \
        range_utils.c   \
-       recent.c        \
        rtp_player.c    \
        rtp_stream.c    \
        sctp_byte_graph_dlg.c   \
@@ -324,7 +323,6 @@ noinst_HEADERS = \
        proto_help.h    \
        proto_hier_stats_dlg.h  \
        range_utils.h \
-       recent.h        \
        remote_icons.h  \
        rtp_analysis.h  \
        rtp_player.h    \
index 379d54599ec374a49b9862e4d98326101fe75068..a7b7197abd449fbc65f66a0156a715a7776fd56a 100644 (file)
@@ -43,6 +43,8 @@
 #include "../log.h"
 #include "../version_info.h"
 
+#include "ui/last_open_dir.h"
+
 #include "ui/gtk/about_dlg.h"
 #include "ui/gtk/gui_utils.h"
 #include "ui/gtk/dlg_utils.h"
index f34abf48dda2993cc6cd3e825d6ff024d2116e41..cb5ece2f517c37938eee1738c34278bc403df319 100644 (file)
@@ -49,6 +49,7 @@
 #include "../capture_ui_utils.h"
 #include "../ringbuffer.h"
 
+#include "ui/recent_utils.h"
 #include "ui/simple_dialog.h"
 
 #include "ui/gtk/main.h"
index c7825965044d94eae7e40b1b6acf026d08fb3812..70478a3cfdc46266be61ecfcb20f73e0a9ed6178 100644 (file)
@@ -179,25 +179,6 @@ void
 activate_monitor (GtkTreeViewColumn *tree_column, GtkCellRenderer *renderer,
                   GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
 
-#ifdef HAVE_PCAP_REMOTE
-#define RECENT_KEY_REMOTE_HOST "recent.remote_host"
-
-/** Write all remote hosts to the recent file
- *
- * @param rf recent file
- */
-void
-capture_remote_combo_recent_write_all(FILE *rf);
-
-/** Add a new remote host from the recent file
- *
- * @param s string with hostname,port,auth_type
- * @return TRUE if correctly added
- */
-gboolean
-capture_remote_combo_add_recent(gchar *s);
-#endif
-
 gboolean
 dlg_window_present(void);
 
index 019aca7b4e792ff58ab181aa7bd9fe98ba5c56a7..11b0304757f9025ebf1c9f916eb85c577944af74 100644 (file)
@@ -47,6 +47,8 @@
 #include <wsutil/file_util.h>
 
 #include "ui/alert_box.h"
+#include "ui/last_open_dir.h"
+#include "ui/recent.h"
 #include "ui/simple_dialog.h"
 #include "ui/ui_util.h"
 
@@ -60,7 +62,6 @@
 #include "ui/gtk/drag_and_drop.h"
 #include "ui/gtk/main.h"
 #include "ui/gtk/menus.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/color_dlg.h"
 #include "ui/gtk/new_packet_list.h"
 #ifdef HAVE_LIBPCAP
index a6990954de9c61f71665241424c2c441ec5a1931..e67b57b79e83087825302a1f00d90560dcaaab47 100644 (file)
@@ -46,6 +46,7 @@
 #include "wsutil/file_util.h"
 #include <wiretap/wtap.h>
 
+#include "ui/recent.h"
 #include "ui/simple_dialog.h"
 
 #ifdef _WIN32
@@ -55,7 +56,6 @@
 #include "ui/gtk/stock_icons.h"
 #include "ui/gtk/capture_dlg.h"
 #include "ui/gtk/capture_if_dlg.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/gui_utils.h"
 #include "ui/gtk/dlg_utils.h"
 #include "ui/gtk/main.h"
index 67cfcff6bf485d3dc988d0c941d8fdfba3ec3fc5..9abed9c5c13f1a9a0fa99f2f24c107d4cb31e05a 100644 (file)
 
 #include <gtk/gtk.h>
 
+#include "ui/recent.h"
+#include "ui/recent_utils.h"
+
 #include "ui/gtk/main.h"
 #include "ui/gtk/gtkglobals.h"
 #include "ui/gtk/cfilter_combo_utils.h"
-#include "ui/gtk/recent.h"
 
 
 /* XXX: use a preference for this setting! */
index f07f77022278aab8e0165e2396496889e65cb7b0..88cc07b007abaedbd97fca61fb4d858571c7bfc8 100644 (file)
  *  Capture filter combo box routines
  */
 
-extern void cfilter_combo_recent_write_all(FILE *rf);
-extern gboolean cfilter_combo_add_recent(gchar *s);
-
 #define E_CFILTER_CM_KEY          "capture_filter_combo"
 #define E_CFILTER_FL_KEY          "capture_filter_list"
-#define RECENT_KEY_CAPTURE_FILTER "recent.capture_filter"
 
 #endif /* __CFILTER_COMBO_UTILS_H__ */
index 6c8cf92172d96b0beab1042fe7bc1b64acefe760..bce668a27b6fcb0e91d24f0731d831bf1a9ddfc6 100644 (file)
@@ -42,6 +42,7 @@
 #include "../capture.h"
 #endif
 
+#include "ui/recent_utils.h"
 #include "ui/simple_dialog.h"
 
 #include "ui/gtk/gtkglobals.h"
index 30e6105d7c751e17fc74bac060a1a22b17ee0a4d..14c214cd169bb89705ff92ca171e6161eae76076 100644 (file)
 
 #include "../isprint.h"
 
-#include "ui/simple_dialog.h"
 #include "ui/alert_box.h"
+#include "ui/last_open_dir.h"
 #include "ui/progress_dlg.h"
+#include "ui/recent.h"
+#include "ui/simple_dialog.h"
 #include "ui/ui_util.h"
 
 #include "ui/gtk/keys.h"
@@ -73,7 +75,6 @@
 #include "ui/gtk/webbrowser.h"
 #include "ui/gtk/main.h"
 #include "ui/gtk/menus.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/export_sslkeys.h"
 
 #ifdef _WIN32
index 87dd8d4d8d65fe3c9549f1698b5d0c30991312b7..9303f61958e2aa489c05be050f709814e543f4ab 100644 (file)
@@ -99,12 +99,6 @@ extern void file_selection_set_extra_widget(GtkWidget *fs, GtkWidget *extra);
 extern void
 file_selection_browse(GtkWidget *file_bt, GtkWidget *file_te, const char *title, file_selection_action_t action);
 
-/** Get the latest opened directory.
- *
- * @return the dirname
- */
-extern char *get_last_open_dir(void);
-
 /** Set the latest opened directory.
  *  Will already be done when using file_selection_new().
  *
index 431a8f0aac2b5c6f40276bfe8abfe31b2e07addf..106094350a420a17968c3ba1e7fbc8da0b006e9b 100644 (file)
@@ -58,7 +58,9 @@
 #include <epan/dissectors/packet-ipv6.h>
 
 #include <ui/alert_box.h>
+#include <ui/last_open_dir.h>
 #include <ui/simple_dialog.h>
+
 #include <wsutil/file_util.h>
 
 #include "ui/gtk/main.h"
index 32c12ccbfdce4f5cba5b4ba86e97a8447ea8c751..5d97ff0b7882d05a9794c4b92cc60775c8423989 100644 (file)
 #include <epan/prefs.h>
 #include <epan/charsets.h>
 
-#include <ui/alert_box.h>
 #include <../isprint.h>
 #include <../print.h>
+
+#include <ui/alert_box.h>
+#include <ui/last_open_dir.h>
 #include <ui/simple_dialog.h>
+
 #include <wsutil/file_util.h>
 
 #include "ui/gtk/color_utils.h"
index 4af1a8877bbed9b19e646b8503c5046125692c8a..b02bbd965ed32368f44ead744769755b60e60a01 100644 (file)
 #include <wsutil/unicode-utils.h>
 #endif
 
+#include "ui/recent.h"
 #include "ui/simple_dialog.h"
 
 #include "ui/gtk/main.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/gtkglobals.h"
 #include "ui/gtk/font_utils.h"
 #include "ui/gtk/main_proto_draw.h"
index 9d749f16bffec6c636735af34c2a26b6018b4816..ca890caacd703d89fd307b546b3524f20658e3fd 100644 (file)
 #include <epan/filesystem.h>
 
 #include "../util.h"
-#include "ui/simple_dialog.h"
+
 #include "ui/alert_box.h"
+#include "ui/last_open_dir.h"
+#include "ui/recent.h"
+#include "ui/simple_dialog.h"
+
 #include <wsutil/file_util.h>
 
 #include "ui/gtk/gtkglobals.h"
@@ -62,7 +66,6 @@
 #include "ui/gtk/dlg_utils.h"
 #include "ui/gtk/main.h"
 #include "ui/gtk/graph_analysis.h"
-#include "ui/gtk/recent.h"
 
 #include "ui/gtk/old-gtk-compat.h"
 
index 5a35348fa9bdfd685f21905ba67d99105de10999..1c2ce3595d73588c8667ec61a8815f3a6b7395fa 100644 (file)
 #include "epan/epan.h"
 
 #include <epan/packet_info.h>
+
+#include "ui/recent.h"
 #include "ui/ui_util.h"
+
 #include <wsutil/file_util.h>
 
 #include "ui/gtk/gtkglobals.h"
 #include "ui/gtk/gui_utils.h"
 #include "ui/gtk/font_utils.h"
-#include "ui/gtk/recent.h"
 
 #include "ui/gtk/old-gtk-compat.h"
 
index 9720a2a0d6dc95260ec9683564d63b3fa51f6266..e57b910467986d7be9ec344fcf4a93b99bc9521f 100644 (file)
@@ -25,6 +25,8 @@
 #ifndef __GUI_UTILS_H__
 #define __GUI_UTILS_H__
 
+#include "ui/ui_util.h"
+
 /** @defgroup windows_group Windows
  *
  * There are the following toplevel windows:
@@ -158,20 +160,6 @@ extern void window_cancel_button_cb(GtkWidget *w _U_, gpointer data);
  */
 extern gboolean window_delete_event_cb(GtkWidget *win, GdkEvent *event _U_, gpointer user_data _U_);
 
-/** geometry values for use in window_get_geometry() and window_set_geometry() */
-typedef struct window_geometry_s {
-    gchar       *key;           /**< current key in hashtable (internally used only) */
-    gboolean    set_pos;        /**< set the x and y position values */
-    gint        x;              /**< the windows x position */
-    gint        y;              /**< the windows y position */
-    gboolean    set_size;       /**< set the width and height values */
-    gint        width;          /**< the windows width */
-    gint        height;         /**< the windows height */
-
-    gboolean    set_maximized;  /**< set the maximized state (GTK2 only) */
-    gboolean    maximized;      /**< the windows maximized state (GTK2 only) */
-} window_geometry_t;
-
 /** Get the geometry of a window.
  *
  * @param win the window from window_new()
@@ -187,21 +175,6 @@ extern void window_get_geometry(GtkWidget *win, window_geometry_t *geom);
  */
 extern void window_set_geometry(GtkWidget *win, window_geometry_t *geom);
 
-/** Write all geometry values of all windows to the recent file.
- * Will call write_recent_geom() for every existing window type.
- *
- * @param rf recent file handle from caller
- */
-extern void window_geom_recent_write_all(gpointer rf);
-
-/** Read in a single geometry key value pair from the recent file.
- *
- * @param name the geom_name of the window
- * @param key the subkey of this pair (e.g. "x")
- * @param value the new value (e.g. "123")
- */
-extern void window_geom_recent_read_pair(const char *name, const char *key, const char *value);
-
 /** Raise a top-level window and de-iconify it.
  *  This routine is used if the user has done something to
  *  ask that a window of a certain type be popped up when there can be only
index 814f4673f8ed360ef990880cb27b8093d44a2a9c..a1908ad4fec7ad4b7ab06a7d666d57057eb2539b 100644 (file)
 
 #include "../util.h"
 #include "../g711.h"
-#include "ui/alert_box.h"
-#include "ui/simple_dialog.h"
 #include "../stat_menu.h"
-#include "ui/progress_dlg.h"
 #include "../tempfile.h"
+
+#include "ui/alert_box.h"
+#include "ui/last_open_dir.h"
+#include "ui/progress_dlg.h"
+#include "ui/simple_dialog.h"
+
 #include <wsutil/file_util.h>
 
 #include "ui/gtk/gtkglobals.h"
index f79d94a4edb739df35ece85d044c8b585ccce3c8..4fc410154e58c66ede313319d21900cbcef44362 100644 (file)
 #include "../color.h"
 #include "../color_filters.h"
 #include "../print.h"
-#include "ui/simple_dialog.h"
-#include "ui/main_statusbar.h"
 #include "../register.h"
 #include "../ringbuffer.h"
-#include "ui/ui_util.h"
 #include "../util.h"
 #include "../clopts_common.h"
 #include "../console_io.h"
 #include "../cmdarg_err.h"
 #include "../version_info.h"
 #include "../merge.h"
-#include "ui/alert_box.h"
 #include "../log.h"
 #include "../u3.h"
+
+#include "ui/alert_box.h"
+#include "ui/main_statusbar.h"
+#include "ui/recent.h"
+#include "ui/recent_utils.h"
+#include "ui/simple_dialog.h"
+#include "ui/ui_util.h"
+
 #include <wsutil/file_util.h>
 
 #ifdef HAVE_LIBPCAP
 #include "ui/gtk/packet_win.h"
 #include "ui/gtk/stock_icons.h"
 #include "ui/gtk/find_dlg.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/follow_tcp.h"
 #include "ui/gtk/font_utils.h"
 #include "ui/gtk/about_dlg.h"
index f944ab2bb6f9c22afd3cc6ffdc081ec6c6506590..47a6599b06fcbd70a28298d435be0c10d9f31707 100644 (file)
@@ -301,22 +301,10 @@ extern void find_next_mark_cb(GtkWidget *widget, gpointer data, int action);
  */
 extern void find_prev_mark_cb(GtkWidget *widget, gpointer data, int action);
 
-/** Add a display filter coming from the user's recent file to the dfilter combo box.
- *
- * @param dftext the filter string
- */
-extern gboolean dfilter_combo_add_recent(gchar *dftext);
-
 #if 0
 /** Empty out the combobox entry field */
 extern void dfilter_combo_add_empty(void);
 #endif
-/** Write all non empty display filters (until maximum count)
- *  of the combo box GList to the user's recent file.
- *
- * @param rf the recent file
- */
-extern void dfilter_recent_combo_write_all(FILE *rf);
 
 /** Quit the program.
  *
index 43054bdf71a915dedd257275817b6b504cc31e37..3b0531898a71aed99a6a0b5b9ee29dcb9e36620e 100644 (file)
@@ -34,6 +34,9 @@
 #include <string.h>
 
 #include <gtk/gtk.h>
+
+#include "ui/recent.h"
+
 #include "ui/gtk/old-gtk-compat.h"
 
 #include "filter_dlg.h"
@@ -44,7 +47,6 @@
 #include "keys.h"
 #include "gtkglobals.h"
 #include "stock_icons.h"
-#include "recent.h"
 
 #include "main.h"
 #include "menus.h"
index 8a702ad0fb9828381e448b724da2ac4b0c15a036..c6729ab5c6b6f371f7a007c334246fe8250410c1 100644 (file)
 #include <epan/filesystem.h>
 
 #include "../print.h"
-#include "ui/ui_util.h"
-#include "ui/simple_dialog.h"
-#include "ui/main_statusbar.h"
 #include "../color_filters.h"
 #include "../stat_menu.h"
 #include "../u3.h"
 
+#include "ui/ui_util.h"
+#include "ui/recent.h"
+#include "ui/simple_dialog.h"
+#include "ui/main_statusbar.h"
+
 #include "ui/gtk/about_dlg.h"
 #include "ui/gtk/capture_dlg.h"
 #include "ui/gtk/capture_if_dlg.h"
@@ -80,7 +82,6 @@
 #include "ui/gtk/keys.h"
 #include "ui/gtk/stock_icons.h"
 #include "ui/gtk/gtkglobals.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/main_proto_draw.h"
 #include "ui/gtk/conversations_table.h"
 #include "ui/gtk/hostlist_table.h"
index 9b9b757f9314b33c0fd95c9a041c061ef9633e24..788ce29803f4bccd301d6ed0b95b68c1a99c5472 100644 (file)
 #include <epan/filesystem.h>
 
 #include "../isprint.h"
+
 #include "ui/alert_box.h"
-#include "ui/simple_dialog.h"
+#include "ui/last_open_dir.h"
 #include "ui/progress_dlg.h"
+#include "ui/recent.h"
+#include "ui/simple_dialog.h"
 #include "ui/ui_util.h"
+
 #include <wsutil/file_util.h>
 
 #include "ui/gtk/keys.h"
@@ -73,7 +77,6 @@
 #include "ui/gtk/main.h"
 #include "ui/gtk/menus.h"
 #include "ui/gtk/main_proto_draw.h"
-#include "ui/gtk/recent.h"
 
 #ifdef _WIN32
 #include <gdk/gdkwin32.h>
index 4937c3a69e71ea9bb107fa9725a1e8f335f04f74..f8dbe9f50d82e62127d37932524a2dc6a81fa1fd 100644 (file)
@@ -47,8 +47,8 @@
 #endif
 
 #include "ui/main_statusbar.h"
+#include "ui/recent.h"
 
-#include "ui/gtk/recent.h"
 #include "ui/gtk/main.h"
 #include "ui/gtk/main_statusbar_private.h"
 #include "ui/gtk/gui_utils.h"
index 1a0616a72d4e9e8a56de082948653d9bae40f998..a834953ca3ca83f1020e261b31ac66c38a477c2e 100644 (file)
@@ -38,6 +38,8 @@
 
 #include "../color_filters.h"
 
+#include "ui/recent.h"
+
 #ifdef HAVE_LIBPCAP
 #include "ui/gtk/capture_dlg.h"
 #include "ui/gtk/capture_if_dlg.h"
@@ -55,7 +57,6 @@
 #include "ui/gtk/gtkglobals.h"
 #include "ui/gtk/stock_icons.h"
 #include "ui/gtk/keys.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/packet_history.h"
 #include "ui/gtk/new_packet_list.h"
 
index 3b7f0aff991610f8f4b4a83e6cd9c7ee9b52f3b0..1983a874b845e973708ebd763345d458bf324712 100644 (file)
 
 #include <wsutil/file_util.h>
 
+#include "ui/recent.h"
 #include "ui/simple_dialog.h"
 
 #include "ui/gtk/gui_utils.h"
 #include "ui/gtk/color_utils.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/gtkglobals.h"
 #include "ui/gtk/main.h"
 #include "ui/gtk/menus.h"
index 845cf69d7b772feb1046e1faf2cea2be0d21a78d..27940cbc06525df84d4bc79f651229a6cf3cc71b 100644 (file)
 extern "C" {
 #endif /* __cplusplus */
 
-/* Add a new recent capture filename to the "Recent Files" submenu
-   (duplicates will be ignored) */
-extern void add_menu_recent_capture_file(gchar *cf_name);
-
 /* Open a file(name)
    (will not ask to close existing capture file!) */
 extern void menu_open_filename(gchar *cf_name);
@@ -42,11 +38,6 @@ extern void menu_open_filename(gchar *cf_name);
  *  @ingroup main_window_group
  */
 
-/** Write all recent capture filenames to the user's recent file.
- * @param rf recent file
- */
-extern void menu_recent_file_write_all(FILE *rf);
-
 /** User pushed a recent file submenu item.
  *
  * @param widget parent widget
index 3cea65cb543ddc85b94dd8e4d50d575e173f6a53..913127957aa19a2f1d51a1cbf1e2c0eceae20b59 100644 (file)
 #include <gtk/gtk.h>
 #include <glib.h>
 
-#include "gui_utils.h"
-#include "packet_list_store.h"
-#include "ui/gtk/new_packet_list.h"
-#include "epan/column_info.h"
-#include "epan/prefs.h"
+#include <epan/column_info.h>
+#include <epan/prefs.h>
 #include <epan/packet.h>
 #include <epan/epan_dissect.h>
-#include "ui/ui_util.h"
+#include <epan/column.h>
+#include <epan/strutil.h>
+#include <epan/emem.h>
+
+#include "ui/main_statusbar.h"
 #include "ui/progress_dlg.h"
+#include "ui/recent.h"
+#include "ui/recent_utils.h"
 #include "ui/simple_dialog.h"
-#include "ui/main_statusbar.h"
-#include "epan/emem.h"
+#include "ui/ui_util.h"
+
+#include "gui_utils.h"
+#include "packet_list_store.h"
+#include "ui/gtk/new_packet_list.h"
 #include "globals.h"
 #include "ui/gtk/gtkglobals.h"
 #include "ui/gtk/font_utils.h"
 #include "ui/gtk/packet_history.h"
-#include "epan/column.h"
-#include "epan/strutil.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/keys.h"
 #include "ui/gtk/menus.h"
 #include "color.h"
index b25bdf76f9488a5b40f094532af5bd2b3439d507..70cf706b4bf29ba32ea56739705a908dcc908643 100644 (file)
@@ -31,8 +31,6 @@
  *  @ingroup main_window_group
  */
 
-#define RECENT_KEY_COL_WIDTH                "column.width"
-
 typedef enum {
   COLUMN_SELECTED_SORT_ASCENDING,
   COLUMN_SELECTED_SORT_DESCENDING,
@@ -135,12 +133,6 @@ typedef enum {
  */
 void new_packet_list_copy_summary_cb(gpointer data _U_, copy_summary_type copy_type);
 
-/** Write all packet list geometry values to the recent file.
- *
- *  @param rf recent file handle from caller
- */
-extern void new_packet_list_recent_write_all(FILE *rf);
-
 GtkWidget * new_packet_list_get_widget(void);
 void new_packet_list_colorize_packets(void);
 
index f07f9e0d238caac613bd066064a32ad1e6f27741..9b35d3da17c7bc23462e5eff39fa55008acbf748 100644 (file)
 
 #include "../file.h"
 #include "../print.h"
-#include "ui/ui_util.h"
 #include "../summary.h"
+
+#include "ui/recent.h"
 #include "ui/simple_dialog.h"
+#include "ui/ui_util.h"
 
 #include "ui/gtk/font_utils.h"
 #include "ui/gtk/main.h"
@@ -71,7 +73,6 @@
 #include "ui/gtk/keys.h"
 #include "ui/gtk/gtkglobals.h"
 #include "ui/gtk/gui_utils.h"
-#include "ui/gtk/recent.h"
 
 #define BV_SIZE 75
 #define TV_SIZE 95
index b4c0aca5b767ffd06db66e8fdb9ec7fe35ea275d..faaf05f43c28b982cc7389c9560eeb4d5f874a4b 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <epan/filesystem.h>
 
+#include "ui/last_open_dir.h"
 #include "ui/simple_dialog.h"
 
 #include "ui/gtk/pixmap_save.h"
index c35dd1d09b4789794e47fa2bbae4414992860eb0..953de9c6842e4b1075e138d0a05ff4d7f814d947 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <epan/prefs.h>
 
+#include "ui/recent.h"
 #include "ui/simple_dialog.h"
 
 #include "ui/gtk/prefs_gui.h"
@@ -45,7 +46,6 @@
 #include "ui/gtk/main_proto_draw.h"
 #include "ui/gtk/main_toolbar.h"
 #include "ui/gtk/font_utils.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/webbrowser.h"
 #include "ui/gtk/main_welcome.h"
 
index 7575a43941ab0fa15cfe0c75d176b868d0f15aa6..22766e2ab7999d03c72f12f0789200221f067d5f 100644 (file)
@@ -38,7 +38,9 @@
 #include <epan/filesystem.h>
 #include <epan/prefs.h>
 
+#include "ui/recent.h"
 #include "ui/simple_dialog.h"
+
 #include <wsutil/file_util.h>
 
 #include "ui/gtk/main.h"
@@ -48,8 +50,8 @@
 #include "ui/gtk/gui_utils.h"
 #include "ui/gtk/gtkglobals.h"
 #include "ui/gtk/help_dlg.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/old-gtk-compat.h"
+
 enum {
   NAME_COLUMN,
   GLOBAL_COLUMN,
index f64c069ec21685ff8c76fbcdeeecfbb33455eab0..3b584bb1c972f617858ecbcde9d596a37595a1ea 100644 (file)
 
 #include "../util.h"
 #include "../g711.h"
-#include "ui/alert_box.h"
-#include "ui/simple_dialog.h"
 #include "../stat_menu.h"
-#include "ui/progress_dlg.h"
 #include "../tempfile.h"
+
+#include "ui/alert_box.h"
+#include "ui/last_open_dir.h"
+#include "ui/progress_dlg.h"
+#include "ui/simple_dialog.h"
+
 #include <wsutil/file_util.h>
 
 #include "ui/gtk/gtkglobals.h"
index 23217b89a39c0df3b0cd0045221a8480333f9de8..e3cbc3bcb61d2ee11d5f8fab6933ce4610a6ca5c 100644 (file)
@@ -41,6 +41,8 @@
 
 #include "../globals.h"
 #include "../stat_menu.h"
+
+#include "ui/last_open_dir.h"
 #include "ui/simple_dialog.h"
 
 #include "ui/gtk/rtp_stream_dlg.h"
index eb7aa7f3ec4f4103d050d5271a01397c7d3a5c5a..763951fb302962a139ad194e630b466fc13f1ee7 100644 (file)
@@ -40,7 +40,9 @@
 #include <epan/dissectors/packet-ieee80211.h>
 #include <epan/strutil.h>
 
+#include "ui/recent.h"
 #include "ui/simple_dialog.h"
+
 #include "../stat_menu.h"
 
 #include "ui/gtk/gtkglobals.h"
@@ -48,7 +50,6 @@
 #include "ui/gtk/filter_utils.h"
 #include "ui/gtk/gui_stat_menu.h"
 #include "ui/gtk/gui_utils.h"
-#include "ui/gtk/recent.h"
 #include "ui/gtk/help_dlg.h"
 #include "ui/gtk/main.h"
 #include "ui/gtk/utf8_entities.h"
index bb5ce0d21a7156f5c860926945087c48f58ee074..2d280c2905d5200f8dc403d9507eee1af787b087 100644 (file)
@@ -40,30 +40,9 @@ extern "C" {
 #endif /* __cplusplus */
 
 // These are defined elsewhere in ../gtk/
-#define RECENT_KEY_COL_WIDTH      "column.width"
-#define RECENT_KEY_CAPTURE_FILTER "recent.capture_filter"
 #define RECENT_KEY_CAPTURE_FILE   "recent.capture_file"
 #define RECENT_KEY_REMOTE_HOST "recent.remote_host"
 
-extern gboolean dfilter_combo_add_recent(gchar *filter);
-extern gboolean cfilter_combo_add_recent(gchar *filter);
-extern void dfilter_recent_combo_write_all(FILE *rf);
-extern void cfilter_combo_recent_write_all(FILE *rf);
-extern void new_packet_list_recent_write_all(FILE *rf);
-/** Get the latest opened directory.
- *
- * @return the dirname
- */
-extern char *get_last_open_dir(void);
-/* Add a new recent capture filename to the "Recent Files" submenu
-   (duplicates will be ignored) */
-extern void add_menu_recent_capture_file(gchar *cf_name);
-/** Write all recent capture filenames to the user's recent file.
- * @param rf recent file
- */
-extern void menu_recent_file_write_all(FILE *rf);
-
-
 /* Type of capture source */
 typedef enum {
     CAPTURE_IFLOCAL,        /**< Local network interface */
@@ -112,36 +91,6 @@ capture_remote_combo_add_recent(gchar *s);
  *  @todo Move these window functions to a new file win_utils.h?
  *  @{ */
 
-
-/** geometry values for use in window_get_geometry() and window_set_geometry() */
-typedef struct window_geometry_s {
-    gchar       *key;           /**< current key in hashtable (internally used only) */
-    gboolean    set_pos;        /**< set the x and y position values */
-    gint        x;              /**< the windows x position */
-    gint        y;              /**< the windows y position */
-    gboolean    set_size;       /**< set the width and height values */
-    gint        width;          /**< the windows width */
-    gint        height;         /**< the windows height */
-
-    gboolean    set_maximized;  /**< set the maximized state (GTK2 only) */
-    gboolean    maximized;      /**< the windows maximized state (GTK2 only) */
-} window_geometry_t;
-
-/** Write all geometry values of all windows to the recent file.
- * Will call write_recent_geom() for every existing window type.
- *
- * @param rf recent file handle from caller
- */
-extern void window_geom_recent_write_all(gpointer rf);
-
-/** Read in a single geometry key value pair from the recent file.
- *
- * @param name the geom_name of the window
- * @param key the subkey of this pair (e.g. "x")
- * @param value the new value (e.g. "123")
- */
-extern void window_geom_recent_read_pair(const char *name, const char *key, const char *value);
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
similarity index 96%
rename from ui/gtk/recent.h
rename to ui/recent.h
index d582573bbfb9881c24271580e87782c4d4fceced..b58a56d6b49605b5d175e88abceb8dda144e1515 100644 (file)
@@ -43,6 +43,12 @@ extern "C" {
 /** ???. */
 #define RECENT_KEY_DISPLAY_FILTER       "recent.display_filter"
 
+#define RECENT_KEY_COL_WIDTH            "column.width"
+
+#define RECENT_KEY_CAPTURE_FILTER       "recent.capture_filter"
+
+#define RECENT_KEY_REMOTE_HOST          "recent.remote_host"
+
 typedef struct _col_width_data {
   gint   cfmt;
   gchar *cfield;
index cd023a32a7567ea9e28c7a4239847eac99f672bf..4d60727ad8a154dee066e07923480e844006fafa 100644 (file)
 extern "C" {
 #endif /* __cplusplus */
 
-/* gui_utils.c */
+/** geometry values for use in window_get_geometry() and window_set_geometry() */
+typedef struct window_geometry_s {
+    gchar       *key;           /**< current key in hashtable (internally used only) */
+    gboolean    set_pos;        /**< set the x and y position values */
+    gint        x;              /**< the windows x position */
+    gint        y;              /**< the windows y position */
+    gboolean    set_size;       /**< set the width and height values */
+    gint        width;          /**< the windows width */
+    gint        height;         /**< the windows height */
+
+    gboolean    set_maximized;  /**< set the maximized state (GTK2 only) */
+    gboolean    maximized;      /**< the windows maximized state (GTK2 only) */
+} window_geometry_t;
 
 /* Set the name of the top-level window and its icon. */
 void set_main_window_name(const gchar *);