[eog] avoid unused 'screen' variable without lcms
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] avoid unused 'screen' variable without lcms
- Date: Thu, 28 Apr 2011 14:12:13 +0000 (UTC)
commit d26cbf159243401686b6c54ecd769dc966ab3185
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Apr 28 00:46:43 2011 -0400
avoid unused 'screen' variable without lcms
Newer GCC flags a compile warning on eog-window.c when HAVE_LCMS is
undefined due to the 'screen' variable being declared and initialised in
eog_window_init() but not used.
Avoid that by having eog_window_get_display_profile() take the widget
itself and query the screen internally.
src/eog-window.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 661adf0..f0d83b3 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -387,7 +387,7 @@ eog_window_can_save_changed_cb (GSettings *settings,
#ifdef HAVE_LCMS
static cmsHPROFILE *
-eog_window_get_display_profile (GdkScreen *screen)
+eog_window_get_display_profile (GtkWidget *window)
{
Display *dpy;
Atom icc_atom, type;
@@ -399,7 +399,9 @@ eog_window_get_display_profile (GdkScreen *screen)
int result;
cmsHPROFILE *profile;
char *atom_name;
+ GdkScreen *screen;
+ screen = gtk_widget_get_screen (window);
dpy = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen));
if (gdk_screen_get_number (screen) > 0)
@@ -4560,7 +4562,6 @@ static void
eog_window_init (EogWindow *window)
{
GdkGeometry hints;
- GdkScreen *screen;
EogWindowPrivate *priv;
eog_debug (DEBUG_WINDOW);
@@ -4568,8 +4569,6 @@ eog_window_init (EogWindow *window)
hints.min_width = EOG_WINDOW_MIN_WIDTH;
hints.min_height = EOG_WINDOW_MIN_HEIGHT;
- screen = gtk_widget_get_screen (GTK_WIDGET (window));
-
priv = window->priv = EOG_WINDOW_GET_PRIVATE (window);
priv->fullscreen_settings = g_settings_new (EOG_CONF_FULLSCREEN);
@@ -4602,7 +4601,7 @@ eog_window_init (EogWindow *window)
#ifdef HAVE_LCMS
window->priv->display_profile =
- eog_window_get_display_profile (screen);
+ eog_window_get_display_profile (GTK_WIDGET (window));
#endif
window->priv->recent_menu_id = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]