mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-10-02 14:13:48 +00:00
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:
parent
800cc6b645
commit
f4805e921d
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue