Changed gtk+ requirement to 2.12 and made url/email hooks optionally

It seemed a bit silly to have to require 2.14 just for the about dialog, so for now I bumped it back to 2.12 and disabled the url/email code for gtk+ < 2.14
This commit is contained in:
Jesse van den Kieboom 2009-02-21 11:50:09 +01:00
parent 800cc6b645
commit f4805e921d
2 changed files with 5 additions and 2 deletions

View file

@ -45,7 +45,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
PKG_CHECK_MODULES(PACKAGE, [
gtk+-2.0 >= 2.14.0
gtk+-2.0 >= 2.12.0
gthread-2.0
gtksourceview-2.0
gio-2.0

View file

@ -897,6 +897,7 @@ on_recent_open(GtkRecentChooser *chooser, GitgWindow *window)
g_object_unref(file);
}
#if GTK_CHECK_VERSION (2, 14, 0)
static void
url_activate_hook(GtkAboutDialog *dialog, gchar const *link, gpointer data)
{
@ -917,6 +918,7 @@ email_activate_hook(GtkAboutDialog *dialog, gchar const *link, gpointer data)
g_free(uri);
g_free(escaped);
}
#endif
void
on_help_about(GtkAction *action, GitgWindow *window)
@ -939,9 +941,10 @@ on_help_about(GtkAction *action, GitgWindow *window)
"Foundation, Inc., 59 Temple Place, Suite 330,\n"
"Boston, MA 02111-1307, USA.");
#if GTK_CHECK_VERSION (2, 14, 0)
gtk_about_dialog_set_url_hook(url_activate_hook, NULL, NULL);
gtk_about_dialog_set_email_hook(email_activate_hook, NULL, NULL);
#endif
gchar *path = gitg_dirs_get_data_filename("icons", "gitg.svg", NULL);
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(path, NULL);
g_free(path);