summaryrefslogtreecommitdiff
path: root/src/caja-notebook.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-11-22 15:02:51 -0500
committerlukefromdc <[email protected]>2016-11-22 15:02:51 -0500
commit276eb145ce96d5f75f8d3901daf6310f60ddbb81 (patch)
tree544f41e76c9a91973867065696fc2e414ca60170 /src/caja-notebook.c
parent969e4d021fe49654fe6e5ee7e88c920fec126505 (diff)
downloadcaja-276eb145ce96d5f75f8d3901daf6310f60ddbb81.tar.bz2
caja-276eb145ce96d5f75f8d3901daf6310f60ddbb81.tar.xz
move to GTK+3 (>= 3.14), drop libunique, GTK+2 code, and --with-gtk build option
*Remove GTK_VERSION_CHECK (3, 0, 0) and libunique selectors *Remove GTK2 and libunique specific code. *Leaves selector for specific GTK3 versions. *Remove #DEFINES for vbox/hbox previously required for GTK2 compatability *Keep vbox in caja-spatial-window.c, it is necessary for the desktop to work *spatial-window vbox issue at https://github.com/mate-desktop/caja/issues/591
Diffstat (limited to 'src/caja-notebook.c')
-rw-r--r--src/caja-notebook.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/caja-notebook.c b/src/caja-notebook.c
index 199e7a2b..1dd5f6a9 100644
--- a/src/caja-notebook.c
+++ b/src/caja-notebook.c
@@ -40,10 +40,6 @@
#define AFTER_ALL_TABS -1
-#if GTK_CHECK_VERSION (3, 0, 0)
-#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
-#endif
-
static void caja_notebook_init (CajaNotebook *notebook);
static void caja_notebook_class_init (CajaNotebookClass *klass);
static int caja_notebook_insert_page (GtkNotebook *notebook,
@@ -81,17 +77,6 @@ caja_notebook_class_init (CajaNotebookClass *klass)
notebook_class->insert_page = caja_notebook_insert_page;
-#if !GTK_CHECK_VERSION (3, 0, 0)
- gtk_rc_parse_string ("style \"caja-tab-close-button-style\"\n"
- "{\n"
- "GtkWidget::focus-padding = 0\n"
- "GtkWidget::focus-line-width = 0\n"
- "xthickness = 0\n"
- "ythickness = 0\n"
- "}\n"
- "widget \"*.caja-tab-close-button\" style \"caja-tab-close-button-style\"");
-#endif
-
signals[TAB_CLOSE_REQUEST] =
g_signal_new ("tab-close-request",
G_OBJECT_CLASS_TYPE (object_class),
@@ -186,12 +171,10 @@ button_press_cb (CajaNotebook *notebook,
static void
caja_notebook_init (CajaNotebook *notebook)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
GtkStyleContext *context;
context = gtk_widget_get_style_context (GTK_WIDGET (notebook));
gtk_style_context_add_class (context, "caja-notebook");
-#endif
gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE);
gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
@@ -307,7 +290,7 @@ build_tab_label (CajaNotebook *nb, CajaWindowSlot *slot)
/* set hbox spacing and label padding (see below) so that there's an
* equal amount of space around the label */
- hbox = gtk_hbox_new (FALSE, 4);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_widget_show (hbox);
/* setup load feedback */
@@ -329,14 +312,11 @@ build_tab_label (CajaNotebook *nb, CajaWindowSlot *slot)
#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
#endif
-#if GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_set_margin_start (label, 0);
gtk_widget_set_margin_end (label, 0);
gtk_widget_set_margin_top (label, 0);
gtk_widget_set_margin_bottom (label, 0);
-#else
- gtk_misc_set_padding (GTK_MISC (label), 0, 0);
-#endif
+
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
gtk_widget_show (label);