gnome-system-tools r4103 - trunk/src/common



Author: carlosg
Date: Sun Jan 13 19:28:41 2008
New Revision: 4103
URL: http://svn.gnome.org/viewvc/gnome-system-tools?rev=4103&view=rev

Log:
2008-01-13  Carlos Garnacho  <carlosg gnome org>

        * gst-dialog.[ch] (gst_dialog_authenticate): Added, programatically
        tells the tool to unlock.


Modified:
   trunk/src/common/ChangeLog
   trunk/src/common/gst-dialog.c
   trunk/src/common/gst-dialog.h

Modified: trunk/src/common/gst-dialog.c
==============================================================================
--- trunk/src/common/gst-dialog.c	(original)
+++ trunk/src/common/gst-dialog.c	Sun Jan 13 19:28:41 2008
@@ -690,3 +690,16 @@
 	g_slist_free (priv->edit_dialogs);
 	priv->edit_dialogs = NULL;
 }
+
+void
+gst_dialog_authenticate (GstDialog *dialog)
+{
+#ifdef HAVE_POLKIT
+	GstDialogPrivate *priv;
+
+	if (!gst_dialog_is_authenticated (dialog)) {
+		priv = GST_DIALOG_GET_PRIVATE (dialog);
+		gtk_button_clicked (GTK_BUTTON (priv->polkit_button));
+	}
+#endif
+}

Modified: trunk/src/common/gst-dialog.h
==============================================================================
--- trunk/src/common/gst-dialog.h	(original)
+++ trunk/src/common/gst-dialog.h	Sun Jan 13 19:28:41 2008
@@ -75,6 +75,7 @@
 
 GstTool            *gst_dialog_get_tool            (GstDialog *xd);
 
+void                gst_dialog_authenticate        (GstDialog *dialog);
 gboolean            gst_dialog_is_authenticated    (GstDialog *dialog);
 void                gst_dialog_require_authentication_for_widget  (GstDialog *xd, GtkWidget *w);
 void                gst_dialog_require_authentication_for_widgets (GstDialog *xd, const gchar **names);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]