~ubuntu-branches/ubuntu/intrepid/gnome-system-tools/intrepid-updates

« back to all changes in this revision

Viewing changes to src/common/gst-polkit-button.c

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2008-01-15 18:41:08 UTC
  • mfrom: (1.1.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20080115184108-5ypf5yia875i7cg4
Tags: 2.21.5.1-0ubuntu1
* New upstream release:
  - Common
    + Switch CFLAGS order to be able to compile with other gst.h files around
  - Network
    + Use Gio to monitor changes in locations
    + Do not put a \n in a window title
    + Use non-obsolete icons
    + Make locations code more extensible
  - Shares
    + Fix nautilus extension, update emblem after any change to folders
    + Locate correctly the nautilus extensions dir
    + Label the OK button "Share", more according to HIG
    + Fix share dialog width
    + Use HIG capitalization for window title
  - Time
    + Put the "synchronize now" button besides the time spin buttons
    + Fix potential crash if it couldn't get dbus connection to inhibit the
      screensaver.
  - Services
    + Use HIG capitalization for window title
    + Use non-obsolete icons
  - Users
    + Use HIG capitalization for window title
    + Fixed potential crash when adding a new user
    + Do not mislead people putting something in the password entries when
      editing an user
    + Check whether the home directory doesn't exist before adding a new user

* debian/control:
  - Build-Depend on libglib2.0-dev >= 2.15.2.
* debian/patches/98_automake.dpatch:
  - Regenerated for the new release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
        case POLKIT_RESULT_ONLY_VIA_SELF_AUTH:
132
132
        case POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_SESSION:
133
133
        case POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_ALWAYS:
 
134
        case POLKIT_RESULT_UNKNOWN:
134
135
                image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_BUTTON);
135
136
                sensitive = TRUE;
136
137
                break;
137
138
        case POLKIT_RESULT_NO:
138
 
        case POLKIT_RESULT_UNKNOWN:
139
139
                image = gtk_image_new_from_stock (GTK_STOCK_NO, GTK_ICON_SIZE_BUTTON);
140
140
                tooltip = N_("This action is not allowed");
141
141
                break;
230
230
gst_polkit_button_clicked (GtkButton *button)
231
231
{
232
232
        GstPolKitButtonPriv *priv;
 
233
        PolKitResult result;
233
234
 
234
235
        priv = GST_POLKIT_BUTTON_GET_PRIVATE (button);
235
236
        gst_polkit_action_authenticate (priv->action);
 
237
        result = gst_polkit_action_get_result (priv->action);
 
238
 
 
239
        if (result == POLKIT_RESULT_UNKNOWN) {
 
240
                GtkWidget *dialog, *toplevel;
 
241
 
 
242
                toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button));
 
243
                dialog = gtk_message_dialog_new (GTK_WINDOW (toplevel),
 
244
                                                 GTK_DIALOG_MODAL,
 
245
                                                 GTK_MESSAGE_ERROR,
 
246
                                                 GTK_BUTTONS_CLOSE,
 
247
                                                 _("Could not authenticate"));
 
248
                gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
 
249
                                                          _("An unexpected error has occurred."));
 
250
 
 
251
                gtk_dialog_run (GTK_DIALOG (dialog));
 
252
                gtk_widget_destroy (dialog);
 
253
        }
 
254
 
236
255
        update_button_state (GST_POLKIT_BUTTON (button));
237
256
}
238
257