[gedit] No longer use Gtk[HV]Box as it is deprecated
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] No longer use Gtk[HV]Box as it is deprecated
- Date: Sun, 12 Jun 2011 19:35:20 +0000 (UTC)
commit 18a62cc5d78b4fc0862578c4216bcab4dc20c3bd
Author: Garrett Regier <alias301 gmail com>
Date: Sun Jun 12 12:35:02 2011 -0700
No longer use Gtk[HV]Box as it is deprecated
gedit/dialogs/gedit-close-confirmation-dialog.c | 10 ++++----
gedit/gedit-documents-panel.c | 5 +++-
gedit/gedit-documents-panel.h | 4 +-
gedit/gedit-file-chooser-dialog.c | 2 +-
gedit/gedit-io-error-info-bar.c | 26 +++++++++++-----------
gedit/gedit-multi-notebook.c | 5 +++-
gedit/gedit-multi-notebook.h | 4 +-
gedit/gedit-panel.c | 21 ++++++++++--------
gedit/gedit-panel.h | 4 +-
gedit/gedit-print-preview.c | 7 ++++-
gedit/gedit-print-preview.h | 4 +-
gedit/gedit-progress-info-bar.c | 4 +-
gedit/gedit-statusbar.c | 2 +-
gedit/gedit-tab-label.c | 7 ++++-
gedit/gedit-tab-label.h | 4 +-
gedit/gedit-tab.c | 5 +++-
gedit/gedit-tab.h | 4 +-
gedit/gedit-view-frame.c | 7 ++++-
gedit/gedit-view-frame.h | 6 ++--
gedit/gedit-window.c | 2 +-
plugins/checkupdate/gedit-check-update-plugin.c | 4 +-
plugins/filebrowser/gedit-file-browser-widget.c | 6 +++-
plugins/filebrowser/gedit-file-browser-widget.h | 4 +-
tests/test-overlay.c | 2 +-
24 files changed, 86 insertions(+), 63 deletions(-)
---
diff --git a/gedit/dialogs/gedit-close-confirmation-dialog.c b/gedit/dialogs/gedit-close-confirmation-dialog.c
index 37ff827..590bf03 100644
--- a/gedit/dialogs/gedit-close-confirmation-dialog.c
+++ b/gedit/dialogs/gedit-close-confirmation-dialog.c
@@ -545,12 +545,12 @@ build_single_doc_dialog (GeditCloseConfirmationDialog *dlg)
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
gtk_widget_set_can_focus (secondary_label, FALSE);
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (FALSE, 12);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
@@ -679,7 +679,7 @@ build_multiple_docs_dialog (GeditCloseConfirmationDialog *dlg)
priv = dlg->priv;
- hbox = gtk_hbox_new (FALSE, 12);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
hbox, TRUE, TRUE, 0);
@@ -690,7 +690,7 @@ build_multiple_docs_dialog (GeditCloseConfirmationDialog *dlg)
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (FALSE, 12);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
/* Primary label */
@@ -726,7 +726,7 @@ build_multiple_docs_dialog (GeditCloseConfirmationDialog *dlg)
g_free (markup_str);
gtk_box_pack_start (GTK_BOX (vbox), primary_label, FALSE, FALSE, 0);
- vbox2 = gtk_vbox_new (FALSE, 8);
+ vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
if (priv->disable_save_to_disk)
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index f0b338a..6dfca09 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -58,7 +58,7 @@ struct _GeditDocumentsPanelPrivate
guint setting_active_notebook : 1;
};
-G_DEFINE_TYPE(GeditDocumentsPanel, gedit_documents_panel, GTK_TYPE_VBOX)
+G_DEFINE_TYPE(GeditDocumentsPanel, gedit_documents_panel, GTK_TYPE_BOX)
enum
{
@@ -1081,6 +1081,9 @@ gedit_documents_panel_init (GeditDocumentsPanel *panel)
panel->priv->adding_tab = FALSE;
panel->priv->is_reodering = FALSE;
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (panel),
+ GTK_ORIENTATION_VERTICAL);
+
/* Create the scrolled window */
sw = gtk_scrolled_window_new (NULL, NULL);
diff --git a/gedit/gedit-documents-panel.h b/gedit/gedit-documents-panel.h
index 950edbc..fdf037f 100644
--- a/gedit/gedit-documents-panel.h
+++ b/gedit/gedit-documents-panel.h
@@ -57,7 +57,7 @@ typedef struct _GeditDocumentsPanel GeditDocumentsPanel;
struct _GeditDocumentsPanel
{
- GtkVBox vbox;
+ GtkBox vbox;
/*< private > */
GeditDocumentsPanelPrivate *priv;
@@ -70,7 +70,7 @@ typedef struct _GeditDocumentsPanelClass GeditDocumentsPanelClass;
struct _GeditDocumentsPanelClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
};
/*
diff --git a/gedit/gedit-file-chooser-dialog.c b/gedit/gedit-file-chooser-dialog.c
index 727c982..9f3238a 100644
--- a/gedit/gedit-file-chooser-dialog.c
+++ b/gedit/gedit-file-chooser-dialog.c
@@ -213,7 +213,7 @@ create_newline_combo (GeditFileChooserDialog *dialog)
static void
create_extra_widget (GeditFileChooserDialog *dialog)
{
- dialog->priv->extra_widget = gtk_hbox_new (FALSE, 6);
+ dialog->priv->extra_widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_widget_show (dialog->priv->extra_widget);
diff --git a/gedit/gedit-io-error-info-bar.c b/gedit/gedit-io-error-info-bar.c
index 1fff9f8..42e7ee3 100644
--- a/gedit/gedit-io-error-info-bar.c
+++ b/gedit/gedit-io-error-info-bar.c
@@ -121,13 +121,13 @@ set_info_bar_text_and_icon (GtkWidget *info_bar,
GtkWidget *primary_label;
GtkWidget *secondary_label;
- hbox_content = gtk_hbox_new (FALSE, 8);
+ hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
image = gtk_image_new_from_stock (icon_stock_id, GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
primary_markup = g_strdup_printf ("<b>%s</b>", primary_text);
@@ -448,7 +448,7 @@ create_combo_box (GtkWidget *info_bar,
GtkWidget *menu;
gchar *label_markup;
- hbox = gtk_hbox_new (FALSE, 6);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
label_markup = g_strdup_printf ("<small>%s</small>",
_("Ch_aracter Encoding:"));
@@ -518,13 +518,13 @@ create_conversion_error_info_bar (const gchar *primary_text,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
- hbox_content = gtk_hbox_new (FALSE, 8);
+ hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
image = gtk_image_new_from_stock ("gtk-dialog-error", GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
primary_markup = g_strdup_printf ("<b>%s</b>", primary_text);
@@ -789,13 +789,13 @@ gedit_file_already_open_warning_info_bar_new (GFile *location)
gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_WARNING);
- hbox_content = gtk_hbox_new (FALSE, 8);
+ hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
image = gtk_image_new_from_stock ("gtk-dialog-warning", GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
primary_text = g_strdup_printf (_("This file (%s) is already open in another gedit window."), uri_for_display);
@@ -879,13 +879,13 @@ gedit_externally_modified_saving_error_info_bar_new (GFile *location,
gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_WARNING);
- hbox_content = gtk_hbox_new (FALSE, 8);
+ hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
image = gtk_image_new_from_stock ("gtk-dialog-warning", GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
/* FIXME: review this message, it's not clear since for the user the "modification"
@@ -977,13 +977,13 @@ gedit_no_backup_saving_error_info_bar_new (GFile *location,
gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_WARNING);
- hbox_content = gtk_hbox_new (FALSE, 8);
+ hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
image = gtk_image_new_from_stock ("gtk-dialog-warning", GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
editor_settings = g_settings_new ("org.gnome.gedit.preferences.editor");
@@ -1266,13 +1266,13 @@ gedit_invalid_character_info_bar_new (GFile *location)
gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar),
GTK_MESSAGE_WARNING);
- hbox_content = gtk_hbox_new (FALSE, 8);
+ hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
image = gtk_image_new_from_stock ("gtk-dialog-warning", GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
primary_text = g_strdup_printf (_("Some invalid chars have been detected while saving %s"),
diff --git a/gedit/gedit-multi-notebook.c b/gedit/gedit-multi-notebook.c
index 9efddc5..80f482d 100644
--- a/gedit/gedit-multi-notebook.c
+++ b/gedit/gedit-multi-notebook.c
@@ -63,7 +63,7 @@ enum
static guint signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (GeditMultiNotebook, gedit_multi_notebook, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (GeditMultiNotebook, gedit_multi_notebook, GTK_TYPE_BOX)
static void remove_notebook (GeditMultiNotebook *mnb,
GtkWidget *notebook);
@@ -590,6 +590,9 @@ gedit_multi_notebook_init (GeditMultiNotebook *mnb)
mnb->priv->removing_notebook = FALSE;
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (mnb),
+ GTK_ORIENTATION_VERTICAL);
+
mnb->priv->active_notebook = gedit_notebook_new ();
add_notebook (mnb, mnb->priv->active_notebook, TRUE);
}
diff --git a/gedit/gedit-multi-notebook.h b/gedit/gedit-multi-notebook.h
index 98ce8e4..255ff4a 100644
--- a/gedit/gedit-multi-notebook.h
+++ b/gedit/gedit-multi-notebook.h
@@ -45,14 +45,14 @@ typedef struct _GeditMultiNotebookPrivate GeditMultiNotebookPrivate;
struct _GeditMultiNotebook
{
- GtkVBox parent;
+ GtkBox parent;
GeditMultiNotebookPrivate *priv;
};
struct _GeditMultiNotebookClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
/* Signals */
void (* notebook_added) (GeditMultiNotebook *mnb,
diff --git a/gedit/gedit-panel.c b/gedit/gedit-panel.c
index 414cfbc..5e58b2e 100644
--- a/gedit/gedit-panel.c
+++ b/gedit/gedit-panel.c
@@ -87,7 +87,7 @@ static guint signals[LAST_SIGNAL];
static void gedit_panel_constructed (GObject *object);
-G_DEFINE_TYPE(GeditPanel, gedit_panel, GTK_TYPE_VBOX)
+G_DEFINE_TYPE(GeditPanel, gedit_panel, GTK_TYPE_BOX)
static void
gedit_panel_finalize (GObject *object)
@@ -192,8 +192,8 @@ gedit_panel_class_init (GeditPanelClass *klass)
g_object_class_install_property (object_class,
PROP_ORIENTATION,
- g_param_spec_enum ("orientation",
- "Orientation",
+ g_param_spec_enum ("panel-orientation",
+ "Panel Orientation",
"The panel's orientation",
GTK_TYPE_ORIENTATION,
GTK_ORIENTATION_VERTICAL,
@@ -386,6 +386,9 @@ static void
gedit_panel_init (GeditPanel *panel)
{
panel->priv = GEDIT_PANEL_GET_PRIVATE (panel);
+
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (panel),
+ GTK_ORIENTATION_VERTICAL);
}
static void
@@ -439,7 +442,7 @@ build_horizontal_panel (GeditPanel *panel)
GtkWidget *sidebar;
GtkWidget *close_button;
- box = gtk_hbox_new(FALSE, 0);
+ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (box),
panel->priv->notebook,
@@ -448,7 +451,7 @@ build_horizontal_panel (GeditPanel *panel)
0);
/* Toolbar, close button and first separator */
- sidebar = gtk_vbox_new(FALSE, 6);
+ sidebar = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_set_border_width (GTK_CONTAINER (sidebar), 4);
gtk_box_pack_start (GTK_BOX (box),
@@ -483,12 +486,12 @@ build_vertical_panel (GeditPanel *panel)
GtkWidget *dummy_label;
/* Create title hbox */
- title_hbox = gtk_hbox_new (FALSE, 6);
+ title_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_container_set_border_width (GTK_CONTAINER (title_hbox), 5);
gtk_box_pack_start (GTK_BOX (panel), title_hbox, FALSE, FALSE, 0);
- icon_name_hbox = gtk_hbox_new (FALSE, 0);
+ icon_name_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (title_hbox),
icon_name_hbox,
TRUE,
@@ -594,13 +597,13 @@ build_tab_label (GeditPanel *panel,
/* 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);
label_ebox = gtk_event_box_new ();
gtk_event_box_set_visible_window (GTK_EVENT_BOX (label_ebox), FALSE);
gtk_box_pack_start (GTK_BOX (hbox), label_ebox, TRUE, TRUE, 0);
- label_hbox = gtk_hbox_new (FALSE, 4);
+ label_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_container_add (GTK_CONTAINER (label_ebox), label_hbox);
/* setup icon */
diff --git a/gedit/gedit-panel.h b/gedit/gedit-panel.h
index fe2bfc4..51cc20a 100644
--- a/gedit/gedit-panel.h
+++ b/gedit/gedit-panel.h
@@ -55,7 +55,7 @@ typedef struct _GeditPanel GeditPanel;
struct _GeditPanel
{
- GtkVBox vbox;
+ GtkBox vbox;
/*< private > */
GeditPanelPrivate *priv;
@@ -68,7 +68,7 @@ typedef struct _GeditPanelClass GeditPanelClass;
struct _GeditPanelClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
void (* item_added) (GeditPanel *panel,
GtkWidget *item);
diff --git a/gedit/gedit-print-preview.c b/gedit/gedit-print-preview.c
index 0d60166..a1cb087 100644
--- a/gedit/gedit-print-preview.c
+++ b/gedit/gedit-print-preview.c
@@ -84,7 +84,7 @@ struct _GeditPrintPreviewPrivate
guint cur_page;
};
-G_DEFINE_TYPE (GeditPrintPreview, gedit_print_preview, GTK_TYPE_VBOX)
+G_DEFINE_TYPE (GeditPrintPreview, gedit_print_preview, GTK_TYPE_BOX)
static void
gedit_print_preview_get_property (GObject *object,
@@ -603,7 +603,7 @@ create_bar (GeditPrintPreview *preview)
gtk_widget_show (GTK_WIDGET (i));
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), i, -1);
- status = gtk_hbox_new (FALSE, 4);
+ status = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
priv->page_entry = gtk_entry_new ();
gtk_entry_set_width_chars (GTK_ENTRY (priv->page_entry), 3);
gtk_entry_set_max_length (GTK_ENTRY (priv->page_entry), 6);
@@ -1014,6 +1014,9 @@ gedit_print_preview_init (GeditPrintPreview *preview)
priv->context = NULL;
priv->gtk_preview = NULL;
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (preview),
+ GTK_ORIENTATION_VERTICAL);
+
create_bar (preview);
create_preview_layout (preview);
diff --git a/gedit/gedit-print-preview.h b/gedit/gedit-print-preview.h
index 4a63bce..5b61642 100644
--- a/gedit/gedit-print-preview.h
+++ b/gedit/gedit-print-preview.h
@@ -48,14 +48,14 @@ typedef struct _GeditPrintPreviewClass GeditPrintPreviewClass;
struct _GeditPrintPreview
{
- GtkVBox parent;
+ GtkBox parent;
GeditPrintPreviewPrivate *priv;
};
struct _GeditPrintPreviewClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
void (* close) (GeditPrintPreview *preview);
};
diff --git a/gedit/gedit-progress-info-bar.c b/gedit/gedit-progress-info-bar.c
index 33d72fd..b890940 100644
--- a/gedit/gedit-progress-info-bar.c
+++ b/gedit/gedit-progress-info-bar.c
@@ -120,10 +120,10 @@ gedit_progress_info_bar_init (GeditProgressInfoBar *bar)
bar->priv = GEDIT_PROGRESS_INFO_BAR_GET_PRIVATE (bar);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_show (vbox);
- hbox = gtk_hbox_new (FALSE, 4);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
diff --git a/gedit/gedit-statusbar.c b/gedit/gedit-statusbar.c
index e3909eb..494b332 100644
--- a/gedit/gedit-statusbar.c
+++ b/gedit/gedit-statusbar.c
@@ -130,7 +130,7 @@ gedit_statusbar_init (GeditStatusbar *statusbar)
gtk_frame_set_shadow_type (GTK_FRAME (statusbar->priv->state_frame),
GTK_SHADOW_IN);
- hbox = gtk_hbox_new (FALSE, 0);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (statusbar->priv->state_frame), hbox);
statusbar->priv->load_image = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
diff --git a/gedit/gedit-tab-label.c b/gedit/gedit-tab-label.c
index 2339d5f..03be9aa 100644
--- a/gedit/gedit-tab-label.c
+++ b/gedit/gedit-tab-label.c
@@ -59,7 +59,7 @@ struct _GeditTabLabelPrivate
static guint signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (GeditTabLabel, gedit_tab_label, GTK_TYPE_HBOX)
+G_DEFINE_TYPE (GeditTabLabel, gedit_tab_label, GTK_TYPE_BOX)
static void
gedit_tab_label_finalize (GObject *object)
@@ -268,12 +268,15 @@ gedit_tab_label_init (GeditTabLabel *tab_label)
tab_label->priv->close_button_sensitive = TRUE;
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (tab_label),
+ GTK_ORIENTATION_HORIZONTAL);
+
ebox = gtk_event_box_new ();
gtk_event_box_set_visible_window (GTK_EVENT_BOX (ebox), FALSE);
gtk_box_pack_start (GTK_BOX (tab_label), ebox, TRUE, TRUE, 0);
tab_label->priv->ebox = ebox;
- hbox = gtk_hbox_new (FALSE, 4);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_container_add (GTK_CONTAINER (ebox), hbox);
close_button = gedit_close_button_new ();
diff --git a/gedit/gedit-tab-label.h b/gedit/gedit-tab-label.h
index 5f25921..f69b003 100644
--- a/gedit/gedit-tab-label.h
+++ b/gedit/gedit-tab-label.h
@@ -42,14 +42,14 @@ typedef struct _GeditTabLabelPrivate GeditTabLabelPrivate;
struct _GeditTabLabel
{
- GtkHBox parent;
+ GtkBox parent;
GeditTabLabelPrivate *priv;
};
struct _GeditTabLabelClass
{
- GtkHBoxClass parent_class;
+ GtkBoxClass parent_class;
void (* close_clicked) (GeditTabLabel *tab_label);
};
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 9556973..8b8133b 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -84,7 +84,7 @@ struct _GeditTabPrivate
gint ask_if_externally_modified : 1;
};
-G_DEFINE_TYPE(GeditTab, gedit_tab, GTK_TYPE_VBOX)
+G_DEFINE_TYPE(GeditTab, gedit_tab, GTK_TYPE_BOX)
enum
{
@@ -1644,6 +1644,9 @@ gedit_tab_init (GeditTab *tab)
tab->priv->ask_if_externally_modified = TRUE;
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (tab),
+ GTK_ORIENTATION_VERTICAL);
+
/* Manage auto save data */
auto_save = g_settings_get_boolean (tab->priv->editor,
GEDIT_SETTINGS_AUTO_SAVE);
diff --git a/gedit/gedit-tab.h b/gedit/gedit-tab.h
index 2c0f4d6..ee20bc1 100644
--- a/gedit/gedit-tab.h
+++ b/gedit/gedit-tab.h
@@ -77,7 +77,7 @@ typedef struct _GeditTab GeditTab;
struct _GeditTab
{
- GtkVBox vbox;
+ GtkBox vbox;
/*< private > */
GeditTabPrivate *priv;
@@ -90,7 +90,7 @@ typedef struct _GeditTabClass GeditTabClass;
struct _GeditTabClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
void (* drop_uris) (GeditView *view,
gchar **uri_list);
diff --git a/gedit/gedit-view-frame.c b/gedit/gedit-view-frame.c
index 670b2b0..a69bb98 100644
--- a/gedit/gedit-view-frame.c
+++ b/gedit/gedit-view-frame.c
@@ -106,7 +106,7 @@ typedef enum
/* The search entry completion is shared among all the views */
GtkListStore *search_completion_model = NULL;
-G_DEFINE_TYPE_WITH_CODE (GeditViewFrame, gedit_view_frame, GTK_TYPE_VBOX,
+G_DEFINE_TYPE_WITH_CODE (GeditViewFrame, gedit_view_frame, GTK_TYPE_BOX,
g_type_add_class_private (g_define_type_id, sizeof (GeditViewFrameClassPrivate)))
static void
@@ -1080,7 +1080,7 @@ create_search_widget (GeditViewFrame *frame)
G_CALLBACK (search_widget_scroll_event),
frame);
- hbox = gtk_hbox_new (FALSE, 3);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
gtk_widget_show (hbox);
gtk_container_add (GTK_CONTAINER (search_widget), hbox);
@@ -1425,6 +1425,9 @@ gedit_view_frame_init (GeditViewFrame *frame)
frame->priv->typeselect_flush_timeout = 0;
frame->priv->wrap_around = TRUE;
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (frame),
+ GTK_ORIENTATION_VERTICAL);
+
doc = gedit_document_new ();
_gedit_document_set_mount_operation_factory (doc,
diff --git a/gedit/gedit-view-frame.h b/gedit/gedit-view-frame.h
index 3c5cd69..1f66b2f 100644
--- a/gedit/gedit-view-frame.h
+++ b/gedit/gedit-view-frame.h
@@ -44,14 +44,14 @@ typedef struct _GeditViewFrameClassPrivate GeditViewFrameClassPrivate;
struct _GeditViewFrame
{
- GtkVBox parent;
-
+ GtkBox parent;
+
GeditViewFramePrivate *priv;
};
struct _GeditViewFrameClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
GeditViewFrameClassPrivate *priv;
};
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index efd8dcb..16b59e8 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -4106,7 +4106,7 @@ gedit_window_init (GeditWindow *window)
window->priv->window_group = gtk_window_group_new ();
gtk_window_group_add_window (window->priv->window_group, GTK_WINDOW (window));
- main_box = gtk_vbox_new (FALSE, 0);
+ main_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), main_box);
gtk_widget_show (main_box);
diff --git a/plugins/checkupdate/gedit-check-update-plugin.c b/plugins/checkupdate/gedit-check-update-plugin.c
index 550e326..41908ea 100644
--- a/plugins/checkupdate/gedit-check-update-plugin.c
+++ b/plugins/checkupdate/gedit-check-update-plugin.c
@@ -201,7 +201,7 @@ set_message_area_text_and_icon (GtkWidget *message_area,
GtkWidget *primary_label;
GtkWidget *secondary_label;
- hbox_content = gtk_hbox_new (FALSE, 8);
+ hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_widget_show (hbox_content);
image = gtk_image_new_from_stock (icon_stock_id, GTK_ICON_SIZE_DIALOG);
@@ -209,7 +209,7 @@ set_message_area_text_and_icon (GtkWidget *message_area,
gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
- vbox = gtk_vbox_new (FALSE, 6);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_show (vbox);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/gedit-file-browser-widget.c
index 57161b0..747fb73 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/gedit-file-browser-widget.c
@@ -233,7 +233,7 @@ static void on_action_filter_binary (GtkAction *action,
static void on_action_bookmark_open (GtkAction *action,
GeditFileBrowserWidget *obj);
-G_DEFINE_DYNAMIC_TYPE (GeditFileBrowserWidget, gedit_file_browser_widget, GTK_TYPE_VBOX)
+G_DEFINE_DYNAMIC_TYPE (GeditFileBrowserWidget, gedit_file_browser_widget, GTK_TYPE_BOX)
static void
free_name_icon (gpointer data)
@@ -1262,7 +1262,7 @@ create_filter (GeditFileBrowserWidget *obj)
gtk_widget_show (expander);
gtk_box_pack_start (GTK_BOX (obj), expander, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (FALSE, 3);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_widget_show (vbox);
obj->priv->filter_expander = expander;
@@ -1295,6 +1295,8 @@ gedit_file_browser_widget_init (GeditFileBrowserWidget *obj)
free_name_icon);
gtk_box_set_spacing (GTK_BOX (obj), 3);
+ gtk_orientable_set_orientation (GTK_ORIENTABLE (obj),
+ GTK_ORIENTATION_VERTICAL);
obj->priv->busy_cursor = gdk_cursor_new (GDK_WATCH);
}
diff --git a/plugins/filebrowser/gedit-file-browser-widget.h b/plugins/filebrowser/gedit-file-browser-widget.h
index dad6735..8938bf6 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.h
+++ b/plugins/filebrowser/gedit-file-browser-widget.h
@@ -48,14 +48,14 @@ gboolean (*GeditFileBrowserWidgetFilterFunc) (GeditFileBrowserWidget *obj,
struct _GeditFileBrowserWidget
{
- GtkVBox parent;
+ GtkBox parent;
GeditFileBrowserWidgetPrivate *priv;
};
struct _GeditFileBrowserWidgetClass
{
- GtkVBoxClass parent_class;
+ GtkBoxClass parent_class;
/* Signals */
void (* location_activated) (GeditFileBrowserWidget *widget,
diff --git a/tests/test-overlay.c b/tests/test-overlay.c
index 87db940..caa4c49 100644
--- a/tests/test-overlay.c
+++ b/tests/test-overlay.c
@@ -30,7 +30,7 @@ main ()
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
- vbox = gtk_vbox_new (FALSE, 0);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
textview = gtk_text_view_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]