Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f620287051 | ||
|
|
c8c147901e | ||
|
|
a566b78721 | ||
|
|
05ca273c38 | ||
|
|
3db57eb3fc | ||
|
|
5a2fe1756c | ||
|
|
9106ecc1ae | ||
|
|
17678d789a | ||
|
|
7a9d850363 | ||
|
|
20f5b01327 | ||
|
|
14cd08e28e | ||
|
|
62eacf7e04 | ||
|
|
2c1d656982 | ||
|
|
730c56d944 |
@@ -3,14 +3,14 @@
|
||||
<id>jp.angeltech.MoeMoji</id>
|
||||
|
||||
<name>MoeMoji</name>
|
||||
<summary>Moe picker!</summary>
|
||||
<summary>Kaomoji picker! Japanese emoticons library</summary>
|
||||
|
||||
<developer id="jp.angeltech">
|
||||
<name>angeltech.jp</name>
|
||||
</developer>
|
||||
|
||||
<description>
|
||||
<p>Kaomoji picker. Browse a library of Japanese emoticons, click to copy, add your own!</p>
|
||||
<p>Kaomoji picker! Browse a library of Japanese emoticons, click to copy, add your own!</p>
|
||||
</description>
|
||||
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
@@ -22,15 +22,20 @@
|
||||
<project_license>WTFPL</project_license>
|
||||
<content_rating type="oars-1.1" />
|
||||
|
||||
<branding>
|
||||
<color type="primary" scheme_preference="light">#a1bedd</color>
|
||||
<color type="primary" scheme_preference="dark">#363e4f</color>
|
||||
</branding>
|
||||
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://gitea.angeltech.jp/Angel-Technologies/MoeMoji/media/branch/main/preview.png</image>
|
||||
<image>https://gitea.angeltech.jp/Angel-Technologies/MoeMoji/raw/commit/62eacf7e0446c95c9e075145f3a6ce42ca39d55f/flathub-preview.png</image>
|
||||
<caption>Kaomoji picker</caption>
|
||||
</screenshot>
|
||||
</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>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 321 KiB |
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"only-arches": ["x86_64"]
|
||||
}
|
||||
@@ -16,8 +16,9 @@
|
||||
"buildsystem": "meson",
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "."
|
||||
"type": "archive",
|
||||
"url": "https://gitea.angeltech.jp/Angel-Technologies/MoeMoji/archive/v0.1.3.tar.gz",
|
||||
"sha256": "b3942dfa69c85dade533e3db5bb26bf82bf165ae396038de9f9038e8a7e63a8a"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -29,6 +29,9 @@ subdir('data')
|
||||
subdir('src')
|
||||
subdir('tests')
|
||||
|
||||
install_data('LICENSE',
|
||||
install_dir: join_paths(get_option('datadir'), 'licenses', 'jp.angeltech.MoeMoji')
|
||||
)
|
||||
|
||||
gnome.post_install(
|
||||
glib_compile_schemas: true,
|
||||
|
||||
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
+37
-10
@@ -94,10 +94,13 @@ 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,
|
||||
G_GNUC_UNUSED const gchar *sender,
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user