[Usability]A clearer two-line clock applet



Hey,

So, the clock applet has bugged me for a while. I've always wished that the
two line version would show the time first, and that the time were bold. So
I've fixed that. This is significant step on my way to becoming the amazing
uberhacker I've always wanted to be! :-)

Even if the bold is not wanted, please take the time\ndate change. It's far
clearer.

[ I think the 'date, time' format of the single line version is appropriate,
however. The time is in a clear, constant spot, so I don't think it needs to
move or be highlighted. ]

For my next trick...

- Jeff

-- 
   "The beanbag is a triumph of modern day eclectic colourism..." - Catie   
                                   Flick                                    
diff --speed-large-files --minimal -Nru clock.c.orig clock.c
--- clock.c.orig	2002-10-01 12:36:12.000000000 +1000
+++ clock.c	2002-10-22 20:09:44.000000000 +1000
@@ -184,7 +184,7 @@
 		if (cd->orient == PANEL_APPLET_ORIENT_LEFT ||
 		    cd->orient == PANEL_APPLET_ORIENT_RIGHT ||
 		    cd->size >= GNOME_Vertigo_PANEL_MEDIUM)
-			loc = g_strconcat (_("%a %b %d"), "\n", time, NULL);
+			loc = g_strconcat ("<b>", time, "</b>", "\n", _("%a %b %d"), NULL);
 		else
 			loc = g_strconcat (_("%a %b %d"), ", ", time, NULL);
 	} else {
@@ -284,7 +284,7 @@
 	}
 
 	utf8 = g_locale_to_utf8 (hour, -1, NULL, NULL, NULL);
-	gtk_label_set_text (GTK_LABEL (cd->clockw), utf8);
+	gtk_label_set_markup (GTK_LABEL (cd->clockw), utf8);
 	g_free (utf8);
 
 	/* Show date in tooltip */
@@ -380,6 +380,7 @@
 	clock = gtk_label_new ("hmm?");
 	gtk_label_set_justify (GTK_LABEL (clock), GTK_JUSTIFY_CENTER);
 	gtk_label_set_line_wrap (GTK_LABEL (clock), TRUE);
+	gtk_label_set_use_markup (GTK_LABEL (clock), TRUE);
 	gtk_widget_show (clock);
 
 	cd->clockw = clock;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]