2008-04-04 23:16:07 +00:00
|
|
|
/* main_welcome.c
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-16 00:17:51 +00:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
2008-04-17 23:59:56 +00:00
|
|
|
#include <time.h>
|
2008-04-16 00:17:51 +00:00
|
|
|
|
2008-04-04 23:16:07 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
#include <epan/prefs.h>
|
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
#include "../color.h"
|
2010-05-14 01:39:02 +00:00
|
|
|
#ifdef HAVE_LIBPCAP
|
2008-04-15 22:46:35 +00:00
|
|
|
#include "capture.h"
|
|
|
|
#include "capture-pcap-util.h"
|
|
|
|
#include "capture_opts.h"
|
2008-04-18 14:29:54 +00:00
|
|
|
#include "capture_ui_utils.h"
|
2010-05-14 01:39:02 +00:00
|
|
|
#endif
|
2008-04-15 22:46:35 +00:00
|
|
|
#include "simple_dialog.h"
|
2008-05-22 15:46:27 +00:00
|
|
|
#include <wsutil/file_util.h>
|
2008-04-15 02:14:22 +00:00
|
|
|
|
2008-04-13 00:55:59 +00:00
|
|
|
#include "gtk/gui_utils.h"
|
2008-04-15 02:14:22 +00:00
|
|
|
#include "gtk/color_utils.h"
|
2008-04-13 00:55:59 +00:00
|
|
|
#include "gtk/recent.h"
|
2008-04-15 02:14:22 +00:00
|
|
|
#include "gtk/gtkglobals.h"
|
2008-04-15 22:46:35 +00:00
|
|
|
#include "gtk/main.h"
|
2009-06-21 19:16:37 +00:00
|
|
|
#include "gtk/menus.h"
|
2008-04-13 00:55:59 +00:00
|
|
|
#include "gtk/main_welcome.h"
|
2008-04-15 02:14:22 +00:00
|
|
|
#include "gtk/help_dlg.h"
|
2010-05-14 01:39:02 +00:00
|
|
|
#include "gtk/capture_file_dlg.h"
|
2008-04-15 02:14:22 +00:00
|
|
|
#include "gtk/stock_icons.h"
|
2010-08-16 18:58:24 +00:00
|
|
|
#include "gtk/utf8_entities.h"
|
2010-05-14 01:39:02 +00:00
|
|
|
#ifdef HAVE_LIBPCAP
|
|
|
|
#include "gtk/capture_dlg.h"
|
|
|
|
#include "gtk/capture_if_dlg.h"
|
2008-06-24 03:38:15 +00:00
|
|
|
#include "gtk/capture_globals.h"
|
2010-05-14 01:39:02 +00:00
|
|
|
#endif
|
2008-06-24 22:53:52 +00:00
|
|
|
#include "../image/wssplash-dev.xpm"
|
2008-09-02 17:41:47 +00:00
|
|
|
#include "../version_info.h"
|
2008-04-15 02:14:22 +00:00
|
|
|
|
2009-09-16 19:23:15 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <tchar.h>
|
|
|
|
#include <windows.h>
|
|
|
|
#endif
|
|
|
|
|
2008-10-15 22:51:17 +00:00
|
|
|
#ifdef HAVE_AIRPCAP
|
|
|
|
#include "airpcap.h"
|
|
|
|
#include "airpcap_loader.h"
|
|
|
|
#include "airpcap_gui_utils.h"
|
|
|
|
#endif
|
2008-04-15 02:14:22 +00:00
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* XXX */
|
|
|
|
extern gint if_list_comparator_alph (const void *first_arg, const void *second_arg);
|
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
static GtkWidget *welcome_hb = NULL;
|
|
|
|
static GtkWidget *header_lb = NULL;
|
2009-12-02 00:31:04 +00:00
|
|
|
/* Foreground colors are set using Pango markup */
|
|
|
|
static GdkColor welcome_bg = { 0, 0xe6e6, 0xe6e6, 0xe6e6 };
|
|
|
|
static GdkColor header_bar_bg = { 0, 0x1818, 0x5c5c, 0xcaca };
|
|
|
|
static GdkColor topic_header_bg = { 0, 0x0101, 0x3939, 0xbebe };
|
|
|
|
static GdkColor topic_content_bg = { 0, 0xffff, 0xffff, 0xffff };
|
2008-06-18 20:14:28 +00:00
|
|
|
static GdkColor topic_item_idle_bg;
|
2009-12-02 00:31:04 +00:00
|
|
|
static GdkColor topic_item_entered_bg = { 0, 0xd3d3, 0xd8d8, 0xdada };
|
2008-04-15 02:14:22 +00:00
|
|
|
|
2008-06-18 20:14:28 +00:00
|
|
|
static GtkWidget *welcome_file_panel_vb = NULL;
|
2008-06-18 21:23:52 +00:00
|
|
|
#ifdef HAVE_LIBPCAP
|
2008-06-18 20:14:28 +00:00
|
|
|
static GtkWidget *welcome_if_panel_vb = NULL;
|
2008-06-18 21:23:52 +00:00
|
|
|
#endif
|
2008-04-15 22:46:35 +00:00
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
static GSList *status_messages = NULL;
|
2008-04-19 13:33:42 +00:00
|
|
|
|
|
|
|
/* The "scroll box dynamic" is a (complicated) pseudo widget to */
|
|
|
|
/* place a vertically list of widgets in (currently the interfaces and recent files). */
|
|
|
|
/* Once this list get's higher than a specified amount, */
|
|
|
|
/* it is moved into a scrolled_window. */
|
|
|
|
/* This is all complicated, the scrolled window is a bit ugly, */
|
|
|
|
/* the sizes might not be the same on all systems, ... */
|
|
|
|
/* ... but that's the best what we currently have */
|
|
|
|
#define SCROLL_BOX_CHILD_BOX "ScrollBoxDynamic_ChildBox"
|
|
|
|
#define SCROLL_BOX_MAX_CHILDS "ScrollBoxDynamic_MaxChilds"
|
|
|
|
#define SCROLL_BOX_SCROLLW_Y_SIZE "ScrollBoxDynamic_Scrollw_Y_Size"
|
|
|
|
#define SCROLL_BOX_SCROLLW "ScrollBoxDynamic_Scrollw"
|
|
|
|
|
|
|
|
|
|
|
|
static GtkWidget *
|
|
|
|
scroll_box_dynamic_new(GtkBox *child_box, guint max_childs, guint scrollw_y_size) {
|
|
|
|
GtkWidget * parent_box;
|
|
|
|
|
|
|
|
|
|
|
|
parent_box = gtk_vbox_new(FALSE, 0);
|
|
|
|
gtk_box_pack_start(GTK_BOX(parent_box), GTK_WIDGET(child_box), TRUE, TRUE, 0);
|
|
|
|
g_object_set_data(G_OBJECT(parent_box), SCROLL_BOX_CHILD_BOX, child_box);
|
|
|
|
g_object_set_data(G_OBJECT(parent_box), SCROLL_BOX_MAX_CHILDS, GINT_TO_POINTER(max_childs));
|
|
|
|
g_object_set_data(G_OBJECT(parent_box), SCROLL_BOX_SCROLLW_Y_SIZE, GINT_TO_POINTER(scrollw_y_size));
|
|
|
|
gtk_widget_show_all(parent_box);
|
|
|
|
|
|
|
|
return parent_box;
|
|
|
|
}
|
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
|
2008-04-19 13:33:42 +00:00
|
|
|
static GtkWidget *
|
|
|
|
scroll_box_dynamic_add(GtkWidget *parent_box)
|
|
|
|
{
|
|
|
|
GtkWidget *child_box;
|
|
|
|
GtkWidget *scrollw;
|
|
|
|
guint max_cnt;
|
|
|
|
guint curr_cnt;
|
|
|
|
guint scrollw_y_size;
|
|
|
|
GList *childs;
|
|
|
|
|
|
|
|
child_box = g_object_get_data(G_OBJECT(parent_box), SCROLL_BOX_CHILD_BOX);
|
|
|
|
max_cnt = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(parent_box), SCROLL_BOX_MAX_CHILDS));
|
2008-05-22 15:46:27 +00:00
|
|
|
|
2008-04-19 13:33:42 +00:00
|
|
|
/* get the current number of children */
|
|
|
|
childs = gtk_container_get_children(GTK_CONTAINER(child_box));
|
|
|
|
curr_cnt = g_list_length(childs);
|
|
|
|
g_list_free(childs);
|
|
|
|
|
|
|
|
/* have we just reached the max? */
|
|
|
|
if(curr_cnt == max_cnt) {
|
|
|
|
/* create the scrolled window */
|
|
|
|
/* XXX - there's no way to get rid of the shadow frame - except for creating an own widget :-( */
|
|
|
|
scrollw = scrolled_window_new(NULL, NULL);
|
|
|
|
scrollw_y_size = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(parent_box), SCROLL_BOX_SCROLLW_Y_SIZE));
|
2010-08-19 15:02:23 +00:00
|
|
|
gtk_widget_set_size_request(scrollw, -1, scrollw_y_size);
|
2008-04-19 13:33:42 +00:00
|
|
|
|
|
|
|
g_object_set_data(G_OBJECT(parent_box), SCROLL_BOX_SCROLLW, scrollw);
|
|
|
|
gtk_box_pack_start(GTK_BOX(parent_box), scrollw, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
/* move child_box from parent_box into scrolled window */
|
2009-04-09 05:51:56 +00:00
|
|
|
g_object_ref(child_box);
|
2008-04-19 13:33:42 +00:00
|
|
|
gtk_container_remove(GTK_CONTAINER(parent_box), child_box);
|
|
|
|
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw),
|
|
|
|
child_box);
|
2008-04-19 18:39:58 +00:00
|
|
|
gtk_widget_show_all(scrollw);
|
2008-04-19 13:33:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return child_box;
|
|
|
|
}
|
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
|
2008-04-19 13:33:42 +00:00
|
|
|
static GtkWidget *
|
|
|
|
scroll_box_dynamic_reset(GtkWidget *parent_box)
|
|
|
|
{
|
|
|
|
GtkWidget *child_box, *scrollw;
|
|
|
|
|
|
|
|
|
|
|
|
child_box = g_object_get_data(G_OBJECT(parent_box), SCROLL_BOX_CHILD_BOX);
|
|
|
|
scrollw = g_object_get_data(G_OBJECT(parent_box), SCROLL_BOX_SCROLLW);
|
|
|
|
|
|
|
|
if(scrollw != NULL) {
|
|
|
|
/* move the child_box back from scrolled window into the parent_box */
|
2009-04-09 05:51:56 +00:00
|
|
|
g_object_ref(child_box);
|
2008-04-19 13:33:42 +00:00
|
|
|
gtk_container_remove(GTK_CONTAINER(parent_box), scrollw);
|
|
|
|
g_object_set_data(G_OBJECT(parent_box), SCROLL_BOX_SCROLLW, NULL);
|
|
|
|
gtk_box_pack_start(GTK_BOX(parent_box), child_box, TRUE, TRUE, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return child_box;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* mouse entered this widget - change background color */
|
2008-04-15 02:14:22 +00:00
|
|
|
static gboolean
|
2008-04-15 22:46:35 +00:00
|
|
|
welcome_item_enter_cb(GtkWidget *eb, GdkEventCrossing *event _U_, gpointer user_data _U_)
|
2008-04-15 02:14:22 +00:00
|
|
|
{
|
|
|
|
gtk_widget_modify_bg(eb, GTK_STATE_NORMAL, &topic_item_entered_bg);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* mouse has left this widget - change background color */
|
2008-04-15 02:14:22 +00:00
|
|
|
static gboolean
|
2010-08-19 15:02:23 +00:00
|
|
|
welcome_item_leave_cb(GtkWidget *eb, GdkEventCrossing *event _U_, gpointer user_data _U_)
|
2008-04-15 02:14:22 +00:00
|
|
|
{
|
2008-04-17 00:31:38 +00:00
|
|
|
gtk_widget_modify_bg(eb, GTK_STATE_NORMAL, &topic_item_idle_bg);
|
2008-04-15 02:14:22 +00:00
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
typedef gboolean (*welcome_button_callback_t) (GtkWidget *widget,
|
|
|
|
GdkEventButton *event,
|
|
|
|
gpointer user_data);
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* create a "button widget" */
|
2008-06-18 20:14:28 +00:00
|
|
|
static GtkWidget *
|
2008-04-17 23:59:56 +00:00
|
|
|
welcome_button(const gchar *stock_item,
|
2010-08-19 15:02:23 +00:00
|
|
|
const gchar *title, const gchar *subtitle, const gchar *tooltip,
|
|
|
|
welcome_button_callback_t welcome_button_callback, gpointer welcome_button_callback_data)
|
2008-04-04 23:16:07 +00:00
|
|
|
{
|
2008-04-15 02:14:22 +00:00
|
|
|
GtkWidget *eb, *w, *item_hb, *text_vb;
|
|
|
|
gchar *formatted_text;
|
2008-04-17 03:24:24 +00:00
|
|
|
GtkTooltips *tooltips;
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
|
2008-04-17 03:24:24 +00:00
|
|
|
tooltips = gtk_tooltips_new();
|
|
|
|
|
2008-04-04 23:16:07 +00:00
|
|
|
item_hb = gtk_hbox_new(FALSE, 1);
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* event box (for background color and events) */
|
2008-04-15 02:14:22 +00:00
|
|
|
eb = gtk_event_box_new();
|
|
|
|
gtk_container_add(GTK_CONTAINER(eb), item_hb);
|
2008-04-17 00:31:38 +00:00
|
|
|
gtk_widget_modify_bg(eb, GTK_STATE_NORMAL, &topic_item_idle_bg);
|
2008-04-17 03:24:24 +00:00
|
|
|
if(tooltip != NULL) {
|
|
|
|
gtk_tooltips_set_tip(tooltips, eb, tooltip, "");
|
2008-05-22 15:46:27 +00:00
|
|
|
}
|
2008-04-15 02:14:22 +00:00
|
|
|
|
|
|
|
g_signal_connect(eb, "enter-notify-event", G_CALLBACK(welcome_item_enter_cb), NULL);
|
|
|
|
g_signal_connect(eb, "leave-notify-event", G_CALLBACK(welcome_item_leave_cb), NULL);
|
2010-08-19 15:02:23 +00:00
|
|
|
g_signal_connect(eb, "button-release-event", G_CALLBACK(welcome_button_callback), welcome_button_callback_data);
|
2008-04-15 02:14:22 +00:00
|
|
|
|
|
|
|
/* icon */
|
|
|
|
w = gtk_image_new_from_stock(stock_item, GTK_ICON_SIZE_LARGE_TOOLBAR);
|
|
|
|
gtk_box_pack_start(GTK_BOX(item_hb), w, FALSE, FALSE, 5);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
text_vb = gtk_vbox_new(FALSE, 3);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
/* title */
|
|
|
|
w = gtk_label_new(title);
|
2009-04-21 16:57:52 +00:00
|
|
|
gtk_misc_set_alignment (GTK_MISC(w), 0.0f, 0.5f);
|
2008-05-14 10:56:31 +00:00
|
|
|
formatted_text = g_strdup_printf("<span weight=\"bold\" size=\"x-large\" foreground=\"black\">%s</span>", title);
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_label_set_markup(GTK_LABEL(w), formatted_text);
|
|
|
|
g_free(formatted_text);
|
|
|
|
gtk_box_pack_start(GTK_BOX(text_vb), w, FALSE, FALSE, 1);
|
2008-04-17 23:59:56 +00:00
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
/* subtitle */
|
|
|
|
w = gtk_label_new(subtitle);
|
2009-04-21 16:57:52 +00:00
|
|
|
gtk_misc_set_alignment (GTK_MISC(w), 0.0f, 0.5f);
|
2008-05-14 10:56:31 +00:00
|
|
|
formatted_text = g_strdup_printf("<span size=\"small\" foreground=\"black\">%s</span>", subtitle);
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_label_set_markup(GTK_LABEL(w), formatted_text);
|
|
|
|
g_free(formatted_text);
|
|
|
|
gtk_box_pack_start(GTK_BOX(text_vb), w, FALSE, FALSE, 1);
|
2008-04-17 23:59:56 +00:00
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(item_hb), text_vb, TRUE, TRUE, 5);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
return eb;
|
2008-04-04 23:16:07 +00:00
|
|
|
}
|
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
|
|
|
|
/* Hack to handle welcome-button "button-release-event" callback */
|
|
|
|
/* 1. Dispatch to desired actual callback */
|
|
|
|
/* 2. Return TRUE for the event callback. */
|
|
|
|
/* user_data: actual (no arg) callback fcn to be invoked. */
|
|
|
|
static gboolean
|
|
|
|
welcome_button_callback_helper(GtkWidget *w, GdkEventButton *event _U_, gpointer user_data)
|
|
|
|
{
|
|
|
|
void (*funct)(GtkWidget *, gpointer) = user_data;
|
|
|
|
(*funct)(w, NULL);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
static void
|
|
|
|
welcome_header_set_message(gchar *msg) {
|
|
|
|
GString *message;
|
|
|
|
time_t secs = time(NULL);
|
|
|
|
struct tm *now = localtime(&secs);
|
2010-08-16 18:32:27 +00:00
|
|
|
|
2009-12-02 00:31:04 +00:00
|
|
|
message = g_string_new("<span weight=\"bold\" size=\"x-large\" foreground=\"white\">");
|
2010-08-16 18:32:27 +00:00
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
if (msg) {
|
2010-08-19 15:02:23 +00:00
|
|
|
g_string_append(message, msg);
|
2009-04-29 22:42:33 +00:00
|
|
|
} else { /* Use our default header */
|
2010-08-19 15:02:23 +00:00
|
|
|
if ((now->tm_mon == 3 && now->tm_mday == 1) || (now->tm_mon == 6 && now->tm_mday == 14)) {
|
|
|
|
g_string_append(message, "Sniffing the glue that holds the Internet together");
|
|
|
|
} else {
|
|
|
|
g_string_append(message, prefs.gui_start_title);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (prefs.gui_version_in_start_page) {
|
|
|
|
g_string_append_printf(message, "</span>\n<span size=\"large\" foreground=\"white\">Version " VERSION "%s",
|
|
|
|
wireshark_svnversion);
|
|
|
|
}
|
2009-04-29 22:42:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
g_string_append(message, "</span>");
|
|
|
|
|
|
|
|
gtk_label_set_markup(GTK_LABEL(header_lb), message->str);
|
|
|
|
g_string_free(message, TRUE);
|
|
|
|
}
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* create the banner "above our heads" */
|
2008-06-18 20:14:28 +00:00
|
|
|
static GtkWidget *
|
2008-04-04 23:16:07 +00:00
|
|
|
welcome_header_new(void)
|
|
|
|
{
|
|
|
|
GtkWidget *item_vb;
|
|
|
|
GtkWidget *item_hb;
|
|
|
|
GtkWidget *eb;
|
|
|
|
GtkWidget *icon;
|
|
|
|
|
|
|
|
item_vb = gtk_vbox_new(FALSE, 0);
|
|
|
|
|
|
|
|
/* colorize vbox */
|
|
|
|
eb = gtk_event_box_new();
|
|
|
|
gtk_container_add(GTK_CONTAINER(eb), item_vb);
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_widget_modify_bg(eb, GTK_STATE_NORMAL, &header_bar_bg);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
item_hb = gtk_hbox_new(FALSE, 0);
|
|
|
|
gtk_box_pack_start(GTK_BOX(item_vb), item_hb, FALSE, FALSE, 10);
|
|
|
|
|
|
|
|
icon = xpm_to_widget_from_parent(top_level, wssplash_xpm);
|
|
|
|
gtk_box_pack_start(GTK_BOX(item_hb), icon, FALSE, FALSE, 10);
|
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
header_lb = gtk_label_new(NULL);
|
|
|
|
welcome_header_set_message(NULL);
|
|
|
|
gtk_misc_set_alignment (GTK_MISC(header_lb), 0.0f, 0.5f);
|
|
|
|
gtk_box_pack_start(GTK_BOX(item_hb), header_lb, TRUE, TRUE, 5);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
gtk_widget_show_all(eb);
|
|
|
|
|
|
|
|
return eb;
|
|
|
|
}
|
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
void
|
|
|
|
welcome_header_push_msg(gchar *msg) {
|
|
|
|
gchar *msg_copy = g_strdup(msg);
|
2010-08-16 18:32:27 +00:00
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
status_messages = g_slist_append(status_messages, msg_copy);
|
2010-08-16 18:32:27 +00:00
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
welcome_header_set_message(msg_copy);
|
2010-08-16 18:32:27 +00:00
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
gtk_widget_hide(welcome_hb);
|
|
|
|
}
|
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
void
|
2009-05-08 15:16:07 +00:00
|
|
|
welcome_header_pop_msg(void) {
|
2010-08-16 18:32:27 +00:00
|
|
|
gchar *msg = NULL;
|
2009-04-29 22:42:33 +00:00
|
|
|
|
|
|
|
if (status_messages) {
|
2010-08-19 15:02:23 +00:00
|
|
|
g_free(status_messages->data);
|
2009-04-29 22:42:33 +00:00
|
|
|
status_messages = g_slist_delete_link(status_messages, status_messages);
|
|
|
|
}
|
2010-08-16 18:32:27 +00:00
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
if (status_messages) {
|
2010-08-19 15:02:23 +00:00
|
|
|
msg = status_messages->data;
|
2009-04-29 22:42:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
welcome_header_set_message(msg);
|
2010-08-16 18:32:27 +00:00
|
|
|
|
2009-04-29 22:42:33 +00:00
|
|
|
if (!status_messages) {
|
|
|
|
gtk_widget_show(welcome_hb);
|
|
|
|
}
|
|
|
|
}
|
2008-04-15 02:14:22 +00:00
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* create a "topic header widget" */
|
2008-06-18 20:14:28 +00:00
|
|
|
static GtkWidget *
|
2008-04-04 23:16:07 +00:00
|
|
|
welcome_topic_header_new(const char *header)
|
|
|
|
{
|
|
|
|
GtkWidget *w;
|
|
|
|
GtkWidget *eb;
|
|
|
|
gchar *formatted_message;
|
|
|
|
|
|
|
|
|
|
|
|
w = gtk_label_new(header);
|
2009-12-02 00:31:04 +00:00
|
|
|
formatted_message = g_strdup_printf("<span weight=\"bold\" size=\"x-large\" foreground=\"white\">%s</span>", header);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_label_set_markup(GTK_LABEL(w), formatted_message);
|
|
|
|
g_free(formatted_message);
|
|
|
|
|
|
|
|
/* colorize vbox */
|
|
|
|
eb = gtk_event_box_new();
|
|
|
|
gtk_container_add(GTK_CONTAINER(eb), w);
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_widget_modify_bg(eb, GTK_STATE_NORMAL, &topic_header_bg);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
return eb;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* create a "topic widget" */
|
2008-06-18 20:14:28 +00:00
|
|
|
static GtkWidget *
|
2008-04-04 23:16:07 +00:00
|
|
|
welcome_topic_new(const char *header, GtkWidget **to_fill)
|
|
|
|
{
|
|
|
|
GtkWidget *topic_vb;
|
|
|
|
GtkWidget *layout_vb;
|
|
|
|
GtkWidget *topic_eb;
|
|
|
|
GtkWidget *topic_header;
|
|
|
|
|
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
topic_vb = gtk_vbox_new(FALSE, 0);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
topic_header = welcome_topic_header_new(header);
|
|
|
|
gtk_box_pack_start(GTK_BOX(topic_vb), topic_header, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
layout_vb = gtk_vbox_new(FALSE, 5);
|
2008-06-29 15:51:43 +00:00
|
|
|
gtk_container_set_border_width(GTK_CONTAINER(layout_vb), 10);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_vb), layout_vb, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
/* colorize vbox (we need an event box for this!) */
|
|
|
|
topic_eb = gtk_event_box_new();
|
|
|
|
gtk_container_add(GTK_CONTAINER(topic_eb), topic_vb);
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_widget_modify_bg(topic_eb, GTK_STATE_NORMAL, &topic_content_bg);
|
2008-04-04 23:16:07 +00:00
|
|
|
*to_fill = layout_vb;
|
|
|
|
|
|
|
|
return topic_eb;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* a file link was pressed */
|
2008-04-04 23:16:07 +00:00
|
|
|
static gboolean
|
2010-08-19 15:02:23 +00:00
|
|
|
welcome_filename_link_press_cb(GtkWidget *widget _U_, GdkEventButton *event _U_, gpointer data)
|
2008-04-15 22:46:35 +00:00
|
|
|
{
|
|
|
|
menu_open_filename(data);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
|
|
|
|
/* create a "file link widget" */
|
2008-06-18 20:14:28 +00:00
|
|
|
static GtkWidget *
|
2008-04-15 22:46:35 +00:00
|
|
|
welcome_filename_link_new(const gchar *filename, GtkWidget **label)
|
2008-04-04 23:16:07 +00:00
|
|
|
{
|
2010-08-19 15:02:23 +00:00
|
|
|
GtkWidget *w;
|
|
|
|
GtkWidget *eb;
|
|
|
|
GString *str;
|
|
|
|
gchar *str_escaped;
|
2010-08-16 17:53:43 +00:00
|
|
|
glong uni_len;
|
|
|
|
gsize uni_start, uni_end;
|
2010-08-16 18:32:27 +00:00
|
|
|
const glong max = 60;
|
2010-08-19 15:02:23 +00:00
|
|
|
int err;
|
2010-08-16 17:53:43 +00:00
|
|
|
struct stat stat_buf;
|
2008-04-17 04:05:14 +00:00
|
|
|
GtkTooltips *tooltips;
|
|
|
|
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-17 04:05:14 +00:00
|
|
|
tooltips = gtk_tooltips_new();
|
2008-04-15 22:46:35 +00:00
|
|
|
|
2008-04-17 00:31:38 +00:00
|
|
|
/* filename */
|
2008-04-15 22:46:35 +00:00
|
|
|
str = g_string_new(filename);
|
2010-08-16 17:53:43 +00:00
|
|
|
uni_len = g_utf8_strlen(str->str, str->len);
|
2008-04-15 22:46:35 +00:00
|
|
|
|
2008-04-17 00:31:38 +00:00
|
|
|
/* cut max filename length */
|
2010-08-16 17:53:43 +00:00
|
|
|
if (uni_len > max) {
|
2010-08-19 15:02:23 +00:00
|
|
|
uni_start = g_utf8_offset_to_pointer(str->str, 20) - str->str;
|
|
|
|
uni_end = g_utf8_offset_to_pointer(str->str, uni_len - max) - str->str;
|
2010-08-16 17:53:43 +00:00
|
|
|
g_string_erase(str, uni_start, uni_end);
|
|
|
|
g_string_insert(str, uni_start, " " UTF8_HORIZONTAL_ELLIPSIS " ");
|
2008-04-15 22:46:35 +00:00
|
|
|
}
|
|
|
|
|
2009-05-22 23:09:31 +00:00
|
|
|
/* escape the possibly shortened filename before adding pango language */
|
|
|
|
str_escaped=g_markup_escape_text(str->str, -1);
|
|
|
|
g_string_free(str, TRUE);
|
|
|
|
str=g_string_new(str_escaped);
|
|
|
|
g_free(str_escaped);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Add file size. We use binary prefixes instead of IEC because that's what
|
|
|
|
* most OSes use.
|
|
|
|
*/
|
2008-05-22 15:46:27 +00:00
|
|
|
err = ws_stat(filename, &stat_buf);
|
2008-04-17 00:31:38 +00:00
|
|
|
if(err == 0) {
|
2009-05-22 23:09:31 +00:00
|
|
|
if (stat_buf.st_size/1024/1024/1024 > 10) {
|
|
|
|
g_string_append_printf(str, " (%" G_GINT64_MODIFIER "d GB)", (gint64) (stat_buf.st_size/1024/1024/1024));
|
2010-08-19 15:02:23 +00:00
|
|
|
} else if (stat_buf.st_size/1024/1024 > 10) {
|
2009-05-22 23:09:31 +00:00
|
|
|
g_string_append_printf(str, " (%" G_GINT64_MODIFIER "d MB)", (gint64) (stat_buf.st_size/1024/1024));
|
2008-04-17 00:31:38 +00:00
|
|
|
} else if (stat_buf.st_size/1024 > 10) {
|
2009-05-22 23:09:31 +00:00
|
|
|
g_string_append_printf(str, " (%" G_GINT64_MODIFIER "d KB)", (gint64) (stat_buf.st_size/1024));
|
2008-04-17 00:31:38 +00:00
|
|
|
} else {
|
2009-05-22 23:09:31 +00:00
|
|
|
g_string_append_printf(str, " (%" G_GINT64_MODIFIER "d Bytes)", (gint64) (stat_buf.st_size));
|
2008-04-17 00:31:38 +00:00
|
|
|
}
|
|
|
|
} else {
|
2008-04-17 08:53:09 +00:00
|
|
|
g_string_append(str, " [not found]");
|
2008-04-17 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* pango format string */
|
2008-04-17 08:53:09 +00:00
|
|
|
if(err == 0) {
|
|
|
|
g_string_prepend(str, "<span foreground='blue'>");
|
|
|
|
g_string_append(str, "</span>");
|
|
|
|
}
|
2008-04-15 22:46:35 +00:00
|
|
|
|
2008-04-17 00:31:38 +00:00
|
|
|
/* label */
|
2008-04-15 22:46:35 +00:00
|
|
|
w = gtk_label_new(str->str);
|
2008-04-04 23:16:07 +00:00
|
|
|
*label = w;
|
2008-04-15 22:46:35 +00:00
|
|
|
gtk_label_set_markup(GTK_LABEL(w), str->str);
|
|
|
|
gtk_misc_set_padding(GTK_MISC(w), 5, 2);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2009-05-22 23:09:31 +00:00
|
|
|
/* event box */
|
2008-04-04 23:16:07 +00:00
|
|
|
eb = gtk_event_box_new();
|
|
|
|
gtk_container_add(GTK_CONTAINER(eb), w);
|
2008-04-17 04:05:14 +00:00
|
|
|
gtk_tooltips_set_tip(tooltips, eb, filename, "");
|
2008-04-17 08:53:09 +00:00
|
|
|
if(err != 0) {
|
|
|
|
gtk_widget_set_sensitive(w, FALSE);
|
|
|
|
}
|
2008-04-17 23:59:56 +00:00
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
g_signal_connect(eb, "enter-notify-event", G_CALLBACK(welcome_item_enter_cb), w);
|
|
|
|
g_signal_connect(eb, "leave-notify-event", G_CALLBACK(welcome_item_leave_cb), w);
|
2008-04-15 22:46:35 +00:00
|
|
|
g_signal_connect(eb, "button-press-event", G_CALLBACK(welcome_filename_link_press_cb), (gchar *) filename);
|
|
|
|
|
|
|
|
g_string_free(str, TRUE);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
return eb;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* reset the list of recent files */
|
|
|
|
void
|
2008-12-02 08:11:23 +00:00
|
|
|
main_welcome_reset_recent_capture_files(void)
|
2008-04-15 22:46:35 +00:00
|
|
|
{
|
2008-04-19 13:33:42 +00:00
|
|
|
GtkWidget *child_box;
|
2008-04-15 22:46:35 +00:00
|
|
|
GList* child_list;
|
|
|
|
GList* child_list_item;
|
2008-04-17 23:59:56 +00:00
|
|
|
|
2008-04-19 13:33:42 +00:00
|
|
|
|
2008-04-19 18:39:58 +00:00
|
|
|
if(welcome_file_panel_vb) {
|
|
|
|
child_box = scroll_box_dynamic_reset(welcome_file_panel_vb);
|
|
|
|
child_list = gtk_container_get_children(GTK_CONTAINER(child_box));
|
|
|
|
child_list_item = child_list;
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-19 18:39:58 +00:00
|
|
|
while(child_list_item) {
|
|
|
|
gtk_container_remove(GTK_CONTAINER(child_box), child_list_item->data);
|
|
|
|
child_list_item = g_list_next(child_list_item);
|
|
|
|
}
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-19 18:39:58 +00:00
|
|
|
g_list_free(child_list);
|
|
|
|
}
|
2008-04-04 23:16:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* add a new file to the list of recent files */
|
|
|
|
void
|
|
|
|
main_welcome_add_recent_capture_files(const char *widget_cf_name)
|
|
|
|
{
|
|
|
|
GtkWidget *w;
|
2008-04-19 13:33:42 +00:00
|
|
|
GtkWidget *child_box;
|
2008-04-15 22:46:35 +00:00
|
|
|
GtkWidget *label;
|
2008-04-15 02:14:22 +00:00
|
|
|
|
2008-04-19 13:33:42 +00:00
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
w = welcome_filename_link_new(widget_cf_name, &label);
|
2008-04-17 00:31:38 +00:00
|
|
|
gtk_widget_modify_bg(w, GTK_STATE_NORMAL, &topic_item_idle_bg);
|
2009-04-21 16:57:52 +00:00
|
|
|
gtk_misc_set_alignment (GTK_MISC(label), 0.0f, 0.0f);
|
2008-04-19 13:33:42 +00:00
|
|
|
child_box = scroll_box_dynamic_add(welcome_file_panel_vb);
|
|
|
|
gtk_box_pack_start(GTK_BOX(child_box), w, FALSE, FALSE, 0);
|
2008-04-15 22:46:35 +00:00
|
|
|
gtk_widget_show_all(w);
|
2008-04-19 13:33:42 +00:00
|
|
|
gtk_widget_show_all(child_box);
|
2008-04-15 22:46:35 +00:00
|
|
|
}
|
2008-04-15 02:14:22 +00:00
|
|
|
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
#ifdef HAVE_LIBPCAP
|
|
|
|
/* user clicked on an interface button */
|
2008-04-15 02:14:22 +00:00
|
|
|
static gboolean
|
2010-08-19 15:02:23 +00:00
|
|
|
welcome_if_press_cb(GtkWidget *widget _U_, GdkEventButton *event _U_, gpointer data)
|
2008-04-15 22:46:35 +00:00
|
|
|
{
|
2010-05-15 19:38:13 +00:00
|
|
|
cap_settings_t cap_settings;
|
|
|
|
|
2009-03-13 22:06:48 +00:00
|
|
|
g_free(global_capture_opts.iface);
|
|
|
|
g_free(global_capture_opts.iface_descr);
|
2008-04-15 02:14:22 +00:00
|
|
|
|
2008-06-24 03:38:15 +00:00
|
|
|
global_capture_opts.iface = g_strdup(data);
|
|
|
|
global_capture_opts.iface_descr = NULL;
|
2008-04-15 22:46:35 +00:00
|
|
|
/* XXX - fix this */
|
2008-06-24 03:38:15 +00:00
|
|
|
/*global_capture_opts.iface_descr = get_interface_descriptive_name(global_capture_opts.iface);*/
|
2010-05-15 19:38:13 +00:00
|
|
|
cap_settings = capture_get_cap_settings (global_capture_opts.iface);;
|
|
|
|
global_capture_opts.monitor_mode = cap_settings.monitor_mode;
|
|
|
|
global_capture_opts.linktype = cap_settings.linktype;
|
2008-04-15 02:14:22 +00:00
|
|
|
|
|
|
|
/* XXX - remove this? */
|
2008-06-24 03:38:15 +00:00
|
|
|
if (global_capture_opts.save_file) {
|
|
|
|
g_free(global_capture_opts.save_file);
|
|
|
|
global_capture_opts.save_file = NULL;
|
2008-04-15 02:14:22 +00:00
|
|
|
}
|
|
|
|
|
2008-10-15 22:51:17 +00:00
|
|
|
#ifdef HAVE_AIRPCAP
|
|
|
|
airpcap_if_active = get_airpcap_if_from_name(airpcap_if_list, global_capture_opts.iface);
|
|
|
|
airpcap_if_selected = airpcap_if_active;
|
|
|
|
airpcap_set_toolbar_start_capture(airpcap_if_active);
|
|
|
|
#endif
|
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
capture_start_cb(NULL, NULL);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* create a single interface entry */
|
|
|
|
static GtkWidget *
|
2009-02-01 22:20:42 +00:00
|
|
|
welcome_if_new(const if_info_t *if_info, const gchar *user_descr, GdkColor *topic_bg _U_, gpointer interf)
|
2008-04-04 23:16:07 +00:00
|
|
|
{
|
|
|
|
GtkWidget *interface_hb;
|
|
|
|
GtkWidget *w;
|
|
|
|
GString *message;
|
2008-04-15 02:14:22 +00:00
|
|
|
GtkWidget *eb;
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
/* event box */
|
|
|
|
eb = gtk_event_box_new();
|
2008-04-17 00:31:38 +00:00
|
|
|
gtk_widget_modify_bg(eb, GTK_STATE_NORMAL, &topic_item_idle_bg);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
g_signal_connect(eb, "enter-notify-event", G_CALLBACK(welcome_item_enter_cb), NULL);
|
|
|
|
g_signal_connect(eb, "leave-notify-event", G_CALLBACK(welcome_item_leave_cb), NULL);
|
|
|
|
g_signal_connect(eb, "button-press-event", G_CALLBACK(welcome_if_press_cb), interf);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
interface_hb = gtk_hbox_new(FALSE, 5);
|
|
|
|
gtk_container_add(GTK_CONTAINER(eb), interface_hb);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
/* icon */
|
2009-02-01 22:20:42 +00:00
|
|
|
w = capture_get_if_icon(if_info);
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(interface_hb), w, FALSE, FALSE, 5);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2009-02-01 22:20:42 +00:00
|
|
|
if (user_descr != NULL)
|
|
|
|
message = g_string_new(user_descr);
|
|
|
|
else if (if_info->description != NULL)
|
|
|
|
message = g_string_new(if_info->description);
|
|
|
|
else
|
|
|
|
message = g_string_new(if_info->name);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
/* truncate string if it's too long */
|
2008-04-15 02:14:22 +00:00
|
|
|
/* (the number of chars is a bit arbitrary, though) */
|
|
|
|
if(message->len > 48) {
|
|
|
|
g_string_truncate(message, 45);
|
2008-04-04 23:16:07 +00:00
|
|
|
g_string_append (message, " ...");
|
|
|
|
}
|
2008-04-15 02:14:22 +00:00
|
|
|
g_string_prepend(message, "<span foreground='blue'>");
|
|
|
|
g_string_append (message, "</span>");
|
2008-04-04 23:16:07 +00:00
|
|
|
w = gtk_label_new(message->str);
|
|
|
|
gtk_label_set_markup(GTK_LABEL(w), message->str);
|
|
|
|
g_string_free(message, TRUE);
|
|
|
|
|
2009-04-21 16:57:52 +00:00
|
|
|
gtk_misc_set_alignment (GTK_MISC(w), 0.0f, 0.0f);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(interface_hb), w, FALSE, FALSE, 0);
|
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
return eb;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-18 20:14:28 +00:00
|
|
|
/* load the list of interfaces */
|
|
|
|
static void
|
|
|
|
welcome_if_panel_load(void)
|
2008-04-15 02:14:22 +00:00
|
|
|
{
|
2010-08-19 15:02:23 +00:00
|
|
|
GtkWidget *child_box;
|
|
|
|
GtkWidget *interface_hb;
|
|
|
|
|
|
|
|
if_info_t *if_info;
|
|
|
|
GList *if_list;
|
|
|
|
int err;
|
2010-08-21 16:38:13 +00:00
|
|
|
gchar *err_str = NULL;
|
2010-08-19 15:02:23 +00:00
|
|
|
int ifs;
|
|
|
|
GList *curr;
|
|
|
|
gchar *user_descr;
|
|
|
|
|
|
|
|
|
|
|
|
/* LOAD THE INTERFACES */
|
|
|
|
if_list = capture_interface_list(&err, &err_str);
|
|
|
|
if_list = g_list_sort (if_list, if_list_comparator_alph);
|
|
|
|
if (if_list == NULL && err == CANT_GET_INTERFACE_LIST) {
|
|
|
|
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_str);
|
|
|
|
g_free(err_str);
|
|
|
|
return;
|
2010-08-20 22:15:07 +00:00
|
|
|
} else if (err_str) {
|
|
|
|
g_free(err_str);
|
2010-08-19 15:02:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* List the interfaces */
|
|
|
|
for(ifs = 0; (curr = g_list_nth(if_list, ifs)); ifs++) {
|
|
|
|
/*g_string_assign(if_tool_str, "");*/
|
|
|
|
if_info = curr->data;
|
|
|
|
|
|
|
|
/* Continue if capture device is hidden */
|
|
|
|
if (prefs_is_capture_device_hidden(if_info->name)) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
user_descr = capture_dev_user_descr_find(if_info->name);
|
|
|
|
if (user_descr) {
|
2008-04-18 14:29:54 +00:00
|
|
|
#ifndef _WIN32
|
2010-08-19 15:02:23 +00:00
|
|
|
gchar *comment = user_descr;
|
|
|
|
user_descr = g_strdup_printf("%s (%s)", comment, if_info->name);
|
|
|
|
g_free (comment);
|
2008-04-18 14:29:54 +00:00
|
|
|
#endif
|
2010-08-19 15:02:23 +00:00
|
|
|
interface_hb = welcome_if_new(if_info, user_descr, &topic_content_bg, g_strdup(if_info->name));
|
|
|
|
g_free (user_descr);
|
|
|
|
} else {
|
|
|
|
interface_hb = welcome_if_new(if_info, NULL, &topic_content_bg, g_strdup(if_info->name));
|
|
|
|
}
|
2008-04-18 14:29:54 +00:00
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
child_box = scroll_box_dynamic_add(welcome_if_panel_vb);
|
|
|
|
gtk_box_pack_start(GTK_BOX(child_box), interface_hb, FALSE, FALSE, 1);
|
|
|
|
}
|
2008-04-15 02:14:22 +00:00
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
free_interface_list(if_list);
|
2008-04-04 23:16:07 +00:00
|
|
|
}
|
2008-04-15 02:14:22 +00:00
|
|
|
#endif /* HAVE_LIBPCAP */
|
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
|
2008-06-18 20:14:28 +00:00
|
|
|
/* reload the list of interfaces */
|
|
|
|
void
|
|
|
|
welcome_if_panel_reload(void)
|
|
|
|
{
|
|
|
|
#ifdef HAVE_LIBPCAP
|
|
|
|
GtkWidget *child_box;
|
|
|
|
GList* child_list;
|
|
|
|
GList* child_list_item;
|
|
|
|
|
|
|
|
|
|
|
|
if(welcome_if_panel_vb) {
|
|
|
|
child_box = scroll_box_dynamic_reset(welcome_if_panel_vb);
|
|
|
|
child_list = gtk_container_get_children(GTK_CONTAINER(child_box));
|
|
|
|
child_list_item = child_list;
|
|
|
|
|
|
|
|
while(child_list_item) {
|
|
|
|
gtk_container_remove(GTK_CONTAINER(child_box), child_list_item->data);
|
|
|
|
child_list_item = g_list_next(child_list_item);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_list_free(child_list);
|
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
welcome_if_panel_load();
|
|
|
|
gtk_widget_show_all(welcome_if_panel_vb);
|
2008-06-18 20:14:28 +00:00
|
|
|
}
|
|
|
|
#endif /* HAVE_LIBPCAP */
|
|
|
|
}
|
|
|
|
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* create the welcome page */
|
2008-04-04 23:16:07 +00:00
|
|
|
GtkWidget *
|
|
|
|
welcome_new(void)
|
|
|
|
{
|
|
|
|
GtkWidget *welcome_scrollw;
|
2009-12-02 00:31:04 +00:00
|
|
|
GtkWidget *welcome_eb;
|
2008-04-04 23:16:07 +00:00
|
|
|
GtkWidget *welcome_vb;
|
|
|
|
GtkWidget *column_vb;
|
|
|
|
GtkWidget *item_hb;
|
|
|
|
GtkWidget *w;
|
|
|
|
GtkWidget *header;
|
|
|
|
GtkWidget *topic_vb;
|
|
|
|
GtkWidget *topic_to_fill;
|
2008-06-18 20:59:57 +00:00
|
|
|
#ifdef HAVE_LIBPCAP
|
2008-06-18 20:14:28 +00:00
|
|
|
GtkWidget *if_child_box;
|
2008-06-18 20:59:57 +00:00
|
|
|
#endif /* HAVE_LIBPCAP */
|
2008-04-19 13:33:42 +00:00
|
|
|
GtkWidget *file_child_box;
|
2008-05-14 10:56:31 +00:00
|
|
|
gchar *label_text;
|
2009-09-16 19:23:15 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
LONG reg_ret;
|
|
|
|
DWORD chimney_enabled = 0;
|
2009-09-16 20:29:00 +00:00
|
|
|
DWORD ce_size = sizeof(chimney_enabled);
|
2009-09-16 19:23:15 +00:00
|
|
|
#endif
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
/* prepare colors */
|
2009-12-02 00:31:04 +00:00
|
|
|
|
|
|
|
/* "page" background */
|
|
|
|
get_color(&welcome_bg);
|
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
/* header bar background color */
|
|
|
|
get_color(&header_bar_bg);
|
|
|
|
|
|
|
|
/* topic header background color */
|
|
|
|
get_color(&topic_header_bg);
|
|
|
|
|
2008-05-14 10:56:31 +00:00
|
|
|
/* topic content background color */
|
2008-04-15 02:14:22 +00:00
|
|
|
get_color(&topic_content_bg);
|
|
|
|
|
2008-04-17 00:31:38 +00:00
|
|
|
topic_item_idle_bg = topic_content_bg;
|
|
|
|
|
2008-05-14 10:56:31 +00:00
|
|
|
/* topic item entered color */
|
2008-04-17 00:31:38 +00:00
|
|
|
get_color(&topic_item_entered_bg);
|
|
|
|
|
2008-04-04 23:16:07 +00:00
|
|
|
welcome_scrollw = scrolled_window_new(NULL, NULL);
|
|
|
|
|
|
|
|
welcome_vb = gtk_vbox_new(FALSE, 0);
|
|
|
|
|
2009-12-02 00:31:04 +00:00
|
|
|
welcome_eb = gtk_event_box_new();
|
|
|
|
gtk_container_add(GTK_CONTAINER(welcome_eb), welcome_vb);
|
|
|
|
gtk_widget_modify_bg(welcome_eb, GTK_STATE_NORMAL, &welcome_bg);
|
|
|
|
|
2008-04-04 23:16:07 +00:00
|
|
|
/* header */
|
|
|
|
header = welcome_header_new();
|
|
|
|
gtk_box_pack_start(GTK_BOX(welcome_vb), header, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
/* content */
|
|
|
|
welcome_hb = gtk_hbox_new(FALSE, 10);
|
2008-06-29 15:51:43 +00:00
|
|
|
gtk_container_set_border_width(GTK_CONTAINER(welcome_hb), 10);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(welcome_vb), welcome_hb, TRUE, TRUE, 0);
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
|
2008-04-04 23:16:07 +00:00
|
|
|
/* column capture */
|
|
|
|
column_vb = gtk_vbox_new(FALSE, 10);
|
2009-12-02 00:31:04 +00:00
|
|
|
gtk_widget_modify_bg(column_vb, GTK_STATE_NORMAL, &welcome_bg);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(welcome_hb), column_vb, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
/* capture topic */
|
|
|
|
topic_vb = welcome_topic_new("Capture", &topic_to_fill);
|
|
|
|
gtk_box_pack_start(GTK_BOX(column_vb), topic_vb, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
#ifdef HAVE_LIBPCAP
|
2008-04-15 22:46:35 +00:00
|
|
|
item_hb = welcome_button(WIRESHARK_STOCK_CAPTURE_INTERFACES,
|
2008-04-15 02:14:22 +00:00
|
|
|
"Interface List",
|
2010-10-05 06:59:11 +00:00
|
|
|
"Live list of the capture interfaces\n(counts incoming packets)",
|
2008-04-17 03:24:24 +00:00
|
|
|
"Same as Capture/Interfaces menu or toolbar item",
|
2010-08-19 15:02:23 +00:00
|
|
|
welcome_button_callback_helper, capture_if_cb);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
|
|
|
|
|
2009-03-12 07:56:42 +00:00
|
|
|
label_text = g_strdup("<span foreground=\"black\">Start capture on interface:</span>");
|
2008-05-14 10:56:31 +00:00
|
|
|
w = gtk_label_new(label_text);
|
|
|
|
gtk_label_set_markup(GTK_LABEL(w), label_text);
|
|
|
|
g_free (label_text);
|
2009-04-21 16:57:52 +00:00
|
|
|
gtk_misc_set_alignment (GTK_MISC(w), 0.0f, 0.0f);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), w, FALSE, FALSE, 5);
|
|
|
|
|
2008-06-18 20:14:28 +00:00
|
|
|
if_child_box = gtk_vbox_new(FALSE, 0);
|
|
|
|
/* 8 capture interfaces or 150 pixels height is about the size */
|
|
|
|
/* that still fits on a screen of about 1000*700 */
|
|
|
|
welcome_if_panel_vb = scroll_box_dynamic_new(GTK_BOX(if_child_box), 8, 150);
|
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), welcome_if_panel_vb, FALSE, FALSE, 0);
|
|
|
|
welcome_if_panel_load();
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
item_hb = welcome_button(WIRESHARK_STOCK_CAPTURE_OPTIONS,
|
2008-04-15 02:14:22 +00:00
|
|
|
"Capture Options",
|
2010-08-19 15:02:23 +00:00
|
|
|
"Start a capture with detailed options",
|
2008-04-17 03:24:24 +00:00
|
|
|
"Same as Capture/Options menu or toolbar item",
|
2010-08-19 15:02:23 +00:00
|
|
|
welcome_button_callback_helper, capture_prep_cb);
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2009-09-16 19:23:15 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
/* Check for chimney offloading */
|
|
|
|
reg_ret = RegQueryValueEx(HKEY_LOCAL_MACHINE,
|
2010-08-19 15:02:23 +00:00
|
|
|
_T("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\EnableTCPChimney"),
|
|
|
|
NULL, NULL, (LPBYTE) &chimney_enabled, &ce_size);
|
2010-08-16 18:32:27 +00:00
|
|
|
if (reg_ret == ERROR_SUCCESS && chimney_enabled) {
|
2010-08-19 15:02:23 +00:00
|
|
|
item_hb = welcome_button(WIRESHARK_STOCK_WIKI,
|
|
|
|
"Offloading Detected",
|
|
|
|
"TCP Chimney offloading is enabled. You \nmight not capture much data.",
|
|
|
|
topic_online_url(ONLINEPAGE_CHIMNEY),
|
|
|
|
topic_menu_cb, GINT_TO_POINTER(ONLINEPAGE_CHIMNEY));
|
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
|
2009-09-16 19:23:15 +00:00
|
|
|
}
|
|
|
|
#endif /* _WIN32 */
|
|
|
|
|
2008-04-04 23:16:07 +00:00
|
|
|
/* capture help topic */
|
|
|
|
topic_vb = welcome_topic_new("Capture Help", &topic_to_fill);
|
|
|
|
gtk_box_pack_start(GTK_BOX(column_vb), topic_vb, TRUE, TRUE, 0);
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
item_hb = welcome_button(WIRESHARK_STOCK_WIKI,
|
2010-08-19 15:02:23 +00:00
|
|
|
"How to Capture",
|
|
|
|
"Step by step to a successful capture setup",
|
2008-04-17 03:24:24 +00:00
|
|
|
topic_online_url(ONLINEPAGE_CAPTURE_SETUP),
|
2010-08-19 15:02:23 +00:00
|
|
|
topic_menu_cb, GINT_TO_POINTER(ONLINEPAGE_CAPTURE_SETUP));
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
item_hb = welcome_button(WIRESHARK_STOCK_WIKI,
|
2010-08-19 15:02:23 +00:00
|
|
|
"Network Media",
|
2010-10-05 06:59:11 +00:00
|
|
|
"Specific information for capturing on:\nEthernet, WLAN, ...",
|
2008-04-17 03:24:24 +00:00
|
|
|
topic_online_url(ONLINEPAGE_NETWORK_MEDIA),
|
2010-08-19 15:02:23 +00:00
|
|
|
topic_menu_cb, GINT_TO_POINTER(ONLINEPAGE_NETWORK_MEDIA));
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
|
2008-04-15 02:14:22 +00:00
|
|
|
#else
|
2009-03-12 07:56:42 +00:00
|
|
|
label_text = g_strdup("<span foreground=\"black\">Capturing is not compiled into this version of Wireshark!</span>");
|
2008-05-14 10:56:31 +00:00
|
|
|
w = gtk_label_new(label_text);
|
|
|
|
gtk_label_set_markup(GTK_LABEL(w), label_text);
|
|
|
|
g_free (label_text);
|
2009-04-22 00:49:00 +00:00
|
|
|
gtk_misc_set_alignment (GTK_MISC(w), 0.0f, 0.0f);
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), w, FALSE, FALSE, 5);
|
2008-04-15 22:46:35 +00:00
|
|
|
#endif /* HAVE_LIBPCAP */
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
/* fill bottom space */
|
|
|
|
w = gtk_label_new("");
|
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), w, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
|
|
|
|
/* column files */
|
|
|
|
topic_vb = welcome_topic_new("Files", &topic_to_fill);
|
|
|
|
gtk_box_pack_start(GTK_BOX(welcome_hb), topic_vb, TRUE, TRUE, 0);
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
item_hb = welcome_button(GTK_STOCK_OPEN,
|
2008-04-15 02:14:22 +00:00
|
|
|
"Open",
|
2010-08-19 15:02:23 +00:00
|
|
|
"Open a previously captured file",
|
2008-04-17 03:24:24 +00:00
|
|
|
"Same as File/Open menu or toolbar item",
|
2010-08-19 15:02:23 +00:00
|
|
|
welcome_button_callback_helper, file_open_cmd_cb);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
/* prepare list of recent files (will be filled in later) */
|
2009-03-12 07:56:42 +00:00
|
|
|
label_text = g_strdup("<span foreground=\"black\">Open Recent:</span>");
|
2008-05-14 10:56:31 +00:00
|
|
|
w = gtk_label_new(label_text);
|
|
|
|
gtk_label_set_markup(GTK_LABEL(w), label_text);
|
|
|
|
g_free (label_text);
|
2009-04-21 16:57:52 +00:00
|
|
|
gtk_misc_set_alignment (GTK_MISC(w), 0.0f, 0.0f);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), w, FALSE, FALSE, 5);
|
|
|
|
|
2008-04-19 13:33:42 +00:00
|
|
|
file_child_box = gtk_vbox_new(FALSE, 1);
|
|
|
|
/* 17 file items or 300 pixels height is about the size */
|
|
|
|
/* that still fits on a screen of about 1000*700 */
|
|
|
|
welcome_file_panel_vb = scroll_box_dynamic_new(GTK_BOX(file_child_box), 17, 300);
|
2008-04-15 22:46:35 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), welcome_file_panel_vb, FALSE, FALSE, 0);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
item_hb = welcome_button(WIRESHARK_STOCK_WIKI,
|
2008-04-15 02:14:22 +00:00
|
|
|
"Sample Captures",
|
2010-08-19 15:02:23 +00:00
|
|
|
"A rich assortment of example capture files on the wiki",
|
2008-04-17 03:24:24 +00:00
|
|
|
topic_online_url(ONLINEPAGE_SAMPLE_CAPTURES),
|
2010-08-19 15:02:23 +00:00
|
|
|
topic_menu_cb, GINT_TO_POINTER(ONLINEPAGE_SAMPLE_CAPTURES));
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
|
|
|
|
|
|
|
|
/* fill bottom space */
|
2008-04-04 23:16:07 +00:00
|
|
|
w = gtk_label_new("");
|
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), w, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
|
|
|
|
/* column online */
|
|
|
|
column_vb = gtk_vbox_new(FALSE, 10);
|
|
|
|
gtk_box_pack_start(GTK_BOX(welcome_hb), column_vb, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
/* topic online */
|
|
|
|
topic_vb = welcome_topic_new("Online", &topic_to_fill);
|
|
|
|
gtk_box_pack_start(GTK_BOX(column_vb), topic_vb, TRUE, TRUE, 0);
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
item_hb = welcome_button(GTK_STOCK_HOME,
|
2008-04-15 02:14:22 +00:00
|
|
|
"Website",
|
2010-08-19 15:02:23 +00:00
|
|
|
"Visit the project's website",
|
2008-04-17 03:24:24 +00:00
|
|
|
topic_online_url(ONLINEPAGE_HOME),
|
2010-08-19 15:02:23 +00:00
|
|
|
topic_menu_cb, GINT_TO_POINTER(ONLINEPAGE_HOME));
|
2008-04-15 02:14:22 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
|
|
|
|
|
2010-08-19 15:02:23 +00:00
|
|
|
#ifdef HHC_DIR
|
2008-04-15 22:46:35 +00:00
|
|
|
item_hb = welcome_button(GTK_STOCK_HELP,
|
2008-04-15 02:14:22 +00:00
|
|
|
"User's Guide",
|
2010-08-19 15:02:23 +00:00
|
|
|
"The User's Guide "
|
2010-06-20 16:27:03 +00:00
|
|
|
"(local version, if installed)",
|
2008-04-17 03:24:24 +00:00
|
|
|
"Locally installed (if installed) otherwise online version",
|
2010-08-19 15:02:23 +00:00
|
|
|
topic_menu_cb, GINT_TO_POINTER(HELP_CONTENT));
|
2010-06-20 16:27:03 +00:00
|
|
|
#else
|
2010-08-19 15:02:23 +00:00
|
|
|
item_hb = welcome_button(GTK_STOCK_HELP,
|
|
|
|
"User's Guide",
|
|
|
|
"The User's Guide "
|
2010-06-20 16:27:03 +00:00
|
|
|
"(online version)",
|
|
|
|
topic_online_url(ONLINEPAGE_USERGUIDE),
|
2010-08-19 15:02:23 +00:00
|
|
|
topic_menu_cb, GINT_TO_POINTER(ONLINEPAGE_USERGUIDE));
|
2010-06-20 16:27:03 +00:00
|
|
|
#endif
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
|
|
|
|
|
2008-04-15 22:46:35 +00:00
|
|
|
item_hb = welcome_button(WIRESHARK_STOCK_WIKI,
|
2008-04-15 02:14:22 +00:00
|
|
|
"Security",
|
2010-08-19 15:02:23 +00:00
|
|
|
"Work with Wireshark as securely as possible",
|
2008-04-17 03:24:24 +00:00
|
|
|
topic_online_url(ONLINEPAGE_SECURITY),
|
2010-08-19 15:02:23 +00:00
|
|
|
topic_menu_cb, GINT_TO_POINTER(ONLINEPAGE_SECURITY));
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), item_hb, FALSE, FALSE, 5);
|
|
|
|
|
2008-04-15 02:14:22 +00:00
|
|
|
#if 0
|
|
|
|
/* XXX - add this, once the Windows update functionality is implemented */
|
2008-04-04 23:16:07 +00:00
|
|
|
/* topic updates */
|
|
|
|
topic_vb = welcome_topic_new("Updates", &topic_to_fill);
|
|
|
|
gtk_box_pack_start(GTK_BOX(column_vb), topic_vb, TRUE, TRUE, 0);
|
|
|
|
|
2009-03-12 07:56:42 +00:00
|
|
|
label_text = g_strdup("<span foreground=\"black\">No updates available!</span>");
|
2008-05-14 10:56:31 +00:00
|
|
|
w = gtk_label_new(label_text);
|
|
|
|
gtk_label_set_markup(GTK_LABEL(w), label_text);
|
|
|
|
g_free (label_text);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_box_pack_start(GTK_BOX(topic_to_fill), w, TRUE, TRUE, 0);
|
2008-04-15 02:14:22 +00:00
|
|
|
#endif
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* the end */
|
2009-12-02 00:31:04 +00:00
|
|
|
gtk_widget_show_all(welcome_eb);
|
2008-04-04 23:16:07 +00:00
|
|
|
|
|
|
|
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(welcome_scrollw),
|
2009-12-02 00:31:04 +00:00
|
|
|
welcome_eb);
|
2008-04-04 23:16:07 +00:00
|
|
|
gtk_widget_show_all(welcome_scrollw);
|
|
|
|
|
|
|
|
return welcome_scrollw;
|
|
|
|
}
|
|
|
|
|