10 Commits

Author SHA1 Message Date
deepend-tildeclub
c43915d609 Merge pull request #111 from ZoiteChat/perl-python-flatpak
flatpak: enable Python/Perl plugins; bundle Perl runtime module
2026-03-13 01:04:32 -06:00
989ecc5a23 flatpak: bump pycparser/cffi 2026-03-13 00:48:56 -06:00
a225af6d71 fix: add strings.h for Perl strcasecmp funcs 2026-03-12 22:33:28 -06:00
d2407c39c7 flatpak: fix Perl source checksum for 5.40.1 build 2026-03-12 20:38:54 -06:00
4754cf3927 flatpak: enable Python/Perl plugins; bundle Perl runtime module 2026-03-12 20:28:24 -06:00
deepend-tildeclub
b23c1a73ca Merge pull request #109 from ZoiteChat/fix-tray-icon-restore-hide
fix: keep tray hide/restore label synced to real window state
2026-03-12 19:40:40 -06:00
deepend-tildeclub
166542f1e3 Merge pull request #108 from ZoiteChat/fix-flatpak-titlebar
Fix flatpak titlebar
2026-03-12 18:45:48 -06:00
05f4bf382d flatpak: enable GTK_CSD=1 for GTK titlebars on KDE 2026-03-12 18:39:22 -06:00
deepend-tildeclub
a2e2bdf803 Merge pull request #106 from ZoiteChat/remove-icons
ui: drop menubar icons
2026-03-12 18:15:12 -06:00
99f97b82a6 ui: drop menubar icons; make Away plain item w/ toggle handler 2026-03-12 16:52:06 -06:00
5 changed files with 62 additions and 50 deletions

View File

@@ -16,11 +16,10 @@
"--filesystem=~/.themes:ro", "--filesystem=~/.themes:ro",
"--filesystem=~/.icons:ro", "--filesystem=~/.icons:ro",
"--filesystem=xdg-run/tray-icon:create", "--filesystem=xdg-run/tray-icon:create",
"--env=GTK_CSD=1",
"--talk-name=org.freedesktop.Notifications", "--talk-name=org.freedesktop.Notifications",
"--talk-name=org.kde.StatusNotifierWatcher", "--talk-name=org.kde.StatusNotifierWatcher",
"--talk-name=com.canonical.AppMenu.Registrar", "--talk-name=com.canonical.AppMenu.Registrar",
"--talk-name=org.mpris.MediaPlayer2.*" "--talk-name=org.mpris.MediaPlayer2.*"
], ],
"add-extensions": { "add-extensions": {
@@ -40,6 +39,7 @@
"shared-modules/libcanberra/libcanberra.json", "shared-modules/libcanberra/libcanberra.json",
"shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json", "shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json",
"python3-cffi.json", "python3-cffi.json",
"perl.json",
{ {
"name": "lgi", "name": "lgi",
"buildsystem": "meson", "buildsystem": "meson",
@@ -56,8 +56,8 @@
"buildsystem": "meson", "buildsystem": "meson",
"config-opts": [ "config-opts": [
"-Ddbus-service-use-appid=true", "-Ddbus-service-use-appid=true",
"-Dwith-perl=false", "-Dwith-perl=perl",
"-Dwith-python=false", "-Dwith-python=python3",
"-Dwith-lua=lua" "-Dwith-lua=lua"
], ],
"build-options": { "build-options": {

20
flatpak/perl.json Normal file
View File

@@ -0,0 +1,20 @@
{
"name": "perl",
"buildsystem": "simple",
"build-commands": [
"./Configure -des -Dprefix=/app -Dvendorprefix=/app -Duseshrplib -Dman1dir=none -Dman3dir=none",
"make -j${FLATPAK_BUILDER_N_JOBS}",
"make install"
],
"cleanup": [
"/share/man",
"/lib/perl5/*/*/CORE/*.a"
],
"sources": [
{
"type": "archive",
"url": "https://www.cpan.org/src/5.0/perl-5.40.1.tar.xz",
"sha256": "dfa20c2eef2b4af133525610bbb65dd13777ecf998c9c5b1ccf0d308e732ee3f"
}
]
}

View File

@@ -7,13 +7,13 @@
"sources": [ "sources": [
{ {
"type": "file", "type": "file",
"url": "https://files.pythonhosted.org/packages/0f/86/e19659527668d70be91d0369aeaa055b4eb396b0f387a4f92293a20035bd/pycparser-2.20.tar.gz", "url": "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz",
"sha256": "2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0" "sha256": "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"
}, },
{ {
"type": "file", "type": "file",
"url": "https://files.pythonhosted.org/packages/a8/20/025f59f929bbcaa579704f443a438135918484fffaacfaddba776b374563/cffi-1.14.5.tar.gz", "url": "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz",
"sha256": "fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c" "sha256": "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"
} }
] ]
} }

View File

@@ -32,6 +32,7 @@
#include <stdbool.h> #include <stdbool.h>
#else #else
#include <dirent.h> #include <dirent.h>
#include <strings.h>
#endif #endif
#include <glib.h> #include <glib.h>

View File

@@ -1572,6 +1572,12 @@ menu_away (GtkCheckMenuItem *item, gpointer none)
handle_command (current_sess, gtk_check_menu_item_get_active (item) ? "away" : "back", FALSE); handle_command (current_sess, gtk_check_menu_item_get_active (item) ? "away" : "back", FALSE);
} }
static void
menu_away_toggle (GtkWidget *item, gpointer none)
{
handle_command (current_sess, current_sess->server->is_away ? "back" : "away", FALSE);
}
static void static void
menu_chanlist (GtkWidget * wid, gpointer none) menu_chanlist (GtkWidget * wid, gpointer none)
{ {
@@ -1888,30 +1894,12 @@ menu_about (GtkWidget *wid, gpointer sess)
gtk_widget_show_all (GTK_WIDGET(dialog)); gtk_widget_show_all (GTK_WIDGET(dialog));
} }
#define ICON_NEW "zc-menu-new"
#define ICON_NETWORK_LIST "zc-menu-network-list"
#define ICON_LOAD_PLUGIN "zc-menu-load-plugin"
#define ICON_DETACH "zc-menu-detach"
#define ICON_CLOSE "zc-menu-close"
#define ICON_QUIT "zc-menu-quit"
#define ICON_DISCONNECT "zc-menu-disconnect"
#define ICON_CONNECT "zc-menu-connect"
#define ICON_JOIN "zc-menu-join"
#define ICON_CHANLIST "zc-menu-chanlist"
#define ICON_PREFERENCES "zc-menu-preferences"
#define ICON_CLEAR "zc-menu-clear"
#define ICON_SAVE "zc-menu-save"
#define ICON_SEARCH "zc-menu-search"
#define ICON_FIND "zc-menu-find"
#define ICON_HELP "zc-menu-help"
#define ICON_ABOUT "zc-menu-about"
static struct mymenu mymenu[] = { static struct mymenu mymenu[] = {
{N_("_ZoiteChat"), 0, 0, M_NEWMENU, MENU_ID_ZOITECHAT, 0, 1}, {N_("_ZoiteChat"), 0, 0, M_NEWMENU, MENU_ID_ZOITECHAT, 0, 1},
{N_("Network Li_st"), menu_open_server_list, ICON_NETWORK_LIST, M_MENUSTOCK, 0, 0, 1, GDK_KEY_s}, {N_("Network Li_st"), menu_open_server_list, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_s},
{0, 0, 0, M_SEP, 0, 0, 0}, {0, 0, 0, M_SEP, 0, 0, 0},
{N_("_New"), 0, ICON_NEW, M_MENUSUB, 0, 0, 1}, {N_("_New"), 0, 0, M_MENUSUB, 0, 0, 1},
{N_("Server Tab"), menu_newserver_tab, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_t}, {N_("Server Tab"), menu_newserver_tab, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_t},
{N_("Channel Tab"), menu_newchannel_tab, 0, M_MENUITEM, 0, 0, 1}, {N_("Channel Tab"), menu_newchannel_tab, 0, M_MENUITEM, 0, 0, 1},
{N_("Server Window"), menu_newserver_window, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_n}, {N_("Server Window"), menu_newserver_window, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_n},
@@ -1919,14 +1907,14 @@ static struct mymenu mymenu[] = {
{0, 0, 0, M_END, 0, 0, 0}, {0, 0, 0, M_END, 0, 0, 0},
{0, 0, 0, M_SEP, 0, 0, 0}, {0, 0, 0, M_SEP, 0, 0, 0},
{N_("_Load Plugin or Script" ELLIPSIS), menu_loadplugin, ICON_LOAD_PLUGIN, M_MENUSTOCK, 0, 0, 1}, {N_("_Load Plugin or Script" ELLIPSIS), menu_loadplugin, 0, M_MENUITEM, 0, 0, 1},
{0, 0, 0, M_SEP, 0, 0, 0}, /* 11 */ {0, 0, 0, M_SEP, 0, 0, 0}, /* 11 */
#define DETACH_OFFSET (12) #define DETACH_OFFSET (12)
{0, menu_detach, ICON_DETACH, M_MENUSTOCK, 0, 0, 1}, /* 12 */ {0, menu_detach, 0, M_MENUITEM, 0, 0, 1}, /* 12 */
#define CLOSE_OFFSET (13) #define CLOSE_OFFSET (13)
{0, menu_close, ICON_CLOSE, M_MENUSTOCK, 0, 0, 1}, {0, menu_close, 0, M_MENUITEM, 0, 0, 1},
{0, 0, 0, M_SEP, 0, 0, 0}, {0, 0, 0, M_SEP, 0, 0, 0},
{N_("_Quit"), menu_quit, ICON_QUIT, M_MENUSTOCK, 0, 0, 1, GDK_KEY_q}, /* 15 */ {N_("_Quit"), menu_quit, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_q}, /* 15 */
{N_("_View"), 0, 0, M_NEWMENU, 0, 0, 1}, {N_("_View"), 0, 0, M_NEWMENU, 0, 0, 1},
#define MENUBAR_OFFSET (17) #define MENUBAR_OFFSET (17)
@@ -1952,18 +1940,18 @@ static struct mymenu mymenu[] = {
{N_ ("_Fullscreen"), menu_fullscreen_toggle, 0, M_MENUTOG, MENU_ID_FULLSCREEN, 0, 1, GDK_KEY_F11}, {N_ ("_Fullscreen"), menu_fullscreen_toggle, 0, M_MENUTOG, MENU_ID_FULLSCREEN, 0, 1, GDK_KEY_F11},
{N_("_Server"), 0, 0, M_NEWMENU, 0, 0, 1}, {N_("_Server"), 0, 0, M_NEWMENU, 0, 0, 1},
{N_("_Disconnect"), menu_disconnect, ICON_DISCONNECT, M_MENUSTOCK, MENU_ID_DISCONNECT, 0, 1}, {N_("_Disconnect"), menu_disconnect, 0, M_MENUITEM, MENU_ID_DISCONNECT, 0, 1},
{N_("_Reconnect"), menu_reconnect, ICON_CONNECT, M_MENUSTOCK, MENU_ID_RECONNECT, 0, 1}, {N_("_Reconnect"), menu_reconnect, 0, M_MENUITEM, MENU_ID_RECONNECT, 0, 1},
{N_("_Join a Channel" ELLIPSIS), menu_join, ICON_JOIN, M_MENUSTOCK, MENU_ID_JOIN, 0, 1}, {N_("_Join a Channel" ELLIPSIS), menu_join, 0, M_MENUITEM, MENU_ID_JOIN, 0, 1},
{N_("Channel _List"), menu_chanlist, ICON_CHANLIST, M_MENUSTOCK, 0, 0, 1}, {N_("Channel _List"), menu_chanlist, 0, M_MENUITEM, 0, 0, 1},
{0, 0, 0, M_SEP, 0, 0, 0}, {0, 0, 0, M_SEP, 0, 0, 0},
#define AWAY_OFFSET (41) #define AWAY_OFFSET (41)
{N_("Marked _Away"), menu_away, 0, M_MENUTOG, MENU_ID_AWAY, 0, 1, GDK_KEY_a}, {N_("Marked _Away"), menu_away_toggle, 0, M_MENUITEM, MENU_ID_AWAY, 0, 1, GDK_KEY_a},
{N_("_Usermenu"), 0, 0, M_NEWMENU, MENU_ID_USERMENU, 0, 1}, /* 40 */ {N_("_Usermenu"), 0, 0, M_NEWMENU, MENU_ID_USERMENU, 0, 1}, /* 40 */
{N_("S_ettings"), 0, 0, M_NEWMENU, 0, 0, 1}, {N_("S_ettings"), 0, 0, M_NEWMENU, 0, 0, 1},
{N_("_Preferences"), menu_settings, ICON_PREFERENCES, M_MENUSTOCK, 0, 0, 1}, {N_("_Preferences"), menu_settings, 0, M_MENUITEM, 0, 0, 1},
{0, 0, 0, M_SEP, 0, 0, 0}, {0, 0, 0, M_SEP, 0, 0, 0},
{N_("Auto Replace"), menu_rpopup, 0, M_MENUITEM, 0, 0, 1}, {N_("Auto Replace"), menu_rpopup, 0, M_MENUITEM, 0, 0, 1},
{N_("CTCP Replies"), menu_ctcpguiopen, 0, M_MENUITEM, 0, 0, 1}, {N_("CTCP Replies"), menu_ctcpguiopen, 0, M_MENUITEM, 0, 0, 1},
@@ -1989,18 +1977,18 @@ static struct mymenu mymenu[] = {
{N_("Reset Marker Line"), menu_resetmarker, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_m}, {N_("Reset Marker Line"), menu_resetmarker, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_m},
{N_("Move to Marker Line"), menu_movetomarker, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_M}, {N_("Move to Marker Line"), menu_movetomarker, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_M},
{N_("_Copy Selection"), menu_copy_selection, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_C}, {N_("_Copy Selection"), menu_copy_selection, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_C},
{N_("C_lear Text"), menu_flushbuffer, ICON_CLEAR, M_MENUSTOCK, 0, 0, 1}, {N_("C_lear Text"), menu_flushbuffer, 0, M_MENUITEM, 0, 0, 1},
{N_("Save Text" ELLIPSIS), menu_savebuffer, ICON_SAVE, M_MENUSTOCK, 0, 0, 1}, {N_("Save Text" ELLIPSIS), menu_savebuffer, 0, M_MENUITEM, 0, 0, 1},
#define SEARCH_OFFSET (70) #define SEARCH_OFFSET (70)
{N_("Search"), 0, ICON_SEARCH, M_MENUSUB, 0, 0, 1}, {N_("Search"), 0, 0, M_MENUSUB, 0, 0, 1},
{N_("Search Text" ELLIPSIS), menu_search, ICON_FIND, M_MENUSTOCK, 0, 0, 1, GDK_KEY_f}, {N_("Search Text" ELLIPSIS), menu_search, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_f},
{N_("Search Next" ), menu_search_next, ICON_FIND, M_MENUSTOCK, 0, 0, 1, GDK_KEY_g}, {N_("Search Next" ), menu_search_next, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_g},
{N_("Search Previous" ), menu_search_prev, ICON_FIND, M_MENUSTOCK, 0, 0, 1, GDK_KEY_G}, {N_("Search Previous" ), menu_search_prev, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_G},
{0, 0, 0, M_END, 0, 0, 0}, {0, 0, 0, M_END, 0, 0, 0},
{N_("_Help"), 0, 0, M_NEWMENU, 0, 0, 1}, /* 74 */ {N_("_Help"), 0, 0, M_NEWMENU, 0, 0, 1}, /* 74 */
{N_("_Contents"), menu_docs, ICON_HELP, M_MENUSTOCK, 0, 0, 1, GDK_KEY_F1}, {N_("_Contents"), menu_docs, 0, M_MENUITEM, 0, 0, 1, GDK_KEY_F1},
{N_("_About"), menu_about, ICON_ABOUT, M_MENUSTOCK, 0, 0, 1}, {N_("_About"), menu_about, 0, M_MENUITEM, 0, 0, 1},
{0, 0, 0, M_END, 0, 0, 0}, {0, 0, 0, M_END, 0, 0, 0},
}; };
@@ -2008,11 +1996,14 @@ static struct mymenu mymenu[] = {
void void
menu_set_away (session_gui *gui, int away) menu_set_away (session_gui *gui, int away)
{ {
GtkCheckMenuItem *item = GTK_CHECK_MENU_ITEM (gui->menu_item[MENU_ID_AWAY]); if (GTK_IS_CHECK_MENU_ITEM (gui->menu_item[MENU_ID_AWAY]))
{
GtkCheckMenuItem *item = GTK_CHECK_MENU_ITEM (gui->menu_item[MENU_ID_AWAY]);
g_signal_handlers_block_by_func (G_OBJECT (item), menu_away, NULL); g_signal_handlers_block_by_func (G_OBJECT (item), menu_away, NULL);
gtk_check_menu_item_set_active (item, away); gtk_check_menu_item_set_active (item, away);
g_signal_handlers_unblock_by_func (G_OBJECT (item), menu_away, NULL); g_signal_handlers_unblock_by_func (G_OBJECT (item), menu_away, NULL);
}
} }
void void