Commit 705699b2 authored by Giovanni Campagna's avatar Giovanni Campagna Committed by Ray Strode

Stop connecting to the X11 server

Remove all GTK+ code from the main gnome-session binary (including
the two fallback mode dialogs), so that gnome-session can run
when X is not available.

These dialogs are no longer used anymore, so it's not a UI freeze
break.

https://bugzilla.gnome.org/show_bug.cgi?id=706420
parent 672cb149
......@@ -63,7 +63,6 @@ PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= $GTK3_REQUIRED)
PKG_CHECK_MODULES(GNOME_SESSION,
glib-2.0 >= $GLIB_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
gtk+-3.0 >= $GTK3_REQUIRED
dbus-glib-1 >= $DBUS_GLIB_REQUIRED
upower-glib >= $UPOWER_REQUIRED
json-glib-1.0 >= $JSON_GLIB_REQUIRED
......
......@@ -2,8 +2,7 @@ SUBDIRS = icons
uidir = $(pkgdatadir)
ui_DATA = \
session-properties.ui \
gsm-inhibit-dialog.ui
session-properties.ui
if BUILD_SESSION_SELECTOR
ui_DATA += session-selector.ui
......
<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkVBox" id="main-box">
<property name="visible">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="header-label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Some programs are still running:</property>
<property name="wrap">True</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="inhibitors-treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
<property name="enable_search">False</property>
<property name="show_expanders">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="description-label">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="margin-bottom">18</property>
<property name="label" translatable="no">Waiting for the program to finish. Interrupting the program may cause you to lose work.</property>
<property name="wrap">True</property>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
</object>
</interface>
......@@ -8,6 +8,7 @@ noinst_PROGRAMS = \
test-process-helper
AM_CPPFLAGS = \
$(GTK3_CFLAGS) \
$(GNOME_SESSION_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS)
......@@ -32,10 +33,6 @@ gnome_session_SOURCES = \
gsm-consolekit.h \
gsm-systemd.h \
gsm-systemd.c \
gsm-logout-dialog.h \
gsm-logout-dialog.c \
gsm-inhibit-dialog.h \
gsm-inhibit-dialog.c \
gsm-presence.h \
gsm-presence-flag.h \
gsm-presence.c \
......@@ -118,7 +115,7 @@ gnome_session_failed_LDADD = \
$(GTK3_LIBS)
test_inhibit_SOURCES = test-inhibit.c
test_inhibit_LDADD = $(GNOME_SESSION_LIBS)
test_inhibit_LDADD = $(GTK3_LIBS) $(GNOME_SESSION_LIBS)
test_client_dbus_SOURCES = test-client-dbus.c
test_client_dbus_LDADD = $(DBUS_GLIB_LIBS)
......
This diff is collapsed.
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2008 William Jon McCann <mccann@jhu.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef __GSM_INHIBIT_DIALOG_H
#define __GSM_INHIBIT_DIALOG_H
#include <glib-object.h>
#include <gtk/gtk.h>
#include "gsm-store.h"
G_BEGIN_DECLS
#define GSM_TYPE_INHIBIT_DIALOG (gsm_inhibit_dialog_get_type ())
#define GSM_INHIBIT_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSM_TYPE_INHIBIT_DIALOG, GsmInhibitDialog))
#define GSM_INHIBIT_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSM_TYPE_INHIBIT_DIALOG, GsmInhibitDialogClass))
#define GSM_IS_INHIBIT_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSM_TYPE_INHIBIT_DIALOG))
#define GSM_IS_INHIBIT_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSM_TYPE_INHIBIT_DIALOG))
#define GSM_INHIBIT_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSM_TYPE_INHIBIT_DIALOG, GsmInhibitDialogClass))
typedef struct GsmInhibitDialogPrivate GsmInhibitDialogPrivate;
typedef enum
{
GSM_LOGOUT_ACTION_LOGOUT,
GSM_LOGOUT_ACTION_SWITCH_USER,
GSM_LOGOUT_ACTION_SHUTDOWN,
GSM_LOGOUT_ACTION_REBOOT,
GSM_LOGOUT_ACTION_HIBERNATE,
GSM_LOGOUT_ACTION_SLEEP
} GsmLogoutAction;
typedef struct
{
GtkDialog parent;
GsmInhibitDialogPrivate *priv;
} GsmInhibitDialog;
typedef struct
{
GtkDialogClass parent_class;
} GsmInhibitDialogClass;
GType gsm_inhibit_dialog_get_type (void);
GtkWidget * gsm_inhibit_dialog_new (GsmStore *inhibitors,
GsmStore *clients,
int action);
GtkTreeModel * gsm_inhibit_dialog_get_model (GsmInhibitDialog *dialog);
G_END_DECLS
#endif /* __GSM_INHIBIT_DIALOG_H */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2006 Vincent Untz
* Copyright (C) 2008 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* Authors:
* Vincent Untz <vuntz@gnome.org>
*/
#include <config.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#define UPOWER_ENABLE_DEPRECATED 1
#include <upower.h>
#include "gsm-logout-dialog.h"
#include "gsm-system.h"
#include "gsm-icon-names.h"
#include "gdm.h"
#define GSM_LOGOUT_DIALOG_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GSM_TYPE_LOGOUT_DIALOG, GsmLogoutDialogPrivate))
/* Shared with gsm-fail-whale-dialog.c */
#define AUTOMATIC_ACTION_TIMEOUT 60
#define LOCKDOWN_SCHEMA "org.gnome.desktop.lockdown"
#define KEY_DISABLE_USER_SWITCHING "disable-user-switching"
struct _GsmLogoutDialogPrivate
{
GsmDialogLogoutType type;
UpClient *up_client;
GsmSystem *system;
int timeout;
unsigned int timeout_id;
unsigned int default_response;
};
static GsmLogoutDialog *current_dialog = NULL;
static void gsm_logout_dialog_set_timeout (GsmLogoutDialog *logout_dialog);
static void gsm_logout_dialog_destroy (GsmLogoutDialog *logout_dialog,
gpointer data);
static void gsm_logout_dialog_show (GsmLogoutDialog *logout_dialog,
gpointer data);
enum {
PROP_0,
PROP_MESSAGE_TYPE
};
G_DEFINE_TYPE (GsmLogoutDialog, gsm_logout_dialog, GTK_TYPE_MESSAGE_DIALOG);
static void
gsm_logout_dialog_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
switch (prop_id) {
case PROP_MESSAGE_TYPE:
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gsm_logout_dialog_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
switch (prop_id) {
case PROP_MESSAGE_TYPE:
g_value_set_enum (value, GTK_MESSAGE_WARNING);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gsm_logout_dialog_class_init (GsmLogoutDialogClass *klass)
{
GObjectClass *gobject_class;
gobject_class = G_OBJECT_CLASS (klass);
/* This is a workaround to avoid a stupid crash: libgnomeui
* listens for the "show" signal on all GtkMessageDialog and
* gets the "message-type" of the dialogs. We will crash when
* it accesses this property if we don't override it since we
* didn't define it. */
gobject_class->set_property = gsm_logout_dialog_set_property;
gobject_class->get_property = gsm_logout_dialog_get_property;
g_object_class_override_property (gobject_class,
PROP_MESSAGE_TYPE,
"message-type");
g_type_class_add_private (klass, sizeof (GsmLogoutDialogPrivate));
}
static void
gsm_logout_dialog_init (GsmLogoutDialog *logout_dialog)
{
logout_dialog->priv = GSM_LOGOUT_DIALOG_GET_PRIVATE (logout_dialog);
logout_dialog->priv->timeout_id = 0;
logout_dialog->priv->timeout = 0;
logout_dialog->priv->default_response = GTK_RESPONSE_CANCEL;
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (logout_dialog), TRUE);
gtk_window_set_keep_above (GTK_WINDOW (logout_dialog), TRUE);
gtk_window_stick (GTK_WINDOW (logout_dialog));
logout_dialog->priv->up_client = up_client_new ();
logout_dialog->priv->system = gsm_get_system ();
g_signal_connect (logout_dialog,
"destroy",
G_CALLBACK (gsm_logout_dialog_destroy),
NULL);
g_signal_connect (logout_dialog,
"show",
G_CALLBACK (gsm_logout_dialog_show),
NULL);
}
static void
gsm_logout_dialog_destroy (GsmLogoutDialog *logout_dialog,
gpointer data)
{
if (logout_dialog->priv->timeout_id != 0) {
g_source_remove (logout_dialog->priv->timeout_id);
logout_dialog->priv->timeout_id = 0;
}
g_clear_object (&logout_dialog->priv->up_client);
g_clear_object (&logout_dialog->priv->system);
current_dialog = NULL;
}
static gboolean
gsm_logout_supports_system_suspend (GsmLogoutDialog *logout_dialog)
{
return up_client_get_can_suspend (logout_dialog->priv->up_client);
}
static gboolean
gsm_logout_supports_system_hibernate (GsmLogoutDialog *logout_dialog)
{
return up_client_get_can_hibernate (logout_dialog->priv->up_client);
}
static gboolean
gsm_logout_supports_switch_user (GsmLogoutDialog *logout_dialog)
{
GSettings *settings;
gboolean ret = TRUE;
settings = g_settings_new (LOCKDOWN_SCHEMA);
if (g_settings_get_boolean (settings, KEY_DISABLE_USER_SWITCHING))
ret = FALSE;
g_object_unref (settings);
if (ret)
ret = gsm_system_can_switch_user (logout_dialog->priv->system);
return ret;
}
static gboolean
gsm_logout_supports_reboot (GsmLogoutDialog *logout_dialog)
{
gboolean ret;
ret = gsm_system_can_restart (logout_dialog->priv->system);
if (!ret) {
ret = gdm_supports_logout_action (GDM_LOGOUT_ACTION_REBOOT);
}
return ret;
}
static gboolean
gsm_logout_supports_shutdown (GsmLogoutDialog *logout_dialog)
{
gboolean ret;
ret = gsm_system_can_stop (logout_dialog->priv->system);
if (!ret) {
ret = gdm_supports_logout_action (GDM_LOGOUT_ACTION_SHUTDOWN);
}
return ret;
}
static void
gsm_logout_dialog_show (GsmLogoutDialog *logout_dialog, gpointer user_data)
{
gsm_logout_dialog_set_timeout (logout_dialog);
}
static gboolean
gsm_logout_dialog_timeout (gpointer data)
{
GsmLogoutDialog *logout_dialog;
char *seconds_warning;
char *secondary_text;
int seconds_to_show;
logout_dialog = (GsmLogoutDialog *) data;
if (!logout_dialog->priv->timeout) {
gtk_dialog_response (GTK_DIALOG (logout_dialog),
logout_dialog->priv->default_response);
return FALSE;
}
if (logout_dialog->priv->timeout <= 30) {
seconds_to_show = logout_dialog->priv->timeout;
} else {
seconds_to_show = (logout_dialog->priv->timeout/10) * 10;
if (logout_dialog->priv->timeout % 10)
seconds_to_show += 10;
}
switch (logout_dialog->priv->type) {
case GSM_DIALOG_LOGOUT_TYPE_LOGOUT:
/* This string is shared with gsm-fail-whale-dialog.c */
seconds_warning = ngettext ("You will be automatically logged "
"out in %d second.",
"You will be automatically logged "
"out in %d seconds.",
seconds_to_show);
break;
case GSM_DIALOG_LOGOUT_TYPE_SHUTDOWN:
seconds_warning = ngettext ("This system will be automatically "
"shut down in %d second.",
"This system will be automatically "
"shut down in %d seconds.",
seconds_to_show);
break;
case GSM_DIALOG_LOGOUT_TYPE_REBOOT:
seconds_warning = ngettext ("This system will be automatically "
"restarted in %d second.",
"This system will be automatically "
"restarted in %d seconds.",
seconds_to_show);
break;
default:
g_assert_not_reached ();
}
if (!gsm_system_is_login_session (logout_dialog->priv->system)) {
char *name, *tmp;
name = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
if (!name || name[0] == '\0' || strcmp (name, "Unknown") == 0) {
name = g_locale_to_utf8 (g_get_user_name (), -1 , NULL, NULL, NULL);
}
if (!name) {
name = g_strdup (g_get_user_name ());
}
tmp = g_strdup_printf (_("You are currently logged in as \"%s\"."), name);
secondary_text = g_strconcat (tmp, "\n", seconds_warning, NULL);
g_free (tmp);
g_free (name);
} else {
secondary_text = g_strdup (seconds_warning);
}
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (logout_dialog),
secondary_text,
seconds_to_show,
NULL);
logout_dialog->priv->timeout--;
g_free (secondary_text);
return TRUE;
}
static void
gsm_logout_dialog_set_timeout (GsmLogoutDialog *logout_dialog)
{
logout_dialog->priv->timeout = AUTOMATIC_ACTION_TIMEOUT;
/* Sets the secondary text */
gsm_logout_dialog_timeout (logout_dialog);
if (logout_dialog->priv->timeout_id != 0) {
g_source_remove (logout_dialog->priv->timeout_id);
}
logout_dialog->priv->timeout_id = g_timeout_add (1000,
gsm_logout_dialog_timeout,
logout_dialog);
}
static GtkWidget *
gsm_get_dialog (GsmDialogLogoutType type,
GdkScreen *screen,
guint32 activate_time)
{
GsmLogoutDialog *logout_dialog;
GtkWidget *dialog_image;
const char *primary_text;
const char *icon_name;
if (current_dialog != NULL) {
gtk_widget_destroy (GTK_WIDGET (current_dialog));
}
logout_dialog = g_object_new (GSM_TYPE_LOGOUT_DIALOG, NULL);
current_dialog = logout_dialog;
gtk_window_set_title (GTK_WINDOW (logout_dialog), "");
logout_dialog->priv->type = type;
icon_name = NULL;
primary_text = NULL;
switch (type) {
case GSM_DIALOG_LOGOUT_TYPE_LOGOUT:
icon_name = GSM_ICON_LOGOUT;
primary_text = _("Log out of this system now?");
logout_dialog->priv->default_response = GSM_LOGOUT_RESPONSE_LOGOUT;
if (gsm_logout_supports_switch_user (logout_dialog)) {
gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
_("_Switch User"),
GSM_LOGOUT_RESPONSE_SWITCH_USER);
}
gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
_("_Log Out"),
GSM_LOGOUT_RESPONSE_LOGOUT);
break;
case GSM_DIALOG_LOGOUT_TYPE_SHUTDOWN:
icon_name = GSM_ICON_SHUTDOWN;
primary_text = _("Shut down this system now?");
logout_dialog->priv->default_response = GSM_LOGOUT_RESPONSE_SHUTDOWN;
if (gsm_logout_supports_system_suspend (logout_dialog)) {
gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
_("S_uspend"),
GSM_LOGOUT_RESPONSE_SLEEP);
}
if (gsm_logout_supports_system_hibernate (logout_dialog)) {
gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
_("_Hibernate"),
GSM_LOGOUT_RESPONSE_HIBERNATE);
}
if (gsm_logout_supports_reboot (logout_dialog)) {
gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
_("_Restart"),
GSM_LOGOUT_RESPONSE_REBOOT);
}
gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
if (gsm_logout_supports_shutdown (logout_dialog)) {
gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
_("_Shut Down"),
GSM_LOGOUT_RESPONSE_SHUTDOWN);
}
break;
case GSM_DIALOG_LOGOUT_TYPE_REBOOT:
icon_name = GSM_ICON_SHUTDOWN;
primary_text = _("Restart this system now?");
logout_dialog->priv->default_response = GSM_LOGOUT_RESPONSE_REBOOT;
gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
if (gsm_logout_supports_reboot (logout_dialog)) {
gtk_dialog_add_button (GTK_DIALOG (logout_dialog),
_("_Restart"),
GSM_LOGOUT_RESPONSE_REBOOT);
}
break;
default:
g_assert_not_reached ();
}
dialog_image = gtk_message_dialog_get_image (GTK_MESSAGE_DIALOG (logout_dialog));
gtk_image_set_from_icon_name (GTK_IMAGE (dialog_image),
icon_name, GTK_ICON_SIZE_DIALOG);
gtk_window_set_icon_name (GTK_WINDOW (logout_dialog), icon_name);
gtk_window_set_position (GTK_WINDOW (logout_dialog), GTK_WIN_POS_CENTER_ALWAYS);
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (logout_dialog), primary_text);
gtk_dialog_set_default_response (GTK_DIALOG (logout_dialog),
logout_dialog->priv->default_response);
gtk_window_set_screen (GTK_WINDOW (logout_dialog), screen);
return GTK_WIDGET (logout_dialog);
}
GtkWidget *
gsm_get_shutdown_dialog (GdkScreen *screen,
guint32 activate_time,
GsmDialogLogoutType type)
{
return gsm_get_dialog (type,
screen,
activate_time);
}
GtkWidget *
gsm_get_logout_dialog (GdkScreen *screen,
guint32 activate_time)
{
return gsm_get_dialog (GSM_DIALOG_LOGOUT_TYPE_LOGOUT,
screen,
activate_time);
}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2006 Vincent Untz
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* Authors:
* Vincent Untz <vuntz@gnome.org>
*/
#ifndef __GSM_LOGOUT_DIALOG_H__
#define __GSM_LOGOUT_DIALOG_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
enum
{
GSM_LOGOUT_RESPONSE_LOGOUT,
GSM_LOGOUT_RESPONSE_SWITCH_USER,
GSM_LOGOUT_RESPONSE_SHUTDOWN,
GSM_LOGOUT_RESPONSE_REBOOT,
GSM_LOGOUT_RESPONSE_HIBERNATE,
GSM_LOGOUT_RESPONSE_SLEEP
};
typedef enum {
GSM_DIALOG_LOGOUT_TYPE_LOGOUT,
GSM_DIALOG_LOGOUT_TYPE_SHUTDOWN,
GSM_DIALOG_LOGOUT_TYPE_REBOOT
} GsmDialogLogoutType;
#define GSM_TYPE_LOGOUT_DIALOG (gsm_logout_dialog_get_type ())
#define GSM_LOGOUT_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSM_TYPE_LOGOUT_DIALOG, GsmLogoutDialog))
#define GSM_LOGOUT_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSM_TYPE_LOGOUT_DIALOG, GsmLogoutDialogClass))
#define GSM_IS_LOGOUT_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSM_TYPE_LOGOUT_DIALOG))
#define GSM_IS_LOGOUT_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GSM_TYPE_LOGOUT_DIALOG))
#define GSM_LOGOUT_DIALOG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSM_TYPE_LOGOUT_DIALOG, GsmLogoutDialogClass))
typedef struct _GsmLogoutDialog GsmLogoutDialog;
typedef struct _GsmLogoutDialogClass GsmLogoutDialogClass;
typedef struct _GsmLogoutDialogPrivate GsmLogoutDialogPrivate;
struct _GsmLogoutDialog
{
GtkMessageDialog parent;
GsmLogoutDialogPrivate *priv;
};
struct _GsmLogoutDialogClass
{
GtkMessageDialogClass parent_class;
};
GType gsm_logout_dialog_get_type (void) G_GNUC_CONST;
GtkWidget *gsm_get_logout_dialog (GdkScreen *screen,
guint32 activate_time);
GtkWidget *gsm_get_shutdown_dialog (GdkScreen *screen,
guint32 activate_time,
GsmDialogLogoutType type);
G_END_DECLS
#endif /* __GSM_LOGOUT_DIALOG_H__ */
This diff is collapsed.