Skip to content

Commit

Permalink
LinGUI: Preparation for GTK4 port
Browse files Browse the repository at this point in the history
- Remove --enable-gtk4 option from build system
- Remove files which are no longer needed
  • Loading branch information
robxnano authored and galad87 committed Jan 26, 2024
1 parent c80c488 commit a5f82aa
Show file tree
Hide file tree
Showing 58 changed files with 9 additions and 10,711 deletions.
10 changes: 2 additions & 8 deletions gtk/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ project('handbrake-gtk', 'c', 'cpp',

# Minimum versions for dependencies
glib_min = '>= 2.56'
gtk4_min = '>= 4.4'
gtk3_min = '>= 3.22'
gtk_min = '>= 3.22'
gst_min = '>= 1.10'

cc = meson.get_compiler('c')
Expand Down Expand Up @@ -40,6 +39,7 @@ ghb_deps = [
dependency('gio-2.0', version: glib_min),
dependency('gthread-2.0', version: glib_min),
dependency('gmodule-2.0', version: glib_min),
dependency('gtk+-3.0', version: gtk_min),
dependency('jansson'),
dependency('libass'),
dependency('libavcodec'),
Expand Down Expand Up @@ -67,12 +67,6 @@ ghb_deps = [
dependency('zlib'),
]

if get_option('gtk4')
ghb_deps += dependency('gtk4', version: gtk4_min)
else
ghb_deps += dependency('gtk+-3.0', version: gtk3_min)
endif

if get_option('gstreamer').enabled()
gst = dependency('gstreamer-1.0', version: gst_min, required: false)
gst_audio = dependency('gstreamer-audio-1.0', required: false)
Expand Down
5 changes: 0 additions & 5 deletions gtk/meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ option('gstreamer',
value: 'disabled',
description: 'Disable gstreamer (live preview)')

option('gtk4',
type: 'boolean',
value: false,
description: 'Enable building with GTK4')

option('hb-dir',
type: 'string',
value: '',
Expand Down
6 changes: 0 additions & 6 deletions gtk/module.defs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ else
GTK.CONFIGURE.extra += -Dflatpak=false
endif

ifeq (1,$(FEATURE.gtk4))
GTK.CONFIGURE.extra += -Dgtk4=true
else
GTK.CONFIGURE.extra += -Dgtk4=false
endif

ifneq (,$(filter $(HOST.system),freebsd netbsd openbsd))
GTK.CONFIGURE.extra += -Dextra-libdirs=$(LOCALBASE)/lib
endif
Expand Down
9 changes: 5 additions & 4 deletions gtk/po/POTFILES.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# List of source files containing translatable strings.

# UI files
src/ui-gtk3/menu.ui
src/ui-gtk3/ghb.ui
src/ui-gtk3/ghb-file-button.ui
src/ui-gtk3/ghb-queue-row.ui
src/ui/menu.ui
src/ui/ghb.ui
src/ui/ghb-chapter-row.ui
src/ui/ghb-file-button.ui
src/ui/ghb-queue-row.ui

# Source code
src/audiohandler.c
Expand Down
15 changes: 2 additions & 13 deletions gtk/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ ghb_src = files(
'videohandler.c',
)

ui_dir = get_option('gtk4') ? 'ui-gtk4' : 'ui-gtk3'

ui_files = files(
ui_dir / 'menu.ui',
ui_dir / 'ghb.ui',
ui_dir / 'ghb-chapter-row.ui',
ui_dir / 'ghb-file-button.ui',
ui_dir / 'ghb-queue-row.ui',
)

config_h = configuration_data()
config_h.set('GHB_FLATPAK', get_option('flatpak'),
description: 'Define if building HandBrake for Flatpak.')
Expand All @@ -56,9 +46,8 @@ configure_file(configuration: config_h, output: 'config.h')

# Generated files

ui = gnome.compile_resources('ui_res', 'ui_res.gresource.xml',
dependencies: ui_files,
source_dir: ui_dir,
ui = gnome.compile_resources('ui_res', 'ui/ui_res.gresource.xml',
source_dir: 'ui',
c_name: 'ghb_ui')

# Build targets
Expand Down
Loading

0 comments on commit a5f82aa

Please sign in to comment.