gdm r6570 - in trunk: . gui/user-switch-applet
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r6570 - in trunk: . gui/user-switch-applet
- Date: Wed, 15 Oct 2008 02:56:18 +0000 (UTC)
Author: mccann
Date: Wed Oct 15 02:56:17 2008
New Revision: 6570
URL: http://svn.gnome.org/viewvc/gdm?rev=6570&view=rev
Log:
2008-10-14 William Jon McCann <jmccann redhat com>
* gui/user-switch-applet/applet.c (_gtk_label_make_bold),
(setup_current_user):
Make the label bold.
Modified:
trunk/ChangeLog
trunk/gui/user-switch-applet/applet.c
Modified: trunk/gui/user-switch-applet/applet.c
==============================================================================
--- trunk/gui/user-switch-applet/applet.c (original)
+++ trunk/gui/user-switch-applet/applet.c Wed Oct 15 02:56:17 2008
@@ -1010,10 +1010,32 @@
reset_icon (adata);
}
+/* copied from eel */
+static void
+_gtk_label_make_bold (GtkLabel *label)
+{
+ PangoFontDescription *font_desc;
+
+ font_desc = pango_font_description_new ();
+
+ pango_font_description_set_weight (font_desc,
+ PANGO_WEIGHT_BOLD);
+
+ /* This will only affect the weight of the font, the rest is
+ * from the current state of the widget, which comes from the
+ * theme or user prefs, since the font desc only has the
+ * weight flag turned on.
+ */
+ gtk_widget_modify_font (GTK_WIDGET (label), font_desc);
+
+ pango_font_description_free (font_desc);
+}
+
static void
setup_current_user (GdmAppletData *adata)
{
const char *name;
+ GtkWidget *label;
adata->user = gdm_user_manager_get_user_by_uid (adata->manager, getuid ());
if (adata->user != NULL) {
@@ -1024,6 +1046,8 @@
}
adata->menuitem = gtk_image_menu_item_new_with_label (name);
+ label = GTK_BIN (adata->menuitem)->child;
+ _gtk_label_make_bold (GTK_LABEL (label));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->menuitem),
gtk_image_new ());
gtk_menu_shell_append (GTK_MENU_SHELL (adata->menubar), adata->menuitem);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]