GNOME Bugzilla – Attachment 153372 Details for
Bug 605137
way to suppress "(as superuser)" message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Test case
metacity-hide-username-demo.c (text/plain), 1.26 KB, created by
Thomas Thurman
on 2010-02-09 23:07 UTC
(
hide
)
Description:
Test case
Filename:
MIME Type:
Creator:
Thomas Thurman
Created:
2010-02-09 23:07 UTC
Size:
1.26 KB
patch
obsolete
Status
:
none
accepted-commit_now
needs-work
accepted-commit_after_freeze
committed
rejected
reviewed
>/* >gcc `pkg-config --cflags --libs gtk+-2.0 gdk-2.0` metacity-hide-username-demo.c -o metacity-hide-username-demo > */ > >#include <gtk/gtk.h> >#include <gdk/gdkx.h> >#include <X11/Xlib.h> >#include <X11/Xutil.h> >#include <X11/Xatom.h> > >static void >hide_username_on_window (GtkWidget *window) >{ > GdkDisplay *display = gdk_drawable_get_display (window->window); > Window xwindow = GDK_WINDOW_XID (window->window); > guint32 one = 1; > > XChangeProperty (GDK_DISPLAY_XDISPLAY (display), > xwindow, > gdk_x11_get_xatom_by_name_for_display (display, "_METACITY_HIDE_USERNAME"), > gdk_x11_get_xatom_by_name_for_display (display, "CARDINAL"), 32, > PropModeReplace, (char*) &one, 1); >} > >int >main(int argc, char **argv) >{ > GtkWidget *first, *second; > > gtk_init (&argc, &argv); > > first = gtk_window_new (GTK_WINDOW_TOPLEVEL); > gtk_window_set_title (GTK_WINDOW (first), "Doesn't have the hint"); > gtk_window_set_default_size (GTK_WINDOW (first), 800, 100); > gtk_widget_show_all (first); > > second = gtk_window_new (GTK_WINDOW_TOPLEVEL); > gtk_window_set_title (GTK_WINDOW (second), "Has the hint"); > gtk_window_set_default_size (GTK_WINDOW (second), 800, 100); > gtk_widget_show_all (second); > hide_username_on_window (second); > > gtk_main(); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 605137
: 153372 |
153373