SHA256
1
0
forked from pool/wireshark
wireshark/wireshark-1.2.0-disable-warning-dialog.patch

60 lines
2.2 KiB
Diff

Index: gtk/main.c
===================================================================
--- gtk/main.c.orig
+++ gtk/main.c
@@ -1247,11 +1247,11 @@ set_display_filename(capture_file *cf)
GtkWidget *close_dlg = NULL;
-static void
-priv_warning_dialog_cb(gpointer dialog, gint btn _U_, gpointer data _U_)
-{
- recent.privs_warn_if_elevated = !simple_dialog_check_get(dialog);
-}
+// static void
+// priv_warning_dialog_cb(gpointer dialog, gint btn _U_, gpointer data _U_)
+// {
+// recent.privs_warn_if_elevated = !simple_dialog_check_get(dialog);
+// }
#ifdef _WIN32
static void
@@ -1817,7 +1817,7 @@ main(int argc, char *argv[])
e_prefs *prefs;
char badopt;
GtkWidget *splash_win = NULL;
- gpointer priv_warning_dialog;
+// gpointer priv_warning_dialog;
GLogLevelFlags log_flags;
guint go_to_packet = 0;
int optind_initial;
@@ -2577,17 +2577,17 @@ main(int argc, char *argv[])
main_load_window_geometry(top_level);
/* Tell the user not to run as root. */
- if (running_with_special_privs() && recent.privs_warn_if_elevated) {
- cur_user = get_cur_username();
- cur_group = get_cur_groupname();
- priv_warning_dialog = simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
- "Running as user \"%s\" and group \"%s\".\n"
- "This could be dangerous.", cur_user, cur_group);
- g_free(cur_user);
- g_free(cur_group);
- simple_dialog_check_set(priv_warning_dialog, "Don't show this message again.");
- simple_dialog_set_cb(priv_warning_dialog, priv_warning_dialog_cb, NULL);
- }
+// if (running_with_special_privs() && recent.privs_warn_if_elevated) {
+// cur_user = get_cur_username();
+// cur_group = get_cur_groupname();
+// priv_warning_dialog = simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK,
+// "Running as user \"%s\" and group \"%s\".\n"
+// "This could be dangerous.", cur_user, cur_group);
+// g_free(cur_user);
+// g_free(cur_group);
+// simple_dialog_check_set(priv_warning_dialog, "Don't show this message again.");
+// simple_dialog_set_cb(priv_warning_dialog, priv_warning_dialog_cb, NULL);
+// }
#ifdef _WIN32
/* Warn the user if npf.sys isn't loaded. */