diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-03 13:14:53 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-03 13:14:53 +0200 |
commit | c43dfb815a4951b8248f4f0e98babe4f80204f03 (patch) | |
tree | 82745ed2353757c41ea1865bad9ac7a1b0a8a366 /src/Properties.vala | |
parent | 2785a691b958a79a1dd606c445188c71c3f58b3c (diff) |
Imported Upstream version 0.22.0upstream/0.22.0
Diffstat (limited to 'src/Properties.vala')
-rw-r--r-- | src/Properties.vala | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/src/Properties.vala b/src/Properties.vala index 9edb4fb..88e0e1d 100644 --- a/src/Properties.vala +++ b/src/Properties.vala @@ -1,4 +1,4 @@ -/* Copyright 2009-2014 Yorba Foundation +/* Copyright 2009-2015 Yorba Foundation * * This software is licensed under the GNU LGPL (version 2.1 or later). * See the COPYING file in this distribution. @@ -453,8 +453,6 @@ private class BasicProperties : Properties { private class ExtendedPropertiesWindow : Gtk.Dialog { private ExtendedProperties properties = null; - private const int FRAME_BORDER = 6; - private Gtk.Button close_button; private class ExtendedProperties : Properties { private const string NO_VALUE = ""; @@ -632,13 +630,13 @@ private class ExtendedPropertiesWindow : Gtk.Dialog { } public ExtendedPropertiesWindow(Gtk.Window owner) { + Object(use_header_bar: 1); + add_events(Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.KEY_PRESS_MASK); focus_on_map = true; set_accept_focus(true); set_can_focus(true); set_title(_("Extended Information")); - set_size_request(300,-1); - set_default_size(520, -1); set_position(Gtk.WindowPosition.CENTER); set_transient_for(owner); set_type_hint(Gdk.WindowTypeHint.DIALOG); @@ -648,20 +646,8 @@ private class ExtendedPropertiesWindow : Gtk.Dialog { properties = new ExtendedProperties(); Gtk.Alignment alignment = new Gtk.Alignment(0.5f,0.5f,1,1); alignment.add(properties); - alignment.set_padding(4, 4, 4, 4); + alignment.set_border_width(3); ((Gtk.Box) get_content_area()).add(alignment); - close_button = new Gtk.Button.from_stock(Gtk.Stock.CLOSE); - close_button.clicked.connect(on_close_clicked); - - Gtk.Alignment action_alignment = new Gtk.Alignment(1, 0.5f, 1, 1); - action_alignment.add(close_button); - ((Gtk.Container) get_action_area()).add(action_alignment); - - set_has_resize_grip(false); - } - - ~ExtendedPropertiesWindow() { - close_button.clicked.disconnect(on_close_clicked); } public override bool button_press_event(Gdk.EventButton event) { @@ -674,10 +660,6 @@ private class ExtendedPropertiesWindow : Gtk.Dialog { return true; } - private void on_close_clicked() { - hide(); - } - public override bool key_press_event(Gdk.EventKey event) { // hide properties if (Gdk.keyval_name(event.keyval) == "Escape") { |