mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-09-17 21:29:58 +00:00
Compare commits
10 Commits
test-start
...
release/2.
| Author | SHA1 | Date | |
|---|---|---|---|
| 58208b81f2 | |||
| e7631701ce | |||
| b5c3be8ff1 | |||
| 2b9a39783b | |||
|
|
ecdb462ff8 | ||
|
|
78eb1882cb | ||
| 6c95db8539 | |||
|
|
75286642df | ||
|
|
8044b8562d | ||
| de6e16cbdf |
@@ -2,6 +2,7 @@ appdir = join_paths(get_option('datadir'), 'applications')
|
|||||||
metainfodir = join_paths(get_option('datadir'), 'metainfo')
|
metainfodir = join_paths(get_option('datadir'), 'metainfo')
|
||||||
mimedir = join_paths(get_option('datadir'), 'mime', 'packages')
|
mimedir = join_paths(get_option('datadir'), 'mime', 'packages')
|
||||||
desktop_utils = find_program('desktop-file-validate', required: false)
|
desktop_utils = find_program('desktop-file-validate', required: false)
|
||||||
|
appstreamcli = find_program('appstreamcli', required: false)
|
||||||
|
|
||||||
if get_option('gtk-frontend')
|
if get_option('gtk-frontend')
|
||||||
if get_option('install-appdata')
|
if get_option('install-appdata')
|
||||||
@@ -13,7 +14,6 @@ if get_option('gtk-frontend')
|
|||||||
install_dir: metainfodir
|
install_dir: metainfodir
|
||||||
)
|
)
|
||||||
|
|
||||||
appstreamcli = find_program('appstreamcli', required: false)
|
|
||||||
if appstreamcli.found()
|
if appstreamcli.found()
|
||||||
test('Validate net.zoite.Zoitechat.appdata.xml', appstreamcli,
|
test('Validate net.zoite.Zoitechat.appdata.xml', appstreamcli,
|
||||||
args: ['validate', zoitechat_appdata]
|
args: ['validate', zoitechat_appdata]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
project('zoitechat', 'c',
|
project('zoitechat', 'c',
|
||||||
version: run_command('cat', 'VERSION', check: true).stdout().strip(),
|
version: run_command('cat', 'VERSION', check: true).stdout().strip(),
|
||||||
meson_version: '>= 0.55.0',
|
meson_version: '>= 0.59.0',
|
||||||
default_options: [
|
default_options: [
|
||||||
'c_std=c17',
|
'c_std=c17',
|
||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
|
|||||||
@@ -126,7 +126,21 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip,
|
|||||||
if (ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset))
|
if (ctcp_check (sess, nick, word, word_eol, word[4] + ctcp_offset))
|
||||||
goto generic;
|
goto generic;
|
||||||
|
|
||||||
inbound_action (sess, to, nick, ip, msg + 7, FALSE, tags_data->identified, tags_data);
|
{
|
||||||
|
gboolean private_fromme = !serv->p_cmp (nick, serv->nick) && !is_channel (serv, to);
|
||||||
|
|
||||||
|
if (private_fromme)
|
||||||
|
{
|
||||||
|
session *target = find_dialog (serv, to);
|
||||||
|
|
||||||
|
if (target)
|
||||||
|
sess = target;
|
||||||
|
else if (serv->front_session)
|
||||||
|
sess = serv->front_session;
|
||||||
|
}
|
||||||
|
|
||||||
|
inbound_action (sess, to, nick, ip, msg + 7, private_fromme, tags_data->identified, tags_data);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ dbus_includes = [
|
|||||||
dbus_service_dir = join_paths(get_option('datadir'), 'dbus-1/services')
|
dbus_service_dir = join_paths(get_option('datadir'), 'dbus-1/services')
|
||||||
|
|
||||||
if get_option('dbus-service-use-appid')
|
if get_option('dbus-service-use-appid')
|
||||||
dbus_service_name = 'io.github.Hexchat'
|
dbus_service_name = 'net.zoite.Zoitechat'
|
||||||
dbus_output_file = 'io.github.Hexchat.service'
|
dbus_output_file = 'net.zoite.Zoitechat.service'
|
||||||
dbus_cargs = '-DDBUS_SERVICE="io.github.Hexchat"'
|
dbus_cargs = '-DDBUS_SERVICE="net.zoite.Zoitechat"'
|
||||||
else
|
else
|
||||||
dbus_service_name = 'org.zoitechat.service'
|
dbus_service_name = 'org.zoitechat.service'
|
||||||
dbus_output_file = 'org.zoitechat.service.service'
|
dbus_output_file = 'org.zoitechat.service.service'
|
||||||
|
|||||||
@@ -858,8 +858,10 @@ path_depth_from_root (const char *base, const char *path)
|
|||||||
static gint
|
static gint
|
||||||
theme_root_candidate_compare (gconstpointer a, gconstpointer b)
|
theme_root_candidate_compare (gconstpointer a, gconstpointer b)
|
||||||
{
|
{
|
||||||
const ThemeRootCandidate *ca = a;
|
/* g_ptr_array_sort() passes pointers to the array slots, not the values
|
||||||
const ThemeRootCandidate *cb = b;
|
* stored in those slots. Dereference once before comparing candidates. */
|
||||||
|
const ThemeRootCandidate *ca = *(ThemeRootCandidate * const *) a;
|
||||||
|
const ThemeRootCandidate *cb = *(ThemeRootCandidate * const *) b;
|
||||||
if (ca->has_index_theme != cb->has_index_theme)
|
if (ca->has_index_theme != cb->has_index_theme)
|
||||||
return ca->has_index_theme ? -1 : 1;
|
return ca->has_index_theme ? -1 : 1;
|
||||||
if (ca->depth != cb->depth)
|
if (ca->depth != cb->depth)
|
||||||
|
|||||||
@@ -1368,7 +1368,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
{
|
{
|
||||||
if (ignore_check (word[1], IG_PRIV))
|
if (ignore_check (word[1], IG_PRIV))
|
||||||
return;
|
return;
|
||||||
if (serv->have_echo_message && !serv->p_cmp (nick, serv->nick))
|
if (!serv->p_cmp (nick, serv->nick))
|
||||||
{
|
{
|
||||||
session *target_sess = find_dialog (serv, to);
|
session *target_sess = find_dialog (serv, to);
|
||||||
|
|
||||||
|
|||||||
@@ -463,8 +463,7 @@ doover:
|
|||||||
while (list)
|
while (list)
|
||||||
{
|
{
|
||||||
sess = list->data;
|
sess = list->data;
|
||||||
if (!sess->server->have_awaynotify)
|
sess->done_away_check = FALSE;
|
||||||
sess->done_away_check = FALSE;
|
|
||||||
list = list->next;
|
list = list->next;
|
||||||
}
|
}
|
||||||
loop++;
|
loop++;
|
||||||
|
|||||||
@@ -301,26 +301,35 @@ cv_tree_focus (chan *ch)
|
|||||||
path = gtk_tree_model_get_path (model, &ch->iter);
|
path = gtk_tree_model_get_path (model, &ch->iter);
|
||||||
if (path)
|
if (path)
|
||||||
{
|
{
|
||||||
/* This full section does what
|
if (!gtk_widget_get_realized (GTK_WIDGET (tree)))
|
||||||
* gtk_tree_view_scroll_to_cell (tree, path, NULL, TRUE, 0.5, 0.5);
|
|
||||||
* does, except it only scrolls the window if the provided cell is
|
|
||||||
* not visible. Basic algorithm taken from gtktreeview.c */
|
|
||||||
|
|
||||||
/* obtain information to see if the cell is visible */
|
|
||||||
gtk_tree_view_get_background_area (tree, path, NULL, &cell_rect);
|
|
||||||
gtk_tree_view_get_visible_rect (tree, &vis_rect);
|
|
||||||
|
|
||||||
/* The cordinates aren't offset correctly */
|
|
||||||
gtk_tree_view_convert_widget_to_bin_window_coords ( tree, cell_rect.x, cell_rect.y, NULL, &cell_rect.y );
|
|
||||||
|
|
||||||
/* only need to scroll if out of bounds */
|
|
||||||
if (cell_rect.y < vis_rect.y ||
|
|
||||||
cell_rect.y + cell_rect.height > vis_rect.y + vis_rect.height)
|
|
||||||
{
|
{
|
||||||
dest_y = cell_rect.y - ((vis_rect.height - cell_rect.height) * 0.5);
|
/* Layout changes can restore focus before the new tree is realized.
|
||||||
if (dest_y < 0)
|
* Let GTK track the row and scroll once its geometry is available. */
|
||||||
dest_y = 0;
|
gtk_tree_view_scroll_to_cell (tree, path, NULL, TRUE, 0.5, 0.5);
|
||||||
gtk_tree_view_scroll_to_point (tree, -1, dest_y);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* This full section does what
|
||||||
|
* gtk_tree_view_scroll_to_cell (tree, path, NULL, TRUE, 0.5, 0.5);
|
||||||
|
* does, except it only scrolls the window if the provided cell is
|
||||||
|
* not visible. Basic algorithm taken from gtktreeview.c */
|
||||||
|
|
||||||
|
/* obtain information to see if the cell is visible */
|
||||||
|
gtk_tree_view_get_background_area (tree, path, NULL, &cell_rect);
|
||||||
|
gtk_tree_view_get_visible_rect (tree, &vis_rect);
|
||||||
|
|
||||||
|
/* The cordinates aren't offset correctly */
|
||||||
|
gtk_tree_view_convert_widget_to_bin_window_coords ( tree, cell_rect.x, cell_rect.y, NULL, &cell_rect.y );
|
||||||
|
|
||||||
|
/* only need to scroll if out of bounds */
|
||||||
|
if (cell_rect.y < vis_rect.y ||
|
||||||
|
cell_rect.y + cell_rect.height > vis_rect.y + vis_rect.height)
|
||||||
|
{
|
||||||
|
dest_y = cell_rect.y - ((vis_rect.height - cell_rect.height) * 0.5);
|
||||||
|
if (dest_y < 0)
|
||||||
|
dest_y = 0;
|
||||||
|
gtk_tree_view_scroll_to_point (tree, -1, dest_y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* theft done, now make it focused like */
|
/* theft done, now make it focused like */
|
||||||
gtk_tree_view_set_cursor (tree, path, NULL, FALSE);
|
gtk_tree_view_set_cursor (tree, path, NULL, FALSE);
|
||||||
|
|||||||
Reference in New Issue
Block a user