[libegg] [fileformatchooser] Use accessor funcions intead direct access
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libegg] [fileformatchooser] Use accessor funcions intead direct access
- Date: Tue, 16 Feb 2010 02:53:25 +0000 (UTC)
commit 8f7956634f4d1892b03eae49fd3fe77f1ed24d66
Author: Javier Jardón <jjardon gnome org>
Date: Fri Feb 12 20:32:31 2010 +0100
[fileformatchooser] Use accessor funcions intead direct access
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=609763
libegg/Makefile.am | 9 ++++++++-
libegg/fileformatchooser/eggfileformatchooser.c | 10 ++++++++--
2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/libegg/Makefile.am b/libegg/Makefile.am
index 46d92f2..894994a 100644
--- a/libegg/Makefile.am
+++ b/libegg/Makefile.am
@@ -9,6 +9,11 @@ iconchooser_SUBDIRS = \
iconchooser
endif
+if HAVE_GTK210
+gtk210_SUBDIRS = \
+ fileformatchooser
+endif
+
if HAVE_GTK215
gtk215_SUBDIRS = \
toolpalette
@@ -23,7 +28,9 @@ SUBDIRS = util column-chooser treeviewutils \
sidebar $(background_monitor_SUBDIRS) \
dock datetime $(thumbnail_SUBDIRS) \
smclient \
- fileformatchooser $(gtk215_SUBDIRS)
+ $(gtk210_SUBDIRS) \
+ $(gtk215_SUBDIRS)
+
# Don't compile broken code
#$(iconchooser_SUBDIRS)
diff --git a/libegg/fileformatchooser/eggfileformatchooser.c b/libegg/fileformatchooser/eggfileformatchooser.c
index e1eb2d5..4c691c9 100644
--- a/libegg/fileformatchooser/eggfileformatchooser.c
+++ b/libegg/fileformatchooser/eggfileformatchooser.c
@@ -572,6 +572,7 @@ error_message_with_parent (GtkWindow *parent,
{
gboolean first_call = TRUE;
GtkWidget *dialog;
+ GtkWindowGroup *window_group;
if (first_call)
{
@@ -588,8 +589,9 @@ error_message_with_parent (GtkWindow *parent,
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", detail);
- if (parent->group)
- gtk_window_group_add_window (parent->group, GTK_WINDOW (dialog));
+ window_group = gtk_window_get_group (parent);
+ if (window_group)
+ gtk_window_group_add_window (window_group, GTK_WINDOW (dialog));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -602,7 +604,11 @@ get_toplevel (GtkWidget *widget)
GtkWidget *toplevel;
toplevel = gtk_widget_get_toplevel (widget);
+#if GTK_CHECK_VERSION (2,18,0)
+ if (!gtk_widget_is_toplevel (toplevel))
+#else
if (!GTK_WIDGET_TOPLEVEL (toplevel))
+#endif
return NULL;
else
return GTK_WINDOW (toplevel);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]