Clean up uses of deprecated GtkMisc
This commit is contained in:
parent
c65c6f2a3e
commit
422dc034f4
|
@ -471,7 +471,6 @@ build_single_doc_dialog (XedCloseConfirmationDialog *dlg)
|
||||||
primary_label = gtk_label_new (NULL);
|
primary_label = gtk_label_new (NULL);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
|
|
||||||
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_widget_set_can_focus (GTK_WIDGET (primary_label), FALSE);
|
gtk_widget_set_can_focus (GTK_WIDGET (primary_label), FALSE);
|
||||||
|
|
||||||
|
@ -639,7 +638,7 @@ build_multiple_docs_dialog (XedCloseConfirmationDialog *dlg)
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_widget_set_halign (GTK_WIDGET (primary_label), GTK_ALIGN_START);
|
gtk_widget_set_halign (GTK_WIDGET (primary_label), GTK_ALIGN_START);
|
||||||
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
|
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
|
||||||
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
||||||
|
|
||||||
str = g_strdup_printf (ngettext ("There is %d document with unsaved changes. "
|
str = g_strdup_printf (ngettext ("There is %d document with unsaved changes. "
|
||||||
|
@ -663,7 +662,7 @@ build_multiple_docs_dialog (XedCloseConfirmationDialog *dlg)
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), select_label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox2), select_label, FALSE, FALSE, 0);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (select_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (select_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (select_label), 0.0, 0.5);
|
gtk_widget_set_halign (select_label, GTK_ALIGN_START);
|
||||||
|
|
||||||
scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
|
scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow, TRUE, TRUE, 0);
|
||||||
|
|
|
@ -80,7 +80,7 @@ create_option_menu (XedFileChooserDialog *dialog)
|
||||||
GtkWidget *menu;
|
GtkWidget *menu;
|
||||||
|
|
||||||
label = gtk_label_new_with_mnemonic (_("C_haracter Encoding:"));
|
label = gtk_label_new_with_mnemonic (_("C_haracter Encoding:"));
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||||
|
|
||||||
menu = xed_encodings_combo_box_new (
|
menu = xed_encodings_combo_box_new (
|
||||||
gtk_file_chooser_get_action (GTK_FILE_CHOOSER (dialog)) == GTK_FILE_CHOOSER_ACTION_SAVE);
|
gtk_file_chooser_get_action (GTK_FILE_CHOOSER (dialog)) == GTK_FILE_CHOOSER_ACTION_SAVE);
|
||||||
|
@ -145,7 +145,7 @@ create_newline_combo (XedFileChooserDialog *dialog)
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
|
||||||
label = gtk_label_new_with_mnemonic (_("L_ine Ending:"));
|
label = gtk_label_new_with_mnemonic (_("L_ine Ending:"));
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||||
|
|
||||||
store = gtk_list_store_new (2, G_TYPE_STRING, XED_TYPE_DOCUMENT_NEWLINE_TYPE);
|
store = gtk_list_store_new (2, G_TYPE_STRING, XED_TYPE_DOCUMENT_NEWLINE_TYPE);
|
||||||
combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));
|
combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store));
|
||||||
|
|
|
@ -134,7 +134,7 @@ set_message_area_text_and_icon (GtkWidget *message_area,
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
|
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_use_markup (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
|
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
|
||||||
gtk_widget_set_can_focus (primary_label, TRUE);
|
gtk_widget_set_can_focus (primary_label, TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ set_message_area_text_and_icon (GtkWidget *message_area,
|
||||||
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5);
|
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_show_all (hbox_content);
|
gtk_widget_show_all (hbox_content);
|
||||||
|
@ -466,7 +466,7 @@ create_conversion_error_message_area (const gchar *primary_text,
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
|
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_use_markup (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
|
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
|
||||||
gtk_widget_set_can_focus (primary_label, TRUE);
|
gtk_widget_set_can_focus (primary_label, TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ create_conversion_error_message_area (const gchar *primary_text,
|
||||||
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5);
|
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
|
||||||
}
|
}
|
||||||
|
|
||||||
create_combo_box (message_area, vbox);
|
create_combo_box (message_area, vbox);
|
||||||
|
@ -724,7 +724,7 @@ xed_file_already_open_warning_message_area_new (const gchar *uri)
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
|
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_use_markup (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
|
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
|
||||||
gtk_widget_set_can_focus (primary_label, TRUE);
|
gtk_widget_set_can_focus (primary_label, TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
||||||
|
|
||||||
|
@ -738,7 +738,7 @@ xed_file_already_open_warning_message_area_new (const gchar *uri)
|
||||||
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5);
|
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
|
||||||
|
|
||||||
gtk_widget_show_all (hbox_content);
|
gtk_widget_show_all (hbox_content);
|
||||||
set_contents (message_area, hbox_content);
|
set_contents (message_area, hbox_content);
|
||||||
|
@ -811,7 +811,7 @@ xed_externally_modified_saving_error_message_area_new (const gchar *uri,
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
|
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_use_markup (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
|
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
|
||||||
gtk_widget_set_can_focus (primary_label, TRUE);
|
gtk_widget_set_can_focus (primary_label, TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
||||||
|
|
||||||
|
@ -824,7 +824,7 @@ xed_externally_modified_saving_error_message_area_new (const gchar *uri,
|
||||||
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5);
|
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
|
||||||
|
|
||||||
gtk_widget_show_all (hbox_content);
|
gtk_widget_show_all (hbox_content);
|
||||||
set_contents (message_area, hbox_content);
|
set_contents (message_area, hbox_content);
|
||||||
|
@ -906,7 +906,7 @@ xed_no_backup_saving_error_message_area_new (const gchar *uri,
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0);
|
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_use_markup (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
|
gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
|
||||||
gtk_widget_set_can_focus (primary_label, TRUE);
|
gtk_widget_set_can_focus (primary_label, TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
|
||||||
|
|
||||||
|
@ -921,7 +921,7 @@ xed_no_backup_saving_error_message_area_new (const gchar *uri,
|
||||||
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5);
|
gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
|
||||||
|
|
||||||
gtk_widget_show_all (hbox_content);
|
gtk_widget_show_all (hbox_content);
|
||||||
set_contents (message_area, hbox_content);
|
set_contents (message_area, hbox_content);
|
||||||
|
|
|
@ -422,7 +422,7 @@ build_tab_label (XedPanel *panel,
|
||||||
/* setup label */
|
/* setup label */
|
||||||
label = gtk_label_new (name);
|
label = gtk_label_new (name);
|
||||||
|
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||||
gtk_widget_set_margin_left (label, 0);
|
gtk_widget_set_margin_left (label, 0);
|
||||||
gtk_widget_set_margin_right (label, 0);
|
gtk_widget_set_margin_right (label, 0);
|
||||||
gtk_widget_set_margin_top (label, 0);
|
gtk_widget_set_margin_top (label, 0);
|
||||||
|
@ -496,7 +496,7 @@ xed_panel_add_item (XedPanel *panel,
|
||||||
|
|
||||||
menu_label = gtk_label_new (name);
|
menu_label = gtk_label_new (name);
|
||||||
|
|
||||||
gtk_misc_set_alignment (GTK_MISC (menu_label), 0.0, 0.5);
|
gtk_widget_set_halign (menu_label, GTK_ALIGN_START);
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (item))
|
if (!gtk_widget_get_visible (item))
|
||||||
{
|
{
|
||||||
|
|
|
@ -151,7 +151,7 @@ xed_progress_message_area_init (XedProgressMessageArea *area)
|
||||||
gtk_widget_show (area->priv->label);
|
gtk_widget_show (area->priv->label);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), area->priv->label, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), area->priv->label, TRUE, TRUE, 0);
|
||||||
gtk_label_set_use_markup (GTK_LABEL (area->priv->label), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (area->priv->label), TRUE);
|
||||||
gtk_misc_set_alignment (GTK_MISC (area->priv->label), 0.0, 0.5);
|
gtk_widget_set_halign (area->priv->label, GTK_ALIGN_START);
|
||||||
gtk_label_set_ellipsize (GTK_LABEL (area->priv->label), PANGO_ELLIPSIZE_END);
|
gtk_label_set_ellipsize (GTK_LABEL (area->priv->label), PANGO_ELLIPSIZE_END);
|
||||||
|
|
||||||
area->priv->progress = gtk_progress_bar_new ();
|
area->priv->progress = gtk_progress_bar_new ();
|
||||||
|
|
|
@ -297,7 +297,7 @@ xed_tab_label_init (XedTabLabel *tab_label)
|
||||||
|
|
||||||
label = gtk_label_new ("");
|
label = gtk_label_new ("");
|
||||||
|
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||||
gtk_widget_set_margin_left (label, 0);
|
gtk_widget_set_margin_left (label, 0);
|
||||||
gtk_widget_set_margin_right (label, 0);
|
gtk_widget_set_margin_right (label, 0);
|
||||||
gtk_widget_set_margin_top (label, 0);
|
gtk_widget_set_margin_top (label, 0);
|
||||||
|
|
Loading…
Reference in New Issue