Skip to content

Commit 6407bf6

Browse files
committed
GTK / QT: refactor directory structures
1 parent e2d145c commit 6407bf6

File tree

11 files changed

+24
-36
lines changed

11 files changed

+24
-36
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ if(LINUX)
333333
src/detection/displayserver/linux/xlib.c
334334
src/detection/font/font_linux.c
335335
src/detection/gpu/gpu_linux.c
336-
src/detection/gtk.c
336+
src/detection/gtk_qt/gtk.c
337337
src/detection/host/host_linux.c
338338
src/detection/localip/localip_linux.c
339339
src/detection/gamepad/gamepad_linux.c
@@ -344,7 +344,7 @@ if(LINUX)
344344
src/detection/packages/packages_linux.c
345345
src/detection/poweradapter/poweradapter_nosupport.c
346346
src/detection/processes/processes_linux.c
347-
src/detection/qt.c
347+
src/detection/gtk_qt/qt.c
348348
src/detection/sound/sound_linux.c
349349
src/detection/swap/swap_linux.c
350350
src/detection/temps/temps_linux.c
@@ -419,7 +419,7 @@ elseif(BSD)
419419
src/detection/displayserver/linux/xlib.c
420420
src/detection/font/font_linux.c
421421
src/detection/gpu/gpu_linux.c
422-
src/detection/gtk.c
422+
src/detection/gtk_qt/gtk.c
423423
src/detection/host/host_bsd.c
424424
src/detection/localip/localip_linux.c
425425
src/detection/gamepad/gamepad_nosupport.c
@@ -430,7 +430,7 @@ elseif(BSD)
430430
src/detection/packages/packages_linux.c
431431
src/detection/poweradapter/poweradapter_nosupport.c
432432
src/detection/processes/processes_bsd.c
433-
src/detection/qt.c
433+
src/detection/gtk_qt/qt.c
434434
src/detection/sound/sound_linux.c
435435
src/detection/swap/swap_bsd.c
436436
src/detection/temps/temps_linux.c

src/common/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#include "fastfetch.h"
22
#include "common/parsing.h"
33
#include "common/thread.h"
4-
#include "detection/qt.h"
5-
#include "detection/gtk.h"
64
#include "detection/displayserver/displayserver.h"
75
#include "util/textModifier.h"
86

@@ -220,6 +218,8 @@ FF_THREAD_ENTRY_DECL_WRAPPER(ffConnectDisplayServer, FFinstance*)
220218

221219
#if !(defined(__APPLE__) || defined(_WIN32))
222220

221+
#include "detection/gtk_qt/gtk_qt.h"
222+
223223
#define FF_DETECT_QT_GTK 1
224224

225225
FF_THREAD_ENTRY_DECL_WRAPPER(ffDetectQt, FFinstance*)

src/detection/cursor/cursor_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "common/properties.h"
44
#include "common/parsing.h"
55
#include "common/settings.h"
6-
#include "detection/gtk.h"
6+
#include "detection/gtk_qt/gtk_qt.h"
77
#include "detection/displayserver/displayserver.h"
88
#include "util/stringUtils.h"
99

src/detection/font/font_linux.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#include "detection/qt.h"
2-
#include "detection/gtk.h"
31
#include "common/font.h"
2+
#include "detection/gtk_qt/gtk_qt.h"
43
#include "font.h"
54

65
void ffDetectFontImpl(const FFinstance* instance, FFFontResult* result)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "fastfetch.h"
2-
#include "detection/gtk.h"
2+
#include "detection/gtk_qt/gtk_qt.h"
33
#include "common/properties.h"
44
#include "common/thread.h"
55
#include "common/settings.h"
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

3-
#ifndef FF_INCLUDED_detection_gtk
4-
#define FF_INCLUDED_detection_gtk
3+
#ifndef FF_INCLUDED_detection_gtkqt_gtkqt
4+
#define FF_INCLUDED_detection_gtkqt_gtkqt
55

66
#include "fastfetch.h"
77

@@ -14,8 +14,17 @@ typedef struct FFGTKResult
1414
FFstrbuf cursorSize;
1515
} FFGTKResult;
1616

17+
typedef struct FFQtResult
18+
{
19+
FFstrbuf widgetStyle;
20+
FFstrbuf colorScheme;
21+
FFstrbuf icons;
22+
FFstrbuf font;
23+
} FFQtResult;
24+
1725
const FFGTKResult* ffDetectGTK2(const FFinstance* instance);
1826
const FFGTKResult* ffDetectGTK4(const FFinstance* instance);
1927
const FFGTKResult* ffDetectGTK3(const FFinstance* instance);
28+
const FFQtResult* ffDetectQt(const FFinstance* instance);
2029

2130
#endif
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "fastfetch.h"
2-
#include "detection/qt.h"
32
#include "common/properties.h"
43
#include "common/thread.h"
4+
#include "detection/gtk_qt/gtk_qt.h"
55
#include "detection/displayserver/displayserver.h"
66

77
#include <stdlib.h>

src/detection/qt.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/detection/wmtheme/wmtheme_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "common/properties.h"
33
#include "common/parsing.h"
44
#include "common/settings.h"
5-
#include "detection/gtk.h"
5+
#include "detection/gtk_qt/gtk_qt.h"
66
#include "detection/displayserver/displayserver.h"
77
#include "util/stringUtils.h"
88

src/modules/icons.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#include "fastfetch.h"
22
#include "common/printing.h"
33
#include "common/parsing.h"
4-
#include "detection/qt.h"
5-
#include "detection/gtk.h"
4+
#include "detection/gtk_qt/gtk_qt.h"
65
#include "detection/displayserver/displayserver.h"
76

87
#define FF_ICONS_MODULE_NAME "Icons"

0 commit comments

Comments
 (0)