Gtk+-3.14: don't use deprecated GtkMisc

This commit is contained in:
Wolfgang Ulbrich 2015-11-18 21:15:02 +01:00
parent dc6b2065db
commit 6454339a1a
12 changed files with 175 additions and 2 deletions

View File

@ -454,7 +454,11 @@ build_suggestion_menu (PlumaAutomaticSpellChecker *spell, const gchar *word)
label = gtk_label_new (label_text);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
#endif
mi = gtk_menu_item_new ();
gtk_container_add (GTK_CONTAINER(mi), label);

View File

@ -645,8 +645,17 @@ add_preview_widget (PlumaTaglistPluginPanel *panel)
gtk_label_set_line_wrap (GTK_LABEL (panel->priv->preview), TRUE);
gtk_label_set_use_markup (GTK_LABEL (panel->priv->preview), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (panel->priv->preview, GTK_ALIGN_START);
gtk_widget_set_valign (panel->priv->preview, GTK_ALIGN_START);
gtk_widget_set_margin_start (panel->priv->preview, 6);
gtk_widget_set_margin_end (panel->priv->preview, 6);
gtk_widget_set_margin_top (panel->priv->preview, 6);
gtk_widget_set_margin_bottom (panel->priv->preview, 6);
#else
gtk_misc_set_alignment (GTK_MISC (panel->priv->preview), 0, 0);
gtk_misc_set_padding (GTK_MISC (panel->priv->preview), 6, 6);
#endif
gtk_label_set_selectable (GTK_LABEL (panel->priv->preview), TRUE);
gtk_label_set_selectable (GTK_LABEL (panel->priv->preview), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (panel->priv->preview),

View File

@ -504,13 +504,21 @@ build_single_doc_dialog (PlumaCloseConfirmationDialog *dlg)
/* Image */
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_DIALOG);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
#endif
/* Primary label */
primary_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
gtk_widget_set_can_focus (GTK_WIDGET (primary_label), FALSE);
@ -543,7 +551,11 @@ build_single_doc_dialog (PlumaCloseConfirmationDialog *dlg)
secondary_label = gtk_label_new (str);
g_free (str);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5);
#endif
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
gtk_widget_set_can_focus (GTK_WIDGET (secondary_label), FALSE);
@ -689,7 +701,11 @@ build_multiple_docs_dialog (PlumaCloseConfirmationDialog *dlg)
/* Image */
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_DIALOG);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
#endif
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
vbox = gtk_vbox_new (FALSE, 12);
@ -699,7 +715,11 @@ build_multiple_docs_dialog (PlumaCloseConfirmationDialog *dlg)
primary_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
if (priv->disable_save_to_disk)
@ -734,7 +754,11 @@ build_multiple_docs_dialog (PlumaCloseConfirmationDialog *dlg)
gtk_box_pack_start (GTK_BOX (vbox2), select_label, FALSE, FALSE, 0);
gtk_label_set_line_wrap (GTK_LABEL (select_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (select_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (select_label), 0.0, 0.5);
#endif
scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow, TRUE, TRUE, 0);
@ -756,7 +780,11 @@ build_multiple_docs_dialog (PlumaCloseConfirmationDialog *dlg)
gtk_box_pack_start (GTK_BOX (vbox2), secondary_label, FALSE, FALSE, 0);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
#endif
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_mnemonic_widget (GTK_LABEL (select_label), treeview);

View File

@ -86,7 +86,11 @@ create_option_menu (PlumaFileChooserDialog *dialog)
GtkWidget *menu;
label = gtk_label_new_with_mnemonic (_("C_haracter Encoding:"));
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
#endif
menu = pluma_encodings_combo_box_new (
gtk_file_chooser_get_action (GTK_FILE_CHOOSER (dialog)) == GTK_FILE_CHOOSER_ACTION_SAVE);
@ -151,7 +155,11 @@ create_newline_combo (PlumaFileChooserDialog *dialog)
GtkTreeIter iter;
label = gtk_label_new_with_mnemonic (_("L_ine Ending:"));
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
#endif
store = gtk_list_store_new (2, G_TYPE_STRING, PLUMA_TYPE_DOCUMENT_NEWLINE_TYPE);
combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));

View File

@ -126,7 +126,11 @@ set_message_area_text_and_icon (GtkWidget *message_area,
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);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
#endif
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
@ -137,7 +141,11 @@ set_message_area_text_and_icon (GtkWidget *message_area,
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (primary_label), 0, 0.5);
#endif
gtk_widget_set_can_focus (primary_label, TRUE);
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
@ -152,7 +160,11 @@ set_message_area_text_and_icon (GtkWidget *message_area,
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
#endif
}
gtk_widget_show_all (hbox_content);
@ -514,7 +526,11 @@ create_conversion_error_message_area (const gchar *primary_text,
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);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
#endif
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
@ -525,7 +541,11 @@ create_conversion_error_message_area (const gchar *primary_text,
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (primary_label), 0, 0.5);
#endif
gtk_widget_set_can_focus (primary_label, TRUE);
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
@ -540,7 +560,11 @@ create_conversion_error_message_area (const gchar *primary_text,
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
#endif
}
create_combo_box (message_area, vbox);
@ -779,7 +803,11 @@ pluma_file_already_open_warning_message_area_new (const gchar *uri)
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);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
#endif
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
@ -794,7 +822,11 @@ pluma_file_already_open_warning_message_area_new (const gchar *uri)
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (primary_label), 0, 0.5);
#endif
gtk_widget_set_can_focus (primary_label, TRUE);
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
@ -809,7 +841,11 @@ pluma_file_already_open_warning_message_area_new (const gchar *uri)
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
#endif
gtk_widget_show_all (hbox_content);
set_contents (message_area, hbox_content);
@ -870,7 +906,11 @@ pluma_externally_modified_saving_error_message_area_new (
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);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
#endif
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
@ -889,7 +929,11 @@ pluma_externally_modified_saving_error_message_area_new (
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (primary_label), 0, 0.5);
#endif
gtk_widget_set_can_focus (primary_label, TRUE);
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
@ -903,7 +947,11 @@ pluma_externally_modified_saving_error_message_area_new (
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
#endif
gtk_widget_show_all (hbox_content);
set_contents (message_area, hbox_content);
@ -965,7 +1013,11 @@ pluma_no_backup_saving_error_message_area_new (const gchar *uri,
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);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_valign (image, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
#endif
vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, TRUE, TRUE, 0);
@ -988,7 +1040,11 @@ pluma_no_backup_saving_error_message_area_new (const gchar *uri,
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (primary_label), 0, 0.5);
#endif
gtk_widget_set_can_focus (primary_label, TRUE);
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
@ -1004,7 +1060,11 @@ pluma_no_backup_saving_error_message_area_new (const gchar *uri,
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
#endif
gtk_widget_show_all (hbox_content);
set_contents (message_area, hbox_content);

View File

@ -547,7 +547,11 @@ build_vertical_panel (PlumaPanel *panel)
0);
panel->priv->title_label = gtk_label_new (_("Empty"));
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (panel->priv->title_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (panel->priv->title_label), 0, 0.5);
#endif
gtk_label_set_ellipsize(GTK_LABEL (panel->priv->title_label), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (icon_name_hbox),
@ -645,8 +649,16 @@ build_tab_label (PlumaPanel *panel,
/* setup label */
label = gtk_label_new (name);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (label, GTK_ALIGN_START);
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_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_misc_set_padding (GTK_MISC (label), 0, 0);
#endif
gtk_box_pack_start (GTK_BOX (label_hbox), label, TRUE, TRUE, 0);
gtk_widget_set_tooltip_text (label_ebox, name);
@ -712,7 +724,11 @@ pluma_panel_add_item (PlumaPanel *panel,
tab_label = build_tab_label (panel, item, data->name, data->icon);
menu_label = gtk_label_new (name);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (menu_label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (menu_label), 0.0, 0.5);
#endif
if (!gtk_widget_get_visible (item))
gtk_widget_show (item);

View File

@ -808,7 +808,11 @@ pluma_plugin_manager_init (PlumaPluginManager *pm)
label = gtk_label_new_with_mnemonic (_("Active _Plugins:"));
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
#endif
gtk_box_pack_start (GTK_BOX (pm), label, FALSE, TRUE, 0);

View File

@ -153,14 +153,23 @@ pluma_progress_message_area_init (PlumaProgressMessageArea *area)
area->priv->image = gtk_image_new_from_icon_name (GTK_STOCK_MISSING_IMAGE,
GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_widget_show (area->priv->image);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (area->priv->image, GTK_ALIGN_CENTER);
gtk_widget_set_valign (area->priv->image, GTK_ALIGN_CENTER);
#else
gtk_misc_set_alignment (GTK_MISC (area->priv->image), 0.5, 0.5);
#endif
gtk_box_pack_start (GTK_BOX (hbox), area->priv->image, FALSE, FALSE, 4);
area->priv->label = gtk_label_new ("");
gtk_widget_show (area->priv->label);
gtk_box_pack_start (GTK_BOX (hbox), area->priv->label, TRUE, TRUE, 0);
gtk_label_set_use_markup (GTK_LABEL (area->priv->label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (area->priv->label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (area->priv->label), 0, 0.5);
#endif
gtk_label_set_ellipsize (GTK_LABEL (area->priv->label),
PANGO_ELLIPSIZE_END);

View File

@ -279,7 +279,11 @@ pluma_status_combo_box_init (PlumaStatusComboBox *self)
gtk_widget_show (self->priv->label);
gtk_label_set_single_line_mode (GTK_LABEL (self->priv->label), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (self->priv->label, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (self->priv->label), 0.0, 0.5);
#endif
gtk_box_pack_start (GTK_BOX (self->priv->hbox), self->priv->label, FALSE, TRUE, 0);
@ -287,13 +291,22 @@ pluma_status_combo_box_init (PlumaStatusComboBox *self)
gtk_widget_show (self->priv->item);
gtk_label_set_single_line_mode (GTK_LABEL (self->priv->item), TRUE);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (self->priv->item, GTK_ALIGN_START);
#else
gtk_misc_set_alignment (GTK_MISC (self->priv->item), 0, 0.5);
#endif
gtk_box_pack_start (GTK_BOX (self->priv->hbox), self->priv->item, TRUE, TRUE, 0);
self->priv->arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
gtk_widget_show (self->priv->arrow);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (self->priv->arrow, GTK_ALIGN_CENTER);
gtk_widget_set_valign (self->priv->arrow, GTK_ALIGN_CENTER);
#else
gtk_misc_set_alignment (GTK_MISC (self->priv->arrow), 0.5, 0.5);
#endif
gtk_box_pack_start (GTK_BOX (self->priv->hbox), self->priv->arrow, FALSE, TRUE, 0);

View File

@ -166,8 +166,15 @@ pluma_statusbar_init (PlumaStatusbar *statusbar)
gtk_frame_set_shadow_type (GTK_FRAME (statusbar->priv->error_frame), GTK_SHADOW_IN);
error_image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_MENU);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_margin_start (error_image, 4);
gtk_widget_set_margin_end (error_image, 4);
gtk_widget_set_margin_top (error_image, 0);
gtk_widget_set_margin_bottom (error_image, 0);
#else
gtk_misc_set_padding (GTK_MISC (error_image), 4, 0);
gtk_widget_show (error_image);
#endif
statusbar->priv->error_event_box = gtk_event_box_new ();
gtk_event_box_set_visible_window (GTK_EVENT_BOX (statusbar->priv->error_event_box),

View File

@ -301,8 +301,16 @@ pluma_tab_label_init (PlumaTabLabel *tab_label)
tab_label->priv->icon = icon;
label = gtk_label_new ("");
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_halign (label, GTK_ALIGN_START);
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_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_misc_set_padding (GTK_MISC (label), 0, 0);
#endif
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
tab_label->priv->label = label;

View File

@ -1097,7 +1097,14 @@ handle_builder_error (const gchar *message, ...)
g_free (msg_plain);
g_free (msg);
#if GTK_CHECK_VERSION (3, 14, 0)
gtk_widget_set_margin_start (label, 5);
gtk_widget_set_margin_end (label, 5);
gtk_widget_set_margin_top (label, 5);
gtk_widget_set_margin_bottom (label, 5);
#else
gtk_misc_set_padding (GTK_MISC (label), 5, 5);
#endif
return label;
}