Merge lp:~robert-ancell/unity-greeter/show-hostname into lp:unity-greeter

Proposed by Robert Ancell
Status: Merged
Approved by: Robert Ancell
Approved revision: 1019
Merged at revision: 1131
Proposed branch: lp:~robert-ancell/unity-greeter/show-hostname
Merge into: lp:unity-greeter
Diff against target: 77 lines (+21/-12)
4 files modified
data/com.canonical.unity-greeter.gschema.xml (+4/-0)
src/main-window.vala (+1/-0)
src/menubar.vala (+15/-12)
src/settings.vala (+1/-0)
To merge this branch: bzr merge lp:~robert-ancell/unity-greeter/show-hostname
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Robert Ancell Approve
Review via email: mp+194645@code.launchpad.net

Commit message

Add option to disable hostname in login screen

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

No-one else is checking these MPs...

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1018. By Robert Ancell

Merge with trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1019. By Robert Ancell

Kick Jenkins

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/com.canonical.unity-greeter.gschema.xml'
2--- data/com.canonical.unity-greeter.gschema.xml 2013-10-03 13:59:34 +0000
3+++ data/com.canonical.unity-greeter.gschema.xml 2014-01-17 20:00:51 +0000
4@@ -17,6 +17,10 @@
5 <default>true</default>
6 <summary>Whether to draw an overlay grid</summary>
7 </key>
8+ <key name="show-hostname" type="b">
9+ <default>true</default>
10+ <summary>Whether to show the hostname in the menubar</summary>
11+ </key>
12 <key name="logo" type="s">
13 <default>'/usr/share/unity-greeter/logo.png'</default>
14 <summary>Logo file to use</summary>
15
16=== modified file 'src/main-window.vala'
17--- src/main-window.vala 2013-11-13 04:28:36 +0000
18+++ src/main-window.vala 2014-01-17 20:00:51 +0000
19@@ -113,6 +113,7 @@
20 hbox.add (align);
21
22 back_button = new FlatButton ();
23+ back_button.get_accessible ().set_name (_("Back"));
24 back_button.focus_on_click = false;
25 var image = new Gtk.Image.from_file (Path.build_filename (Config.PKGDATADIR, "arrow_left.png", null));
26 image.show ();
27
28=== modified file 'src/menubar.vala'
29--- src/menubar.vala 2013-10-03 13:59:34 +0000
30+++ src/menubar.vala 2014-01-17 20:00:51 +0000
31@@ -122,19 +122,22 @@
32
33 pack_direction = Gtk.PackDirection.RTL;
34
35- var label = new Gtk.Label (Posix.utsname ().nodename);
36- label.show ();
37- var hostname_item = new Gtk.MenuItem ();
38- hostname_item.add (label);
39- hostname_item.sensitive = false;
40- hostname_item.right_justified = true;
41- hostname_item.show ();
42- append (hostname_item);
43+ if (UGSettings.get_boolean (UGSettings.KEY_SHOW_HOSTNAME))
44+ {
45+ var label = new Gtk.Label (Posix.utsname ().nodename);
46+ label.show ();
47+ var hostname_item = new Gtk.MenuItem ();
48+ hostname_item.add (label);
49+ hostname_item.sensitive = false;
50+ hostname_item.right_justified = true;
51+ hostname_item.show ();
52+ append (hostname_item);
53
54- /* Hack to get a label showing on the menubar */
55- label.ensure_style ();
56- var fg = label.get_style_context ().get_color (Gtk.StateFlags.NORMAL);
57- label.override_color (Gtk.StateFlags.INSENSITIVE, fg);
58+ /* Hack to get a label showing on the menubar */
59+ label.ensure_style ();
60+ var fg = label.get_style_context ().get_color (Gtk.StateFlags.NORMAL);
61+ label.override_color (Gtk.StateFlags.INSENSITIVE, fg);
62+ }
63
64 /* Prevent dragging the window by the menubar */
65 try
66
67=== modified file 'src/settings.vala'
68--- src/settings.vala 2013-09-20 18:28:43 +0000
69+++ src/settings.vala 2014-01-17 20:00:51 +0000
70@@ -24,6 +24,7 @@
71 public static const string KEY_BACKGROUND_COLOR = "background-color";
72 public static const string KEY_DRAW_USER_BACKGROUNDS = "draw-user-backgrounds";
73 public static const string KEY_DRAW_GRID = "draw-grid";
74+ public static const string KEY_SHOW_HOSTNAME = "show-hostname";
75 public static const string KEY_LOGO = "logo";
76 public static const string KEY_BACKGROUND_LOGO = "background-logo";
77 public static const string KEY_THEME_NAME = "theme-name";

Subscribers

People subscribed via source and target branches