aboutsummaryrefslogtreecommitdiff
path: root/src/gtk-dialog/gtk-logout-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtk-dialog/gtk-logout-helper.c')
-rw-r--r--src/gtk-dialog/gtk-logout-helper.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gtk-dialog/gtk-logout-helper.c b/src/gtk-dialog/gtk-logout-helper.c
index d8aea6b..09e6e86 100644
--- a/src/gtk-dialog/gtk-logout-helper.c
+++ b/src/gtk-dialog/gtk-logout-helper.c
@@ -25,12 +25,12 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <glib.h>
#include <gtk/gtk.h>
#include <dbus/dbus-glib.h>
-#include "logout-dialog.h"
+#include "dialog.h"
#include "ck-pk-helper.h"
#include "gconf-helper.h"
static void
-session_action (LogoutDialogAction action)
+session_action (LogoutDialogType action)
{
DBusGConnection * sbus;
DBusGProxy * sm_proxy;
@@ -55,13 +55,13 @@ session_action (LogoutDialogAction action)
g_clear_error (&error);
- if (action == LOGOUT_DIALOG_LOGOUT) {
+ if (action == LOGOUT_DIALOG_TYPE_LOG_OUT) {
res = dbus_g_proxy_call_with_timeout (sm_proxy, "Logout", INT_MAX, &error,
G_TYPE_UINT, 1, G_TYPE_INVALID, G_TYPE_INVALID);
- } else if (action == LOGOUT_DIALOG_SHUTDOWN) {
+ } else if (action == LOGOUT_DIALOG_TYPE_SHUTDOWN) {
res = dbus_g_proxy_call_with_timeout (sm_proxy, "RequestShutdown", INT_MAX, &error,
G_TYPE_INVALID, G_TYPE_INVALID);
- } else if (action == LOGOUT_DIALOG_RESTART) {
+ } else if (action == LOGOUT_DIALOG_TYPE_RESTART) {
res = dbus_g_proxy_call_with_timeout (sm_proxy, "RequestReboot", INT_MAX, &error,
G_TYPE_INVALID, G_TYPE_INVALID);
} else {
@@ -85,26 +85,26 @@ session_action (LogoutDialogAction action)
return;
}
-static LogoutDialogAction type = LOGOUT_DIALOG_LOGOUT;
+static LogoutDialogType type = LOGOUT_DIALOG_TYPE_LOG_OUT;
static gboolean
option_logout (const gchar * arg, const gchar * value, gpointer data, GError * error)
{
- type = LOGOUT_DIALOG_LOGOUT;
+ type = LOGOUT_DIALOG_TYPE_LOG_OUT;
return TRUE;
}
static gboolean
option_shutdown (const gchar * arg, const gchar * value, gpointer data, GError * error)
{
- type = LOGOUT_DIALOG_SHUTDOWN;
+ type = LOGOUT_DIALOG_TYPE_SHUTDOWN;
return TRUE;
}
static gboolean
option_restart (const gchar * arg, const gchar * value, gpointer data, GError * error)
{
- type = LOGOUT_DIALOG_RESTART;
+ type = LOGOUT_DIALOG_TYPE_RESTART;
return TRUE;
}
@@ -150,7 +150,7 @@ main (int argc, char * argv[])
not getting a dialog at all. */
/* if (!pk_require_auth(type) && !supress_confirmations()) { */
if (!supress_confirmations()) {
- dialog = logout_dialog_new(type);
+ dialog = GTK_WIDGET(logout_dialog_new(type));
}
if (dialog != NULL) {
@@ -158,7 +158,7 @@ main (int argc, char * argv[])
gtk_widget_hide(dialog);
if (response == GTK_RESPONSE_HELP) {
- type = LOGOUT_DIALOG_RESTART;
+ type = LOGOUT_DIALOG_TYPE_RESTART;
response = GTK_RESPONSE_OK;
}