diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/caja-autorun-software.c | 2 | ||||
-rw-r--r-- | src/caja-connect-server-dialog.c | 60 | ||||
-rw-r--r-- | src/caja-image-properties-page.c | 6 | ||||
-rw-r--r-- | src/caja-location-bar.c | 15 | ||||
-rw-r--r-- | src/caja-notebook.c | 12 | ||||
-rw-r--r-- | src/caja-x-content-bar.c | 4 | ||||
-rw-r--r-- | src/file-manager/fm-directory-view.c | 10 | ||||
-rw-r--r-- | src/file-manager/fm-ditem-page.c | 4 | ||||
-rw-r--r-- | src/file-manager/fm-list-view.c | 6 | ||||
-rw-r--r-- | src/file-manager/fm-properties-window.c | 4 |
10 files changed, 82 insertions, 41 deletions
diff --git a/src/caja-autorun-software.c b/src/caja-autorun-software.c index 2cb44c16..a2d6a94b 100644 --- a/src/caja-autorun-software.c +++ b/src/caja-autorun-software.c @@ -233,7 +233,7 @@ 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) +#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_halign (image, GTK_ALIGN_CENTER); gtk_widget_set_valign (image, GTK_ALIGN_START); #else diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c index 312bcf4a..60c88643 100644 --- a/src/caja-connect-server-dialog.c +++ b/src/caja-connect-server-dialog.c @@ -891,8 +891,8 @@ 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, 0, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif @@ -918,7 +918,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* first row: server entry + port spinbutton */ label = gtk_label_new_with_mnemonic (_("_Server:")); - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif gtk_container_add (GTK_CONTAINER (grid), label); gtk_widget_show (label); @@ -959,8 +963,8 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* port */ label = gtk_label_new_with_mnemonic (_("_Port:")); -#if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif @@ -981,11 +985,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* second row: type combobox */ label = gtk_label_new (_("Type:")); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif #if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); gtk_container_add (GTK_CONTAINER (grid), label); #else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, @@ -1069,11 +1076,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* third row: share entry */ label = gtk_label_new (_("Share:")); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif #if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); gtk_container_add (GTK_CONTAINER (grid), label); #else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, @@ -1096,11 +1106,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* fourth row: folder entry */ label = gtk_label_new (_("Folder:")); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif #if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); gtk_container_add (GTK_CONTAINER (grid), label); #else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, @@ -1126,8 +1139,8 @@ 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, 0, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif @@ -1157,11 +1170,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* first row: domain entry */ label = gtk_label_new (_("Domain Name:")); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif #if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); gtk_container_add (GTK_CONTAINER (grid), label); #else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, @@ -1184,11 +1200,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* second row: username entry */ label = gtk_label_new (_("User Name:")); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif #if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); gtk_container_add (GTK_CONTAINER (grid), label); #else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, @@ -1211,11 +1230,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) /* third row: password entry */ label = gtk_label_new (_("Password:")); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +#endif #if GTK_CHECK_VERSION (3, 0, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); gtk_container_add (GTK_CONTAINER (grid), label); #else - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); 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 c2faa25d..d43b3c09 100644 --- a/src/caja-image-properties-page.c +++ b/src/caja-image-properties-page.c @@ -149,9 +149,9 @@ 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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); + gtk_label_set_yalign (GTK_LABEL (label), 0); #else gtk_misc_set_alignment (GTK_MISC (label), 0, 0); #endif diff --git a/src/caja-location-bar.c b/src/caja-location-bar.c index e2a70104..440e742f 100644 --- a/src/caja-location-bar.c +++ b/src/caja-location-bar.c @@ -251,6 +251,9 @@ style_set_handler (GtkWidget *widget, GtkStyle *previous_style) PangoLayout *layout; int width, width2; int xpad; +#if GTK_CHECK_VERSION (3, 0, 0) + gint margin_start, margin_end; +#endif layout = gtk_label_get_layout (GTK_LABEL(widget)); @@ -263,8 +266,14 @@ style_set_handler (GtkWidget *widget, GtkStyle *previous_style) pango_layout_get_pixel_size (layout, &width2, NULL); width = MAX (width, width2); +#if GTK_CHECK_VERSION (3, 0, 0) + margin_start = gtk_widget_get_margin_start (widget); + margin_end = gtk_widget_get_margin_end (widget); + xpad = margin_start + margin_end; +#else gtk_misc_get_padding (GTK_MISC (widget), &xpad, NULL); +#endif width += 2 * xpad; @@ -429,9 +438,9 @@ 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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 1.0); + gtk_label_set_yalign (GTK_LABEL (label), 0.5); #else gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); #endif diff --git a/src/caja-notebook.c b/src/caja-notebook.c index 69a50ade..c2c22cd6 100644 --- a/src/caja-notebook.c +++ b/src/caja-notebook.c @@ -407,12 +407,20 @@ 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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); + gtk_label_set_yalign (GTK_LABEL (label), 0.5); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif +#if GTK_CHECK_VERSION (3, 0, 0) + 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_padding (GTK_MISC (label), 0, 0); +#endif gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); gtk_widget_show (label); diff --git a/src/caja-x-content-bar.c b/src/caja-x-content-bar.c index 1ef5fcba..1fc8aabe 100644 --- a/src/caja-x-content-bar.c +++ b/src/caja-x-content-bar.c @@ -310,7 +310,9 @@ caja_x_content_bar_init (CajaXContentBar *bar) gtk_label_set_ellipsize (GTK_LABEL (bar->priv->label), PANGO_ELLIPSIZE_END); #if GTK_CHECK_VERSION (3, 0, 0) gtk_orientable_set_orientation (GTK_ORIENTABLE (bar), GTK_ORIENTATION_HORIZONTAL); - gtk_widget_set_halign (bar->priv->label, GTK_ALIGN_START); +#endif +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (bar->priv->label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (bar->priv->label), 0.0, 0.5); #endif diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index 2c65cec7..031dd8d2 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -1231,7 +1231,7 @@ 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) +#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_halign (example, GTK_ALIGN_START); #else gtk_misc_set_alignment (GTK_MISC (example), 0.0, 0.5); @@ -1407,8 +1407,8 @@ action_save_search_as_callback (GtkAction *action, #endif label = gtk_label_new_with_mnemonic (_("Search _name:")); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else gtk_misc_set_alignment (GTK_MISC(label), 0.0, 0.5); #endif @@ -1435,8 +1435,8 @@ 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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else gtk_misc_set_alignment (GTK_MISC(label), 0.0, 0.5); #endif diff --git a/src/file-manager/fm-ditem-page.c b/src/file-manager/fm-ditem-page.c index 16cd204f..13803597 100644 --- a/src/file-manager/fm-ditem-page.c +++ b/src/file-manager/fm-ditem-page.c @@ -362,8 +362,8 @@ 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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index d797df55..71b7f65d 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -2549,9 +2549,9 @@ 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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0); + gtk_label_set_yalign (GTK_LABEL (label), 0); #else gtk_misc_set_alignment (GTK_MISC (label), 0, 0); #endif diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index 096283dd..a3fc7278 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -1464,8 +1464,8 @@ attach_label (GtkTable *table, eel_gtk_label_make_bold (GTK_LABEL (label_field)); } #endif -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (label_field, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label_field), 0); #else gtk_misc_set_alignment (GTK_MISC (label_field), right_aligned ? 1 : 0, 0.5); #endif |