use GtkBox instead of GtkVBox/GtkHBox in both GTK+ builds

and fix deprecated usage of GtkHBox and GtkVBox in GTK+3 build
master-1.22
monsta 2016-01-20 10:56:16 +03:00
parent 75b1dfbc03
commit 4ef8ebf3a3
6 changed files with 24 additions and 6 deletions

View File

@ -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);
}

View File

@ -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)));

View File

@ -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);

View File

@ -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 */

View File

@ -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);

View File

@ -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:"));