[gnome-control-center] region: Add System tab
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] region: Add System tab
- Date: Mon, 4 Jul 2011 11:59:43 +0000 (UTC)
commit 81945e7a546240a57b09a3ef7254c09c29823b78
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Mon Jul 4 12:25:43 2011 +0200
region: Add System tab
panels/region/Makefile.am | 2 +
panels/region/cc-region-panel.c | 2 +
panels/region/gnome-region-panel-system.c | 40 ++++
panels/region/gnome-region-panel-system.h | 29 +++
panels/region/gnome-region-panel.ui | 347 ++++++++++++++++++++++++++++-
5 files changed, 415 insertions(+), 5 deletions(-)
---
diff --git a/panels/region/Makefile.am b/panels/region/Makefile.am
index 3222a8c..30f477c 100644
--- a/panels/region/Makefile.am
+++ b/panels/region/Makefile.am
@@ -21,6 +21,8 @@ libregion_la_SOURCES = \
gnome-region-panel-formats.h \
gnome-region-panel-lang.c \
gnome-region-panel-lang.h \
+ gnome-region-panel-system.c \
+ gnome-region-panel-system.h \
gnome-region-panel-xkb.c \
gnome-region-panel-xkblt.c \
gnome-region-panel-xkbltadd.c \
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index 2519374..5e5cb4f 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -25,6 +25,7 @@
#include "gnome-region-panel-xkb.h"
#include "gnome-region-panel-lang.h"
#include "gnome-region-panel-formats.h"
+#include "gnome-region-panel-system.h"
#define WID(s) GTK_WIDGET (gtk_builder_get_object (dialog, s))
@@ -122,6 +123,7 @@ cc_region_panel_init (CcRegionPanel * self)
setup_xkb_tabs (priv->builder);
setup_language (priv->builder);
setup_formats (priv->builder);
+ setup_system (priv->builder);
}
void
diff --git a/panels/region/gnome-region-panel-system.c b/panels/region/gnome-region-panel-system.c
new file mode 100644
index 0000000..2393f89
--- /dev/null
+++ b/panels/region/gnome-region-panel-system.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Rodrigo Moya
+ *
+ * Written by: Rodrigo Moya <rodrigo gnome org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "cc-common-language.h"
+#include "gdm-languages.h"
+#include "gnome-region-panel-system.h"
+
+static GSettings *locale_settings;
+
+void
+setup_system (GtkBuilder *builder)
+{
+ gchar *user_language;
+
+ locale_settings = g_settings_new ("org.gnome.system.locale");
+
+ user_language = cc_common_language_get_current_language ();
+}
diff --git a/panels/region/gnome-region-panel-system.h b/panels/region/gnome-region-panel-system.h
new file mode 100644
index 0000000..8150662
--- /dev/null
+++ b/panels/region/gnome-region-panel-system.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 Rodrigo Moya
+ *
+ * Written by: Rodrigo Moya <rodrigo gnome org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef __GNOME_REGION_PANEL_SYSTEM_H
+#define __GNOME_REGION_PANEL_SYSTEM_H
+
+#include <gtk/gtk.h>
+
+void setup_system (GtkBuilder *builder);
+
+#endif
diff --git a/panels/region/gnome-region-panel.ui b/panels/region/gnome-region-panel.ui
index 83a17c5..69079fd 100644
--- a/panels/region/gnome-region-panel.ui
+++ b/panels/region/gnome-region-panel.ui
@@ -82,6 +82,17 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkVBox" id="region_vbox">
<property name="visible">True</property>
@@ -849,6 +860,337 @@ default settings</property>
<property name="tab_fill">False</property>
</packing>
</child>
+ <child>
+ <object class="GtkTable" id="table3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="xpad">6</property>
+ <property name="ypad">6</property>
+ <property name="label" translatable="yes">The login screen, system accounts and new user accounts use the system Region & Language settings. You may change the system settings to match yours</property>
+ <property name="wrap">True</property>
+ <property name="angle">0.0099999997764825821</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_SHRINK</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkTable" id="table4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">3</property>
+ <property name="row_spacing">3</property>
+ <child>
+ <object class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Display language:</property>
+ </object>
+ <packing>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="user_display_language">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">label</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Input source:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="user_input_source">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">label</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Format:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="user_format">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">label</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Your settings</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkTable" id="table5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">3</property>
+ <property name="row_spacing">3</property>
+ <child>
+ <object class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Display language:</property>
+ </object>
+ <packing>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="system_display_language">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">label</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label20">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Input source:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="system_input_source">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">label</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Format:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="system_format">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">label</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>System settings</b></property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="copy_settings_button">
+ <property name="label" translatable="yes">Copy Settings...</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_SHRINK</property>
+ <property name="y_options">GTK_SHRINK</property>
+ <property name="x_padding">3</property>
+ <property name="y_padding">3</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">System</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -863,11 +1205,6 @@ default settings</property>
<property name="position">1</property>
</packing>
</child>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- </object>
- </child>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]