New upstream version 4.6.3
Norbert Preining
3 years ago
47 | 47 | fi |
48 | 48 | |
49 | 49 | jobs: |
50 | "mint": | |
50 | "mint20": | |
51 | 51 | <<: *shared |
52 | 52 | docker: |
53 | 53 | - image: linuxmintd/mint20-amd64 |
54 | 54 | |
55 | "lmde": | |
55 | "lmde4": | |
56 | 56 | <<: *shared |
57 | 57 | docker: |
58 | 58 | - image: linuxmintd/lmde4-amd64 |
61 | 61 | version: 2 |
62 | 62 | build: |
63 | 63 | jobs: |
64 | - "mint" | |
65 | - "lmde" | |
64 | - "mint20" | |
65 | - "lmde4" |
0 | nemo (4.6.3) ulyana; urgency=medium | |
1 | ||
2 | [ Michael Webster ] | |
3 | * icon view: Fix additional line calculation for labels, and tweak spacing between icons. | |
4 | * nemo-icon-canvas-item.c: Only show full label text when an item is hovered over, but not if it is merely selected. | |
5 | * nemo-file-management-properties.glade: Add the modal flag to the window and increase vertical size slightly. | |
6 | ||
7 | [ Soapux ] | |
8 | * meson: Remove a workaround for old meson versions | |
9 | ||
10 | [ Fabio Fantoni ] | |
11 | * use debhelper 11 for integrated meson support | |
12 | ||
13 | [ Clement Lefebvre ] | |
14 | * CI: Use explicit tags | |
15 | ||
16 | -- Clement Lefebvre <root@linuxmint.com> Sat, 06 Jun 2020 14:52:58 +0100 | |
17 | ||
0 | 18 | nemo (4.6.2) ulyana; urgency=medium |
1 | 19 | |
2 | 20 | [ Michael Webster ] |
3 | 3 | Maintainer: Linux Mint <root@linuxmint.com> |
4 | 4 | Build-Depends: |
5 | 5 | cinnamon-l10n, |
6 | debhelper (>= 10), | |
6 | debhelper (>= 11.1~), | |
7 | 7 | gobject-introspection, |
8 | 8 | gtk-doc-tools (>= 1.4), |
9 | 9 | intltool (>= 0.40.1), |
3 | 3 | export LC_ALL=C.UTF-8 |
4 | 4 | |
5 | 5 | CONFIGURE_EXTRA_FLAGS = \ |
6 | --prefix=/usr \ | |
7 | --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ | |
8 | 6 | --libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH)/nemo \ |
9 | 7 | -D deprecated_warnings=false \ |
10 | 8 | -D gtk_doc=true \ |
11 | 9 | -D selinux=false |
12 | 10 | |
13 | export LDFLAGS+=-Wl,-z,defs -Wl,-O1 -Wl,--as-needed | |
11 | export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs -Wl,-O1 -Wl,--as-needed | |
14 | 12 | |
15 | 13 | |
16 | 14 | %: |
17 | 15 | dh $@ --with gir |
18 | 16 | |
19 | 17 | override_dh_auto_configure: |
20 | mkdir -p debian/build | |
21 | meson debian/build $(CONFIGURE_EXTRA_FLAGS) | |
22 | ||
23 | override_dh_auto_build: | |
24 | ninja -C debian/build | |
18 | dh_auto_configure -- $(CONFIGURE_EXTRA_FLAGS) | |
25 | 19 | |
26 | 20 | override_dh_auto_test: |
27 | # ninja -C build test | |
21 | # Disabled | |
22 | : | |
28 | 23 | |
29 | 24 | override_dh_strip: |
30 | 25 | dh_strip --dbg-package=nemo-dbg |
31 | ||
32 | override_dh_auto_install: | |
33 | DESTDIR=${CURDIR}/debian/tmp \ | |
34 | ninja -C debian/build install | |
35 | 26 | |
36 | 27 | override_dh_makeshlibs: |
37 | 28 | dh_makeshlibs -Xusr/lib/nemo/extensions-3.0/ |
39 | 30 | override_dh_installmime: |
40 | 31 | dh_installmime -pnemo-data |
41 | 32 | |
42 | # with dh11 replace with dh_missing | |
43 | # debian/not-installed wildcard support introduced in debhelper 11.1 | |
44 | 33 | # --list-missing will be default in compat 12 |
45 | override_dh_install: | |
46 | dh_install --list-missing | |
34 | override_dh_missing: | |
35 | dh_missing --list-missing | |
47 | 36 |
0 | 0 | <?xml version="1.0" encoding="UTF-8"?> |
1 | <!-- Generated with glade 3.22.1 | |
1 | <!-- Generated with glade 3.22.2 | |
2 | 2 | |
3 | 3 | Copyright (C) |
4 | 4 | |
355 | 355 | <property name="title" translatable="yes">File Management Preferences</property> |
356 | 356 | <property name="window_position">center</property> |
357 | 357 | <property name="default_width">800</property> |
358 | <property name="default_height">530</property> | |
358 | <property name="default_height">600</property> | |
359 | 359 | <property name="type_hint">dialog</property> |
360 | <child> | |
360 | <child type="titlebar"> | |
361 | 361 | <placeholder/> |
362 | 362 | </child> |
363 | 363 | <child> |
0 | prefix=@prefix@ | |
1 | libdir=${prefix}/@libdir@ | |
2 | includedir=${prefix}/@includedir@ | |
3 | ||
4 | extensiondir=@extensiondir@ | |
5 | ||
6 | Name: libnemo-extension | |
7 | Description: A library to create Nemo view extensions | |
8 | Version: @version@ | |
9 | Requires: gio-2.0, glib-2.0, gtk+-3.0 | |
10 | Libs: -L${libdir} -lnemo-extension | |
11 | Cflags: -I${includedir}/nemo |
72 | 72 | install: true, |
73 | 73 | ) |
74 | 74 | |
75 | if meson.version().version_compare('>=0.41.0') | |
76 | pkgconfig.generate(filebase: 'libnemo-extension', | |
77 | name: 'libnemo-extension', | |
78 | description: 'A library to create Nemo view extensions', | |
79 | version: meson.project_version(), | |
80 | requires: [ 'gio-2.0', 'glib-2.0', 'gtk+-3.0' ], | |
81 | libraries: nemo_extension_lib, | |
82 | subdirs: 'nemo', | |
83 | variables: 'extensiondir=${libdir}/@0@/@1@'.format('nemo', 'extensions-3.0'), | |
84 | ) | |
85 | else | |
86 | pc_conf = configuration_data() | |
87 | pc_conf.set('prefix', get_option('prefix')) | |
88 | pc_conf.set('libdir', get_option('libdir')) | |
89 | pc_conf.set('includedir', get_option('includedir')) | |
90 | pc_conf.set('version', meson.project_version()) | |
91 | pc_conf.set('extensiondir', nemoExtensionPath) | |
92 | configure_file( | |
93 | input : 'libnemo-extension.pc.in', | |
94 | output: 'libnemo-extension.pc', | |
95 | configuration: pc_conf, | |
96 | install: true, | |
97 | install_dir: join_paths(get_option('libdir'), 'pkgconfig'), | |
98 | ) | |
99 | endif | |
75 | pkgconfig.generate(filebase: 'libnemo-extension', | |
76 | name: 'libnemo-extension', | |
77 | description: 'A library to create Nemo view extensions', | |
78 | version: meson.project_version(), | |
79 | requires: [ 'gio-2.0', 'glib-2.0', 'gtk+-3.0' ], | |
80 | libraries: nemo_extension_lib, | |
81 | subdirs: 'nemo', | |
82 | variables: 'extensiondir=${libdir}/@0@/@1@'.format('nemo', 'extensions-3.0'), | |
83 | ) | |
84 |
47 | 47 | #include <string.h> |
48 | 48 | |
49 | 49 | /* gap between bottom of icon and start of text box */ |
50 | #define LABEL_OFFSET 3 | |
51 | 50 | #define LABEL_OFFSET_BESIDES 3 |
52 | 51 | #define LABEL_LINE_SPACING 0 |
53 | 52 | |
583 | 582 | { |
584 | 583 | EelIRect text_rectangle; |
585 | 584 | double pixels_per_unit; |
586 | double label_offset; | |
587 | 585 | double text_width, text_height, text_height_for_layout, text_height_for_entire_text, real_text_height, text_dx; |
588 | 586 | |
589 | 587 | pixels_per_unit = EEL_CANVAS_ITEM (item)->canvas->pixels_per_unit; |
593 | 591 | text_height_for_layout = item->details->text_height_for_layout; |
594 | 592 | text_height_for_entire_text = item->details->text_height_for_entire_text; |
595 | 593 | text_dx = item->details->text_dx; |
596 | label_offset = LABEL_OFFSET; | |
597 | 594 | } else { |
598 | 595 | text_width = item->details->text_width / pixels_per_unit; |
599 | 596 | text_height = item->details->text_height / pixels_per_unit; |
600 | 597 | text_height_for_layout = item->details->text_height_for_layout / pixels_per_unit; |
601 | 598 | text_height_for_entire_text = item->details->text_height_for_entire_text / pixels_per_unit; |
602 | 599 | text_dx = item->details->text_dx / pixels_per_unit; |
603 | label_offset = LABEL_OFFSET / pixels_per_unit; | |
604 | 600 | } |
605 | 601 | |
606 | 602 | if (NEMO_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas)->details->label_position == NEMO_ICON_LABEL_POSITION_BESIDE) { |
643 | 639 | text_rectangle.y1 = text_rectangle.y0 + real_text_height; |
644 | 640 | } else { |
645 | 641 | text_rectangle.x0 = (icon_rectangle.x0 + icon_rectangle.x1) / 2 - (int) text_width / 2; |
646 | text_rectangle.y0 = icon_rectangle.y1 + label_offset; | |
642 | text_rectangle.y0 = icon_rectangle.y1; | |
647 | 643 | text_rectangle.x1 = text_rectangle.x0 + text_width; |
648 | 644 | |
649 | 645 | if (usage == BOUNDS_USAGE_FOR_LAYOUT) { |
651 | 647 | } else if (usage == BOUNDS_USAGE_FOR_ENTIRE_ITEM) { |
652 | 648 | real_text_height = text_height_for_entire_text; |
653 | 649 | } else if (usage == BOUNDS_USAGE_FOR_DISPLAY) { |
654 | real_text_height = text_height; | |
650 | real_text_height = text_height + 6; /* Extra bottom highlight padding. */ | |
655 | 651 | } else { |
656 | 652 | g_assert_not_reached (); |
657 | 653 | } |
658 | 654 | |
659 | text_rectangle.y1 = text_rectangle.y0 + real_text_height + label_offset; | |
655 | text_rectangle.y1 = text_rectangle.y0 + real_text_height; | |
660 | 656 | } |
661 | 657 | |
662 | 658 | return text_rectangle; |
808 | 804 | |
809 | 805 | #define TEXT_BACK_PADDING_X 4 |
810 | 806 | #define TEXT_BACK_PADDING_Y 1 |
807 | #define TEXT_TOP_GAP 3 | |
811 | 808 | |
812 | 809 | static void |
813 | 810 | prepare_pango_layout_width (NemoIconCanvasItem *item, |
855 | 852 | |
856 | 853 | if (IS_COMPACT_VIEW (container)) { |
857 | 854 | pango_layout_set_height (layout, -1); |
858 | } else if (needs_highlight || | |
859 | details->is_prelit || | |
860 | details->is_highlighted_as_keyboard_focus || | |
855 | } else if (details->is_prelit || | |
861 | 856 | details->entire_text) { |
862 | 857 | /* VOODOO-TODO, cf. compute_text_rectangle() */ |
863 | 858 | pango_layout_set_height (layout, G_MININT); |
1116 | 1111 | gtk_style_context_set_state (context, state); |
1117 | 1112 | |
1118 | 1113 | gtk_render_layout (context, cr, |
1119 | x, text_rect.y0 + TEXT_BACK_PADDING_Y, | |
1114 | x, text_rect.y0 + TEXT_TOP_GAP, | |
1120 | 1115 | editable_layout); |
1121 | 1116 | |
1122 | 1117 | gtk_style_context_restore (context); |
1138 | 1133 | gtk_style_context_add_class (context, "dim-label"); |
1139 | 1134 | |
1140 | 1135 | gtk_render_layout (context, cr, |
1141 | x, text_rect.y0 + details->editable_text_height + LABEL_LINE_SPACING + TEXT_BACK_PADDING_Y, | |
1136 | x, text_rect.y0 + details->editable_text_height + LABEL_LINE_SPACING + TEXT_TOP_GAP, | |
1142 | 1137 | additional_layout); |
1143 | 1138 | } |
1144 | 1139 | |
2029 | 2024 | gint line_height, total_height, lines; |
2030 | 2025 | |
2031 | 2026 | container = NEMO_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas); |
2027 | ||
2028 | if (nemo_icon_container_get_zoom_level (container) == NEMO_ZOOM_LEVEL_SMALLEST) { | |
2029 | // No label/info, just a bit of padding. | |
2030 | return 0; | |
2031 | } | |
2032 | ||
2032 | 2033 | lines = nemo_icon_container_get_max_layout_lines (container); |
2033 | 2034 | lines += nemo_icon_container_get_additional_text_line_count (container); |
2035 | ||
2034 | 2036 | layout = create_label_layout (item, "-"); |
2035 | 2037 | pango_layout_get_pixel_size (layout, NULL, &line_height); |
2036 | 2038 |
999 | 999 | static void |
1000 | 1000 | redo_layout_internal (NemoIconContainer *container) |
1001 | 1001 | { |
1002 | container->details->fixed_text_height = -1; | |
1003 | ||
1002 | 1004 | if (NEMO_ICON_CONTAINER_GET_CLASS (container)->finish_adding_new_icons != NULL) { |
1003 | 1005 | NEMO_ICON_CONTAINER_GET_CLASS (container)->finish_adding_new_icons (container); |
1004 | 1006 | } |
5201 | 5203 | details->layout_timestamp = UNDEFINED_TIME; |
5202 | 5204 | details->store_layout_timestamps_when_finishing_new_icons = FALSE; |
5203 | 5205 | |
5206 | details->fixed_text_height = -1; | |
5207 | ||
5204 | 5208 | if (container->details->update_visible_icons_id > 0) { |
5205 | 5209 | g_source_remove (container->details->update_visible_icons_id); |
5206 | 5210 | container->details->update_visible_icons_id = 0; |
0 | 0 | # Meson build file |
1 | 1 | |
2 | 2 | # https://github.com/linuxmint/nemo |
3 | project('nemo', 'c', version: '4.6.2', | |
3 | project('nemo', 'c', version: '4.6.3', | |
4 | 4 | meson_version: '>=0.41.0' |
5 | 5 | ) |
6 | 6 |
705 | 705 | } |
706 | 706 | } |
707 | 707 | |
708 | #define LAYOUT_GAP 4 | |
708 | #define ICON_TEXT_GAP 4 | |
709 | #define COLUMN_GAP 4 | |
710 | #define ROW_GAP 10 | |
709 | 711 | |
710 | 712 | static void |
711 | 713 | lay_down_icons_horizontal (NemoIconContainer *container, |
727 | 729 | int i; |
728 | 730 | int num_columns; |
729 | 731 | double ppu; |
730 | int gap; | |
732 | int icon_text_gap, column_gap, row_gap; | |
731 | 733 | int device_canvas_width; |
732 | 734 | GtkAllocation allocation; |
733 | 735 | gint icon_size, text_size, use_size; |
746 | 748 | max_icon_width = max_text_width = 0.0; |
747 | 749 | |
748 | 750 | ppu = EEL_CANVAS (container)->pixels_per_unit; |
749 | gap = floor (LAYOUT_GAP / ppu); | |
751 | icon_text_gap = floor (ICON_TEXT_GAP / ppu); | |
752 | column_gap = floor (COLUMN_GAP / ppu); | |
753 | row_gap = floor (ROW_GAP / ppu); | |
750 | 754 | |
751 | 755 | device_canvas_width = floor (canvas_width * ppu); |
752 | 756 | icon_size = nemo_get_icon_size_for_zoom_level (container->details->zoom_level); |
766 | 770 | max_text_width = MAX (max_text_width, ceil (text_bounds.x1 - text_bounds.x0)); |
767 | 771 | } |
768 | 772 | |
769 | grid_width = max_icon_width + max_text_width + gap; | |
773 | grid_width = max_icon_width + max_text_width + column_gap; | |
770 | 774 | } else { |
771 | 775 | num_columns = device_canvas_width / use_size; |
772 | 776 | /* Minimum of one column */ |
775 | 779 | grid_width = (((device_canvas_width / num_columns) / ppu) - 1.0); |
776 | 780 | } |
777 | 781 | |
778 | line_width = container->details->label_position == NEMO_ICON_LABEL_POSITION_BESIDE ? gap : 0; | |
782 | line_width = container->details->label_position == NEMO_ICON_LABEL_POSITION_BESIDE ? column_gap : 0; | |
779 | 783 | line_start = icons; |
780 | y = start_y + gap; | |
784 | y = start_y + row_gap; | |
781 | 785 | i = 0; |
782 | 786 | |
783 | 787 | for (p = icons; p != NULL; p = p->next) { |
798 | 802 | /* If this icon doesn't fit, it's time to lay out the line that's queued up. */ |
799 | 803 | if (line_start != p && line_width + icon_width >= canvas_width ) { |
800 | 804 | if (container->details->label_position == NEMO_ICON_LABEL_POSITION_BESIDE) { |
801 | y += gap; | |
805 | y += row_gap; | |
802 | 806 | } else { |
803 | 807 | /* Advance to the baseline. */ |
804 | y += gap + icon_size; | |
808 | y += icon_text_gap + icon_size; | |
805 | 809 | } |
806 | 810 | |
807 | lay_down_one_line (container, line_start, p, y, icon_size, positions, FALSE, gap); | |
811 | lay_down_one_line (container, line_start, p, y, icon_size, positions, FALSE, column_gap); | |
808 | 812 | |
809 | 813 | if (container->details->label_position == NEMO_ICON_LABEL_POSITION_BESIDE) { |
810 | y += gap + icon_size; | |
814 | y += row_gap + icon_size; | |
811 | 815 | } else { |
812 | 816 | /* Advance to next line. */ |
813 | y += container->details->fixed_text_height + gap; | |
817 | y += container->details->fixed_text_height + row_gap; | |
814 | 818 | } |
815 | 819 | |
816 | line_width = container->details->label_position == NEMO_ICON_LABEL_POSITION_BESIDE ? gap : 0; | |
820 | line_width = container->details->label_position == NEMO_ICON_LABEL_POSITION_BESIDE ? column_gap : 0; | |
817 | 821 | line_start = p; |
818 | 822 | i = 0; |
819 | 823 | } |
824 | 828 | position->height = icon_bounds.y1 - icon_bounds.y0; |
825 | 829 | |
826 | 830 | if (container->details->label_position == NEMO_ICON_LABEL_POSITION_BESIDE) { |
827 | position->x_offset = max_icon_width + (2 * gap) - (icon_bounds.x1 - icon_bounds.x0); | |
831 | position->x_offset = max_icon_width + (2 * row_gap) - (icon_bounds.x1 - icon_bounds.x0); | |
828 | 832 | position->y_offset = 0; |
829 | 833 | } else { |
830 | 834 | position->x_offset = (icon_width - (icon_bounds.x1 - icon_bounds.x0)) / 2; |
838 | 842 | /* Lay down that last line of icons. */ |
839 | 843 | if (line_start != NULL) { |
840 | 844 | if (container->details->label_position == NEMO_ICON_LABEL_POSITION_BESIDE) { |
841 | y += gap; | |
845 | y += row_gap; | |
842 | 846 | } else { |
843 | 847 | /* Advance to the baseline. */ |
844 | y += gap + icon_size; | |
848 | y += icon_text_gap + icon_size; | |
845 | 849 | } |
846 | 850 | |
847 | lay_down_one_line (container, line_start, NULL, y, icon_size, positions, TRUE, gap); | |
851 | lay_down_one_line (container, line_start, NULL, y, icon_size, positions, TRUE, column_gap); | |
848 | 852 | } |
849 | 853 | |
850 | 854 | g_array_free (positions, TRUE); |
890 | 894 | } |
891 | 895 | |
892 | 896 | ppu = EEL_CANVAS (container)->pixels_per_unit; |
893 | gap = floor (LAYOUT_GAP / ppu); | |
897 | gap = floor (ICON_TEXT_GAP / ppu); | |
894 | 898 | |
895 | 899 | positions = g_array_new (FALSE, FALSE, sizeof (NemoCanvasRects)); |
896 | 900 | gtk_widget_get_allocation (GTK_WIDGET (container), &allocation); |
2038 | 2042 | static gint |
2039 | 2043 | nemo_icon_view_container_get_additional_text_line_count (NemoIconContainer *container) |
2040 | 2044 | { |
2041 | G_GNUC_UNUSED GQuark *attributes; | |
2042 | gint len; | |
2045 | GQuark *attributes; | |
2046 | gint len, i, real_count; | |
2043 | 2047 | |
2044 | 2048 | attributes = nemo_icon_view_container_get_icon_text_attribute_names (container, &len); |
2045 | 2049 | |
2046 | return len; | |
2050 | i = 0; | |
2051 | real_count = 0; | |
2052 | ||
2053 | for (i = 0; i < len; ++i) { | |
2054 | if (attributes[i] == attribute_none_q) { | |
2055 | continue; | |
2056 | } | |
2057 | ||
2058 | real_count++; | |
2059 | } | |
2060 | ||
2061 | return real_count; | |
2047 | 2062 | } |
2048 | 2063 | |
2049 | 2064 | static void |