Commit 362a899b authored by Mario Sanchez Prada's avatar Mario Sanchez Prada

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.
parent e5f5c744
......@@ -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.
......
......@@ -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)
......
......@@ -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)
......
<?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>
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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),
......
......@@ -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),
......
......@@ -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);
......
......@@ -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);
......
......@@ -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++)
......
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment