]> spindle.queued.net Git - midori/commitdiff
Remove superuser warning completely
authorChristian Dywan <christian@twotoasts.de>
Sun, 17 May 2009 00:53:57 +0000 (02:53 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 17 May 2009 00:53:57 +0000 (02:53 +0200)
midori/midori-browser.c
midori/sokoke.c
midori/sokoke.h

index 81cc0499b8d81bf7b457e592675e9244c8a7415c..be2527127b2b5c96bdae1c04dde725189a60f41b 100644 (file)
@@ -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",
index 301f35295f8ea03e15a4cd1d9e9775102a8981c8..5bee98b40cedffd02f260b5716ce9c49852c88b8 100644 (file)
@@ -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,
-            &GTK_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)
 {
index 56a766155c4d72f040b61a28dd55e242b9de1eb8..d656410e56b829b477f633c92b478023cf06cfc3 100644 (file)
@@ -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);