diff options
-rw-r--r-- | eel/eel-gtk-extensions.c | 4 | ||||
-rw-r--r-- | eel/eel-labeled-image.c | 10 | ||||
-rw-r--r-- | libcaja-private/caja-autorun.c | 13 | ||||
-rw-r--r-- | libcaja-private/caja-file-conflict-dialog.c | 13 | ||||
-rw-r--r-- | libcaja-private/caja-mime-application-chooser.c | 4 | ||||
-rw-r--r-- | libcaja-private/caja-open-with-dialog.c | 8 | ||||
-rw-r--r-- | libcaja-private/caja-progress-info.c | 8 | ||||
-rw-r--r-- | src/caja-autorun-software.c | 5 | ||||
-rw-r--r-- | src/caja-connect-server-dialog.c | 42 | ||||
-rw-r--r-- | src/caja-image-properties-page.c | 5 | ||||
-rw-r--r-- | src/caja-location-bar.c | 5 | ||||
-rw-r--r-- | src/caja-notebook.c | 4 | ||||
-rw-r--r-- | src/caja-property-browser.c | 8 | ||||
-rw-r--r-- | src/caja-x-content-bar.c | 4 | ||||
-rw-r--r-- | src/file-manager/fm-directory-view.c | 12 | ||||
-rw-r--r-- | src/file-manager/fm-ditem-page.c | 4 | ||||
-rw-r--r-- | src/file-manager/fm-list-view.c | 5 | ||||
-rw-r--r-- | src/file-manager/fm-properties-window.c | 4 | ||||
-rw-r--r-- | test/test-eel-editable-label.c | 9 |
19 files changed, 166 insertions, 1 deletions
diff --git a/eel/eel-gtk-extensions.c b/eel/eel-gtk-extensions.c index 5b8121b6..b86b2b88 100644 --- a/eel/eel-gtk-extensions.c +++ b/eel/eel-gtk-extensions.c @@ -479,7 +479,11 @@ eel_gtk_message_dialog_set_details_label (GtkMessageDialog *dialog, label = gtk_label_new (details_text); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_label_set_selectable (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 gtk_container_add (GTK_CONTAINER (expander), label); gtk_box_pack_start (GTK_BOX (content_area), expander, FALSE, FALSE, 0); diff --git a/eel/eel-labeled-image.c b/eel/eel-labeled-image.c index 7eff21a9..dbaa47aa 100644 --- a/eel/eel-labeled-image.c +++ b/eel/eel-labeled-image.c @@ -1135,9 +1135,14 @@ labeled_image_update_alignments (EelLabeledImage *labeled_image) } +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (labeled_image->details->label, GTK_ALIGN_CENTER); + gtk_widget_set_valign (labeled_image->details->label, GTK_ALIGN_CENTER); +#else gtk_misc_set_alignment (GTK_MISC (labeled_image->details->label), x_alignment, y_alignment); +#endif } } @@ -1184,9 +1189,14 @@ labeled_image_update_alignments (EelLabeledImage *labeled_image) } } +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (labeled_image->details->image, GTK_ALIGN_CENTER); + gtk_widget_set_valign (labeled_image->details->image, GTK_ALIGN_CENTER); +#else gtk_misc_set_alignment (GTK_MISC (labeled_image->details->image), x_alignment, y_alignment); +#endif } } } diff --git a/libcaja-private/caja-autorun.c b/libcaja-private/caja-autorun.c index 989ec36e..9409456b 100644 --- a/libcaja-private/caja-autorun.c +++ b/libcaja-private/caja-autorun.c @@ -1012,7 +1012,12 @@ show_dialog: g_object_unref (icon_info); g_object_unref (icon); image = gtk_image_new_from_pixbuf (pixbuf); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (image, GTK_ALIGN_CENTER); + 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, TRUE, TRUE, 0); /* also use the icon on the dialog */ gtk_window_set_title (GTK_WINDOW (dialog), mount_name); @@ -1095,7 +1100,11 @@ show_dialog: #if GTK_CHECK_VERSION (3, 0, 0) gtk_label_set_max_width_chars (GTK_LABEL (label), 50); #endif +#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 (vbox), label, TRUE, TRUE, 0); label = gtk_label_new (NULL); @@ -1108,7 +1117,11 @@ show_dialog: #if GTK_CHECK_VERSION (3, 0, 0) gtk_label_set_max_width_chars (GTK_LABEL (label), 50); #endif +#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 (vbox), label, TRUE, TRUE, 0); data = g_new0 (AutorunDialogData, 1); diff --git a/libcaja-private/caja-file-conflict-dialog.c b/libcaja-private/caja-file-conflict-dialog.c index 7ff27b76..45012e60 100644 --- a/libcaja-private/caja-file-conflict-dialog.c +++ b/libcaja-private/caja-file-conflict-dialog.c @@ -217,7 +217,11 @@ file_list_ready_cb (GList *files, gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (label), PANGO_WRAP_WORD_CHAR); gtk_widget_set_size_request (label, 350, -1); +#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 (details->titles_vbox), label, FALSE, FALSE, 0); gtk_widget_modify_font (label, NULL); @@ -232,7 +236,11 @@ file_list_ready_cb (GList *files, label = gtk_label_new (secondary_text); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_widget_set_size_request (label, 350, -1); +#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 (details->titles_vbox), label, FALSE, FALSE, 0); gtk_widget_show (label); @@ -568,7 +576,12 @@ caja_file_conflict_dialog_init (CajaFileConflictDialog *fcd) widget = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_DIALOG); gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (widget, GTK_ALIGN_CENTER); + gtk_widget_set_valign (widget, GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (widget), 0.5, 0.0); +#endif /* Setup the vbox containing the dialog body */ vbox = gtk_vbox_new (FALSE, 12); diff --git a/libcaja-private/caja-mime-application-chooser.c b/libcaja-private/caja-mime-application-chooser.c index c989bad1..438a92fe 100644 --- a/libcaja-private/caja-mime-application-chooser.c +++ b/libcaja-private/caja-mime-application-chooser.c @@ -381,7 +381,11 @@ caja_mime_application_chooser_init (CajaMimeApplicationChooser *chooser) gtk_box_set_homogeneous (GTK_BOX (chooser), FALSE); chooser->details->label = gtk_label_new (""); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (chooser->details->label, GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (chooser->details->label), 0.0, 0.5); +#endif gtk_label_set_line_wrap (GTK_LABEL (chooser->details->label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (chooser->details->label), PANGO_WRAP_WORD_CHAR); diff --git a/libcaja-private/caja-open-with-dialog.c b/libcaja-private/caja-open-with-dialog.c index 824b87e7..1a507a3f 100644 --- a/libcaja-private/caja-open-with-dialog.c +++ b/libcaja-private/caja-open-with-dialog.c @@ -857,7 +857,11 @@ caja_open_with_dialog_init (CajaOpenWithDialog *dialog) gtk_box_pack_start (GTK_BOX (vbox), vbox2, TRUE, TRUE, 0); dialog->details->label = gtk_label_new (""); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (dialog->details->label, GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (dialog->details->label), 0.0, 0.5); +#endif gtk_label_set_line_wrap (GTK_LABEL (dialog->details->label), TRUE); gtk_box_pack_start (GTK_BOX (vbox2), dialog->details->label, FALSE, FALSE, 0); @@ -880,7 +884,11 @@ caja_open_with_dialog_init (CajaOpenWithDialog *dialog) gtk_box_pack_start (GTK_BOX (vbox2), scrolled_window, TRUE, TRUE, 0); dialog->details->desc_label = gtk_label_new (_("Select an application to view its description.")); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (dialog->details->desc_label, GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (dialog->details->desc_label), 0.0, 0.5); +#endif gtk_label_set_justify (GTK_LABEL (dialog->details->desc_label), GTK_JUSTIFY_LEFT); gtk_label_set_line_wrap (GTK_LABEL (dialog->details->desc_label), TRUE); gtk_label_set_single_line_mode (GTK_LABEL (dialog->details->desc_label), FALSE); diff --git a/libcaja-private/caja-progress-info.c b/libcaja-private/caja-progress-info.c index 27f48da5..503a8ac6 100644 --- a/libcaja-private/caja-progress-info.c +++ b/libcaja-private/caja-progress-info.c @@ -375,7 +375,11 @@ progress_widget_new (CajaProgressInfo *info) gtk_widget_set_size_request (label, 500, -1); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_label_set_line_wrap_mode (GTK_LABEL (label), PANGO_WRAP_WORD_CHAR); +#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 (vbox), label, TRUE, FALSE, @@ -413,7 +417,11 @@ progress_widget_new (CajaProgressInfo *info) 0); label = gtk_label_new ("details"); +#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_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (vbox), label, diff --git a/src/caja-autorun-software.c b/src/caja-autorun-software.c index a06eecb0..2cb44c16 100644 --- a/src/caja-autorun-software.c +++ b/src/caja-autorun-software.c @@ -233,7 +233,12 @@ present_autorun_for_software_dialog (GMount *mount) icon_info = caja_icon_info_lookup (icon, icon_size); pixbuf = caja_icon_info_get_pixbuf_at_size (icon_info, icon_size); image = gtk_image_new_from_pixbuf (pixbuf); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (image, GTK_ALIGN_CENTER); + gtk_widget_set_valign (image, GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); +#endif gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image); diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c index 1c78ca7f..290d02bd 100644 --- a/src/caja-connect-server-dialog.c +++ b/src/caja-connect-server-dialog.c @@ -879,7 +879,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) str = g_strdup_printf ("<b>%s</b>", _("Server Details")); gtk_label_set_markup (GTK_LABEL (label), str); g_free (str); +#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 (content_area), label, FALSE, FALSE, 6); gtk_widget_show (label); @@ -898,7 +902,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* first row: server entry + port spinbutton */ label = gtk_label_new_with_mnemonic (_("_Server:")); +#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_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, @@ -920,7 +928,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* port */ label = gtk_label_new_with_mnemonic (_("_Port:")); +#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 (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); @@ -938,7 +950,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* second row: type combobox */ label = gtk_label_new (_("Type:")); +#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_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, @@ -1016,7 +1032,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* third row: share entry */ label = gtk_label_new (_("Share:")); +#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_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, @@ -1033,7 +1053,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* fourth row: folder entry */ label = gtk_label_new (_("Folder:")); +#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_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, @@ -1053,7 +1077,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) str = g_strdup_printf ("<b>%s</b>", _("User Details")); gtk_label_set_markup (GTK_LABEL (label), str); g_free (str); +#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 (content_area), label, FALSE, FALSE, 6); /* user details alignment */ @@ -1071,7 +1099,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* first row: domain entry */ label = gtk_label_new (_("Domain Name:")); +#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_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, @@ -1088,7 +1120,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* second row: username entry */ label = gtk_label_new (_("User Name:")); +#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_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, @@ -1105,7 +1141,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* third row: password entry */ label = gtk_label_new (_("Password:")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#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_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, diff --git a/src/caja-image-properties-page.c b/src/caja-image-properties-page.c index aee7cb4f..b07d129c 100644 --- a/src/caja-image-properties-page.c +++ b/src/caja-image-properties-page.c @@ -146,7 +146,12 @@ append_label (GtkWidget *vbox, label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), str); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (label), 0, 0); +#endif gtk_label_set_selectable (GTK_LABEL (label), TRUE); /* setting can_focus to FALSE will allow to make the label diff --git a/src/caja-location-bar.c b/src/caja-location-bar.c index ec94c16d..965da186 100644 --- a/src/caja-location-bar.c +++ b/src/caja-location-bar.c @@ -429,7 +429,12 @@ caja_location_bar_init (CajaLocationBar *bar) label = gtk_label_new (LOCATION_LABEL); gtk_container_add (GTK_CONTAINER (event_box), label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_RIGHT); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (label, GTK_ALIGN_END); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); +#else gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); +#endif g_signal_connect (label, "style_set", G_CALLBACK (style_set_handler), NULL); diff --git a/src/caja-notebook.c b/src/caja-notebook.c index 38546e98..a520a4a4 100644 --- a/src/caja-notebook.c +++ b/src/caja-notebook.c @@ -373,7 +373,11 @@ build_tab_label (CajaNotebook *nb, CajaWindowSlot *slot) label = gtk_label_new (NULL); gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); gtk_label_set_single_line_mode (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 gtk_misc_set_padding (GTK_MISC (label), 0, 0); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); gtk_widget_show (label); diff --git a/src/caja-property-browser.c b/src/caja-property-browser.c index afe91842..12248e08 100644 --- a/src/caja-property-browser.c +++ b/src/caja-property-browser.c @@ -1126,7 +1126,11 @@ caja_emblem_dialog_new (CajaPropertyBrowser *property_browser) /* make the keyword label and field */ widget = gtk_label_new_with_mnemonic(_("_Keyword:")); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (widget, GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (widget), 0, 0.5); +#endif gtk_widget_show(widget); gtk_table_attach(GTK_TABLE(table), widget, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); @@ -1145,7 +1149,11 @@ caja_emblem_dialog_new (CajaPropertyBrowser *property_browser) /* set up a file chooser to pick the image file */ label = gtk_label_new_with_mnemonic (_("_Image:")); +#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 gtk_widget_show (label); gtk_table_attach (GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); diff --git a/src/caja-x-content-bar.c b/src/caja-x-content-bar.c index 392fdb73..19fcf135 100644 --- a/src/caja-x-content-bar.c +++ b/src/caja-x-content-bar.c @@ -304,7 +304,11 @@ caja_x_content_bar_init (CajaXContentBar *bar) bar->priv->label = gtk_label_new (NULL); gtk_label_set_ellipsize (GTK_LABEL (bar->priv->label), PANGO_ELLIPSIZE_END); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (bar->priv->label, GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.5); +#endif gtk_box_pack_start (GTK_BOX (bar), bar->priv->label, TRUE, TRUE, 0); bar->priv->button = gtk_button_new (); diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index 157e0f95..80815dcd 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -1219,7 +1219,11 @@ select_pattern (FMDirectoryView *view) "*.png, file\?\?.txt, pict*.\?\?\?"); gtk_label_set_markup (GTK_LABEL (example), example_pattern); g_free (example_pattern); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (example, GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (example), 0.0, 0.5); +#endif entry = gtk_entry_new (); gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE); @@ -1354,7 +1358,11 @@ action_save_search_as_callback (GtkAction *action, gtk_widget_show (table); label = gtk_label_new_with_mnemonic (_("Search _name:")); +#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_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); gtk_widget_show (label); entry = gtk_entry_new (); @@ -1368,7 +1376,11 @@ action_save_search_as_callback (GtkAction *action, gtk_widget_show (entry); label = gtk_label_new_with_mnemonic (_("_Folder:")); +#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_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); gtk_widget_show (label); diff --git a/src/file-manager/fm-ditem-page.c b/src/file-manager/fm-ditem-page.c index b08417a2..c3b75b65 100644 --- a/src/file-manager/fm-ditem-page.c +++ b/src/file-manager/fm-ditem-page.c @@ -346,7 +346,11 @@ build_table (GtkWidget *container, label = gtk_label_new (label_text); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); g_free (label_text); +#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_size_group_add_widget (label_size_group, label); entry = gtk_entry_new (); diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index 075e8c00..dc9bc20b 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -2547,7 +2547,12 @@ create_column_editor (FMListView *view) label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), str); gtk_label_set_line_wrap (GTK_LABEL (label), FALSE); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (label, GTK_ALIGN_START); + gtk_widget_set_valign (label, GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (label), 0, 0); +#endif gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0); diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index dcb9374e..6edb01ee 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -1397,7 +1397,11 @@ attach_label (GtkTable *table, if (bold) { eel_gtk_label_make_bold (GTK_LABEL (label_field)); } +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (label_field, right_aligned ? 1 :GTK_ALIGN_START); +#else gtk_misc_set_alignment (GTK_MISC (label_field), right_aligned ? 1 : 0, 0.5); +#endif gtk_widget_show (label_field); gtk_table_attach (table, label_field, column, column + 1, diff --git a/test/test-eel-editable-label.c b/test/test-eel-editable-label.c index 75dc3f49..f98a81ca 100644 --- a/test/test-eel-editable-label.c +++ b/test/test-eel-editable-label.c @@ -42,13 +42,22 @@ main (int argc, char* argv[]) label = eel_editable_label_new ("Left aligned label"); +#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 (vbox), label, FALSE, FALSE, 4); label = eel_editable_label_new ("Right aligned label"); +#if GTK_CHECK_VERSION (3, 14, 0) + gtk_widget_set_halign (label, GTK_ALIGN_END); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); +#else gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); +#endif gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4); |