aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2006-09-22 21:14:54 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2006-09-22 21:14:54 +0000
commit25e3676115630a99bc427cfcf587be4e212ed7ea (patch)
treef003e5ec1c257836dda6c2c807fdb0ecccb60e73 /gtk
parent1ec9e0db960b0d91317503bfe38d63921a49d310 (diff)
Add support for reading from stdin under Windows. Based on a patch sent
in last year by Gianluca Varenni. Add partial support for reading from named pipes (currently disabled). Move utf_8to16() and utf_16to8() to a separate module (unicode-utils.[ch]) so that we don't have to cut and paste code in dumpcap.c. Fix up whitespace. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19291 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk')
-rw-r--r--gtk/font_utils.c10
-rw-r--r--gtk/help_dlg.c14
-rw-r--r--gtk/prefs_dlg.c2
-rw-r--r--gtk/webbrowser.c14
-rw-r--r--gtk/win32-file-dlg.c2
5 files changed, 21 insertions, 21 deletions
diff --git a/gtk/font_utils.c b/gtk/font_utils.c
index c2cd10b4a5..fb5da32635 100644
--- a/gtk/font_utils.c
+++ b/gtk/font_utils.c
@@ -36,7 +36,7 @@
#ifdef _WIN32
#include <windows.h>
#include <tchar.h>
-#include <epan/strutil.h>
+#include <epan/unicode-utils.h>
#endif
#include "main.h"
@@ -470,8 +470,8 @@ font_zoom(char *gui_font_name)
font_point_size_l = 10;
/* build a new font name */
- new_font_name = g_strdup_printf("-%s-%s-%s-%s-%s-%s-%s-%ld-%s-%s-%s-%s-%s-%s",
- font_foundry, font_family, font_weight, font_slant, font_set_width,
+ new_font_name = g_strdup_printf("-%s-%s-%s-%s-%s-%s-%s-%ld-%s-%s-%s-%s-%s-%s",
+ font_foundry, font_family, font_weight, font_slant, font_set_width,
font_add_style, font_pixel_size, font_point_size_l, font_res_x,
font_res_y, font_spacing, font_aver_width, font_charset_reg,
font_charset_encoding);
@@ -615,7 +615,7 @@ void app_font_gtk1_init(GtkWidget *top_level_w)
{
GtkStyle *style;
char winfont[80];
-
+
style = gtk_widget_get_style(top_level_w);
if (get_windows_font_gtk1(winfont, sizeof(winfont)) == 0)
style->font = gdk_font_load(winfont);
@@ -725,7 +725,7 @@ void font_init(void)
try_to_get_windows_font_gtk2();
#endif
#endif
-
+
/* Try to load the regular and boldface fixed-width fonts */
#if GTK_MAJOR_VERSION < 2
bold_font_name = user_font_boldify(prefs.gui_font_name1);
diff --git a/gtk/help_dlg.c b/gtk/help_dlg.c
index ee4582bb1b..3ce011f773 100644
--- a/gtk/help_dlg.c
+++ b/gtk/help_dlg.c
@@ -47,7 +47,7 @@
#ifdef HHC_DIR
#include <windows.h>
#include <htmlhelp.h>
-#include "epan/strutil.h"
+#include "epan/unicode-utils.h"
#endif
@@ -234,12 +234,12 @@ static void help_topic(const gchar *topic) {
HWND hw;
GString *url = g_string_new("");
- g_string_append_printf(url, "%s\\user-guide.chm::/%s>Wireshark Help",
+ g_string_append_printf(url, "%s\\user-guide.chm::/%s>Wireshark Help",
get_datafile_dir(), topic);
- hw = HtmlHelpW(NULL,
- utf_8to16(url->str),
- HH_DISPLAY_TOPIC, 0);
+ hw = HtmlHelpW(NULL,
+ utf_8to16(url->str),
+ HH_DISPLAY_TOPIC, 0);
if(hw == NULL) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Could not open help file: %s\\user-guide.chm",
@@ -492,13 +492,13 @@ topic_action(topic_action_e action)
}
-void
+void
topic_cb(GtkWidget *w _U_, topic_action_e action)
{
topic_action(action);
}
-void
+void
topic_menu_cb(GtkWidget *w _U_, gpointer data _U_, topic_action_e action) {
topic_action(action);
}
diff --git a/gtk/prefs_dlg.c b/gtk/prefs_dlg.c
index a83f0269e9..7301156ced 100644
--- a/gtk/prefs_dlg.c
+++ b/gtk/prefs_dlg.c
@@ -337,7 +337,7 @@ module_prefs_show(module_t *module, gpointer user_data)
prefs_pref_foreach(module, pref_show, main_tb);
/* Associate this module with the page's frame. */
- OBJECT_SET_DATA(frame, E_PAGE_MODULE_KEY, module);
+ OBJECT_SET_DATA(main_sw, E_PAGE_MODULE_KEY, module);
/* Add the page to the notebook */
gtk_notebook_append_page(GTK_NOTEBOOK(cts->notebook), main_sw, NULL);
diff --git a/gtk/webbrowser.c b/gtk/webbrowser.c
index debd00bff1..9fecc148a4 100644
--- a/gtk/webbrowser.c
+++ b/gtk/webbrowser.c
@@ -52,7 +52,7 @@
#include <windows.h>
/* We're using Unicode */
#include <tchar.h>
-#include <epan/strutil.h>
+#include <epan/unicode-utils.h>
/* if WIN32_LEAN_AND_MEAN is defined, shellapi.h is needed too */
#include <shellapi.h>
#elif defined (HAVE_OS_X_FRAMEWORKS)
@@ -140,7 +140,7 @@ browser_open_url (const gchar *url)
if (browser == NULL || ! strlen (browser))
{
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
"Web browser not specified.\n"
"Please correct the web browser setting in the Preferences dialog.");
g_free (browser);
@@ -161,9 +161,9 @@ browser_open_url (const gchar *url)
/* parse the cmd line */
if (! g_shell_parse_argv (cmd, NULL, &argv, &error))
{
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
PRIMARY_TEXT_START "Could not parse web browser command: \"%s\"" PRIMARY_TEXT_END
- "\n\n\"%s\"\n\n%s",
+ "\n\n\"%s\"\n\n%s",
browser, error->message,
"Please correct the web browser setting in the Preferences dialog.");
g_error_free (error);
@@ -177,9 +177,9 @@ browser_open_url (const gchar *url)
if (! retval)
{
- simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
PRIMARY_TEXT_START "Could not execute web browser: \"%s\"" PRIMARY_TEXT_END
- "\n\n\"%s\"\n\n%s",
+ "\n\n\"%s\"\n\n%s",
browser, error->message,
"Please correct the web browser setting in the Preferences dialog.");
g_error_free (error);
@@ -195,7 +195,7 @@ browser_open_url (const gchar *url)
/* GLIB version 1.x doesn't support the functions used above,
so simply do nothing for now, to be able to compile.
XXX - has to be improved */
- simple_dialog(ESD_TYPE_INFO, ESD_BTN_OK,
+ simple_dialog(ESD_TYPE_INFO, ESD_BTN_OK,
PRIMARY_TEXT_START "Web browser access not implemented." PRIMARY_TEXT_END
"\n\nThis Wireshark version (using the GLib 1.x toolkit) can't access web browsers. "
"\n\nYou may try to open the following URL in your web browser: \n\n"
diff --git a/gtk/win32-file-dlg.c b/gtk/win32-file-dlg.c
index d07b6cf9ad..7ab088e0cb 100644
--- a/gtk/win32-file-dlg.c
+++ b/gtk/win32-file-dlg.c
@@ -54,7 +54,7 @@
#include "print.h"
#include "simple_dialog.h"
#include "util.h"
-#include "epan/strutil.h"
+#include "epan/unicode-utils.h"
#include "file_dlg.h"
#include "capture_file_dlg.h"