[gnome-session] Move gsm_util_get_computer_fail_icon_size where it is used
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] Move gsm_util_get_computer_fail_icon_size where it is used
- Date: Fri, 23 Nov 2012 07:00:17 +0000 (UTC)
commit e9579206afc73d74dcefd6d8f9b39e73ded9da4c
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Nov 11 12:05:23 2012 -0500
Move gsm_util_get_computer_fail_icon_size where it is used
This is a preliminary step for moving the fail whale dialog
out of process.
gnome-session/gsm-fail-whale-dialog.c | 12 +++++++++++-
gnome-session/gsm-manager.c | 2 +-
gnome-session/gsm-util.c | 11 -----------
gnome-session/gsm-util.h | 3 ---
4 files changed, 12 insertions(+), 16 deletions(-)
---
diff --git a/gnome-session/gsm-fail-whale-dialog.c b/gnome-session/gsm-fail-whale-dialog.c
index 4736136..e9e88ad 100644
--- a/gnome-session/gsm-fail-whale-dialog.c
+++ b/gnome-session/gsm-fail-whale-dialog.c
@@ -31,7 +31,6 @@
#include "gsm-icon-names.h"
#include "gsm-manager.h"
-#include "gsm-util.h"
#include "gsm-shell-extensions.h"
#define GSM_FAIL_WHALE_DIALOG_GET_PRIVATE(o) \
@@ -263,6 +262,17 @@ on_logout_clicked (GtkWidget *button,
}
}
+static GtkIconSize
+gsm_util_get_computer_fail_icon_size (void)
+{
+ static GtkIconSize icon_size = 0;
+
+ if (icon_size == 0)
+ icon_size = gtk_icon_size_register ("gnome-session-computer-fail", 128, 128);
+
+ return icon_size;
+}
+
static void
setup_window (GsmFailWhaleDialog *fail_dialog)
{
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index ea005f3..33d5979 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -1360,7 +1360,7 @@ show_fallback_dialog (const char *title,
gtk_window_set_icon_name (GTK_WINDOW (dialog), GSM_ICON_COMPUTER_FAIL);
image = gtk_image_new_from_icon_name (GSM_ICON_COMPUTER_FAIL,
- gsm_util_get_computer_fail_icon_size ());
+ GTK_ICON_SIZE_DIALOG);
gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image);
if (description) {
diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c
index 2d16c28..402ac69 100644
--- a/gnome-session/gsm-util.c
+++ b/gnome-session/gsm-util.c
@@ -555,14 +555,3 @@ gsm_util_setenv (const char *variable,
g_error_free (bus_error);
}
}
-
-GtkIconSize
-gsm_util_get_computer_fail_icon_size (void)
-{
- static GtkIconSize icon_size = 0;
-
- if (icon_size == 0)
- icon_size = gtk_icon_size_register ("gnome-session-computer-fail", 128, 128);
-
- return icon_size;
-}
diff --git a/gnome-session/gsm-util.h b/gnome-session/gsm-util.h
index 11e23ac..b139890 100644
--- a/gnome-session/gsm-util.h
+++ b/gnome-session/gsm-util.h
@@ -21,7 +21,6 @@
#define __GSM_UTIL_H__
#include <glib.h>
-#include <gtk/gtk.h>
G_BEGIN_DECLS
@@ -55,8 +54,6 @@ char * gsm_util_generate_startup_id (void);
void gsm_util_setenv (const char *variable,
const char *value);
-GtkIconSize gsm_util_get_computer_fail_icon_size (void);
-
G_END_DECLS
#endif /* __GSM_UTIL_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]