[frogr] Raised GTK+ required version from 2.12 to 2.14.
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Raised GTK+ required version from 2.12 to 2.14.
- Date: Wed, 19 Jan 2011 12:27:59 +0000 (UTC)
commit 362a899b6626a32883e4ca1f2a847ed2dcc3e0dc
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Wed Jan 19 13:26:59 2011 +0100
Raised GTK+ required version from 2.12 to 2.14.
This allowed to remove several conditional regions in the code, as
well as to completely get rid, once and for all, of libgnome.
NEWS | 2 ++
README | 2 +-
configure.ac | 18 +-----------------
data/gtkbuilder/frogr-main-view.xml | 2 +-
debian/control | 2 +-
frogr.spec | 4 ++--
src/frogr-add-tags-dialog.c | 4 ----
src/frogr-add-to-group-dialog.c | 4 ----
src/frogr-add-to-set-dialog.c | 4 ----
src/frogr-create-new-set-dialog.c | 4 ----
src/frogr-details-dialog.c | 4 ----
src/frogr-main-view.c | 8 --------
src/frogr-settings-dialog.c | 4 ----
src/frogr-util.c | 4 ----
14 files changed, 8 insertions(+), 58 deletions(-)
---
diff --git a/NEWS b/NEWS
index d053e3b..e8e8b83 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,8 @@
* Added mnemonic to the 'Edit details' and the 'Settings' dialog.
* Renamed 'Albums' as 'Sets'.
* Remove pictures from UI as soon as they get uploaded.
+ * Removed dependency from libgnome when GTK+ < 2.14, and raised
+ minimum version required fo GTK+ from 2.12 up to 2.14.
* Added new translations: British English (en_GB), French (fr),
Swedish (sv), Galician (gl), German (de) and Slovenian (sl).
See TRANSLATORS file for more details.
diff --git a/README b/README
index 18615c5..ff814b2 100644
--- a/README
+++ b/README
@@ -11,7 +11,7 @@ To get the source, please checkout the git repository at gnome.org:
To work properly, frogr needs some libraries to be installed first::
- glib (version 2.16 or higher)
- - gtk+ (version 2.12 or higher)
+ - gtk+ (version 2.14 or higher)
- libxml (version 2.6.8 or higher)
- libsoup (version 2.24 or higher)
diff --git a/configure.ac b/configure.ac
index eba3f1a..54bba12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ AC_ARG_WITH([gtk],
AC_MSG_RESULT([$with_gtk])
case "$with_gtk" in
- 2.0) GTK_MIN_VERSION=2.12
+ 2.0) GTK_MIN_VERSION=2.14
GTK_API_VERSION=2.0
;;
3.0) GTK_MIN_VERSION=2.91
@@ -64,22 +64,6 @@ PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_MIN_VERSION)
FROGR_CFLAGS="$FROGR_CFLAGS $LIBXML2_CFLAGS"
FROGR_LIBS="$FROGR_LIBS $LIBXML2_LIBS"
-echo -n "checking for Gtk+ >= 2.14... "
-if $PKG_CONFIG --atleast-version=2.14 gtk+-2.0; then
- have_gtk_2_14="yes"
-else
- have_gtk_2_14="no"
-fi
-echo $have_gtk_2_14
-
-# if Gtk+ is not >= 2.14, then check for libgnome to
-# use gnome_url_show() instead of gtk_show_uri()
-if test "$have_gtk_2_14" = "no"; then
- PKG_CHECK_MODULES(Libgnome, libgnome-2.0 >= 2.20)
- FROGR_CFLAGS="$FROGR_CFLAGS $Libgnome_CFLAGS"
- FROGR_LIBS="$FROGR_LIBS $Libgnome_LIBS"
-fi
-
AC_SUBST(appdatadir, "\${datadir}/frogr")
AC_SUBST(iconsdir, "\${datadir}/icons")
AC_SUBST(FROGR_CFLAGS)
diff --git a/data/gtkbuilder/frogr-main-view.xml b/data/gtkbuilder/frogr-main-view.xml
index 63abb2b..c6f6c84 100644
--- a/data/gtkbuilder/frogr-main-view.xml
+++ b/data/gtkbuilder/frogr-main-view.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-requires gtk+ 2.14 -->
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkWindow" id="main_window">
<property name="title" translatable="yes">frogr</property>
diff --git a/debian/control b/debian/control
index 1c85505..df3289f 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: frogr
Section: graphics
Priority: optional
Maintainer: Alberto Garcia <agarcia igalia com>
-Build-Depends: cdbs, intltool, debhelper (>= 5), libglib2.0-dev (>= 2.16), libgtk2.0-dev (>= 2.12), libsoup2.4-dev (>= 2.24), libxml2-dev (>= 2.6.8)
+Build-Depends: cdbs, intltool, debhelper (>= 5), libglib2.0-dev (>= 2.16), libgtk2.0-dev (>= 2.14), libsoup2.4-dev (>= 2.24), libxml2-dev (>= 2.6.8)
Standards-Version: 3.7.3
Homepage: http://live.gnome.org/Frogr
diff --git a/frogr.spec b/frogr.spec
index 9bdd2d2..9fbd08b 100644
--- a/frogr.spec
+++ b/frogr.spec
@@ -9,8 +9,8 @@ URL: http://live.gnome.org/Frogr
Source0: http://frogr.googlecode.com/files/%{name}-%{version}.tar.bz2
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
-BuildRequires: gtk2-devel > 2.12, glib2-devel, libsoup-devel, libxml2-devel
-Requires: gtk2 > 2.12, glib > 2.16, libsoup > 2.24, libxml2
+BuildRequires: gtk2-devel > 2.14, glib2-devel, libsoup-devel, libxml2-devel
+Requires: gtk2 > 2.14, glib > 2.16, libsoup > 2.24, libxml2
%description
Frogr is a small application for the GNOME desktop that allows users
diff --git a/src/frogr-add-tags-dialog.c b/src/frogr-add-tags-dialog.c
index 0cd6610..a718210 100644
--- a/src/frogr-add-tags-dialog.c
+++ b/src/frogr-add-tags-dialog.c
@@ -333,11 +333,7 @@ frogr_add_tags_dialog_init (FrogrAddTagsDialog *self)
gtk_container_set_border_width (GTK_CONTAINER (self), 6);
/* Add Entry */
-#if GTK_CHECK_VERSION (2,14,0)
vbox = gtk_dialog_get_content_area (GTK_DIALOG (self));
-#else
- vbox = GTK_DIALOG (self)->vbox;
-#endif
label = gtk_label_new (_("Enter a spaces separated list of tags:"));
align = gtk_alignment_new (0, 0, 0, 1);
diff --git a/src/frogr-add-to-group-dialog.c b/src/frogr-add-to-group-dialog.c
index 4d5d764..4f75025 100644
--- a/src/frogr-add-to-group-dialog.c
+++ b/src/frogr-add-to-group-dialog.c
@@ -525,11 +525,7 @@ frogr_add_to_group_dialog_init (FrogrAddToGroupDialog *self)
NULL);
gtk_container_set_border_width (GTK_CONTAINER (self), 6);
-#if GTK_CHECK_VERSION (2,14,0)
vbox = gtk_dialog_get_content_area (GTK_DIALOG (self));
-#else
- vbox = GTK_DIALOG (self)->vbox;
-#endif
widget = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (widget),
diff --git a/src/frogr-add-to-set-dialog.c b/src/frogr-add-to-set-dialog.c
index 335e5f3..a3c82b4 100644
--- a/src/frogr-add-to-set-dialog.c
+++ b/src/frogr-add-to-set-dialog.c
@@ -525,11 +525,7 @@ frogr_add_to_set_dialog_init (FrogrAddToSetDialog *self)
NULL);
gtk_container_set_border_width (GTK_CONTAINER (self), 6);
-#if GTK_CHECK_VERSION (2,14,0)
vbox = gtk_dialog_get_content_area (GTK_DIALOG (self));
-#else
- vbox = GTK_DIALOG (self)->vbox;
-#endif
widget = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (widget),
diff --git a/src/frogr-create-new-set-dialog.c b/src/frogr-create-new-set-dialog.c
index 24845aa..a53d45b 100644
--- a/src/frogr-create-new-set-dialog.c
+++ b/src/frogr-create-new-set-dialog.c
@@ -292,11 +292,7 @@ frogr_create_new_set_dialog_init (FrogrCreateNewSetDialog *self)
NULL);
gtk_container_set_border_width (GTK_CONTAINER (self), 6);
-#if GTK_CHECK_VERSION (2,14,0)
vbox = gtk_dialog_get_content_area (GTK_DIALOG (self));
-#else
- vbox = GTK_DIALOG (self)->vbox;
-#endif
table = gtk_table_new (2, 2, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), table, TRUE, TRUE, 6);
diff --git a/src/frogr-details-dialog.c b/src/frogr-details-dialog.c
index 64db3da..180e5d8 100644
--- a/src/frogr-details-dialog.c
+++ b/src/frogr-details-dialog.c
@@ -135,11 +135,7 @@ _create_widgets (FrogrDetailsDialog *self)
priv = FROGR_DETAILS_DIALOG_GET_PRIVATE (self);
-#if GTK_CHECK_VERSION (2,14,0)
main_vbox = gtk_dialog_get_content_area (GTK_DIALOG (self));
-#else
- main_vbox = GTK_DIALOG (self)->vbox;
-#endif
hbox = gtk_hbox_new (FALSE, 0);
vbox = gtk_vbox_new (FALSE, 6);
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index 3e20ba7..19aab96 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -488,21 +488,13 @@ _on_icon_view_drag_data_received (GtkWidget *widget,
if (frogr_controller_get_state (priv->controller) == FROGR_STATE_BUSY)
return;
-#if GTK_CHECK_VERSION (2,14,0)
target = gtk_selection_data_get_target (selection_data);
-#else
- target = selection_data->target;
-#endif
if (!gtk_targets_include_uri (&target, 1))
return;
/* Get GSList with the list of files */
-#if GTK_CHECK_VERSION (2,14,0)
files_string = gtk_selection_data_get_data (selection_data);
-#else
- files_string = selection_data->data;
-#endif
fileuris_array = g_strsplit ((const gchar*)files_string, "\r\n", -1);
for (i = 0; fileuris_array[i]; i++)
diff --git a/src/frogr-settings-dialog.c b/src/frogr-settings-dialog.c
index 98ad83d..724885e 100644
--- a/src/frogr-settings-dialog.c
+++ b/src/frogr-settings-dialog.c
@@ -788,11 +788,7 @@ frogr_settings_dialog_init (FrogrSettingsDialog *self)
NULL);
gtk_container_set_border_width (GTK_CONTAINER (self), 6);
-#if GTK_CHECK_VERSION (2,14,0)
vbox = gtk_dialog_get_content_area (GTK_DIALOG (self));
-#else
- vbox = GTK_DIALOG (self)->vbox;
-#endif
notebook = GTK_NOTEBOOK (gtk_notebook_new ());
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (notebook), TRUE, TRUE, 6);
diff --git a/src/frogr-util.c b/src/frogr-util.c
index edbeb4b..d3edc08 100644
--- a/src/frogr-util.c
+++ b/src/frogr-util.c
@@ -31,7 +31,6 @@ frogr_util_open_url_in_browser (const gchar *url)
if (url == NULL)
return;
-#if GTK_CHECK_VERSION (2,14,0)
gchar *command = NULL;
GError *error = NULL;
@@ -46,9 +45,6 @@ frogr_util_open_url_in_browser (const gchar *url)
g_debug ("Error opening URL %s: %s", url, error->message);
g_error_free (error);
}
-#else
- gnome_url_show (url);
-#endif
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]