From 0c6d0420b36083a28b96b2ab304175f52a20f550 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 17 May 2009 02:53:57 +0200 Subject: [PATCH] Remove superuser warning completely --- midori/midori-browser.c | 5 ----- midori/sokoke.c | 28 ---------------------------- midori/sokoke.h | 3 --- 3 files changed, 36 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 81cc0499..be252712 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -4386,7 +4386,6 @@ midori_browser_init (MidoriBrowser* browser) GList* children; #endif GtkSettings* gtk_settings; - GtkWidget* hbox; GtkWidget* hpaned; GtkWidget* vpaned; GtkToolItem* toolitem; @@ -4657,10 +4656,6 @@ midori_browser_init (MidoriBrowser* browser) g_signal_connect (browser->bookmarkbar, "popup-context-menu", G_CALLBACK (midori_browser_toolbar_popup_context_menu_cb), browser); - /* Superuser warning */ - if ((hbox = sokoke_superuser_warning_new ())) - gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - /* Create the panel */ hpaned = gtk_hpaned_new (); g_signal_connect (hpaned, "notify::position", diff --git a/midori/sokoke.c b/midori/sokoke.c index 301f3529..5bee98b4 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -506,34 +506,6 @@ sokoke_xfce_header_new (const gchar* icon, return NULL; } -GtkWidget* -sokoke_superuser_warning_new (void) -{ - /* Create a horizontal bar with a security warning - This returns NULL if the user is no superuser */ - #if HAVE_UNISTD_H - if (G_UNLIKELY (!geteuid ())) /* effective superuser? */ - { - GtkWidget* hbox; - GtkWidget* label; - - hbox = gtk_event_box_new (); - gtk_widget_modify_bg (hbox, GTK_STATE_NORMAL, - &hbox->style->bg[GTK_STATE_SELECTED]); - /* i18n: A superuser, or system administrator, may not be 'root' */ - label = gtk_label_new (_("Warning: You are using a superuser account!")); - gtk_misc_set_padding (GTK_MISC (label), 0, 2); - gtk_widget_modify_fg (GTK_WIDGET (label), GTK_STATE_NORMAL, - >K_WIDGET (label)->style->fg[GTK_STATE_SELECTED]); - gtk_widget_show (label); - gtk_container_add (GTK_CONTAINER (hbox), GTK_WIDGET (label)); - gtk_widget_show (hbox); - return hbox; - } - #endif - return NULL; -} - GtkWidget* sokoke_hig_frame_new (const gchar* title) { diff --git a/midori/sokoke.h b/midori/sokoke.h index 56a76615..d656410e 100644 --- a/midori/sokoke.h +++ b/midori/sokoke.h @@ -73,9 +73,6 @@ GtkWidget* sokoke_xfce_header_new (const gchar* icon, const gchar* title); -GtkWidget* -sokoke_superuser_warning_new (void); - GtkWidget* sokoke_hig_frame_new (const gchar* title);