[eog] Remove now unnecessary GTK_CHECK_VERSION switches
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Remove now unnecessary GTK_CHECK_VERSION switches
- Date: Thu, 22 Jul 2010 17:43:20 +0000 (UTC)
commit 80674c0f4ea6c23afc7872db8365f072046187e4
Author: Felix Riemann <friemann gnome org>
Date: Thu Jul 22 19:38:00 2010 +0200
Remove now unnecessary GTK_CHECK_VERSION switches
We use GTK+-3 and and would always pass each of these checks now.
src/eog-window.c | 28 ----------------------------
1 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 0275fcf..9f59ab2 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -1113,11 +1113,7 @@ eog_window_obtain_desired_size (EogImage *image,
img_width = width;
img_height = height;
-#if GTK_CHECK_VERSION (2, 20, 0)
if (!gtk_widget_get_realized (window->priv->view)) {
-#else
- if (!GTK_WIDGET_REALIZED (window->priv->view)) {
-#endif
gtk_widget_realize (window->priv->view);
}
@@ -1125,11 +1121,7 @@ eog_window_obtain_desired_size (EogImage *image,
view_width = allocation.width;
view_height = allocation.height;
-#if GTK_CHECK_VERSION (2, 20, 0)
if (!gtk_widget_get_realized (GTK_WIDGET (window))) {
-#else
- if (!GTK_WIDGET_REALIZED (GTK_WIDGET (window))) {
-#endif
gtk_widget_realize (GTK_WIDGET (window));
}
@@ -2525,11 +2517,7 @@ eog_window_cmd_show_hide_bar (GtkAction *action, gpointer user_data)
if (visible) {
/* Make sure the focus widget is realized to
* avoid warnings on keypress events */
-#if GTK_CHECK_VERSION (2, 20, 0)
if (!gtk_widget_get_realized (window->priv->thumbview))
-#else
- if (!GTK_WIDGET_REALIZED (window->priv->thumbview))
-#endif
gtk_widget_realize (window->priv->thumbview);
gtk_widget_show (priv->nav);
@@ -2539,21 +2527,13 @@ eog_window_cmd_show_hide_bar (GtkAction *action, gpointer user_data)
* avoid warnings on keypress events.
* Don't do it during init phase or the view
* will get a bogus allocation. */
-#if GTK_CHECK_VERSION (2, 20, 0)
if (!gtk_widget_get_realized (priv->view)
-#else
- if (!GTK_WIDGET_REALIZED (priv->view)
-#endif
&& priv->status == EOG_WINDOW_STATUS_NORMAL)
gtk_widget_realize (priv->view);
gtk_widget_hide (priv->nav);
-#if GTK_CHECK_VERSION (2, 20, 0)
if (gtk_widget_get_realized (priv->view))
-#else
- if (GTK_WIDGET_REALIZED (priv->view))
-#endif
gtk_widget_grab_focus (priv->view);
}
g_settings_set_boolean (priv->ui_settings,
@@ -3894,12 +3874,8 @@ eog_window_drag_data_received (GtkWidget *widget,
if (!gtk_targets_include_uri (&target, 1))
return;
-#if GTK_CHECK_VERSION(2, 21, 1)
if (gdk_drag_context_get_suggested_action (context) == GDK_ACTION_COPY)
{
-#else
- if (context->suggested_action == GDK_ACTION_COPY) {
-#endif
window = EOG_WINDOW (widget);
file_list = eog_util_parse_uri_string_list_to_file_list ((const gchar *) gtk_selection_data_get_data (selection_data));
@@ -4648,11 +4624,7 @@ eog_window_key_press (GtkWidget *widget, GdkEventKey *event)
/* If the focus is not in the toolbar and we still haven't handled the
event, give the scrollview a chance to do it. */
if (!gtk_container_get_focus_child (tbcontainer) && result == FALSE &&
-#if GTK_CHECK_VERSION (2, 20, 0)
gtk_widget_get_realized (GTK_WIDGET (EOG_WINDOW (widget)->priv->view))) {
-#else
- GTK_WIDGET_REALIZED(GTK_WIDGET (EOG_WINDOW (widget)->priv->view))) {
-#endif
result = gtk_widget_event (GTK_WIDGET (EOG_WINDOW (widget)->priv->view),
(GdkEvent *) event);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]