summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-20 10:56:16 +0300
committermonsta <[email protected]>2016-01-20 10:56:16 +0300
commit4ef8ebf3a36535bd46fe40c7c7a1288f45dcae84 (patch)
treeb59afec6084ded93fad2b656187fd43b876ee1e1 /src
parent75b1dfbc0360b199e80e8a8b1c84b78cf1b16078 (diff)
downloadmate-terminal-4ef8ebf3a36535bd46fe40c7c7a1288f45dcae84.tar.bz2
mate-terminal-4ef8ebf3a36535bd46fe40c7c7a1288f45dcae84.tar.xz
use GtkBox instead of GtkVBox/GtkHBox in both GTK+ builds
and fix deprecated usage of GtkHBox and GtkVBox in GTK+3 build
Diffstat (limited to 'src')
-rw-r--r--src/terminal-info-bar.c4
-rw-r--r--src/terminal-screen-container.c8
-rw-r--r--src/terminal-screen-container.h4
-rw-r--r--src/terminal-tab-label.c2
-rw-r--r--src/terminal-tab-label.h4
-rw-r--r--src/terminal-window.c8
6 files changed, 24 insertions, 6 deletions
diff --git a/src/terminal-info-bar.c b/src/terminal-info-bar.c
index 0574224..5e60f21 100644
--- a/src/terminal-info-bar.c
+++ b/src/terminal-info-bar.c
@@ -41,7 +41,11 @@ terminal_info_bar_init (TerminalInfoBar *bar)
priv = bar->priv = TERMINAL_INFO_BAR_GET_PRIVATE (bar);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ priv->content_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
priv->content_box = gtk_vbox_new (FALSE, 6);
+#endif
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (info_bar)),
priv->content_box, TRUE, TRUE, 0);
}
diff --git a/src/terminal-screen-container.c b/src/terminal-screen-container.c
index 8c82c63..7017be9 100644
--- a/src/terminal-screen-container.c
+++ b/src/terminal-screen-container.c
@@ -52,7 +52,7 @@ enum
PROP_WINDOW_PLACEMENT_SET
};
-G_DEFINE_TYPE (TerminalScreenContainer, terminal_screen_container, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (TerminalScreenContainer, terminal_screen_container, GTK_TYPE_BOX)
/* helper functions */
@@ -123,6 +123,8 @@ terminal_screen_container_init (TerminalScreenContainer *container)
priv->vscrollbar_policy = GTK_POLICY_AUTOMATIC;
priv->window_placement = GTK_CORNER_BOTTOM_RIGHT;
priv->window_placement_set = FALSE;
+
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (container), GTK_ORIENTATION_VERTICAL);
}
static GObject *
@@ -165,7 +167,11 @@ terminal_screen_container_constructor (GType type,
#else
+#if GTK_CHECK_VERSION (3, 0, 0)
+ priv->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
priv->hbox = gtk_hbox_new (FALSE, 0);
+#endif
#if VTE_CHECK_VERSION (0, 38, 0)
priv->vscrollbar = gtk_vscrollbar_new (gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (priv->screen)));
diff --git a/src/terminal-screen-container.h b/src/terminal-screen-container.h
index d9eac83..bc8843d 100644
--- a/src/terminal-screen-container.h
+++ b/src/terminal-screen-container.h
@@ -38,7 +38,7 @@ typedef struct _TerminalScreenContainerPrivate TerminalScreenContainerPrivate;
struct _TerminalScreenContainer
{
- GtkVBox parent_instance;
+ GtkBox parent_instance;
/*< private >*/
TerminalScreenContainerPrivate *priv;
@@ -46,7 +46,7 @@ struct _TerminalScreenContainer
struct _TerminalScreenContainerClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
};
GType terminal_screen_container_get_type (void);
diff --git a/src/terminal-tab-label.c b/src/terminal-tab-label.c
index f7ddee2..789ba26 100644
--- a/src/terminal-tab-label.c
+++ b/src/terminal-tab-label.c
@@ -50,7 +50,7 @@ enum
static guint signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (TerminalTabLabel, terminal_tab_label, GTK_TYPE_HBOX);
+G_DEFINE_TYPE (TerminalTabLabel, terminal_tab_label, GTK_TYPE_BOX);
/* helper functions */
diff --git a/src/terminal-tab-label.h b/src/terminal-tab-label.h
index c30580f..685f5ef 100644
--- a/src/terminal-tab-label.h
+++ b/src/terminal-tab-label.h
@@ -38,7 +38,7 @@ typedef struct _TerminalTabLabelPrivate TerminalTabLabelPrivate;
struct _TerminalTabLabel
{
- GtkHBox parent_instance;
+ GtkBox parent_instance;
/*< private >*/
TerminalTabLabelPrivate *priv;
@@ -46,7 +46,7 @@ struct _TerminalTabLabel
struct _TerminalTabLabelClass
{
- GtkHBoxClass parent_class;
+ GtkBoxClass parent_class;
/* Signals */
void (* close_button_clicked) (TerminalTabLabel *tab_label);
diff --git a/src/terminal-window.c b/src/terminal-window.c
index b6e8eb0..8bcc30a 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2081,7 +2081,11 @@ terminal_window_init (TerminalWindow *window)
priv->active_screen = NULL;
priv->menubar_visible = FALSE;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+#else
main_vbox = gtk_vbox_new (FALSE, 0);
+#endif
gtk_container_add (GTK_CONTAINER (window), main_vbox);
gtk_widget_show (main_vbox);
@@ -3903,7 +3907,11 @@ terminal_set_title_callback (GtkAction *action,
message_area = gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (dialog));
gtk_container_foreach (GTK_CONTAINER (message_area), (GtkCallback) gtk_widget_hide, NULL);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+#else
hbox = gtk_hbox_new (FALSE, 12);
+#endif
gtk_box_pack_start (GTK_BOX (message_area), hbox, FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("_Title:"));