/gpump/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/gpump/trunk

« back to all changes in this revision

Viewing changes to src/preferences_ui.js

  • Committer: Gustav Hartvigsson
  • Date: 2014-08-03 21:09:38 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140803210938-jfhdl23v4mzji6pf
* Added translation files (messeges.po and sv.po)
* fixed a few gettext errors in app.js
* TODO:
  * Make the translations not be as "fixed" as they are now.
  * Add auto update/compile for the translations to makefile.

  * Switch to a better build system?

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 */
7
7
 
8
8
const Gtk = imports.gi.Gtk;
 
9
const Lang = imports.lang;
9
10
const _ = imports.gettext.gettext;
10
 
const Lang = imports.lang;
11
11
 
12
12
const SettingsData = imports.settings_data;
13
13
 
19
19
    this.parent ({
20
20
      use_header_bar: true,
21
21
      modal: true,
22
 
      title: _("GPump preferences"),
23
 
      width_request: 550,
24
 
      height_request: 300
 
22
      title: _("GPump preferences")
25
23
    });
26
24
    
27
25
    this._prepare_header_bar ();
54
52
    /*this.get_content_area ().pack_start ()),
55
53
                                         true, true, 25);*/
56
54
    this.get_content_area ().set_center_widget (
57
 
      (this.layout = new Gtk.Box ({
58
 
        orientation: Gtk.Orientation.VERTICAL,
59
 
        spacing: 8,
60
 
        border_width: 8,
61
 
        margin: 50
62
 
      }))
63
 
    );
64
 
    
65
 
    
66
 
    this.layout.pack_start (
67
 
      new Gtk.Frame ({child:
68
 
        (this.list_box = new Gtk.ListBox ({
69
 
          width_request: 400,
70
 
          selection_mode: Gtk.SelectionMode.NONE,
71
 
          expand: false
72
 
        })),
73
 
        expand: false
74
 
      }),
75
 
      true,
76
 
      true,
77
 
      null
78
 
    );
 
55
                                          (this.list_box = new Gtk.ListBox ({
 
56
      width_request: 400,
 
57
      margin: 50,
 
58
      selection_mode: Gtk.SelectionMode.NONE
 
59
    })));
79
60
    
80
61
    let settings_object = SettingsData.get_settings ();
81
62
    
168
149
    //this.list_box.add ((new Gtk.Label ()));
169
150
    
170
151
    /* Reset all settings */
171
 
    this.layout.pack_end (
172
 
      (this.reset_all_btn = new Gtk.Button ({
173
 
        label: _("Reset all settings")
174
 
      })),
175
 
      false,
176
 
      false,
177
 
      null
178
 
    );
 
152
    this.list_box.add ((this.reset_all_btn = new Gtk.Button ({
 
153
      label: _("Reset all settings"),
 
154
      margin_left: 50,
 
155
      margin_right: 50,
 
156
      margin_top: 20
 
157
    })));
179
158
    
180
159
    this.reset_all_btn.connect ("clicked", Lang.bind(this, this._reset_all));
181
160
  },