~vrruiz/gnome-control-center-signon/quantal-autoreconf

« back to all changes in this revision

Viewing changes to src/cc-credentials-preferences.vala

* New upstream release.
  - removed the clutter based transition, it broke the scrollbar and was 
    inconsistent with the other panels (LP: #1043697) (LP: #1043732)
  - Selection style in account type list is inconsistent with the rest 
    of Ubuntu (LP: #1043724)
* debian/control
  - removed clutter build depends
* New upstream release.
* debian/control
  - added libclutter-gtk-1.0-dev and libclutter-1.0-dev to build depends
  - depend on gnome-control-center >= 3.4.2-0ubuntu10, which includes 
    the clutter init patch
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
     * @param ACCOUNTS select an account or provider in a two-pane view
41
41
     * @param AUTHORIZATION authorize an account in a full-size widget, such as
42
42
     * a WebKit view
43
 
     * @param ACCOUNT_APPLICATION_OPTIONS set options on an account for a
44
 
     * specific application
 
43
     * @param ACCOUNT_OPTIONS set options on an account for either a specific
 
44
     * application or for the account globally
45
45
     */
46
46
    private enum PreferencesPage
47
47
    {
48
48
        ACCOUNTS = 0,
49
49
        AUTHORIZATION = 1,
50
 
        ACCOUNT_APPLICATION_OPTIONS = 2
 
50
        ACCOUNT_OPTIONS = 2,
51
51
    }
52
52
 
53
53
    public Preferences ()
108
108
        accounts_page.new_account_request.connect (on_accounts_page_new_account_request);
109
109
        accounts_page.reauthenticate_account_request.connect (on_accounts_page_reauthenticate_account_request);
110
110
        accounts_page.account_options_request.connect (on_accounts_page_account_options_request);
 
111
        accounts_page.account_edit_options_request.connect (on_accounts_page_account_edit_options_request);
111
112
 
112
113
        this.append_page (accounts_page);
113
114
 
198
199
        this.append_page (application_row.plugin_widget);
199
200
        application_row.plugin.finished.connect (on_account_application_options_finished);
200
201
 
201
 
        set_current_page (PreferencesPage.ACCOUNT_APPLICATION_OPTIONS);
 
202
        set_current_page (PreferencesPage.ACCOUNT_OPTIONS);
202
203
    }
203
204
 
204
205
    /**
216
217
                     plugin_err.message);
217
218
        }
218
219
 
219
 
        this.remove_page (PreferencesPage.ACCOUNT_APPLICATION_OPTIONS);
 
220
        this.remove_page (PreferencesPage.ACCOUNT_OPTIONS);
 
221
        set_current_page (PreferencesPage.ACCOUNTS);
 
222
    }
 
223
 
 
224
    /**
 
225
     * Handle the account-edit-options-request signal from AccountsPage (and ini
 
226
     * turn AccountDetailsPage), switching notebook page to the application
 
227
     * account options view.
 
228
     *
 
229
     * @param application_row the AccountApplicationRow to show options for
 
230
     */
 
231
    private void on_accounts_page_account_edit_options_request (Ap.Plugin plugin)
 
232
    {
 
233
        var widget = plugin.build_widget ();
 
234
 
 
235
        if (widget == null)
 
236
        {
 
237
            critical ("Error building configuration widget");
 
238
            return;
 
239
        }
 
240
 
 
241
        widget.show ();
 
242
        this.append_page (widget);
 
243
        plugin.finished.connect (on_account_edit_options_finished);
 
244
 
 
245
        set_current_page (PreferencesPage.ACCOUNT_OPTIONS);
 
246
    }
 
247
 
 
248
    /**
 
249
     * Handle the account options editing process finishing, and switch back to
 
250
     * the accounts view.
 
251
     *
 
252
     * @param plugin the plugin that emitted the finished signal
 
253
     */
 
254
    private void on_account_edit_options_finished (Ap.Plugin plugin)
 
255
    {
 
256
        var plugin_err = plugin.get_error ();
 
257
        if (plugin_err != null)
 
258
        {
 
259
            warning ("Error during account edit options process: %s",
 
260
                     plugin_err.message);
 
261
        }
 
262
 
 
263
        this.remove_page (PreferencesPage.ACCOUNT_OPTIONS);
220
264
        set_current_page (PreferencesPage.ACCOUNTS);
221
265
    }
222
266
}