* Extensible via Javascript.
* Custom context menu actions.
-Requirements: GTK+ 2.6, WebkitGtk, libXML2
+Requirements: GTK+ 2.10, WebkitGtk, libXML2
-Optional: Glib 2.16, GtkSourceView 2.0, Unique 0.9, sqlite 3.0, xdg-open
+Optional: Unique 0.9, libsoup 2.4, sqlite 3.0, xdg-open
For installation instructions read INSTALL.
AC_SUBST(UNIQUE_LIBS)
AC_DEFINE_UNQUOTED(HAVE_UNIQUE,$have_unique, [Whether Unique is available])
-# Checks for GIO2
-PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.16, have_gio=1, have_gio=0)
-AC_SUBST(GIO_CFLAGS)
-AC_SUBST(GIO_LIBS)
-AC_DEFINE_UNQUOTED(HAVE_GIO,$have_gio, [Whether GIO is available])
-
# Checks for Gtk+2
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6, have_gtk=1, have_gtk=0)
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.10, have_gtk=1, have_gtk=0)
if test "x${have_gtk}" = "xfalse" ; then
AC_MSG_ERROR([No Gtk+2 package information found])
fi
INCLUDES = \
$(UNIQUE_CFLAGS) \
- $(GIO_CFLAGS) \
+ $(SQLITE3_CFLAGS) \
$(GTK_CFLAGS) \
- $(GTKSOURCEVIEW_CFLAGS) \
$(WEBKIT_CFLAGS) \
-I../katze
LDADD = \
$(UNIQUE_LIBS) \
- $(GIO_LIBS) \
+ $(SQLITE3_LIBS) \
$(GTK_LIBS) \
- $(GTKSOURCEVIEW_LIBS)\
$(WEBKIT_LIBS) \
$(INTLLIBS) \
../katze/libkatze.la
#if !GTK_CHECK_VERSION(2, 14, 0)
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
/* GTK+/ GdkPixbuf internal helper function
Copyright (C) 2008 Matthias Clasen <mclasen@redhat.com>
#include <config.h>
#endif
-#if HAVE_GIO
+#include <glib.h>
+#if GLIB_CHECK_VERSION (2, 16, 0)
#include <gio/gio.h>
#endif
#include <webkit/webkit.h>
G_BEGIN_DECLS
-#if !GLIB_CHECK_VERSION(2, 16, 0)
+#if !GLIB_CHECK_VERSION (2, 16, 0)
gint
g_strcmp0 (const gchar* string1,
#endif
-#if !GTK_CHECK_VERSION(2, 14, 0)
+#if !GTK_CHECK_VERSION (2, 14, 0)
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
GdkPixbuf*
gdk_pixbuf_new_from_stream (GInputStream* stream,
GdkCursorType cursor_type;
gboolean custom_cursor;
GtkImageType storage_type;
- #if HAVE_GIO
+ #if GLIB_CHECK_VERSION (2, 16, 0)
GIcon *gicon;
#endif
gchar *icon_name;
NULL,
GTK_PARAM_WRITABLE));
- #if HAVE_GIO
+ #if GLIB_CHECK_VERSION (2, 16, 0)
g_object_class_install_property (gobject_class,
PROP_GICON_PRIMARY,
g_param_spec_object ("gicon-primary",
g_value_get_string (value));
break;
- #if HAVE_GIO
+ #if GLIB_CHECK_VERSION (2, 16, 0)
case PROP_GICON_PRIMARY:
gtk_icon_entry_set_icon_from_gicon (entry,
GTK_ICON_ENTRY_PRIMARY,
GTK_ICON_ENTRY_SECONDARY));
break;
- #if HAVE_GIO
+ #if GLIB_CHECK_VERSION (2, 16, 0)
case PROP_GICON_PRIMARY:
g_value_set_object (value,
gtk_icon_entry_get_gicon (entry,
gtk_icon_entry_set_icon_from_icon_name (entry, i, priv->icons[i].icon_name);
}
- #if HAVE_GIO
+ #if GLIB_CHECK_VERSION (2, 16, 0)
else if (priv->icons[i].storage_type == _GTK_IMAGE_GICON)
{
g_object_unref (priv->icons[i].pixbuf);
* appropriately.
*/
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
void
gtk_icon_entry_set_icon_from_gicon (const GtkIconEntry *entry,
GtkIconEntryPosition icon_pos,
*/
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
GIcon *
gtk_icon_entry_get_gicon (const GtkIconEntry *entry,
GtkIconEntryPosition icon_pos)
#endif
#include <glib.h>
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
#include <gio/gio.h>
#endif
#include <gtk/gtk.h>
GtkIconEntryPosition icon_pos,
const gchar *icon_name);
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
void gtk_icon_entry_set_icon_from_gicon (const GtkIconEntry *entry,
GtkIconEntryPosition icon_pos,
GIcon *icon);
#endif
GdkPixbuf* gtk_icon_entry_get_pixbuf (const GtkIconEntry *entry,
GtkIconEntryPosition icon_pos);
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
GIcon* gtk_icon_entry_get_gicon (const GtkIconEntry *entry,
GtkIconEntryPosition icon_pos);
#endif
{ STOCK_TRANSFERS, N_("_Transfers"), 0, 0, GTK_STOCK_SAVE },
{ STOCK_USER_TRASH, N_("_Closed Tabs and Windows"), 0, 0, "gtk-undo-ltr" },
{ STOCK_WINDOW_NEW, N_("New _Window"), 0, 0, GTK_STOCK_ADD },
- #if !GTK_CHECK_VERSION(2, 10, 0)
- { GTK_STOCK_SELECT_ALL, N_("Select _All"), 0, 0, NULL },
- #endif
- #if !GTK_CHECK_VERSION(2, 8, 0)
- { GTK_STOCK_FULLSCREEN, N_("_Fullscreen"), 0, 0, NULL },
- { GTK_STOCK_LEAVE_FULLSCREEN, N_("_Leave Fullscreen"), 0, 0, NULL },
- #endif
};
GtkIconSource* icon_source;
#include <JavaScriptCore/JavaScript.h>
#include <glib/gi18n.h>
#include <string.h>
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
#include <gio/gio.h>
#endif
gtk_widget_set_sensitive (GTK_WIDGET (button), sensitive);
}
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
static void
midori_addons_directory_monitor_changed (GFileMonitor* monitor,
GFile* child,
_addons_get_folder (addons));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
- #if !HAVE_GIO
+ #if GLIB_CHECK_VERSION (2, 16, 0)
/* FIXME: Without GIO clicking this button is the only
way to update the list */
midori_addons_update_elements (addons);
MidoriAddonKind kind)
{
MidoriAddons* addons;
- #if HAVE_GIO
+ #if GLIB_CHECK_VERSION (2, 16, 0)
GSList* directories;
GSList* list;
GFile* directory;
midori_addons_set_kind (addons, kind);
midori_addons_update_elements (addons);
- #if HAVE_GIO
+ #if GLIB_CHECK_VERSION (2, 16, 0)
directories = _addons_get_directories (addons);
list = directories;
while (directories)
gtk_notebook_append_page (GTK_NOTEBOOK (browser->notebook), view,
tab_label);
- #if GTK_CHECK_VERSION(2, 10, 0)
gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (browser->notebook),
view, TRUE);
gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (browser->notebook),
view, TRUE);
- #endif
/* We want the tab to be removed if the widget is destroyed */
g_signal_connect (view, "destroy",
G_TYPE_INT);
}
-#define HAVE_ENTRY_PROGRESS GTK_CHECK_VERSION (2, 10, 0)
+#define HAVE_ENTRY_PROGRESS 1
#ifdef HAVE_ENTRY_PROGRESS
#define STOCK_USER_TRASH "gnome-stock-trash"
#define STOCK_WINDOW_NEW "stock_new-window"
-/* For backwards compatibility */
-
-#if !GTK_CHECK_VERSION(2, 10, 0)
-#define GTK_STOCK_SELECT_ALL "gtk-select-all"
-#endif
-#if !GTK_CHECK_VERSION(2, 8, 0)
-#define GTK_STOCK_FULLSCREEN "gtk-fullscreen"
-#define GTK_STOCK_LEAVE_FULLSCREEN "gtk-leave-fullscreen"
-#endif
-
#endif /* !__MIDORI_STOCK_H__ */
MidoriView* view)
{
const gchar* type;
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
const gchar* rel;
GFile* icon_file;
GIcon* icon;
? gjs_value_get_attribute_string (link, "title") : NULL);
}
}
-#if HAVE_GIO
+#if GLIB_CHECK_VERSION (2, 16, 0)
if (gjs_value_has_attribute (link, "rel"))
{
rel = gjs_value_get_attribute_string (link, "rel");
obj.target = 'midori'
obj.includes = '. ..'
obj.find_sources_in_dirs ('.')
-obj.uselib = 'UNIQUE LIBSOUP GIO GTK GTKSOURCEVIEW SQLITE WEBKIT LIBXML'
+obj.uselib = 'UNIQUE LIBSOUP GTK GTKSOURCEVIEW SQLITE WEBKIT LIBXML'
obj.uselib_local = 'katze'
libsoup = 'no'
conf.check_message_custom ('libsoup', 'support', libsoup)
- if not Params.g_options.disable_gio:
- conf.check_pkg ('gio-2.0', destvar='GIO', vnum='2.16.0', mandatory=False)
- gio = ['not available','yes'][conf.env['HAVE_GIO'] == 1]
- else:
- gio = 'no'
- conf.check_message_custom ('GIO', 'support', gio)
-
- if gio == 'yes':
- if platform.system () != 'Windows':
- if not conf.find_program ('gvfs-open'):
- print '\tNote: There doesn\'t seem to be GVfs installed.'
- print '\t The HTTP backend of GVfs is recommended for'
- print '\t viewing source code and loading favicons.'
-
if not Params.g_options.disable_sqlite:
conf.check_pkg ('sqlite3', destvar='SQLITE', vnum='3.0', mandatory=False)
sqlite = ['not available','yes'][conf.env['HAVE_SQLITE'] == 1]
sqlite = 'no'
conf.check_message_custom ('history database', 'support', sqlite)
- conf.check_pkg ('gtk+-2.0', destvar='GTK', vnum='2.6.0', mandatory=True)
+ conf.check_pkg ('gtk+-2.0', destvar='GTK', vnum='2.10.0', mandatory=True)
conf.check_pkg ('webkit-1.0', destvar='WEBKIT', vnum='0.1', mandatory=True)
conf.check_pkg ('libxml-2.0', destvar='LIBXML', vnum='2.6', mandatory=True)
help='Disables Unique support', dest='disable_unique')
opt.add_option ('--disable-libsoup', action='store_true', default=False,
help='Disables libsoup support', dest='disable_libsoup')
- opt.add_option ('--disable-gio', action='store_true', default=False,
- help='Disables GIO support', dest='disable_gio')
opt.add_option ('--disable-sqlite', action='store_true', default=False,
help='Disables sqlite support', dest='disable_sqlite')