Skip to content

Commit

Permalink
Add missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
btrkeks committed Aug 8, 2024
1 parent 645b2fd commit 8864c83
Show file tree
Hide file tree
Showing 6 changed files with 443 additions and 0 deletions.
35 changes: 35 additions & 0 deletions cmake/FindLMDB.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
MESSAGE(STATUS "Looking for liblmdb")

FIND_PATH(LMDB_INCLUDE_DIR
NAMES lmdb.h
PATH_SUFFIXES include/ include/lmdb/
PATHS "${PROJECT_SOURCE_DIR}"
${LMDB_ROOT}
$ENV{LMDB_ROOT}
/usr/local/
/usr/
)

if(STATIC)
if(MINGW)
find_library(LMDB_LIBRARY liblmdb.dll.a)
else()
find_library(LMDB_LIBRARY liblmdb.a)
endif()
else()
find_library(LMDB_LIBRARY lmdb)
endif()


if(LMDB_INCLUDE_DIR AND LMDB_LIBRARY)
set(LMDB_FOUND TRUE)
if(NOT TARGET LMDB::LMDB)
add_library(LMDB::LMDB INTERFACE IMPORTED)
set_target_properties(LMDB::LMDB PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LMDB_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${LMDB_LIBRARY}"
)
endif()
else()
message(FATAL_ERROR "LMDB not found. Please install LMDB or specify its location.")
endif()
37 changes: 37 additions & 0 deletions cmake/FindMECAB.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
find_path(MECAB_INCLUDE_DIR
NAMES mecab.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
$ENV{MECAB_DIR}/include
)

find_library(MECAB_LIBRARY
NAMES mecab
PATHS
/usr/lib
/usr/local/lib
/opt/local/lib
$ENV{MECAB_DIR}/lib
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MECAB
REQUIRED_VARS MECAB_LIBRARY MECAB_INCLUDE_DIR
)

if(MECAB_FOUND)
set(MECAB_LIBRARIES ${MECAB_LIBRARY})
set(MECAB_INCLUDE_DIRS ${MECAB_INCLUDE_DIR})

if(NOT TARGET MECAB::MECAB)
add_library(MECAB::MECAB UNKNOWN IMPORTED)
set_target_properties(MECAB::MECAB PROPERTIES
IMPORTED_LOCATION "${MECAB_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${MECAB_INCLUDE_DIR}"
)
endif()
endif()

mark_as_advanced(MECAB_INCLUDE_DIR MECAB_LIBRARY)
28 changes: 28 additions & 0 deletions src/frontends/gtk3popup/dp-preferences-window.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@




struct _KgxPreferencesWindow {
AdwPreferencesDialog parent_instance;

DpSettings *settings;
GBindingGroup *settings_binds;

GtkWidget *audible_bell;
GtkWidget *visual_bell;
GtkWidget *use_system_font;
GtkWidget *custom_font;
};

G_DEFINE_TYPE (DpPreferencesWindow, dp_preferences_window, ADW_TYPE_PREFERENCES_DIALOG)


static void
dp_preferences_window_dispose (GObject *object)
{
DpPreferencesWindow *self = KGX_PREFERENCES_WINDOW (object);

g_clear_object (&self->settings);

G_OBJECT_CLASS (kgx_preferences_window_parent_class)->dispose (object);
}
Empty file.
Loading

0 comments on commit 8864c83

Please sign in to comment.