summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-11-21 04:38:13 +0100
committerWolfgang Ulbrich <[email protected]>2015-11-21 04:41:09 +0100
commit48fe60d466a5aba0cca69b6ae7c386c4a473074c (patch)
treea9453f7dab7fd6eb65534b72ac65b8a5e7f209a2
parent7d47e2e5c2b075353df5b62f67d2abd3b9315fe7 (diff)
downloadmate-calc-48fe60d466a5aba0cca69b6ae7c386c4a473074c.tar.bz2
mate-calc-48fe60d466a5aba0cca69b6ae7c386c4a473074c.tar.xz
remove gtk2/3 conditions
-rw-r--r--src/math-converter.c4
-rw-r--r--src/math-display.c8
-rw-r--r--src/math-variable-popup.c12
-rw-r--r--src/math-window.c9
4 files changed, 0 insertions, 33 deletions
diff --git a/src/math-converter.c b/src/math-converter.c
index f72e9c1..ff28500 100644
--- a/src/math-converter.c
+++ b/src/math-converter.c
@@ -391,11 +391,7 @@ math_converter_init(MathConverter *converter)
gtk_box_set_spacing(GTK_BOX(converter), 6);
-#if GTK_CHECK_VERSION (3, 2, 0)
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
-#else
- hbox = gtk_hbox_new(FALSE, 0);
-#endif
gtk_widget_show(hbox);
gtk_box_pack_start(GTK_BOX(converter), hbox, FALSE, TRUE, 0);
diff --git a/src/math-display.c b/src/math-display.c
index 5d19952..69c2ee2 100644
--- a/src/math-display.c
+++ b/src/math-display.c
@@ -329,11 +329,7 @@ create_gui(MathDisplay *display)
int i;
GtkStyle *style;
-#if GTK_CHECK_VERSION (3, 2, 0)
main_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
-#else
- main_box = gtk_vbox_new(FALSE, 0);
-#endif
gtk_container_add(GTK_CONTAINER(display), main_box);
g_signal_connect(display, "key-press-event", G_CALLBACK(key_press_cb), display);
@@ -357,11 +353,7 @@ create_gui(MathDisplay *display)
g_signal_connect(display->priv->text_view, "key-press-event", G_CALLBACK(display_key_press_cb), display);
gtk_box_pack_start(GTK_BOX(main_box), display->priv->text_view, TRUE, TRUE, 0);
-#if GTK_CHECK_VERSION (3, 2, 0)
info_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
-#else
- info_box = gtk_hbox_new(FALSE, 6);
-#endif
gtk_box_pack_start(GTK_BOX(main_box), info_box, FALSE, TRUE, 0);
info_view = gtk_text_view_new();
diff --git a/src/math-variable-popup.c b/src/math-variable-popup.c
index 2ad7e1f..d033571 100644
--- a/src/math-variable-popup.c
+++ b/src/math-variable-popup.c
@@ -131,11 +131,7 @@ make_variable_entry(MathVariablePopup *popup, const gchar *name, const MPNumber
GtkWidget *hbox, *button, *label;
gchar *text;
-#if GTK_CHECK_VERSION (3, 2, 0)
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
-#else
- hbox = gtk_hbox_new(FALSE, 6);
-#endif
if (value)
{
@@ -215,11 +211,7 @@ math_variable_popup_set_property(GObject *object,
}
g_strfreev(names);
-#if GTK_CHECK_VERSION (3, 2, 0)
entry = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
-#else
- entry = gtk_hbox_new(FALSE, 6);
-#endif
gtk_widget_show(entry);
// TODO: Show greyed "variable name" text to give user a hint how to use
@@ -309,11 +301,7 @@ math_variable_popup_init(MathVariablePopup *popup)
/* Destroy this window when it loses focus */
g_signal_connect(G_OBJECT(popup), "focus-out-event", G_CALLBACK(variable_focus_out_event_cb), popup);
-#if GTK_CHECK_VERSION (3, 2, 0)
popup->priv->vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
-#else
- popup->priv->vbox = gtk_vbox_new(FALSE, 6);
-#endif
gtk_box_set_homogeneous(GTK_BOX(popup->priv->vbox), TRUE);
gtk_container_add(GTK_CONTAINER(popup), popup->priv->vbox);
gtk_widget_show(popup->priv->vbox);
diff --git a/src/math-window.c b/src/math-window.c
index d05b79b..990246d 100644
--- a/src/math-window.c
+++ b/src/math-window.c
@@ -17,8 +17,6 @@
#include "utility.h"
// gtk3 hack
-#if !GTK_CHECK_VERSION (3, 0, 0)
-
#ifndef GDK_KEY_F1
#define GDK_KEY_F1 GDK_F1
#endif
@@ -31,13 +29,6 @@
#define GDK_KEY_Z GDK_z
#endif
-#else // gtk 3.0.0
-
- #define gtk_vbox_new(x,y) \
- gtk_box_new(GTK_ORIENTATION_VERTICAL, y)
-
-#endif
-
enum {
PROP_0,
PROP_EQUATION