Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f95b6b274 | |||
| 44ef968105 | |||
| 79d87ca7b3 | |||
| eafff31a99 | |||
| 8c9488cfef | |||
| c8af2ce2d0 | |||
| 263591704d | |||
| f620287051 | |||
| c8c147901e | |||
| a566b78721 | |||
| 05ca273c38 | |||
| 3db57eb3fc | |||
| 5a2fe1756c | |||
| 9106ecc1ae | |||
| 17678d789a | |||
| 7a9d850363 | |||
| 20f5b01327 |
13
README.md
13
README.md
@ -4,7 +4,7 @@ Kaomoji picker. Browse a library of Japanese emoticons, click to copy, add your
|
||||

|
||||
|
||||
## Install
|
||||
1. Download .flatpak file from Releases: https://gitea.angeltech.jp/Angel-Technologies/MoeMoji/releases/tag/konater
|
||||
1. Download .flatpak file from Releases: https://gitea.angeltech.jp/Angel-Technologies/MoeMoji/releases/
|
||||
2. Install with `flatpak install ./moemoji.flatpak`
|
||||
|
||||
## Global shortcut
|
||||
@ -53,3 +53,14 @@ Run dev build: `GSETTINGS_SCHEMA_DIR=./builddir/data ./builddir/src/moemoji`
|
||||
|
||||
`flatpak-builder --force-clean --user --install .flatpak-build jp.angeltech.MoeMoji.json`
|
||||
`flatpak run jp.angeltech.MoeMoji`
|
||||
|
||||
# Creating a distributable package
|
||||
|
||||
`flatpak-builder build/ jp.angeltech.MoeMoji.json`
|
||||
`flatpak build-export export build`
|
||||
`flatpak build-bundle export moemoji.flatpak jp.angeltech.MoeMoji.json`
|
||||
|
||||
## Local manifest
|
||||
|
||||
If you want to test local changes to the source code, you should build with `dev.jp.angeltech.MoeMoji.json` manifest instead, as main manifest pulls a tarball from the remote source.
|
||||
|
||||
|
||||
BIN
data/icons/hicolor/128x128/apps/jp.angeltech.MoeMoji.png
Normal file
BIN
data/icons/hicolor/128x128/apps/jp.angeltech.MoeMoji.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
BIN
data/icons/hicolor/256x256/apps/jp.angeltech.MoeMoji.png
Normal file
BIN
data/icons/hicolor/256x256/apps/jp.angeltech.MoeMoji.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
BIN
data/icons/hicolor/48x48/apps/jp.angeltech.MoeMoji.png
Normal file
BIN
data/icons/hicolor/48x48/apps/jp.angeltech.MoeMoji.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.5 KiB |
BIN
data/icons/hicolor/64x64/apps/jp.angeltech.MoeMoji.png
Normal file
BIN
data/icons/hicolor/64x64/apps/jp.angeltech.MoeMoji.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
BIN
data/icons/hicolor/scalable/apps/jp.angeltech.MoeMoji.png
Normal file
BIN
data/icons/hicolor/scalable/apps/jp.angeltech.MoeMoji.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="83px" height="83px" viewBox="0 0 83 83" version="1.1">
|
||||
<g id="surface1" transform="translate(0,25.5)">
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 60.59375 18.59375 C 57.492188 18.070312 54.054688 14.488281 52.515625 10.171875 C 51.640625 7.714844 51.308594 4.003906 51.828125 2.492188 C 52.292969 1.15625 53.476562 0.71875 53.992188 1.695312 C 54.074219 1.84375 54.1875 2.914062 54.246094 4.066406 C 54.445312 8 55.3125 10.605469 57.1875 12.925781 C 60.078125 16.496094 63.039062 16.558594 65.648438 13.105469 C 67.75 10.328125 68.503906 7.429688 68.171875 3.375 C 68.089844 2.332031 68.0625 1.3125 68.113281 1.105469 C 68.164062 0.898438 68.378906 0.554688 68.59375 0.339844 C 68.921875 0.0078125 69.050781 -0.0390625 69.441406 0.0234375 C 69.695312 0.0664062 70.023438 0.207031 70.164062 0.332031 C 71.117188 1.183594 71.554688 4.667969 71.097656 7.726562 C 70.832031 9.507812 70.578125 10.394531 69.933594 11.789062 C 68.1875 15.578125 65.566406 18.050781 62.773438 18.554688 C 61.675781 18.75 61.554688 18.753906 60.59375 18.59375 Z M 60.59375 18.59375 "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 21.109375 19.128906 C 19.484375 18.882812 18.238281 18.300781 16.761719 17.101562 C 14.632812 15.375 12.847656 11.914062 12.398438 8.652344 C 12.117188 6.625 12.355469 3.445312 12.929688 1.511719 C 13.199219 0.605469 14.046875 0.222656 14.585938 0.761719 C 14.890625 1.070312 14.914062 1.65625 14.695312 3.128906 C 14.375 5.230469 14.984375 8.875 15.984375 10.878906 C 17.722656 14.367188 20.324219 16.226562 22.78125 15.742188 C 24.078125 15.484375 24.875 15.015625 26.082031 13.792969 C 26.957031 12.90625 27.285156 12.457031 27.710938 11.574219 C 28.722656 9.476562 29.195312 7.75 29.558594 4.820312 C 29.761719 3.183594 30.425781 2.359375 31.398438 2.546875 C 31.828125 2.628906 32.460938 3.296875 32.652344 3.875 C 33.320312 5.902344 31.867188 11.515625 29.902344 14.496094 C 28.652344 16.386719 26.777344 17.949219 24.894531 18.664062 C 24.171875 18.9375 22.351562 19.289062 21.90625 19.242188 C 21.820312 19.234375 21.464844 19.183594 21.109375 19.128906 Z M 21.109375 19.128906 "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 37.5 25.976562 C 35.785156 25.4375 34.304688 23.425781 33.828125 20.988281 C 33.742188 20.539062 33.695312 19.609375 33.722656 18.882812 C 33.769531 17.726562 33.8125 17.539062 34.085938 17.246094 C 34.589844 16.703125 35.246094 16.859375 35.496094 17.582031 C 35.574219 17.808594 35.640625 18.328125 35.640625 18.730469 C 35.640625 20.203125 36.375 22.082031 37.320312 23.039062 C 38.269531 23.992188 38.84375 23.84375 39.617188 22.4375 C 39.847656 22.015625 40.242188 21.480469 40.484375 21.246094 C 40.871094 20.878906 41.023438 20.824219 41.609375 20.824219 L 42.285156 20.824219 L 43.277344 21.863281 C 43.890625 22.507812 44.371094 22.90625 44.535156 22.90625 C 44.929688 22.90625 45.695312 22.066406 46.113281 21.167969 C 46.488281 20.371094 46.632812 19.789062 46.867188 18.171875 C 47.019531 17.097656 47.242188 16.726562 47.839844 16.527344 C 48.414062 16.335938 48.878906 16.539062 49.296875 17.160156 C 49.675781 17.726562 49.6875 18.777344 49.339844 20.25 C 48.90625 22.070312 48.246094 23.320312 47.121094 24.449219 C 46.257812 25.3125 45.683594 25.570312 44.617188 25.570312 C 43.578125 25.570312 42.957031 25.300781 42.234375 24.546875 C 41.992188 24.289062 41.730469 24.082031 41.652344 24.082031 C 41.578125 24.085938 41.363281 24.3125 41.175781 24.589844 C 40.289062 25.882812 38.882812 26.414062 37.5 25.976562 Z M 37.5 25.976562 "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,38.039216%,52.941179%);fill-opacity:1;" d="M 71.503906 31.695312 C 69.191406 31.105469 67.3125 29.238281 66.457031 26.679688 C 66.144531 25.746094 66.085938 25.363281 66.082031 24.210938 C 66.074219 21.390625 67.128906 19.191406 69.300781 17.488281 C 70.269531 16.726562 71.15625 16.277344 72.851562 15.679688 C 75.933594 14.59375 78.132812 15.03125 80.371094 17.171875 C 81.609375 18.351562 82.273438 19.402344 82.746094 20.921875 C 83.050781 21.902344 83.074219 22.136719 83.015625 23.589844 C 82.945312 25.414062 82.722656 26.1875 81.859375 27.660156 C 80.738281 29.574219 78.976562 30.90625 76.785156 31.503906 C 75.417969 31.875 72.609375 31.980469 71.503906 31.695312 Z M 71.503906 31.695312 "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,38.039216%,52.941179%);fill-opacity:1;" d="M 5.992188 31.839844 C 2.863281 31.117188 0.972656 29.347656 0.242188 26.476562 C -0.0585938 25.292969 -0.078125 24.339844 0.175781 23.144531 C 0.859375 19.882812 2.957031 17.40625 5.855469 16.429688 C 6.820312 16.105469 7.0625 16.078125 9.09375 16.074219 C 11.550781 16.066406 11.707031 16.109375 12.730469 17.054688 C 13.027344 17.324219 13.519531 17.675781 13.828125 17.835938 C 14.667969 18.265625 16.15625 19.835938 16.632812 20.789062 C 18.109375 23.734375 17.503906 26.886719 14.984375 29.429688 C 13.183594 31.242188 11.554688 31.890625 8.578125 31.96875 C 7.339844 32.003906 6.523438 31.960938 5.992188 31.839844 Z M 5.992188 31.839844 "/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.1 KiB |
@ -1,10 +1,14 @@
|
||||
application_id = 'jp.angeltech.MoeMoji'
|
||||
|
||||
scalable_dir = join_paths('hicolor', 'scalable', 'apps')
|
||||
install_data(
|
||||
join_paths(scalable_dir, ('@0@.svg').format(application_id)),
|
||||
install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir)
|
||||
)
|
||||
|
||||
foreach size : ['48x48', '64x64', '128x128', '256x256']
|
||||
size_dir = join_paths('hicolor', size, 'apps')
|
||||
install_data(
|
||||
join_paths(size_dir, ('@0@.png').format(application_id)),
|
||||
install_dir: join_paths(get_option('datadir'), 'icons', size_dir)
|
||||
)
|
||||
endforeach
|
||||
|
||||
symbolic_dir = join_paths('hicolor', 'symbolic', 'apps')
|
||||
install_data(
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
<content_rating type="oars-1.1" />
|
||||
|
||||
<branding>
|
||||
<color type="primary" scheme_preference="light">#64819c</color>
|
||||
<color type="primary" scheme_preference="dark">#34526e</color>
|
||||
<color type="primary" scheme_preference="light">#a1bedd</color>
|
||||
<color type="primary" scheme_preference="dark">#363e4f</color>
|
||||
</branding>
|
||||
|
||||
<screenshots>
|
||||
@ -35,7 +35,7 @@
|
||||
</screenshots>
|
||||
|
||||
<releases>
|
||||
<release version="0.1.0" date="2026-02-28">
|
||||
<release version="0.1.0" date="2026-03-01">
|
||||
<description>
|
||||
<p>Initial release.</p>
|
||||
</description>
|
||||
|
||||
25
dev.jp.angeltech.MoeMoji.json
Normal file
25
dev.jp.angeltech.MoeMoji.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"app-id": "jp.angeltech.MoeMoji",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "49",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"command": "moemoji",
|
||||
"finish-args": [
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.kde.StatusNotifierWatcher"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"name": "moemoji",
|
||||
"buildsystem": "meson",
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -16,8 +16,9 @@
|
||||
"buildsystem": "meson",
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "."
|
||||
"type": "archive",
|
||||
"url": "https://gitea.angeltech.jp/Angel-Technologies/MoeMoji/archive/v0.1.5.tar.gz",
|
||||
"sha256": "76e1821051b45625a380f9b079c1be83531fa5d509e8eee5b3f41fa98dc57233"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ static void register_with_portal (void) {
|
||||
GDBusConnection *bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
|
||||
if (bus == NULL) {
|
||||
g_warning ("portal register: can't get session bus: %s", error->message);
|
||||
g_error_free (error);
|
||||
g_clear_error (&error);
|
||||
return;
|
||||
}
|
||||
GVariantBuilder options;
|
||||
@ -28,7 +28,7 @@ static void register_with_portal (void) {
|
||||
-1, NULL, &error);
|
||||
if (result == NULL) {
|
||||
g_info ("portal register: %s", error->message);
|
||||
g_error_free (error);
|
||||
g_clear_error (&error);
|
||||
} else {
|
||||
g_variant_unref (result);
|
||||
}
|
||||
|
||||
@ -94,9 +94,12 @@ static void toggle_window(MoeMojiApplication *self) {
|
||||
}
|
||||
|
||||
static gboolean on_close_request(GtkWindow *window, gpointer user_data) {
|
||||
(void)user_data;
|
||||
MoeMojiApplication *self = MOEMOJI_APPLICATION(user_data);
|
||||
if (self->has_tray) {
|
||||
gtk_widget_set_visible(GTK_WIDGET(window), FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void dbusmenu_method_call(G_GNUC_UNUSED GDBusConnection *connection,
|
||||
@ -291,13 +294,38 @@ static void setup_sni(MoeMojiApplication *self) {
|
||||
if (self->dbus_conn == NULL) {
|
||||
g_warning("session bus: %s", error->message);
|
||||
g_clear_error(&error);
|
||||
self->has_tray = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
GVariant *result = g_dbus_connection_call_sync(
|
||||
self->dbus_conn, "org.freedesktop.DBus", "/org/freedesktop/DBus",
|
||||
"org.freedesktop.DBus", "NameHasOwner",
|
||||
g_variant_new("(s)", "org.kde.StatusNotifierWatcher"), G_VARIANT_TYPE("(b)"),
|
||||
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
|
||||
if (result == NULL) {
|
||||
g_warning("NameHasOwner check failed: %s", error->message);
|
||||
g_clear_error(&error);
|
||||
self->has_tray = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
gboolean watcher_exists = FALSE;
|
||||
g_variant_get(result, "(b)", &watcher_exists);
|
||||
g_variant_unref(result);
|
||||
|
||||
if (!watcher_exists) {
|
||||
g_info("No StatusNotifierWatcher found, skipping tray setup");
|
||||
self->has_tray = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
self->has_tray = TRUE;
|
||||
GDBusNodeInfo *sni_node =
|
||||
g_dbus_node_info_new_for_xml(sni_introspection_xml, &error);
|
||||
if (sni_node == NULL) {
|
||||
g_warning("Failed to parse SNI introspection XML: %s", error->message);
|
||||
g_error_free(error);
|
||||
g_clear_error(&error);
|
||||
return;
|
||||
}
|
||||
self->sni_registration_id = g_dbus_connection_register_object(
|
||||
@ -306,14 +334,14 @@ static void setup_sni(MoeMojiApplication *self) {
|
||||
g_dbus_node_info_unref(sni_node);
|
||||
if (self->sni_registration_id == 0) {
|
||||
g_warning("Failed to register SNI object: %s", error->message);
|
||||
g_error_free(error);
|
||||
g_clear_error(&error);
|
||||
return;
|
||||
}
|
||||
GDBusNodeInfo *menu_node =
|
||||
g_dbus_node_info_new_for_xml(dbusmenu_introspection_xml, &error);
|
||||
if (menu_node == NULL) {
|
||||
g_warning("Failed to parse dbusmenu introspection XML: %s", error->message);
|
||||
g_error_free(error);
|
||||
g_clear_error(&error);
|
||||
return;
|
||||
}
|
||||
self->menu_registration_id = g_dbus_connection_register_object(
|
||||
@ -322,7 +350,7 @@ static void setup_sni(MoeMojiApplication *self) {
|
||||
g_dbus_node_info_unref(menu_node);
|
||||
if (self->menu_registration_id == 0) {
|
||||
g_warning("dbusmenu register: %s", error->message);
|
||||
g_error_free(error);
|
||||
g_clear_error(&error);
|
||||
}
|
||||
const gchar *unique_name = g_dbus_connection_get_unique_name(self->dbus_conn);
|
||||
g_dbus_connection_call(
|
||||
@ -332,11 +360,10 @@ static void setup_sni(MoeMojiApplication *self) {
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static void on_shortcuts_activated(GDBusProxy *proxy, const gchar *sender_name,
|
||||
static void on_shortcuts_activated(G_GNUC_UNUSED GDBusProxy *proxy,
|
||||
G_GNUC_UNUSED const gchar *sender_name,
|
||||
const gchar *signal_name,
|
||||
GVariant *parameters, gpointer user_data) {
|
||||
(void)proxy;
|
||||
(void)sender_name;
|
||||
if (g_strcmp0(signal_name, "Activated") != 0)
|
||||
return;
|
||||
MoeMojiApplication *self = MOEMOJI_APPLICATION(user_data);
|
||||
@ -481,7 +508,7 @@ static void setup_global_shortcuts(MoeMojiApplication *self) {
|
||||
"org.freedesktop.portal.GlobalShortcuts", NULL, &error);
|
||||
if (self->shortcuts_proxy == NULL) {
|
||||
g_warning("GlobalShortcuts: Failed to create proxy: %s", error->message);
|
||||
g_error_free(error);
|
||||
g_clear_error(&error);
|
||||
return;
|
||||
}
|
||||
g_timeout_add(500, (GSourceFunc)begin_create_session, self);
|
||||
@ -499,7 +526,7 @@ static void moemoji_application_startup(GApplication *app) {
|
||||
gtk_icon_theme_add_resource_path(
|
||||
gtk_icon_theme_get_for_display(gdk_display_get_default()),
|
||||
"/jp/angeltech/MoeMoji/icons");
|
||||
gtk_window_set_default_icon_name("jp.angeltech.MoeMoji-symbolic");
|
||||
gtk_window_set_default_icon_name("jp.angeltech.MoeMoji");
|
||||
gboolean in_flatpak = g_file_test("/.flatpak-info", G_FILE_TEST_EXISTS);
|
||||
if (in_flatpak) {
|
||||
self->icon_theme_path = NULL;
|
||||
@ -533,7 +560,7 @@ static void moemoji_application_activate(GApplication *app) {
|
||||
self->window = g_object_new(MOEMOJI_TYPE_WINDOW, "application",
|
||||
GTK_APPLICATION(self), NULL);
|
||||
g_signal_connect(self->window, "close-request",
|
||||
G_CALLBACK(on_close_request), NULL);
|
||||
G_CALLBACK(on_close_request), self);
|
||||
self->window_created = TRUE;
|
||||
} else {
|
||||
toggle_window(self);
|
||||
|
||||
@ -16,6 +16,7 @@ struct _MoeMojiApplication {
|
||||
const gchar *tray_icon_name;
|
||||
GDBusProxy *shortcuts_proxy;
|
||||
gchar *shortcuts_session_path;
|
||||
gboolean has_tray;
|
||||
};
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -222,8 +222,8 @@ static void update_spacer_height(MoeMojiWindow *self) {
|
||||
gtk_widget_set_size_request(self->bottom_spacer, -1, spacer_h);
|
||||
}
|
||||
|
||||
static void on_scroll_changed(GtkAdjustment *adj, gpointer user_data) {
|
||||
(void)adj;
|
||||
static void on_scroll_changed(G_GNUC_UNUSED GtkAdjustment *adj,
|
||||
gpointer user_data) {
|
||||
MoeMojiWindow *self = MOEMOJI_WINDOW(user_data);
|
||||
update_chip_from_scroll(self);
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<file>moemoji-window.ui</file>
|
||||
<file>style.css</file>
|
||||
<file>wp.png</file>
|
||||
<file alias="icons/scalable/apps/jp.angeltech.MoeMoji.svg">../data/icons/hicolor/scalable/apps/jp.angeltech.MoeMoji.svg</file>
|
||||
<file alias="icons/scalable/apps/jp.angeltech.MoeMoji.png">../data/icons/hicolor/scalable/apps/jp.angeltech.MoeMoji.png</file>
|
||||
<file alias="icons/scalable/apps/jp.angeltech.MoeMoji-symbolic.svg">../data/icons/hicolor/symbolic/apps/jp.angeltech.MoeMoji-symbolic.svg</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("/jp/angeltech/MoeMoji/wp.png");
|
||||
background-size: cover;
|
||||
background-color: transparent;
|
||||
color: white;
|
||||
}
|
||||
|
||||
wallpaper-bg > * {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user