mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-05-16 21:50:20 +00:00
Compare commits
1 Commits
fix-appima
...
fix-channe
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d65871c4d |
36
.github/workflows/appimage-build.yml
vendored
36
.github/workflows/appimage-build.yml
vendored
@@ -86,17 +86,15 @@ jobs:
|
|||||||
cp -a /usr/lib/x86_64-linux-gnu/python3/dist-packages AppDir/usr/lib/x86_64-linux-gnu/python3/
|
cp -a /usr/lib/x86_64-linux-gnu/python3/dist-packages AppDir/usr/lib/x86_64-linux-gnu/python3/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for perl_dir in /usr/lib/*/perl-base; do
|
if [ -d "/usr/lib/x86_64-linux-gnu/perl" ]; then
|
||||||
if [ -d "$perl_dir" ]; then
|
install -d AppDir/usr/lib/x86_64-linux-gnu
|
||||||
install -d "AppDir$(dirname "$perl_dir")"
|
cp -a /usr/lib/x86_64-linux-gnu/perl AppDir/usr/lib/x86_64-linux-gnu/
|
||||||
cp -a "$perl_dir" "AppDir$perl_dir"
|
fi
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
perl -MConfig -e 'print join "\n", grep { defined && length && -d } @Config{qw(privlibexp archlibexp vendorlibexp vendorarchexp sitelibexp sitearchexp)}' | while IFS= read -r perl_dir; do
|
if [ -d "/usr/share/perl" ]; then
|
||||||
install -d "AppDir$(dirname "$perl_dir")"
|
install -d AppDir/usr/share
|
||||||
cp -aL "$perl_dir" "AppDir$perl_dir"
|
cp -a /usr/share/perl AppDir/usr/share/
|
||||||
done
|
fi
|
||||||
|
|
||||||
if [ -d "/usr/share/perl5" ]; then
|
if [ -d "/usr/share/perl5" ]; then
|
||||||
install -d AppDir/usr/share
|
install -d AppDir/usr/share
|
||||||
@@ -213,24 +211,6 @@ jobs:
|
|||||||
|
|
||||||
unset GTK_MODULES
|
unset GTK_MODULES
|
||||||
|
|
||||||
perl5lib_entries=""
|
|
||||||
for perl_dir in \
|
|
||||||
"$APPDIR/usr/lib"/*/perl-base \
|
|
||||||
"$APPDIR/usr/lib"/*/perl/* \
|
|
||||||
"$APPDIR/usr/lib"/*/perl5/* \
|
|
||||||
"$APPDIR/usr/local/lib"/*/perl/* \
|
|
||||||
"$APPDIR/usr/local/lib"/*/perl5/* \
|
|
||||||
"$APPDIR/usr/local/share/perl"/* \
|
|
||||||
"$APPDIR/usr/share/perl"/* \
|
|
||||||
"$APPDIR/usr/share/perl5"; do
|
|
||||||
if [ -d "$perl_dir" ]; then
|
|
||||||
perl5lib_entries="${perl5lib_entries:+$perl5lib_entries:}$perl_dir"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ -n "$perl5lib_entries" ]; then
|
|
||||||
export PERL5LIB="$perl5lib_entries${PERL5LIB:+:$PERL5LIB}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export PYTHONHOME="$APPDIR/usr"
|
export PYTHONHOME="$APPDIR/usr"
|
||||||
python_stdlib_dir="$(find "$APPDIR/usr/lib" -maxdepth 1 -type d -name 'python3.*' | head -n 1 || true)"
|
python_stdlib_dir="$(find "$APPDIR/usr/lib" -maxdepth 1 -type d -name 'python3.*' | head -n 1 || true)"
|
||||||
pythonpath_entries=""
|
pythonpath_entries=""
|
||||||
|
|||||||
@@ -4166,10 +4166,10 @@ const struct commands xc_cmds[] = {
|
|||||||
static int
|
static int
|
||||||
command_compare (const void *a, const void *b)
|
command_compare (const void *a, const void *b)
|
||||||
{
|
{
|
||||||
return g_ascii_strcasecmp (a, ((const struct commands *)b)->name);
|
return g_ascii_strcasecmp (a, ((struct commands *)b)->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct commands *
|
static struct commands *
|
||||||
find_internal_command (char *name)
|
find_internal_command (char *name)
|
||||||
{
|
{
|
||||||
/* the "-1" is to skip the NULL terminator */
|
/* the "-1" is to skip the NULL terminator */
|
||||||
@@ -4205,7 +4205,7 @@ usercommand_show_help (session *sess, char *name)
|
|||||||
static void
|
static void
|
||||||
help (session *sess, char *tbuf, char *helpcmd, int quiet)
|
help (session *sess, char *tbuf, char *helpcmd, int quiet)
|
||||||
{
|
{
|
||||||
const struct commands *cmd;
|
struct commands *cmd;
|
||||||
|
|
||||||
if (plugin_show_help (sess, helpcmd))
|
if (plugin_show_help (sess, helpcmd))
|
||||||
return;
|
return;
|
||||||
@@ -4763,7 +4763,7 @@ handle_command (session *sess, char *cmd, int check_spch)
|
|||||||
char *word[PDIWORDS+1];
|
char *word[PDIWORDS+1];
|
||||||
char *word_eol[PDIWORDS+1];
|
char *word_eol[PDIWORDS+1];
|
||||||
static int command_level = 0;
|
static int command_level = 0;
|
||||||
const struct commands *int_cmd;
|
struct commands *int_cmd;
|
||||||
char *pdibuf;
|
char *pdibuf;
|
||||||
char *tbuf;
|
char *tbuf;
|
||||||
int len;
|
int len;
|
||||||
|
|||||||
@@ -2412,9 +2412,9 @@ mg_userlist_button (GtkWidget * box, char *label, char *cmd,
|
|||||||
g_signal_connect (G_OBJECT (wid), "clicked",
|
g_signal_connect (G_OBJECT (wid), "clicked",
|
||||||
G_CALLBACK (userlist_button_cb), cmd);
|
G_CALLBACK (userlist_button_cb), cmd);
|
||||||
gtk_widget_set_hexpand (wid, TRUE);
|
gtk_widget_set_hexpand (wid, TRUE);
|
||||||
gtk_widget_set_vexpand (wid, FALSE);
|
gtk_widget_set_vexpand (wid, TRUE);
|
||||||
gtk_widget_set_halign (wid, GTK_ALIGN_FILL);
|
gtk_widget_set_halign (wid, GTK_ALIGN_FILL);
|
||||||
gtk_widget_set_valign (wid, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (wid, GTK_ALIGN_FILL);
|
||||||
gtk_grid_attach (GTK_GRID (box), wid, a, c, b - a, d - c);
|
gtk_grid_attach (GTK_GRID (box), wid, a, c, b - a, d - c);
|
||||||
show_and_unfocus (wid);
|
show_and_unfocus (wid);
|
||||||
}
|
}
|
||||||
@@ -3479,7 +3479,7 @@ mg_create_meters (session_gui *gui, GtkWidget *parent_box)
|
|||||||
GtkWidget *infbox, *wid, *box;
|
GtkWidget *infbox, *wid, *box;
|
||||||
|
|
||||||
gui->meter_box = infbox = box = mg_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 1);
|
gui->meter_box = infbox = box = mg_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 1);
|
||||||
gtk_box_pack_end (GTK_BOX (parent_box), box, 0, 0, 0);
|
gtk_box_pack_start (GTK_BOX (parent_box), box, 0, 0, 0);
|
||||||
|
|
||||||
if ((prefs.hex_gui_lagometer & 2) || (prefs.hex_gui_throttlemeter & 2))
|
if ((prefs.hex_gui_lagometer & 2) || (prefs.hex_gui_throttlemeter & 2))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1283,13 +1283,25 @@ gtk_xtext_get_preferred_height_for_width (GtkWidget *widget, gint width,
|
|||||||
*natural = requisition.height;
|
*natural = requisition.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_xtext_invalidate_resize (GtkXText *xtext, xtext_buffer *buf)
|
||||||
|
{
|
||||||
|
buf->pagetop_ent = NULL;
|
||||||
|
dontscroll (buf);
|
||||||
|
xtext->force_render = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_xtext_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
|
gtk_xtext_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
|
||||||
{
|
{
|
||||||
GtkXText *xtext = GTK_XTEXT (widget);
|
GtkXText *xtext = GTK_XTEXT (widget);
|
||||||
int height_only = FALSE;
|
int height_only = FALSE;
|
||||||
|
gboolean resized;
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
|
|
||||||
|
resized = allocation->width != xtext->buffer->window_width ||
|
||||||
|
allocation->height != xtext->buffer->window_height;
|
||||||
|
|
||||||
if (allocation->width == xtext->buffer->window_width)
|
if (allocation->width == xtext->buffer->window_width)
|
||||||
height_only = TRUE;
|
height_only = TRUE;
|
||||||
|
|
||||||
@@ -1315,6 +1327,11 @@ gtk_xtext_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
|
|||||||
xtext_adj_set_value (xtext->adj,
|
xtext_adj_set_value (xtext->adj,
|
||||||
xtext_adj_get_upper (xtext->adj) -
|
xtext_adj_get_upper (xtext->adj) -
|
||||||
xtext_adj_get_page_size (xtext->adj));
|
xtext_adj_get_page_size (xtext->adj));
|
||||||
|
if (resized)
|
||||||
|
{
|
||||||
|
gtk_xtext_invalidate_resize (xtext, xtext->buffer);
|
||||||
|
gtk_widget_queue_draw (widget);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1587,6 +1604,17 @@ gtk_xtext_render (GtkWidget *widget, GdkRectangle *area, cairo_t *cr)
|
|||||||
|
|
||||||
gtk_widget_get_allocation (widget, &allocation);
|
gtk_widget_get_allocation (widget, &allocation);
|
||||||
|
|
||||||
|
if (xtext->force_render && area->x == 0 && area->y == 0 &&
|
||||||
|
area->height == allocation.height &&
|
||||||
|
area->width == allocation.width)
|
||||||
|
{
|
||||||
|
xtext->force_render = FALSE;
|
||||||
|
}
|
||||||
|
else if (xtext->force_render)
|
||||||
|
{
|
||||||
|
gtk_widget_queue_draw (widget);
|
||||||
|
}
|
||||||
|
|
||||||
if (area->x == 0 && area->y == 0 &&
|
if (area->x == 0 && area->y == 0 &&
|
||||||
area->height == allocation.height &&
|
area->height == allocation.height &&
|
||||||
area->width == allocation.width)
|
area->width == allocation.width)
|
||||||
@@ -4302,13 +4330,9 @@ gtk_xtext_calc_lines (xtext_buffer *buf, int fire_signal)
|
|||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
int lines;
|
int lines;
|
||||||
GdkWindow *window;
|
|
||||||
|
|
||||||
window = gtk_widget_get_window (GTK_WIDGET (buf->xtext));
|
height = buf->window_height;
|
||||||
if (!window)
|
width = buf->window_width;
|
||||||
return;
|
|
||||||
height = gdk_window_get_height (window);
|
|
||||||
width = gdk_window_get_width (window);
|
|
||||||
width -= MARGIN;
|
width -= MARGIN;
|
||||||
|
|
||||||
if (width < 30 || height < buf->xtext->fontsize || width < buf->indent + 30)
|
if (width < 30 || height < buf->xtext->fontsize || width < buf->indent + 30)
|
||||||
@@ -4520,6 +4544,7 @@ gtk_xtext_render_page (GtkXText * xtext)
|
|||||||
int startline = adj_value;
|
int startline = adj_value;
|
||||||
int pos, overlap;
|
int pos, overlap;
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
|
GtkAllocation allocation;
|
||||||
|
|
||||||
if(!gtk_widget_get_realized(GTK_WIDGET(xtext)))
|
if(!gtk_widget_get_realized(GTK_WIDGET(xtext)))
|
||||||
return;
|
return;
|
||||||
@@ -4530,8 +4555,9 @@ gtk_xtext_render_page (GtkXText * xtext)
|
|||||||
window = gtk_widget_get_window (GTK_WIDGET (xtext));
|
window = gtk_widget_get_window (GTK_WIDGET (xtext));
|
||||||
if (!window)
|
if (!window)
|
||||||
return;
|
return;
|
||||||
width = gdk_window_get_width (window);
|
gtk_widget_get_allocation (GTK_WIDGET (xtext), &allocation);
|
||||||
height = gdk_window_get_height (window);
|
width = allocation.width;
|
||||||
|
height = allocation.height;
|
||||||
|
|
||||||
if (width < 34 || height < xtext->fontsize || width < xtext->buffer->indent + 32)
|
if (width < 34 || height < xtext->fontsize || width < xtext->buffer->indent + 32)
|
||||||
return;
|
return;
|
||||||
@@ -4919,12 +4945,13 @@ gtk_xtext_check_marker_visibility (GtkXText * xtext)
|
|||||||
static void
|
static void
|
||||||
gtk_xtext_unstrip_color (gint start, gint end, GSList *slp, GList **gl, gint maxo)
|
gtk_xtext_unstrip_color (gint start, gint end, GSList *slp, GList **gl, gint maxo)
|
||||||
{
|
{
|
||||||
gint off1, off2;
|
gint off1, off2, curlen;
|
||||||
GSList *cursl;
|
GSList *cursl;
|
||||||
offsets_t marks;
|
offsets_t marks;
|
||||||
offlen_t *meta;
|
offlen_t *meta;
|
||||||
|
|
||||||
off1 = 0;
|
off1 = 0;
|
||||||
|
curlen = 0;
|
||||||
cursl = slp;
|
cursl = slp;
|
||||||
while (cursl)
|
while (cursl)
|
||||||
{
|
{
|
||||||
@@ -4934,6 +4961,7 @@ gtk_xtext_unstrip_color (gint start, gint end, GSList *slp, GList **gl, gint max
|
|||||||
off1 = meta->off + start;
|
off1 = meta->off + start;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
curlen += meta->len;
|
||||||
start -= meta->len;
|
start -= meta->len;
|
||||||
end -= meta->len;
|
end -= meta->len;
|
||||||
cursl = g_slist_next (cursl);
|
cursl = g_slist_next (cursl);
|
||||||
@@ -4948,6 +4976,7 @@ gtk_xtext_unstrip_color (gint start, gint end, GSList *slp, GList **gl, gint max
|
|||||||
off2 = meta->off + end;
|
off2 = meta->off + end;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
curlen += meta->len;
|
||||||
end -= meta->len;
|
end -= meta->len;
|
||||||
cursl = g_slist_next (cursl);
|
cursl = g_slist_next (cursl);
|
||||||
}
|
}
|
||||||
@@ -5739,6 +5768,7 @@ gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render)
|
|||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
|
GtkAllocation allocation;
|
||||||
|
|
||||||
buf->xtext = xtext;
|
buf->xtext = xtext;
|
||||||
|
|
||||||
@@ -5765,8 +5795,9 @@ gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render)
|
|||||||
window = gtk_widget_get_window (GTK_WIDGET (xtext));
|
window = gtk_widget_get_window (GTK_WIDGET (xtext));
|
||||||
if (!window)
|
if (!window)
|
||||||
return;
|
return;
|
||||||
h = gdk_window_get_height (window);
|
gtk_widget_get_allocation (GTK_WIDGET (xtext), &allocation);
|
||||||
w = gdk_window_get_width (window);
|
h = allocation.height;
|
||||||
|
w = allocation.width;
|
||||||
|
|
||||||
/* after a font change */
|
/* after a font change */
|
||||||
if (buf->needs_recalc)
|
if (buf->needs_recalc)
|
||||||
@@ -5804,6 +5835,10 @@ gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render)
|
|||||||
|
|
||||||
if (render)
|
if (render)
|
||||||
{
|
{
|
||||||
|
gboolean resized;
|
||||||
|
|
||||||
|
resized = buf->window_width != w || buf->window_height != h;
|
||||||
|
|
||||||
/* did the window change size since this buffer was last shown? */
|
/* did the window change size since this buffer was last shown? */
|
||||||
if (buf->window_width != w)
|
if (buf->window_width != w)
|
||||||
{
|
{
|
||||||
@@ -5824,6 +5859,9 @@ gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render)
|
|||||||
gtk_xtext_adjustment_set (buf, FALSE);
|
gtk_xtext_adjustment_set (buf, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (resized)
|
||||||
|
gtk_xtext_invalidate_resize (xtext, buf);
|
||||||
|
|
||||||
gtk_xtext_render_page (xtext);
|
gtk_xtext_render_page (xtext);
|
||||||
{
|
{
|
||||||
GtkAllocation allocation;
|
GtkAllocation allocation;
|
||||||
|
|||||||
Reference in New Issue
Block a user