diff options
author | raveit65 <[email protected]> | 2015-09-26 17:05:23 +0200 |
---|---|---|
committer | monsta <[email protected]> | 2015-10-19 16:31:56 +0300 |
commit | 597e229c69cf05e734ce0a08cc8ad1af4b2ebae8 (patch) | |
tree | 4a82733244da39d82f29f16c83f18c4222815a33 /src | |
parent | 5609227c672d94e54edec26e2b4db5f9e1697e17 (diff) | |
download | caja-597e229c69cf05e734ce0a08cc8ad1af4b2ebae8.tar.bz2 caja-597e229c69cf05e734ce0a08cc8ad1af4b2ebae8.tar.xz |
GTK3: do not use deprecated gtk_misc_set_alignment
Diffstat (limited to 'src')
-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 |
11 files changed, 97 insertions, 1 deletions
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, |