More polishing for the About dialog
This commit is contained in:
parent
d892b3346e
commit
fe1d958838
|
@ -139,10 +139,10 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip,
|
|||
{
|
||||
#ifdef WIN32
|
||||
snprintf (outbuf, sizeof (outbuf), "VERSION HexChat "PACKAGE_VERSION" [x%d] / %s",
|
||||
get_cpu_arch (), get_cpu_str ());
|
||||
get_cpu_arch (), get_sys_str (1));
|
||||
#else
|
||||
snprintf (outbuf, sizeof (outbuf), "VERSION HexChat "PACKAGE_VERSION" / %s",
|
||||
get_cpu_str ());
|
||||
get_sys_str (1));
|
||||
#endif
|
||||
serv->p_nctcp (serv, nick, outbuf);
|
||||
}
|
||||
|
|
|
@ -3885,7 +3885,7 @@ auto_insert (char *dest, int destlen, unsigned char *src, char *word[],
|
|||
case 'h':
|
||||
utf = h; break;
|
||||
case 'm':
|
||||
utf = get_cpu_str (); break;
|
||||
utf = get_sys_str (1); break;
|
||||
case 'n':
|
||||
utf = n; break;
|
||||
case 's':
|
||||
|
|
|
@ -674,7 +674,7 @@ get_cpu_arch (void)
|
|||
}
|
||||
|
||||
char *
|
||||
get_cpu_str (void)
|
||||
get_sys_str (int with_cpu)
|
||||
{
|
||||
static char verbuf[64];
|
||||
static char winver[20];
|
||||
|
@ -749,7 +749,7 @@ get_cpu_str (void)
|
|||
}
|
||||
|
||||
mhz = get_mhz ();
|
||||
if (mhz)
|
||||
if (mhz && with_cpu)
|
||||
{
|
||||
double cpuspeed = ( mhz > 1000 ) ? mhz / 1000 : mhz;
|
||||
const char *cpuspeedstr = ( mhz > 1000 ) ? "GHz" : "MHz";
|
||||
|
@ -766,7 +766,7 @@ get_cpu_str (void)
|
|||
#else
|
||||
|
||||
char *
|
||||
get_cpu_str (void)
|
||||
get_sys_str (int with_cpu)
|
||||
{
|
||||
#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__)
|
||||
double mhz;
|
||||
|
@ -784,7 +784,7 @@ get_cpu_str (void)
|
|||
|
||||
#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__)
|
||||
get_cpu_info (&mhz, &cpus);
|
||||
if (mhz)
|
||||
if (mhz && with_cpu)
|
||||
{
|
||||
double cpuspeed = ( mhz > 1000 ) ? mhz / 1000 : mhz;
|
||||
const char *cpuspeedstr = ( mhz > 1000 ) ? "GHz" : "MHz";
|
||||
|
|
|
@ -31,7 +31,7 @@ int buf_get_line (char *, char **, int *, int len);
|
|||
char *nocasestrstr (const char *text, const char *tofind);
|
||||
char *country (char *);
|
||||
void country_search (char *pattern, void *ud, void (*print)(void *, char *, ...));
|
||||
char *get_cpu_str (void);
|
||||
char *get_sys_str (int with_cpu);
|
||||
int util_exec (const char *cmd);
|
||||
int util_execv (char * const argv[]);
|
||||
#define STRIP_COLOR 1
|
||||
|
|
|
@ -122,18 +122,18 @@ menu_about (GtkWidget * wid, gpointer sess)
|
|||
g_get_charset (&locale);
|
||||
(snprintf) (buf, sizeof (buf),
|
||||
"<b>Version</b>: "PACKAGE_VERSION"\n"
|
||||
"<b>OS</b>: %s\n"
|
||||
"<b>Compiled</b>: "__DATE__"\n"
|
||||
#ifdef WIN32
|
||||
"<b>Portable Mode</b>: %s\n"
|
||||
"<b>Build Type</b>: x%d\n"
|
||||
#endif
|
||||
"<b>OS</b>: %s\n"
|
||||
"<b>Charset</b>: %s",
|
||||
get_cpu_str (),
|
||||
#ifdef WIN32
|
||||
(portable_mode () ? "Yes" : "No"),
|
||||
get_cpu_arch (),
|
||||
#endif
|
||||
get_sys_str (0),
|
||||
locale);
|
||||
|
||||
label_info = gtk_label_new (NULL);
|
||||
|
|
|
@ -96,7 +96,7 @@ fe_new_window (struct session *sess, int focus)
|
|||
" \017HexChat-Text \00310"PACKAGE_VERSION"\n"
|
||||
" \017Running on \00310%s \017glib \00310%d.%d.%d\n"
|
||||
" \017This binary compiled \00310"__DATE__"\017\n",
|
||||
get_cpu_str(),
|
||||
get_sys_str (1),
|
||||
glib_major_version, glib_minor_version, glib_micro_version);
|
||||
fe_print_text (sess, buf, 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue