Wireshark-dev: Re: [Wireshark-dev] New Wireshark welcome page!
From: "Anders Broman" <anders.broman@xxxxxxxxxxxx>
Date: Fri, 18 Apr 2008 11:31:30 +0200
Hi,
The "proper" patch would then be:
Index: gtk/main_welcome.c
===================================================================
--- gtk/main_welcome.c	(revision 25109)
+++ gtk/main_welcome.c	(working copy)
@@ -53,8 +53,8 @@
 #include "gtk/help_dlg.h"
 #include "gtk/stock_icons.h"
 #include "../image/wssplash.xpm"
+#include "../version_info.h"
 
-
 /* XXX */
 extern gint if_list_comparator_alph (const void *first_arg, const void *second_arg);
 
@@ -170,12 +170,22 @@
     gtk_box_pack_start(GTK_BOX(item_hb), icon, FALSE, FALSE, 10);
 
     if ((now->tm_mon == 3 && now->tm_mday == 1) || (now->tm_mon = 6 && now->tm_mday == 14)) {
-        message = "<span weight=\"bold\" size=\"x-large\">" "Sniffing the glue that holds the Internet together" "</span>";
+        message = g_strdup_printf(
+			"<span weight=\"bold\" size=\"x-large\">"
+			"Sniffing the glue that holds the Internet together"
+			"</span>");
     } else {
-        message = "<span weight=\"bold\" size=\"x-large\">" "The World's Most Popular Network Protocol Analyzer" "</span>";
+		message = g_strdup_printf(
+			"<span weight=\"bold\" size=\"x-large\">"
+			"The World's Most Popular Network Protocol Analyzer"
+			"</span>\n<span size=\"large\">"
+			"Version " VERSION "%s"
+			"</span>",wireshark_svnversion);
+
     }
     w = gtk_label_new(message);
     gtk_label_set_markup(GTK_LABEL(w), message);
+	g_free(message);
     gtk_misc_set_alignment (GTK_MISC(w), 0.0, 0.5);
     gtk_box_pack_start(GTK_BOX(item_hb), w, TRUE, TRUE, 5); 

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Stig Bjørlykke
Sent: den 18 april 2008 11:07
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] New Wireshark welcome page!

2008/4/18, Anders Broman <anders.broman@xxxxxxxxxxxx>:
> I did a quick hack to see what it would look like and I don't think 
> it's  too bad. It would probably look better if it wasn't in bold(not sure how to do that).

This works for me, and I find it really useful when working with a lot of versions:

+              message = g_strdup_printf(
+                      "<span weight=\"bold\" size=\"x-large\">"
+                      "The World's Most Popular Network Protocol Analyzer"
+                      "</span>\n<span size=\"large\">"
+                      "Version " VERSION "%s"
+                      "</span>",wireshark_svnversion);


--
Stig Bjørlykke
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev