/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/account_ui.js

  • Committer: Gustav Hartvigsson
  • Date: 2014-06-09 13:00:41 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140609130041-mn6cn3ogqw22jsas
* made the functions look more alike...
  ie: more glib-ish...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* This file is part of GPump, a Pump.io client.
2
 
 *
3
 
 * GPump (THE SOFTWARE) is made available under the terms and conditions of the
4
 
 * GNU Lesser General Public Licence 3.0. A copy of the licence can be read
5
 
 * in the file lgpl-3.0.txt in the root of this project.
6
 
 */
7
 
 
8
 
 
9
 
const Gtk = imports.gi.Gtk;
10
 
const _ = imports.gettext.gettext;
11
 
const Lang = imports.lang;
12
 
 
13
 
/** @file
14
 
 */
15
 
 
16
 
 /** @class
17
 
 * AccountUI is the UI that is used for handling of accounts.
18
 
 */
19
 
const AccountUI = Lang.Class ({
20
 
  Name: "AccountUI",
21
 
  Extends: Gtk.Dialog,
22
 
  
23
 
  _init: function () {
24
 
    this.parent ({
25
 
      use_header_bar: true,
26
 
      modal: true,
27
 
      title: _("GPump Accounts")
28
 
    });
29
 
    
30
 
    this._prepare_header_bar ();
31
 
    
32
 
    this.show_all ();
33
 
  },
34
 
  
35
 
  _prepare_header_bar: function () {
36
 
    this.headerbar = this.get_header_bar ();
37
 
    this.headerbar.set_show_close_button (false);
38
 
    this.headerbar.pack_end ((this.close_btn = new Gtk.Button ({
39
 
      label: _("close")
40
 
    })));
41
 
    
42
 
    this.close_btn.connect ("clicked", Lang.bind (this, function () {
43
 
      this.destroy ();
44
 
    }));
45
 
    
46
 
    /* Install a custom style */
47
 
    let special_btn_style_ctx = this.close_btn.get_style_context ();
48
 
    special_btn_style_ctx.add_class ("suggested-action");
49
 
  },
50
 
  
51
 
  /**
52
 
   * add a new account to the list of accounts  
53
 
   */
54
 
  _add_new_account: function () {
55
 
    
56
 
  },
57
 
  
58
 
  _prepare_view: function () {
59
 
    
60
 
  }
61
 
  
62
 
});
63
 
 
64