{
GtkWidget* widget = GTK_WIDGET (browser);
- if (GTK_WIDGET_REALIZED (widget) && !browser->alloc_timeout)
+ if (gtk_widget_get_realized (widget) && !browser->alloc_timeout)
{
gpointer last_page;
if (event->button == 2)
{
GtkWidget* parent = gtk_widget_get_parent (toolitem);
- GtkAction* action = gtk_widget_get_action (parent);
+ GtkAction* action = gtk_activatable_get_related_action (
+ GTK_ACTIVATABLE (parent));
return midori_browser_menu_middle_click_on_navigation_action (browser, action);
}
menuitem = sokoke_action_create_popup_menu_item (
gtk_action_group_get_action (actions, "Encoding"));
gtk_menu_shell_append (menu_shell, menuitem);
- if (GTK_WIDGET_IS_SENSITIVE (menuitem))
+ if (gtk_widget_get_sensitive (menuitem))
{
GtkWidget* sub_menu;
static const GtkActionEntry encodings[] = {
GdkDisplay* display = gdk_display_get_default ();
Display* xdisplay = GDK_DISPLAY_XDISPLAY (display);
Window root_window = RootWindow (xdisplay, 0);
- Atom save_mode_atom = gdk_x11_get_xatom_by_name ("_DT_SAVE_MODE");
+ Atom save_mode_atom = gdk_x11_get_xatom_by_name_for_display (
+ display, "_DT_SAVE_MODE");
Atom actual_type;
int actual_format;
unsigned long n_items, bytes;
PANGO_STYLE_ITALIC);
gtk_entry_set_text (entry, default_text);
}
- else if (!GTK_WIDGET_HAS_FOCUS (GTK_WIDGET (entry)))
+ else if (!gtk_widget_has_focus (GTK_WIDGET (entry)))
{
gint has_default = GPOINTER_TO_INT (
g_object_get_data (G_OBJECT (entry), "sokoke_has_default"));
#define gtk_widget_is_toplevel(widget) GTK_WIDGET_TOPLEVEL (widget)
#define gtk_widget_has_focus(widget) GTK_WIDGET_HAS_FOCUS (widget)
#define gtk_widget_get_visible(widget) GTK_WIDGET_VISIBLE (widget)
+ #define gtk_widget_get_sensitive(widget) GTK_WIDGET_IS_SENSITIVE (widget)
+#endif
+
+#if !GTK_CHECK_VERSION (2, 20, 0)
+ #define gtk_widget_get_realized(widget) GTK_WIDGET_REALIZED (widget)
#endif
#if !GTK_CHECK_VERSION(2, 12, 0)