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

  • Committer: Gustav Hartvigsson
  • Date: 2014-06-13 11:34:19 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140613113419-qghgec9kseko63qo
* Fixed the preferences dialoug. For some reasons
   properties that are set in the contructor were not transmitted to
   the class defined in the js, code...

* Added an about dialoug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
    
106
106
    this.set_app_menu (menu);
107
107
    
 
108
    let about_action = new Gio.SimpleAction ({name: "about"});
 
109
    about_action.connect ('activate', Lang.bind (this, function (){
 
110
      let about_dialog = new Gtk.AboutDialog ({use_header_bar: true,
 
111
                                               transient_for: this.window,
 
112
                                               modal: true});
 
113
      about_dialog.authors = ["Gustav Hartvigsson <gustav.hartvigsson@gmail.com>"];
 
114
      about_dialog.connect ("response", function () {
 
115
        about_dialog.destroy ();
 
116
      });
 
117
      about_dialog.run ();
 
118
    }))
 
119
    this.add_action (about_action);
 
120
    
108
121
    let quit_action = new Gio.SimpleAction ({name: "quit"});
109
122
    quit_action.connect ('activate', Lang.bind (this, function () {
110
123
      let allocation = this.window.get_allocation ();
121
134
    
122
135
    let preferences_action = new Gio.SimpleAction ({name: "preferences"});
123
136
    preferences_action.connect ('activate', Lang.bind (this, function (){
124
 
      let pref_dialog = new PreferencesUI.PreferencesUI ({
125
 
        transient_for: this.window,
126
 
        parent: this.window,
127
 
        window_position: Gtk.WindowPosition.CENTER_ON_PARENT
128
 
      });
 
137
      let pref_dialog = new PreferencesUI.PreferencesUI ();
 
138
      pref_dialog.set_transient_for (this.window);
129
139
      pref_dialog.run ();
130
140
    }));
131
141
    this.add_action (preferences_action)