Compare commits
	
		
			No commits in common. "fa034a1a6a5bdc78ae2ea4575635dd8f81330033" and "817f1b6000fdbb1b813b1d290eaeeae4965ae464" have entirely different histories.
		
	
	
		
			fa034a1a6a
			...
			817f1b6000
		
	
		
| @ -50,9 +50,9 @@ ExifTool, resvg (unstable API, needs to be requested explicitly) | |||||||
|  $ meson compile |  $ meson compile | ||||||
| 
 | 
 | ||||||
| Considering the vast amount of dynamically-linked dependencies, do not attempt | Considering the vast amount of dynamically-linked dependencies, do not attempt | ||||||
| direct installations via `ninja install`.  To test the program: | direct installations.  To test the program, help it find its custom thumbnailer: | ||||||
| 
 | 
 | ||||||
|  $ meson devenv fiv |  $ PATH=$(pwd):$PATH ./fiv | ||||||
| 
 | 
 | ||||||
| The lossless JPEG cropper is intended to be invoked from a context menu. | The lossless JPEG cropper is intended to be invoked from a context menu. | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -94,15 +94,6 @@ rm -rf ~/.cache/thumbnails/wide-* | |||||||
| 
 | 
 | ||||||
| <h2>Configuration</h2> | <h2>Configuration</h2> | ||||||
| 
 | 
 | ||||||
| <p>The few configuration options <i>fiv</i> has can be adjusted using |  | ||||||
| <i>dconf-editor</i> or <i>gsettings</i>. |  | ||||||
| 
 |  | ||||||
| <pre> |  | ||||||
| gsettings list-recursively name.janouch.fiv |  | ||||||
| </pre> |  | ||||||
| 
 |  | ||||||
| <h3>Theming</h3> |  | ||||||
| 
 |  | ||||||
| <p>The standard means to adjust the looks of the program is through GTK+ 3 CSS. | <p>The standard means to adjust the looks of the program is through GTK+ 3 CSS. | ||||||
| As an example, to tightly pack browser items, put the following in your | As an example, to tightly pack browser items, put the following in your | ||||||
| <i>~/.config/gtk-3.0/gtk.css</i>: | <i>~/.config/gtk-3.0/gtk.css</i>: | ||||||
|  | |||||||
| @ -1220,7 +1220,6 @@ fiv_browser_scroll_event(GtkWidget *widget, GdkEventScroll *event) | |||||||
| 	case GDK_SCROLL_SMOOTH: | 	case GDK_SCROLL_SMOOTH: | ||||||
| 		// On GDK/Wayland, the mouse wheel will typically create 1.5 deltas,
 | 		// On GDK/Wayland, the mouse wheel will typically create 1.5 deltas,
 | ||||||
| 		// after dividing a 15 degree click angle from libinput by 10.
 | 		// after dividing a 15 degree click angle from libinput by 10.
 | ||||||
| 		// (Noticed on Arch + Sway, cannot reproduce on Ubuntu 22.04.)
 |  | ||||||
| 		// On X11, as libinput(4) indicates, the delta will always be 1.0.
 | 		// On X11, as libinput(4) indicates, the delta will always be 1.0.
 | ||||||
| 		if ((delta += event->delta_y) <= -1) | 		if ((delta += event->delta_y) <= -1) | ||||||
| 			set_item_size(self, self->item_size + 1); | 			set_item_size(self, self->item_size + 1); | ||||||
|  | |||||||
| @ -1,4 +0,0 @@ | |||||||
| #!/bin/sh -e |  | ||||||
| sed -i "s|^MimeType=.*|MimeType=$( |  | ||||||
| 	"${DESTDIR:+$DESTDIR/}"'@EXE@' --list-supported-media-types | tr '\n' ';' |  | ||||||
| )|" "${DESTDIR:+$DESTDIR/}"'@DESKTOP@' |  | ||||||
| @ -547,9 +547,7 @@ fiv_view_realize(GtkWidget *widget) | |||||||
| 	//
 | 	//
 | ||||||
| 	// If GTK+'s OpenGL integration fails to deliver, we need to use the window
 | 	// If GTK+'s OpenGL integration fails to deliver, we need to use the window
 | ||||||
| 	// directly, sidestepping the toolkit entirely.
 | 	// directly, sidestepping the toolkit entirely.
 | ||||||
| 	GSettings *settings = g_settings_new(PROJECT_NS PROJECT_NAME); | 	if (GDK_IS_X11_WINDOW(window)) | ||||||
| 	if (GDK_IS_X11_WINDOW(window) && |  | ||||||
| 		g_settings_get_boolean(settings, "native-view-window")) |  | ||||||
| 		gdk_window_ensure_native(window); | 		gdk_window_ensure_native(window); | ||||||
| #endif  // GDK_WINDOWING_X11
 | #endif  // GDK_WINDOWING_X11
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,14 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="utf-8"?> |  | ||||||
| <schemalist> |  | ||||||
| 	<schema path="/name/janouch/fiv/" id="name.janouch.fiv"> |  | ||||||
| 		<key name='native-view-window' type='b'> |  | ||||||
| 			<default>true</default> |  | ||||||
| 			<summary>Use a native window for the view</summary> |  | ||||||
| 			<description> |  | ||||||
| 				On X11, using native GdkWindows enables use of 30-bit Visuals |  | ||||||
| 				(that is, 10 bits per channel), at the cost of disabling |  | ||||||
| 				double buffering. |  | ||||||
| 			</description> |  | ||||||
| 		</key> |  | ||||||
| 	</schema> |  | ||||||
| </schemalist> |  | ||||||
							
								
								
									
										56
									
								
								meson.build
									
									
									
									
									
								
							
							
						
						
									
										56
									
								
								meson.build
									
									
									
									
									
								
							| @ -70,12 +70,10 @@ endif | |||||||
| 
 | 
 | ||||||
| # XXX: https://github.com/mesonbuild/meson/issues/825 | # XXX: https://github.com/mesonbuild/meson/issues/825 | ||||||
| docdir = get_option('datadir') / 'doc' / meson.project_name() | docdir = get_option('datadir') / 'doc' / meson.project_name() | ||||||
| application_ns = 'name.janouch.' |  | ||||||
| 
 | 
 | ||||||
| conf = configuration_data() | conf = configuration_data() | ||||||
| conf.set_quoted('PROJECT_NAME', meson.project_name()) | conf.set_quoted('PROJECT_NAME', meson.project_name()) | ||||||
| conf.set_quoted('PROJECT_VERSION', meson.project_version()) | conf.set_quoted('PROJECT_VERSION', meson.project_version()) | ||||||
| conf.set_quoted('PROJECT_NS', application_ns) |  | ||||||
| conf.set_quoted('PROJECT_DOCDIR', get_option('prefix') / docdir) | conf.set_quoted('PROJECT_DOCDIR', get_option('prefix') / docdir) | ||||||
| conf.set('HAVE_JPEG_QS', libjpegqs.found()) | conf.set('HAVE_JPEG_QS', libjpegqs.found()) | ||||||
| conf.set('HAVE_LCMS2', lcms2.found()) | conf.set('HAVE_LCMS2', lcms2.found()) | ||||||
| @ -105,7 +103,6 @@ tiff_tables = custom_target('tiff-tables.h', | |||||||
| 	capture : true, | 	capture : true, | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| desktops = ['fiv.desktop', 'fiv-browse.desktop'] |  | ||||||
| exe = executable('fiv', 'fiv.c', 'fiv-view.c', 'fiv-io.c', 'fiv-context-menu.c', | exe = executable('fiv', 'fiv.c', 'fiv-view.c', 'fiv-io.c', 'fiv-context-menu.c', | ||||||
| 	'fiv-browser.c', 'fiv-sidebar.c', 'fiv-thumbnail.c', 'xdg.c', resources, | 	'fiv-browser.c', 'fiv-sidebar.c', 'fiv-thumbnail.c', 'xdg.c', resources, | ||||||
| 	install : true, | 	install : true, | ||||||
| @ -116,13 +113,14 @@ if gdkpixbuf.found() | |||||||
| 		dependencies : [dependencies, gdkpixbuf]) | 		dependencies : [dependencies, gdkpixbuf]) | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| desktops += 'fiv-jpegcrop.desktop' |  | ||||||
| jpegcrop = executable('fiv-jpegcrop', 'fiv-jpegcrop.c', | jpegcrop = executable('fiv-jpegcrop', 'fiv-jpegcrop.c', | ||||||
| 	install : true, | 	install : true, | ||||||
| 	dependencies : [ | 	dependencies : [ | ||||||
| 		dependency('gtk+-3.0'), | 		dependency('gtk+-3.0'), | ||||||
| 		dependency('libturbojpeg'), | 		dependency('libturbojpeg'), | ||||||
| 	]) | 	]) | ||||||
|  | install_data('fiv-jpegcrop.desktop', | ||||||
|  | 	install_dir : get_option('datadir') / 'applications') | ||||||
| 
 | 
 | ||||||
| if get_option('tools').enabled() | if get_option('tools').enabled() | ||||||
| 	# libjq 1.6 lacks a pkg-config file, and there is no release in sight. | 	# libjq 1.6 lacks a pkg-config file, and there is no release in sight. | ||||||
| @ -137,40 +135,26 @@ if get_option('tools').enabled() | |||||||
| 	endforeach | 	endforeach | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| gsettings_schemas = ['fiv.gschema.xml'] | # XXX: With gdk-pixbuf, this even depends on currently installed modules. | ||||||
| install_data(gsettings_schemas, | if meson.is_cross_build() | ||||||
| 	rename : [application_ns + gsettings_schemas[0]], | 	install_data('fiv.desktop', | ||||||
| 	install_dir : get_option('datadir') / 'glib-2.0' / 'schemas') | 		install_dir : get_option('datadir') / 'applications') | ||||||
| 
 | else | ||||||
| # For the purposes of development: make the program find its GSettings schemas. | 	# XXX: The exe path may not contain spaces--quoting is a bitch in Meson. | ||||||
| gnome.compile_schemas(depend_files : files(gsettings_schemas)) | 	desktop = custom_target('desktop', | ||||||
| 
 | 		output : 'fiv.desktop', | ||||||
| if host_machine.system() != 'windows' | 		input : 'fiv.desktop', | ||||||
| 	foreach desktop : desktops | 		command : ['sh', '-c', '''awk '/^MimeType=/ { $0 = "MimeType="; | ||||||
| 		install_data(desktop, | 			while (((exe " --list-supported-media-types") | getline type) > 0) | ||||||
| 			rename : application_ns + desktop, | 				$0 = $0 type ";" } 1' "exe=$1" "$2"''', 'sh', exe, '@INPUT@'], | ||||||
| 			install_dir : get_option('datadir') / 'applications') | 		capture : true, | ||||||
| 	endforeach | 		install : true, | ||||||
| 
 | 		install_dir : get_option('datadir') / 'applications', | ||||||
| 	# With gdk-pixbuf, fiv.desktop depends on currently installed modules; | 	) | ||||||
| 	# the package manager needs to be told to run this script as necessary. |  | ||||||
| 	dynamic_desktops = gdkpixbuf.found() |  | ||||||
| 
 |  | ||||||
| 	updater = configure_file( |  | ||||||
| 		input : 'fiv-update-desktop-files.in', |  | ||||||
| 		output : 'fiv-update-desktop-files', |  | ||||||
| 		configuration : { |  | ||||||
| 			'EXE' : get_option('prefix') / get_option('bindir') / exe.name(), |  | ||||||
| 			'DESKTOP' : get_option('prefix') / get_option('datadir') \ |  | ||||||
| 				/ 'applications' / application_ns + 'fiv.desktop', |  | ||||||
| 		}, |  | ||||||
| 		install : dynamic_desktops, |  | ||||||
| 		install_dir : get_option('bindir')) |  | ||||||
| 	if not meson.is_cross_build() |  | ||||||
| 		meson.add_install_script(updater, skip_if_destdir : dynamic_desktops) |  | ||||||
| 	endif |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
|  | install_data('fiv-browse.desktop', | ||||||
|  | 	install_dir : get_option('datadir') / 'applications') | ||||||
| install_data('fiv.svg', | install_data('fiv.svg', | ||||||
| 	install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps') | 	install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps') | ||||||
| install_subdir('docs', install_dir : docdir, strip_directory : true) | install_subdir('docs', install_dir : docdir, strip_directory : true) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user