diff options
author | waker <wakeroid@gmail.com> | 2013-08-22 22:16:04 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2013-08-22 22:16:04 +0200 |
commit | dc0af4b6b9e8f447335af3d7f95ccf322740104c (patch) | |
tree | d03ae8280c8e48e0c3e75ff2bf7df2b14cfb979d /plugins | |
parent | c043352486909e6a7b0a5ec841b4c8d2749f160c (diff) |
gtkui: shut up many of the gtk3 deprecation warnings
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/ddbcellrenderertextmultiline.c | 2 | ||||
-rw-r--r-- | plugins/gtkui/support.h | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/plugins/gtkui/ddbcellrenderertextmultiline.c b/plugins/gtkui/ddbcellrenderertextmultiline.c index 0312a35f..57d2f23c 100644 --- a/plugins/gtkui/ddbcellrenderertextmultiline.c +++ b/plugins/gtkui/ddbcellrenderertextmultiline.c @@ -360,7 +360,7 @@ popdown_timeout (gpointer data) priv->entry_menu_popdown_timeout = 0; - if (!gtk_widget_has_focus (priv->entry)) + if (!gtk_widget_has_focus (GTK_WIDGET (priv->entry))) ddb_cell_renderer_text_multiline_gtk_cell_renderer_text_editing_done (priv->entry, data); return FALSE; diff --git a/plugins/gtkui/support.h b/plugins/gtkui/support.h index 6f8cbd6e..010c05b6 100644 --- a/plugins/gtkui/support.h +++ b/plugins/gtkui/support.h @@ -8,6 +8,7 @@ #include <gtk/gtk.h> #if GTK_CHECK_VERSION(3,0,0) #include <gdk/gdkkeysyms-compat.h> +#define gdk_cursor_unref(cursor) g_object_unref(cursor) #else #include <gdk/gdkkeysyms.h> #endif @@ -146,3 +147,19 @@ void gtk_widget_get_allocation (GtkWidget *widget, #endif #endif + + +#if GTK_CHECK_VERSION(3,2,0) +#define gtk_vbox_new(homogeneous,spacing) ({GtkWidget *__box=gtk_box_new(GTK_ORIENTATION_VERTICAL,spacing);gtk_box_set_homogeneous(GTK_BOX(__box),homogeneous);__box;}) +#define gtk_hbox_new(homogeneous,spacing) ({GtkWidget *__box=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,spacing);gtk_box_set_homogeneous(GTK_BOX(__box),homogeneous);__box;}) +#define gtk_hpaned_new() gtk_paned_new(GTK_ORIENTATION_HORIZONTAL) +#define gtk_vpaned_new() gtk_paned_new(GTK_ORIENTATION_VERTICAL) +#define gtk_hbutton_box_new() gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL) +#define gtk_vbutton_box_new() gtk_button_box_new(GTK_ORIENTATION_VERTICAL) +#define gtk_hscale_new(adj) gtk_scale_new(GTK_ORIENTATION_HORIZONTAL,adj) +#define gtk_vscale_new(adj) gtk_scale_new(GTK_ORIENTATION_VERTICAL,adj) +#define gtk_hseparator_new() gtk_separator_new(GTK_ORIENTATION_HORIZONTAL) +#define gtk_vseparator_new() gtk_separator_new(GTK_ORIENTATION_VERTICAL) +#define gtk_hscrollbar_new(adj) gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL,adj) +#define gtk_vscrollbar_new(adj) gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL,adj) +#endif |