From ffae9a0909f5a12e510038840586044a77b7baec Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Thu, 9 Jun 2011 17:29:56 +0300 Subject: Use GtkOrientable interface instead of deprecated V/H widgets Gtk[HV]Box, Gtk[HV]Separator, Gtk[HV]Paned are deprecated in GTK+ 3.2, so let's use the GtkOrientable interface instead. GtkBox is likely to dissapear soon too, so a migration to GtkGrid might be necessary at some point. https://bugzilla.gnome.org/show_bug.cgi?id=652201 --- src/bookmarks/ephy-bookmark-action.c | 4 ++-- src/bookmarks/ephy-bookmarks-editor.c | 10 +++++----- src/bookmarks/ephy-topic-action.c | 2 +- src/ephy-find-toolbar.c | 2 +- src/ephy-fullscreen-popup.c | 4 ++-- src/ephy-history-window.c | 6 +++--- src/ephy-notebook.c | 2 +- src/ephy-session.c | 2 +- src/ephy-toolbar-editor.c | 2 +- src/ephy-window.c | 6 +++--- src/pdm-dialog.c | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c index c59dceafa..88e747157 100644 --- a/src/bookmarks/ephy-bookmark-action.c +++ b/src/bookmarks/ephy-bookmark-action.c @@ -142,7 +142,7 @@ create_tool_item (GtkAction *action) item = GTK_ACTION_CLASS (ephy_bookmark_action_parent_class)->create_tool_item (action); - hbox = gtk_hbox_new (FALSE, 0); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_show (hbox); gtk_container_add (GTK_CONTAINER (item), hbox); @@ -161,7 +161,7 @@ create_tool_item (GtkAction *action) g_signal_connect (entry, "button-press-event", G_CALLBACK (entry_button_press_event_cb), action); - hbox = gtk_hbox_new (FALSE, 3); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3); gtk_widget_show (hbox); gtk_container_add (GTK_CONTAINER (button), hbox); diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index f33095354..b2526bb28 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -904,7 +904,7 @@ cmd_bookmarks_export (GtkAction *action, G_CALLBACK (export_format_combo_changed_cb), dialog); gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); - hbox = gtk_hbox_new (FALSE, 12); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0); gtk_widget_show_all (hbox); @@ -949,7 +949,7 @@ cmd_bookmarks_import (GtkAction *action, gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); gtk_box_set_spacing (GTK_BOX (content_area), 2); - vbox = gtk_vbox_new (FALSE, 6); + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_container_set_border_width (GTK_CONTAINER (vbox), 5); gtk_widget_show (vbox); gtk_box_pack_start (GTK_BOX (content_area), vbox, @@ -1532,7 +1532,7 @@ build_search_box (EphyBookmarksEditor *editor) GtkWidget *entry; char *str; - box = gtk_hbox_new (FALSE, 6); + box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); gtk_container_set_border_width (GTK_CONTAINER (box), 6); gtk_widget_show (box); @@ -1664,7 +1664,7 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor) g_signal_connect (editor, "delete_event", G_CALLBACK (delete_event_cb), NULL); - editor->priv->main_vbox = gtk_vbox_new (FALSE, 0); + editor->priv->main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_widget_show (editor->priv->main_vbox); gtk_container_add (GTK_CONTAINER (editor), editor->priv->main_vbox); @@ -1759,7 +1759,7 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor) G_CALLBACK (keyword_node_show_popup_cb), editor); - vbox = gtk_vbox_new (FALSE, 0); + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_paned_pack2 (GTK_PANED (hpaned), vbox, TRUE, TRUE); gtk_widget_show (vbox); diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c index d59d62291..8d951e736 100644 --- a/src/bookmarks/ephy-topic-action.c +++ b/src/bookmarks/ephy-topic-action.c @@ -130,7 +130,7 @@ create_tool_item (GtkAction *action) arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE); gtk_widget_show (arrow); - hbox = gtk_hbox_new (FALSE, 3); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3); gtk_widget_show (hbox); gtk_container_add (GTK_CONTAINER (button), hbox); diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c index 14c6c9da9..7acb56569 100644 --- a/src/ephy-find-toolbar.c +++ b/src/ephy-find-toolbar.c @@ -543,7 +543,7 @@ ephy_find_toolbar_init (EphyFindToolbar *toolbar) alignment = gtk_alignment_new (0.0, 0.5, 1.0, 0.0); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 2, 2); - box = gtk_hbox_new (FALSE, 12); + box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_container_add (GTK_CONTAINER (alignment), box); priv->label = gtk_label_new (NULL); diff --git a/src/ephy-fullscreen-popup.c b/src/ephy-fullscreen-popup.c index 1d1b8be77..7713bf72e 100644 --- a/src/ephy-fullscreen-popup.c +++ b/src/ephy-fullscreen-popup.c @@ -202,7 +202,7 @@ ephy_fullscreen_popup_constructor (GType type, gtk_window_set_resizable (window, FALSE); - hbox = gtk_hbox_new (FALSE, 2); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2); gtk_container_add (GTK_CONTAINER (window), hbox); gtk_widget_show (hbox); @@ -211,7 +211,7 @@ ephy_fullscreen_popup_constructor (GType type, gtk_frame_set_shadow_type (GTK_FRAME (priv->frame), GTK_SHADOW_OUT); gtk_box_pack_start (GTK_BOX (hbox), priv->frame, FALSE, FALSE, 0); - frame_hbox = gtk_hbox_new (FALSE, 2); + frame_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2); gtk_container_add (GTK_CONTAINER (priv->frame), frame_hbox); gtk_widget_show (frame_hbox); diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index 166c21963..8d6a5e49d 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -933,7 +933,7 @@ build_search_box (EphyHistoryWindow *editor) GtkWidget *combo; char *str; - box = gtk_hbox_new (FALSE, 6); + box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); gtk_container_set_border_width (GTK_CONTAINER (box), 6); gtk_widget_show (box); @@ -1101,7 +1101,7 @@ ephy_history_window_construct (EphyHistoryWindow *editor) g_signal_connect (editor, "delete_event", G_CALLBACK (delete_event_cb), NULL); - editor->priv->main_vbox = gtk_vbox_new (FALSE, 0); + editor->priv->main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_widget_show (editor->priv->main_vbox); gtk_container_add (GTK_CONTAINER (editor), editor->priv->main_vbox); @@ -1193,7 +1193,7 @@ ephy_history_window_construct (EphyHistoryWindow *editor) G_CALLBACK (view_selection_changed_cb), editor); - vbox = gtk_vbox_new (FALSE, 0); + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_paned_pack2 (GTK_PANED (hpaned), vbox, TRUE, FALSE); gtk_widget_show (vbox); diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index 597cd1c3c..b5b4def54 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -586,7 +586,7 @@ build_tab_label (EphyNotebook *nb, EphyEmbed *embed) /* 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 */ diff --git a/src/ephy-session.c b/src/ephy-session.c index acd48df78..0c52fe20e 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -768,7 +768,7 @@ session_command_dispatch (EphySession *session) session->priv->resume_window = gtk_widget_get_toplevel (GTK_WIDGET (embed)); action_area = gtk_info_bar_get_action_area (GTK_INFO_BAR (info_bar)); - button_box = gtk_hbutton_box_new (); + button_box = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL); gtk_container_add (GTK_CONTAINER (action_area), button_box); action_button = gtk_button_new_with_label (_("Don't recover")); diff --git a/src/ephy-toolbar-editor.c b/src/ephy-toolbar-editor.c index 2fd49250f..366ff38ae 100644 --- a/src/ephy-toolbar-editor.c +++ b/src/ephy-toolbar-editor.c @@ -196,7 +196,7 @@ ephy_toolbar_editor_constructor (GType type, gtk_box_set_spacing (GTK_BOX (EGG_TOOLBAR_EDITOR (editor)), 5); gtk_box_pack_start (GTK_BOX (vbox), editor, TRUE, TRUE, 0); - hbox = gtk_hbox_new (FALSE, 12); + hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_box_set_spacing (GTK_BOX (editor), 18); gtk_box_pack_start (GTK_BOX (editor), hbox, FALSE, FALSE, 0); diff --git a/src/ephy-window.c b/src/ephy-window.c index 5cbbf8ad6..5d9e6f854 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1555,12 +1555,12 @@ setup_ui_manager (EphyWindow *window) GtkAction *action; GtkUIManager *manager; - window->priv->main_vbox = gtk_vbox_new (FALSE, 0); + window->priv->main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_widget_show (window->priv->main_vbox); gtk_container_add (GTK_CONTAINER (window), window->priv->main_vbox); - window->priv->menu_dock = gtk_vbox_new (FALSE, 0); + window->priv->menu_dock = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_widget_show (window->priv->menu_dock); gtk_box_pack_start (GTK_BOX (window->priv->main_vbox), GTK_WIDGET (window->priv->menu_dock), @@ -3265,7 +3265,7 @@ setup_downloads_box (EphyWindow *window) GtkWidget *close_button; GtkWidget *image; - widget = gtk_hbox_new (FALSE, 0); + widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); close_button = gtk_button_new (); image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_BUTTON); diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c index 1b3e94ca1..54d36d118 100644 --- a/src/pdm-dialog.c +++ b/src/pdm-dialog.c @@ -366,7 +366,7 @@ pdm_dialog_show_clear_all_dialog (EphyDialog *edialog, FALSE); #endif - vbox = gtk_vbox_new (FALSE, 6); + vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); content_area = gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (dialog)); gtk_box_pack_start (GTK_BOX (content_area), vbox, FALSE, FALSE, 0); -- cgit v1.2.3