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

  • Committer: Gustav Hartvigsson
  • Date: 2015-06-05 19:06:14 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150605190614-s410mh65n2jdxtcv
* Cleaded up a lille code
* Fixed a nasty segfault that could occur if the conig folder did not exist.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 */
7
7
 
8
8
/** @file
9
 
 * UserMenu is a custom GtkPopover that shows the accounts that can be
10
 
 * switched between and accsess to the user wizard/account maneger.
11
9
 */
12
10
 
13
11
const Gtk = imports.gi.Gtk;
14
12
const _ = imports.gettext.gettext;
15
13
const Lang = imports.lang;
16
14
 
 
15
const AccountUI = imports.account_ui;
17
16
 
 
17
/** @class
 
18
 * UserMenu is a custom GtkPopover that shows the accounts that can be
 
19
 * switched between and accsess to the user wizard/account maneger.
 
20
 */
18
21
const UserMenu = new Lang.Class ({
19
22
  Name: "UserMenu",
20
23
  Extends: Gtk.Popover,
56
59
    );
57
60
    
58
61
    this.accounts_btn.connect ("clicked", Lang.bind (this, function () {
59
 
      print ("Blubb!")
 
62
      let account_ui = new AccountUI.AccountUI ();
 
63
      this.hide ();
 
64
      account_ui.set_transient_for (this.get_toplevel());
 
65
      account_ui.run ();
60
66
    }));
61
67
    
62
68
    this.connect ("show", Lang.bind (this, function () {