~ubuntu-multiseat/ubuntu/saucy/unity-greeter/bug1201122

« back to all changes in this revision

Viewing changes to src/menubar.vala

Tags: upstream-12.10.3
ImportĀ upstreamĀ versionĀ 12.10.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
 
66
66
public class MenuBar : Gtk.MenuBar
67
67
{
68
 
    public static const int HEIGHT = 32;
69
68
    public Background? background { get; construct; default = null; }
70
69
    public bool high_contrast { get; private set; default = false; }
71
70
    public Gtk.Window? keyboard_window { get; private set; default = null; }
72
 
 
73
71
    public Gtk.AccelGroup? accel_group { get; construct; }
74
72
 
 
73
    private static const int HEIGHT = 24;
 
74
 
75
75
    public MenuBar (Background bg, Gtk.AccelGroup ag)
76
76
    {
77
77
        Object (background: bg, accel_group: ag);
162
162
        }
163
163
        catch (Error e)
164
164
        {
165
 
            debug ("Internal error loading session chooser style: %s", e.message);
 
165
            debug ("Internal error loading menubar style: %s", e.message);
166
166
        }
167
167
 
168
168
        setup_indicators ();
169
 
 
170
 
        set_size_request (-1, HEIGHT);
171
169
    }
172
170
 
173
171
    ~MenuBar ()
181
179
        }
182
180
    }
183
181
 
 
182
    public override void get_preferred_height (out int min, out int nat)
 
183
    {
 
184
        min = HEIGHT;
 
185
        nat = HEIGHT;
 
186
    }
 
187
 
184
188
    private void greeter_set_env (string key, string val)
185
189
    {
186
190
        GLib.Environment.set_variable (key, val, true);
199
203
            var builder = new GLib.VariantBuilder (GLib.VariantType.ARRAY);
200
204
            builder.add ("{ss}", key, val);
201
205
 
202
 
            proxy.call ("UpdateActivationEnvironment", new GLib.Variant ("(a{ss})", builder), GLib.DBusCallFlags.NONE, -1, null);
 
206
            proxy.call_sync ("UpdateActivationEnvironment", new GLib.Variant ("(a{ss})", builder), GLib.DBusCallFlags.NONE, -1, null);
203
207
        }
204
208
        catch (Error e)
205
209
        {
267
271
        }
268
272
        keyboard_label.label = desc;
269
273
 
270
 
        if (UnityGreeter.test_mode)
 
274
        if (UnityGreeter.singleton.test_mode)
271
275
            debug ("Setting layout to %s", layout.name);
272
276
        else
273
277
            LightDM.set_layout (layout);