Remove superuser warning completely

This commit is contained in:
Christian Dywan 2009-05-17 02:53:57 +02:00
parent c8493b4c04
commit 0c6d0420b3
3 changed files with 0 additions and 36 deletions

View file

@ -4386,7 +4386,6 @@ midori_browser_init (MidoriBrowser* browser)
GList* children; GList* children;
#endif #endif
GtkSettings* gtk_settings; GtkSettings* gtk_settings;
GtkWidget* hbox;
GtkWidget* hpaned; GtkWidget* hpaned;
GtkWidget* vpaned; GtkWidget* vpaned;
GtkToolItem* toolitem; GtkToolItem* toolitem;
@ -4657,10 +4656,6 @@ midori_browser_init (MidoriBrowser* browser)
g_signal_connect (browser->bookmarkbar, "popup-context-menu", g_signal_connect (browser->bookmarkbar, "popup-context-menu",
G_CALLBACK (midori_browser_toolbar_popup_context_menu_cb), browser); 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 */ /* Create the panel */
hpaned = gtk_hpaned_new (); hpaned = gtk_hpaned_new ();
g_signal_connect (hpaned, "notify::position", g_signal_connect (hpaned, "notify::position",

View file

@ -506,34 +506,6 @@ sokoke_xfce_header_new (const gchar* icon,
return NULL; 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* GtkWidget*
sokoke_hig_frame_new (const gchar* title) sokoke_hig_frame_new (const gchar* title)
{ {

View file

@ -73,9 +73,6 @@ GtkWidget*
sokoke_xfce_header_new (const gchar* icon, sokoke_xfce_header_new (const gchar* icon,
const gchar* title); const gchar* title);
GtkWidget*
sokoke_superuser_warning_new (void);
GtkWidget* GtkWidget*
sokoke_hig_frame_new (const gchar* title); sokoke_hig_frame_new (const gchar* title);