Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 304918 Details for
Bug 440054
gdm-user-switch-applet doesn't offer "icon only look" anymore
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch
show-user-name.patch (text/plain), 7.27 KB, created by
Matthias Clasen
on 2008-05-09 01:23:57 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Matthias Clasen
Created:
2008-05-09 01:23:57 UTC
Size:
7.27 KB
patch
obsolete
>diff -u -r gdm-2.22.0/gui/user-switch-applet/applet.c hacked/gui/user-switch-applet/applet.c >--- gdm-2.22.0/gui/user-switch-applet/applet.c 2008-04-29 13:38:43.000000000 -0400 >+++ hacked/gui/user-switch-applet/applet.c 2008-05-08 21:18:41.000000000 -0400 >@@ -62,8 +62,10 @@ > GSList *items; > > gboolean active_only; >+ gboolean show_name; > > guint client_notify_lockdown_id; >+ guint client_notify_show_name_id; > > guint user_icon_changed_id; > guint user_notify_id; >@@ -479,6 +481,7 @@ > gdm_applet_data_free (GdmAppletData *adata) > { > gconf_client_notify_remove (adata->client, adata->client_notify_lockdown_id); >+ gconf_client_notify_remove (adata->client, adata->client_notify_show_name_id); > > g_signal_handler_disconnect (adata->user, adata->user_notify_id); > g_signal_handler_disconnect (adata->user, adata->user_icon_changed_id); >@@ -1045,6 +1048,70 @@ > } > } > >+static void >+set_show_name (GdmAppletData *adata, >+ gboolean show_name) >+{ >+ BonoboUIComponent *popup_component; >+ GtkWidget *label; >+ >+ if (adata->show_name == show_name) >+ return; >+ >+ adata->show_name = show_name; >+ >+ popup_component = panel_applet_get_popup_component (adata->applet); >+ label = gtk_bin_get_child (GTK_BIN (adata->menuitem)); >+ >+ if (show_name) >+ gtk_widget_show (label); >+ else >+ gtk_widget_hide (label); >+ >+ bonobo_ui_component_set_prop (popup_component, >+ "/commands/GdmShowName", >+ "state", show_name ? "1" : "0", >+ NULL); >+} >+ >+ >+static void >+show_name_cb (GConfClient *client, >+ guint *cnxn_id, >+ GConfEntry *entry, >+ gpointer user_data) >+{ >+ GConfValue *value; >+ GdmAppletData *adata = user_data; >+ gboolean show_name; >+ >+ value = gconf_entry_get_value (entry); >+ >+ if (!value) >+ return; >+ >+ show_name = gconf_value_get_bool (value); >+ >+ set_show_name (adata, show_name); >+} >+ >+static void >+cb_ui_event (BonoboUIComponent *comp, >+ const gchar *verbname, >+ Bonobo_UIComponent_EventType type, >+ const gchar *state_string, >+ gpointer data) >+{ >+ GdmAppletData *adata = data; >+ gboolean show_name; >+ >+ if (strcmp (verbname, "GdmShowName") == 0) { >+ show_name = strcmp (state_string, "1") == 0 ? TRUE : FALSE; >+ >+ panel_applet_gconf_set_bool (adata->applet, "show_name", show_name, NULL); >+ } >+} >+ > static gboolean > fill_applet (PanelApplet *applet) > { >@@ -1060,6 +1127,8 @@ > char *tmp; > BonoboUIComponent *popup_component; > GdmAppletData *adata; >+ gchar *key; >+ gboolean show_name; > > if (!first_time) { > first_time = TRUE; >@@ -1112,6 +1181,8 @@ > > popup_component = panel_applet_get_popup_component (applet); > >+ g_signal_connect (popup_component, "ui-event", G_CALLBACK (cb_ui_event), adata); >+ > /* Hide the admin context menu items if locked down or no cmd-line */ > if (gconf_client_get_bool (adata->client, > "/desktop/gnome/lockdown/inhibit_command_line", >@@ -1149,6 +1220,21 @@ > g_free (tmp); > } > >+ panel_applet_add_preferences (PANEL_APPLET (applet), >+ "/schemas/apps/gdm/user-switch-applet", >+ NULL); >+ show_name = panel_applet_gconf_get_bool (PANEL_APPLET (applet), "show_name", NULL); >+ adata->show_name = -1; >+ set_show_name (adata, show_name); >+ key = panel_applet_gconf_get_full_key (PANEL_APPLET (applet), "show_name"); >+ adata->client_notify_show_name_id = gconf_client_notify_add (adata->client, >+ key, >+ (GConfClientNotifyFunc)show_name_cb, >+ adata, >+ NULL, >+ NULL); >+ g_free (key); >+ > g_signal_connect (adata->applet, > "style-set", > G_CALLBACK (applet_style_set_cb), adata); >diff -u -r gdm-2.22.0/gui/user-switch-applet/gdm-user-switch-applet.schemas.in hacked/gui/user-switch-applet/gdm-user-switch-applet.schemas.in >--- gdm-2.22.0/gui/user-switch-applet/gdm-user-switch-applet.schemas.in 2008-05-08 21:17:12.000000000 -0400 >+++ hacked/gui/user-switch-applet/gdm-user-switch-applet.schemas.in 2008-05-08 21:10:13.000000000 -0400 >@@ -0,0 +1,16 @@ >+<gconfschemafile> >+ <schemalist> >+ >+ <schema> >+ <key>/schemas/apps/gdm/user-switch-applet/show_name</key> >+ <owner>gdm-user-switch-applet</owner> >+ <type>bool</type> >+ <default>true</default> >+ <locale name="C"> >+ <short>Show the user name in the panel</short> >+ <long>Show the user name in the panel.</long> >+ </locale> >+ >+ </schema> >+ </schemalist> >+</gconfschemafile> >diff -u -r gdm-2.22.0/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml hacked/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml >--- gdm-2.22.0/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml 2008-04-17 23:29:24.000000000 -0400 >+++ hacked/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml 2008-05-08 19:21:24.000000000 -0400 >@@ -9,6 +9,11 @@ > name="Users and Groups Admin Item" > verb="GdmUsersGroupsAdmin" > _label="_Edit Users and Groups"/> >+ <menuitem >+ name="Show Name Item" >+ verb="GdmShowName" >+ _label="_Show Username" >+ type="toggle"/> > <separator > name="GdmSeparator"/> > <menuitem >diff -u -r gdm-2.22.0/gui/user-switch-applet/Makefile.am hacked/gui/user-switch-applet/Makefile.am >--- gdm-2.22.0/gui/user-switch-applet/Makefile.am 2008-04-17 23:29:24.000000000 -0400 >+++ hacked/gui/user-switch-applet/Makefile.am 2008-05-08 19:03:47.000000000 -0400 >@@ -15,6 +15,12 @@ > $(APPLET_CFLAGS) \ > $(NULL) > >+@INTLTOOL_SCHEMAS_RULE@ >+ >+schemasdir = @GCONF_SCHEMA_FILE_DIR@ >+schemas_in_files = gdm-user-switch-applet.schemas.in >+schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) >+ > libexec_PROGRAMS = \ > gdm-user-switch-applet \ > $(NULL) >@@ -50,11 +56,13 @@ > @INTLTOOL_SERVER_RULE@ > > EXTRA_DIST = \ >+ $(schemas_in_files) \ > $(ui_DATA) \ > GNOME_FastUserSwitchApplet.server.in.in \ > $(NULL) > > DISTCLEANFILES = \ >+ $(schemas_DATA) \ > $(server_in_files) \ > $(server_DATA) \ > $(NULL) >@@ -62,3 +70,16 @@ > MAINTAINERCLEANFILES = \ > *~ \ > Makefile.in >+ >+if GCONF_SCHEMAS_INSTALL >+# don't do this if we are building in eg. rpm >+install-data-local: $(schemas_DATA) >+ if test -z "$(DESTDIR)" ; then \ >+ for p in $(schemas_DATA) ; do \ >+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/gui/user-switch-applet/$$p ; \ >+ done \ >+ fi >+else >+install-data-local: >+endif >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 440054
: 304918