[gnome-control-center] info: add os type info
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] info: add os type info
- Date: Tue, 11 Jan 2011 00:46:01 +0000 (UTC)
commit 42732d45fbeca6bdbb49185f1c54dd4c4e130294
Author: William Jon McCann <jmccann redhat com>
Date: Mon Jan 10 18:55:38 2011 -0500
info: add os type info
panels/info/cc-info-panel.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index 3d2ce3b..5eee2ce 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -229,6 +229,18 @@ cc_info_panel_class_finalize (CcInfoPanelClass *klass)
}
static char *
+get_os_type (void)
+{
+ int bits;
+#if defined(__x86_64__) || defined(_M_X64)
+ bits = 64;
+#else
+ bits = 32;
+#endif
+ return g_strdup_printf (_("%d-bit"), bits);
+}
+
+static char *
get_cpu_info (const glibtop_sysinfo *info)
{
GHashTable *counts;
@@ -331,6 +343,11 @@ cc_info_panel_init (CcInfoPanel *self)
gtk_label_set_text (GTK_LABEL (widget), text);
g_free (text);
+ widget = WID (self->priv->builder, "os_type_label");
+ text = get_os_type ();
+ gtk_label_set_text (GTK_LABEL (widget), text);
+ g_free (text);
+
widget = WID (self->priv->builder, "info_vbox");
gtk_widget_reparent (widget, (GtkWidget *) self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]