mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-04-14 15:40:19 +00:00
Compare commits
1 Commits
master
...
flatpak-im
| Author | SHA1 | Date | |
|---|---|---|---|
| e49333340f |
@@ -7,14 +7,13 @@
|
|||||||
"command": "zoitechat",
|
"command": "zoitechat",
|
||||||
"finish-args": [
|
"finish-args": [
|
||||||
"--share=ipc",
|
"--share=ipc",
|
||||||
"--socket=x11",
|
"--socket=wayland",
|
||||||
|
"--socket=fallback-x11",
|
||||||
"--share=network",
|
"--share=network",
|
||||||
"--socket=pulseaudio",
|
"--socket=pulseaudio",
|
||||||
"--filesystem=xdg-download",
|
"--filesystem=xdg-download",
|
||||||
"--filesystem=xdg-data/themes:ro",
|
"--filesystem=xdg-data/themes:ro",
|
||||||
"--filesystem=xdg-data/icons:ro",
|
"--filesystem=xdg-data/icons:ro",
|
||||||
"--filesystem=~/.themes:ro",
|
|
||||||
"--filesystem=~/.icons:ro",
|
|
||||||
"--filesystem=xdg-run/tray-icon:create",
|
"--filesystem=xdg-run/tray-icon:create",
|
||||||
"--env=GTK_CSD=1",
|
"--env=GTK_CSD=1",
|
||||||
"--talk-name=org.freedesktop.Notifications",
|
"--talk-name=org.freedesktop.Notifications",
|
||||||
@@ -45,9 +44,9 @@
|
|||||||
"buildsystem": "meson",
|
"buildsystem": "meson",
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"type": "git",
|
"type": "archive",
|
||||||
"url": "https://github.com/pavouk/lgi.git",
|
"url": "https://github.com/pavouk/lgi/archive/c9b8e4473c6421f2a215d8c06c0d94b86eb0b26a.tar.gz",
|
||||||
"commit": "c9b8e4473c6421f2a215d8c06c0d94b86eb0b26a"
|
"sha256": "db67b2b7ee89fa566f783486d56be7203552a997bc55f35020b57dd2776b9943"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,8 +45,6 @@ cv_tree_sel_cb (GtkTreeSelection *sel, chanview *cv)
|
|||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeIter prev_iter;
|
GtkTreeIter prev_iter;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkTreePath *path;
|
|
||||||
GtkTreeView *view;
|
|
||||||
chan *ch;
|
chan *ch;
|
||||||
chan *prev_ch;
|
chan *prev_ch;
|
||||||
gboolean has_prev;
|
gboolean has_prev;
|
||||||
@@ -62,20 +60,6 @@ cv_tree_sel_cb (GtkTreeSelection *sel, chanview *cv)
|
|||||||
if (has_prev)
|
if (has_prev)
|
||||||
{
|
{
|
||||||
gtk_tree_model_get (model, &prev_iter, COL_CHAN, &prev_ch, -1);
|
gtk_tree_model_get (model, &prev_iter, COL_CHAN, &prev_ch, -1);
|
||||||
if (prev_ch != ch && gtk_tree_store_is_ancestor (cv->store, &iter, &prev_iter))
|
|
||||||
{
|
|
||||||
view = gtk_tree_selection_get_tree_view (sel);
|
|
||||||
path = gtk_tree_model_get_path (model, &iter);
|
|
||||||
if (path)
|
|
||||||
{
|
|
||||||
if (!gtk_tree_view_row_expanded (view, path))
|
|
||||||
{
|
|
||||||
gtk_tree_path_free (path);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
gtk_tree_path_free (path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (prev_ch != ch)
|
if (prev_ch != ch)
|
||||||
gtk_tree_store_set (cv->store, &prev_iter, COL_UNDERLINE, PANGO_UNDERLINE_NONE, -1);
|
gtk_tree_store_set (cv->store, &prev_iter, COL_UNDERLINE, PANGO_UNDERLINE_NONE, -1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -443,27 +443,6 @@ key_handle_key_press (GtkWidget *wid, GdkEventKey *evt, session *sess)
|
|||||||
if (!list)
|
if (!list)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
current_sess = sess;
|
current_sess = sess;
|
||||||
if ((evt->state & GDK_CONTROL_MASK) &&
|
|
||||||
!(evt->state & (GDK_MOD1_MASK | GDK_META_MASK)))
|
|
||||||
{
|
|
||||||
if (!(evt->state & GDK_SHIFT_MASK) &&
|
|
||||||
(evt->keyval == GDK_KEY_w || evt->keyval == GDK_KEY_W))
|
|
||||||
{
|
|
||||||
if (sess->type == SESS_CHANNEL)
|
|
||||||
{
|
|
||||||
fe_close_window (sess);
|
|
||||||
g_signal_stop_emission_by_name (G_OBJECT (wid), "key-press-event");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((evt->state & GDK_SHIFT_MASK) &&
|
|
||||||
(evt->keyval == GDK_KEY_t || evt->keyval == GDK_KEY_T))
|
|
||||||
{
|
|
||||||
mg_reopen_closed_channel_tab ();
|
|
||||||
g_signal_stop_emission_by_name (G_OBJECT (wid), "key-press-event");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin_emit_keypress (sess, evt->state, evt->keyval, gdk_keyval_to_unicode (evt->keyval)))
|
if (plugin_emit_keypress (sess, evt->state, evt->keyval, gdk_keyval_to_unicode (evt->keyval)))
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -468,14 +468,6 @@ static session_gui static_mg_gui;
|
|||||||
static session_gui *mg_gui = NULL; /* the shared irc tab */
|
static session_gui *mg_gui = NULL; /* the shared irc tab */
|
||||||
static int ignore_chanmode = FALSE;
|
static int ignore_chanmode = FALSE;
|
||||||
static const char chan_flags[] = { 'c', 'n', 't', 'i', 'm', 'l', 'k' };
|
static const char chan_flags[] = { 'c', 'n', 't', 'i', 'm', 'l', 'k' };
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int server_id;
|
|
||||||
char channel[CHANLEN];
|
|
||||||
char key[64];
|
|
||||||
}
|
|
||||||
mg_closed_channel_tab;
|
|
||||||
static GSList *mg_closed_channel_tabs;
|
|
||||||
|
|
||||||
static chan *active_tab = NULL; /* active tab */
|
static chan *active_tab = NULL; /* active tab */
|
||||||
GtkWidget *parent_window = NULL; /* the master window */
|
GtkWidget *parent_window = NULL; /* the master window */
|
||||||
@@ -1651,71 +1643,6 @@ mg_tab_close_cb (GtkWidget *dialog, gint arg1, session *sess)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
mg_closed_channel_tabs_add (session *sess)
|
|
||||||
{
|
|
||||||
mg_closed_channel_tab *item;
|
|
||||||
GSList *last;
|
|
||||||
|
|
||||||
if (!sess || sess->type != SESS_CHANNEL || !sess->channel[0])
|
|
||||||
return;
|
|
||||||
|
|
||||||
item = g_new0 (mg_closed_channel_tab, 1);
|
|
||||||
item->server_id = sess->server->id;
|
|
||||||
g_strlcpy (item->channel, sess->channel, sizeof (item->channel));
|
|
||||||
g_strlcpy (item->key, sess->channelkey, sizeof (item->key));
|
|
||||||
mg_closed_channel_tabs = g_slist_prepend (mg_closed_channel_tabs, item);
|
|
||||||
if (g_slist_length (mg_closed_channel_tabs) > 20)
|
|
||||||
{
|
|
||||||
last = g_slist_last (mg_closed_channel_tabs);
|
|
||||||
g_free (last->data);
|
|
||||||
mg_closed_channel_tabs = g_slist_delete_link (mg_closed_channel_tabs, last);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
mg_reopen_closed_channel_tab (void)
|
|
||||||
{
|
|
||||||
mg_closed_channel_tab *item;
|
|
||||||
GSList *head;
|
|
||||||
GSList *list;
|
|
||||||
server *serv;
|
|
||||||
session *sess;
|
|
||||||
|
|
||||||
if (!mg_closed_channel_tabs)
|
|
||||||
return;
|
|
||||||
|
|
||||||
head = mg_closed_channel_tabs;
|
|
||||||
item = head->data;
|
|
||||||
mg_closed_channel_tabs = g_slist_delete_link (mg_closed_channel_tabs, head);
|
|
||||||
if (!item)
|
|
||||||
return;
|
|
||||||
|
|
||||||
serv = NULL;
|
|
||||||
for (list = serv_list; list; list = list->next)
|
|
||||||
{
|
|
||||||
server *candidate = list->data;
|
|
||||||
if (candidate->id == item->server_id)
|
|
||||||
{
|
|
||||||
serv = candidate;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (serv && serv->connected && item->channel[0])
|
|
||||||
{
|
|
||||||
sess = find_channel (serv, item->channel);
|
|
||||||
if (sess)
|
|
||||||
fe_ctrl_gui (sess, 2, 0);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
new_ircwindow (serv, item->channel, SESS_CHANNEL, 1);
|
|
||||||
serv->p_join (serv, item->channel, item->key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (item);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
mg_tab_close (session *sess)
|
mg_tab_close (session *sess)
|
||||||
{
|
{
|
||||||
@@ -1723,12 +1650,11 @@ mg_tab_close (session *sess)
|
|||||||
GSList *list;
|
GSList *list;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (chan_remove (sess->res->tab, FALSE))
|
if (chan_remove (sess->res->tab, FALSE))
|
||||||
{
|
{
|
||||||
mg_closed_channel_tabs_add (sess);
|
sess->res->tab = NULL;
|
||||||
sess->res->tab = NULL;
|
mg_ircdestroy (sess);
|
||||||
mg_ircdestroy (sess);
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (i = 0, list = sess_list; list; list = list->next)
|
for (i = 0, list = sess_list; list; list = list->next)
|
||||||
@@ -2571,7 +2497,6 @@ mg_topic_word_is_clickable (const char *word, int word_pos)
|
|||||||
{
|
{
|
||||||
int start;
|
int start;
|
||||||
int end;
|
int end;
|
||||||
int word_type;
|
|
||||||
|
|
||||||
if (!word || word[0] == 0)
|
if (!word || word[0] == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -2579,8 +2504,7 @@ mg_topic_word_is_clickable (const char *word, int word_pos)
|
|||||||
if (strcmp (word, "/") == 0)
|
if (strcmp (word, "/") == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
word_type = url_check_word (word);
|
if (url_check_word (word) == 0)
|
||||||
if (word_type != WORD_URL && word_type != WORD_HOST && word_type != WORD_HOST6)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
url_last (&start, &end);
|
url_last (&start, &end);
|
||||||
@@ -2629,8 +2553,7 @@ mg_topic_button_release_cb (GtkWidget *entry, GdkEventButton *event, gpointer us
|
|||||||
if (!word)
|
if (!word)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if ((event->state & 13) == prefs.hex_gui_url_mod &&
|
if (mg_topic_word_is_clickable (word, word_pos))
|
||||||
mg_topic_word_is_clickable (word, word_pos))
|
|
||||||
{
|
{
|
||||||
url_last (&start, &end);
|
url_last (&start, &end);
|
||||||
word[end] = 0;
|
word[end] = 0;
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ void mg_apply_setup (void);
|
|||||||
void mg_apply_session_font_prefs (session_gui *gui);
|
void mg_apply_session_font_prefs (session_gui *gui);
|
||||||
void mg_close_sess (session *);
|
void mg_close_sess (session *);
|
||||||
void mg_tab_close (session *sess);
|
void mg_tab_close (session *sess);
|
||||||
void mg_reopen_closed_channel_tab (void);
|
|
||||||
void mg_detach (session *sess, int mode);
|
void mg_detach (session *sess, int mode);
|
||||||
void mg_progressbar_create (session_gui *gui);
|
void mg_progressbar_create (session_gui *gui);
|
||||||
void mg_progressbar_destroy (session_gui *gui);
|
void mg_progressbar_destroy (session_gui *gui);
|
||||||
|
|||||||
@@ -59,17 +59,6 @@ fe_open_url (const char *url)
|
|||||||
(void)url;
|
(void)url;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
|
||||||
get_xdir (void)
|
|
||||||
{
|
|
||||||
return (char *)"/tmp";
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
load_text_events (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
theme_get_color (ThemeSemanticToken token, GdkRGBA *color)
|
theme_get_color (ThemeSemanticToken token, GdkRGBA *color)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user