[gnome-boxes] installer: Minor coding-style fixes
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] installer: Minor coding-style fixes
- Date: Fri, 21 Dec 2012 16:11:08 +0000 (UTC)
commit 1588acc8046b1fe22c3c99dd20fd59de64547bbe
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Dec 19 23:20:50 2012 +0200
installer: Minor coding-style fixes
- Move private get_preferred_language() below public methods.
- Don't exceed 120 chars.
https://bugzilla.gnome.org/show_bug.cgi?id=690536
src/unattended-installer.vala | 51 +++++++++++++++++++++--------------------
1 files changed, 26 insertions(+), 25 deletions(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index ab1567f..f711535 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -98,31 +98,6 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
}
}
- private string get_preferred_language () {
- var system_langs = Intl.get_language_names ();
- var media_langs = new HashTable<string, unowned string> (str_hash, str_equal);
- var media_langs_list = os_media.languages;
-
- foreach (var lang in media_langs_list)
- media_langs.add (lang);
-
- foreach (var lang in system_langs) {
- if (lang in media_langs) {
- debug ("matched %s", lang);
- return lang;
- }
- }
-
- if (media_langs_list != null) {
- debug ("Failed to match system locales with media languages, falling back to %s media language", media_langs_list.nth_data (0));
- return media_langs_list.nth_data (0);
- }
-
- debug ("No media language, using %s locale", system_langs[0]);
-
- return system_langs[0];
- }
-
public async UnattendedInstaller.from_media (InstallerMedia media, InstallScriptList scripts) throws GLib.Error {
os = media.os;
os_media = media.os_media;
@@ -661,6 +636,32 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
}
}
}
+
+ private string get_preferred_language () {
+ var system_langs = Intl.get_language_names ();
+ var media_langs = new HashTable<string, unowned string> (str_hash, str_equal);
+ var media_langs_list = os_media.languages;
+
+ foreach (var lang in media_langs_list)
+ media_langs.add (lang);
+
+ foreach (var lang in system_langs) {
+ if (lang in media_langs) {
+ debug ("matched %s", lang);
+ return lang;
+ }
+ }
+
+ if (media_langs_list != null) {
+ debug ("Failed to match system locales with media languages, falling back to %s media language",
+ media_langs_list.nth_data (0));
+ return media_langs_list.nth_data (0);
+ }
+
+ debug ("No media language, using %s locale", system_langs[0]);
+
+ return system_langs[0];
+ }
}
private interface Boxes.UnattendedFile : GLib.Object {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]