[easytag/wip/application-window: 4/18] Remove some GTK+ 2 compatibility code
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/application-window: 4/18] Remove some GTK+ 2 compatibility code
- Date: Sat, 12 Apr 2014 18:50:14 +0000 (UTC)
commit eaae7f8479c2881f3965e354cf72ad4b743a49fa
Author: David King <amigadave amigadave com>
Date: Sat Apr 12 19:48:37 2014 +0100
Remove some GTK+ 2 compatibility code
src/gtk2_compat.c | 63 -----------------------------------------------------
src/gtk2_compat.h | 24 --------------------
src/misc.c | 4 ---
3 files changed, 0 insertions(+), 91 deletions(-)
---
diff --git a/src/gtk2_compat.c b/src/gtk2_compat.c
index 0f416d5..e9d56fd 100644
--- a/src/gtk2_compat.c
+++ b/src/gtk2_compat.c
@@ -18,65 +18,6 @@
#include "gtk2_compat.h"
-#if !GTK_CHECK_VERSION(3,0,0)
-
-void et_grid_attach_full (GtkGrid *grid, GtkWidget *child, gint left, gint top,
- gint width, gint height, gboolean hexpand,
- gboolean vexpand, gint hmargin, gint vmargin)
-{
- GtkAttachOptions xoptions = GTK_FILL;
- GtkAttachOptions yoptions = GTK_FILL;
-
- if (hexpand)
- {
- xoptions |= GTK_EXPAND;
- }
- if (vexpand)
- {
- yoptions |= GTK_EXPAND;
- }
-
- gtk_table_attach (grid, child, left, left + width, top, top + height,
- xoptions, yoptions, hmargin, vmargin);
-}
-
-void gtk_grid_attach (GtkGrid *grid, GtkWidget *child, gint left, gint top,
- gint width, gint height)
-{
- et_grid_attach_full (grid, child, left, top, width, height, FALSE, FALSE,
- 0, 0);
-}
-
-GtkWidget *gtk_box_new(GtkOrientation orientation,gint padding)
-{
- if (orientation==GTK_ORIENTATION_HORIZONTAL)
- return gtk_hbox_new(FALSE,padding);
- return gtk_vbox_new(FALSE,padding);
-}
-
-GtkWidget *gtk_button_box_new(GtkOrientation orientation)
-{
- if (orientation==GTK_ORIENTATION_HORIZONTAL)
- return gtk_hbutton_box_new();
- return gtk_vbutton_box_new();
-}
-
-GtkWidget *gtk_paned_new(GtkOrientation orientation)
-{
- if (orientation==GTK_ORIENTATION_HORIZONTAL)
- return gtk_hpaned_new();
- return gtk_vpaned_new();
-}
-
-GtkWidget *gtk_separator_new(GtkOrientation orientation)
-{
- if (orientation==GTK_ORIENTATION_HORIZONTAL)
- return gtk_hseparator_new();
- return gtk_vseparator_new();
-}
-
-#else /* GTK_CHECK_VERSION(3,0,0) */
-
void et_grid_attach_full (GtkGrid *grid, GtkWidget *child, gint left, gint top,
gint width, gint height, gboolean hexpand,
gboolean vexpand, gint hmargin, gint vmargin)
@@ -92,8 +33,6 @@ void et_grid_attach_full (GtkGrid *grid, GtkWidget *child, gint left, gint top,
gtk_grid_attach (grid, child, left, top, width, height);
}
-#endif /* GTK_CHECK_VERSION(3,0,0) */
-
void et_grid_attach_margins (GtkGrid *grid, GtkWidget *child, gint left,
gint top, gint width, gint height, gint hmargin,
gint vmargin)
@@ -109,10 +48,8 @@ et_progress_bar_new (void)
progress = gtk_progress_bar_new ();
-#if GTK_CHECK_VERSION(3,0,0)
gtk_progress_bar_set_show_text (GTK_PROGRESS_BAR (progress), TRUE);
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (progress), "");
-#endif
return progress;
}
diff --git a/src/gtk2_compat.h b/src/gtk2_compat.h
index 382e2dd..dc70b5f 100644
--- a/src/gtk2_compat.h
+++ b/src/gtk2_compat.h
@@ -23,32 +23,8 @@
G_BEGIN_DECLS
-#if !GTK_CHECK_VERSION(3,0,0)
-
-#define GTK_SCROLLABLE(x) GTK_TREE_VIEW(x)
-#define gtk_scrollable_get_vadjustment(x) gtk_tree_view_get_vadjustment(x)
-
-#define GTK_GRID(x) GTK_TABLE(x)
-#define GtkGrid GtkTable
-
-#define et_grid_new(r, c) gtk_table_new((r),(c),FALSE)
-
-#define gtk_grid_set_row_spacing gtk_table_set_row_spacings
-#define gtk_grid_set_column_spacing gtk_table_set_col_spacings
-void gtk_grid_attach (GtkGrid *grid, GtkWidget *child, gint left, gint top,
- gint width, gint height);
-
-GtkWidget *gtk_box_new(GtkOrientation orientation, gint padding);
-GtkWidget *gtk_button_box_new(GtkOrientation orientation);
-GtkWidget *gtk_paned_new(GtkOrientation orientation);
-GtkWidget *gtk_separator_new(GtkOrientation orientation);
-
-#else /* GTK_CHECK_VERSION(3,0,0) */
-
#define et_grid_new(r,c) gtk_grid_new()
-#endif /* GTK_CHECK_VERSION(3,0,0) */
-
void et_grid_attach_full (GtkGrid *grid, GtkWidget *child, gint left, gint top,
gint width, gint height, gboolean hexpand,
gboolean vexpand, gint hmargin, gint vmargin);
diff --git a/src/misc.c b/src/misc.c
index 0aa04eb..4c3162b 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -536,11 +536,7 @@ Destroy_Mouse_Cursor (void)
{
if (MouseCursor)
{
-#if GTK_CHECK_VERSION (3,0,0)
g_object_unref (MouseCursor);
-#else
- gdk_cursor_unref (MouseCursor);
-#endif
MouseCursor = NULL;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]