[gnome-calculator] Use a header bar on the preferences dialog
- From: Arth Patel <arthpatel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator] Use a header bar on the preferences dialog
- Date: Sat, 10 May 2014 15:59:03 +0000 (UTC)
commit 19f4ac6ae5201d8c5276af7fa116f4219d2f7562
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri May 9 20:44:09 2014 -0500
Use a header bar on the preferences dialog
https://bugzilla.gnome.org/show_bug.cgi?id=729903
src/math-preferences.vala | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/math-preferences.vala b/src/math-preferences.vala
index 51b8582..cccc143 100644
--- a/src/math-preferences.vala
+++ b/src/math-preferences.vala
@@ -10,7 +10,8 @@
public class MathPreferencesDialog : Gtk.Dialog
{
- private MathEquation equation;
+ public MathEquation equation { private get; construct; }
+
private Gtk.ComboBox angle_unit_combo;
private Gtk.ComboBox number_format_combo;
private Gtk.ComboBox word_size_combo;
@@ -18,15 +19,18 @@ public class MathPreferencesDialog : Gtk.Dialog
private Gtk.CheckButton thousands_separator_check;
private Gtk.CheckButton trailing_zeroes_check;
- public MathPreferencesDialog (MathEquation equation)
+ public MathPreferencesDialog (MathEquation eq)
{
- this.equation = equation;
+ Object(use_header_bar: 1, equation: eq);
+ }
+ construct
+ {
set_title (/* Title of preferences dialog */
_("Preferences"));
border_width = 8;
- add_button (/* Label on close button in preferences dialog */
- _("_Close"), 0);
+
+ ((Gtk.HeaderBar) get_header_bar ()).show_close_button = true;
var grid = new Gtk.Grid ();
grid.show ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]