From: Christian Dywan Date: Sun, 17 May 2009 00:53:57 +0000 (+0200) Subject: Remove superuser warning completely X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c6d0420b36083a28b96b2ab304175f52a20f550;p=midori Remove superuser warning completely --- 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);