mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-09-23 08:07:10 +00:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8466e70424 | ||
|
|
b85229f1a1 | ||
|
|
d03298a048 | ||
|
|
798e0b487e | ||
|
|
49444d72b4 | ||
|
|
c0e0fe4dcb | ||
|
|
9a189848ea | ||
|
|
96b09bfc1d | ||
|
|
9a6c913d89 | ||
|
|
42010594be | ||
|
|
5469c30b75 |
@@ -0,0 +1,57 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an improvement for ZoiteChat
|
||||
title: "[Feature]: "
|
||||
labels: enhancement
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
```text
|
||||
Describe the feature or enhancement clearly and briefly.
|
||||
```
|
||||
|
||||
## Problem
|
||||
|
||||
```text
|
||||
What problem would this solve?
|
||||
```
|
||||
|
||||
## Proposed Solution
|
||||
|
||||
```text
|
||||
How should ZoiteChat behave?
|
||||
```
|
||||
|
||||
## Alternatives Considered
|
||||
|
||||
```text
|
||||
Other approaches or workarounds you considered.
|
||||
```
|
||||
|
||||
## Use Case
|
||||
|
||||
```text
|
||||
Who benefits from this, and when would they use it?
|
||||
```
|
||||
|
||||
## Platform Details
|
||||
|
||||
```text
|
||||
OS:
|
||||
ZoiteChat version:
|
||||
Build/source: GitHub release / Fedora package / source build / Windows installer / other
|
||||
```
|
||||
|
||||
## Checklist
|
||||
|
||||
* [ ] I searched existing issues first.
|
||||
* [ ] I checked whether this already exists in the latest ZoiteChat version available to me.
|
||||
* [ ] I explained the problem this would solve.
|
||||
|
||||
## Extra Notes
|
||||
|
||||
```text
|
||||
Anything else that might help.
|
||||
```
|
||||
@@ -1,12 +1,12 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
<https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
@@ -225,7 +225,7 @@ impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -303,17 +303,15 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
@@ -330,11 +328,11 @@ necessary. Here is a sample; alter the names:
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
<signature of Moe Ghoul>, 1 April 1989
|
||||
Moe Ghoul, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
@@ -1815,14 +1815,14 @@ inbound_login_end (session *sess, char *text, const message_tags_data *tags_data
|
||||
return;
|
||||
|
||||
/* send nickserv password */
|
||||
if (net && net->pass && inbound_nickserv_login (serv))
|
||||
if (net && serv->password[0] && inbound_nickserv_login (serv))
|
||||
{
|
||||
serv->p_ns_identify (serv, net->pass);
|
||||
serv->p_ns_identify (serv, serv->password);
|
||||
}
|
||||
|
||||
/* wait for join if command or nickserv set */
|
||||
if (net && prefs.hex_irc_join_delay
|
||||
&& ((net->pass && inbound_nickserv_login (serv))
|
||||
&& ((serv->password[0] && inbound_nickserv_login (serv))
|
||||
|| net->commandlist))
|
||||
{
|
||||
serv->joindelay_tag = fe_timeout_add_seconds (prefs.hex_irc_join_delay, check_autojoin_channels, serv);
|
||||
|
||||
@@ -4868,9 +4868,9 @@ command_insert_vars (session *sess, char *cmd)
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
if (mynet->pass)
|
||||
if (sess->server->password[0])
|
||||
{
|
||||
g_string_append (expanded, mynet->pass);
|
||||
g_string_append (expanded, sess->server->password);
|
||||
}
|
||||
cmd++;
|
||||
break;
|
||||
|
||||
+153
-153
File diff suppressed because it is too large
Load Diff
+15
-1
@@ -79,6 +79,8 @@ struct _chanview
|
||||
guint theme_listener_id;
|
||||
};
|
||||
|
||||
static void chanview_set_font_desc (chanview *cv, const PangoFontDescription *font_desc);
|
||||
|
||||
struct _chan
|
||||
{
|
||||
chanview *cv; /* our owner */
|
||||
@@ -169,6 +171,7 @@ chanview_apply_theme (chanview *cv)
|
||||
w = GTK_WIDGET (tv->tree);
|
||||
if (input_style)
|
||||
font = input_style->font_desc;
|
||||
chanview_set_font_desc (cv, font);
|
||||
|
||||
theme_manager_apply_channel_tree_style (w,
|
||||
theme_manager_get_channel_tree_palette_behavior (font));
|
||||
@@ -313,6 +316,14 @@ chanview_free_ch (chanview *cv, GtkTreeIter *iter)
|
||||
g_free (ch);
|
||||
}
|
||||
|
||||
static void
|
||||
chanview_set_font_desc (chanview *cv, const PangoFontDescription *font_desc)
|
||||
{
|
||||
if (cv->font_desc)
|
||||
pango_font_description_free (cv->font_desc);
|
||||
cv->font_desc = font_desc ? pango_font_description_copy (font_desc) : NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
chanview_destroy_store (chanview *cv) /* free every (chan *) in the store */
|
||||
{
|
||||
@@ -335,6 +346,9 @@ chanview_destroy (chanview *cv)
|
||||
if (cv->box)
|
||||
gtk_widget_destroy (cv->box);
|
||||
|
||||
if (cv->font_desc)
|
||||
pango_font_description_free (cv->font_desc);
|
||||
|
||||
chanview_destroy_store (cv);
|
||||
g_free (cv);
|
||||
}
|
||||
@@ -356,7 +370,7 @@ chanview_new (int type, int trunc_len, gboolean sort, gboolean use_icons,
|
||||
cv = g_new0 (chanview, 1);
|
||||
cv->store = gtk_tree_store_new (5, G_TYPE_STRING, G_TYPE_POINTER,
|
||||
PANGO_TYPE_ATTR_LIST, GDK_TYPE_PIXBUF, G_TYPE_INT);
|
||||
cv->font_desc = font_desc;
|
||||
cv->font_desc = font_desc ? pango_font_description_copy (font_desc) : NULL;
|
||||
cv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
cv->trunc_len = trunc_len;
|
||||
cv->sorted = sort;
|
||||
|
||||
+11
-9
@@ -1357,17 +1357,19 @@ fe_open_url_inner (const char *url)
|
||||
gboolean opened = FALSE;
|
||||
|
||||
#ifdef WIN32
|
||||
opened = g_app_info_launch_default_for_uri (escaped_url, NULL, &error);
|
||||
gunichar2 *url_utf16 = g_utf8_to_utf16 (escaped_url, -1, NULL, NULL, NULL);
|
||||
|
||||
if (url_utf16 != NULL)
|
||||
{
|
||||
opened = ((INT_PTR) ShellExecuteW (0, L"open", url_utf16, NULL, NULL, SW_SHOWNORMAL)) > 32;
|
||||
g_free (url_utf16);
|
||||
}
|
||||
|
||||
if (!opened)
|
||||
{
|
||||
g_clear_error (&error);
|
||||
gunichar2 *url_utf16 = g_utf8_to_utf16 (escaped_url, -1, NULL, NULL, NULL);
|
||||
|
||||
if (url_utf16 != NULL)
|
||||
{
|
||||
opened = ((INT_PTR) ShellExecuteW (0, L"open", url_utf16, NULL, NULL, SW_SHOWNORMAL)) > 32;
|
||||
g_free (url_utf16);
|
||||
}
|
||||
opened = g_app_info_launch_default_for_uri (escaped_url, NULL, &error);
|
||||
if (!opened)
|
||||
g_clear_error (&error);
|
||||
}
|
||||
#else
|
||||
{
|
||||
|
||||
+13
-4
@@ -3388,10 +3388,19 @@ mg_topicbar_update_height (GtkWidget *topic)
|
||||
|
||||
if (parent && GTK_IS_SCROLLED_WINDOW (parent))
|
||||
{
|
||||
gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW (parent), -1);
|
||||
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (parent), -1);
|
||||
gtk_scrolled_window_set_max_content_height (GTK_SCROLLED_WINDOW (parent), target_height);
|
||||
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (parent), target_height);
|
||||
GtkScrolledWindow *scrolled = GTK_SCROLLED_WINDOW (parent);
|
||||
int max_height = gtk_scrolled_window_get_max_content_height (scrolled);
|
||||
|
||||
if (max_height != -1 && target_height > max_height)
|
||||
{
|
||||
gtk_scrolled_window_set_max_content_height (scrolled, target_height);
|
||||
gtk_scrolled_window_set_min_content_height (scrolled, target_height);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_scrolled_window_set_min_content_height (scrolled, target_height);
|
||||
gtk_scrolled_window_set_max_content_height (scrolled, target_height);
|
||||
}
|
||||
gtk_widget_set_size_request (parent, -1, target_height);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,14 +52,13 @@ static const guint8 theme_default_99_mirc_colors[THEME_XTEXT_MIRC_COLS][3] = {
|
||||
};
|
||||
|
||||
static void
|
||||
theme_access_apply_default_99_palette (XTextColor *palette, size_t palette_len, gboolean apply_base)
|
||||
theme_access_apply_default_99_palette (XTextColor *palette, size_t palette_len)
|
||||
{
|
||||
size_t i;
|
||||
size_t start = apply_base ? 0 : 32;
|
||||
|
||||
if (palette_len == 0)
|
||||
return;
|
||||
for (i = start; i < THEME_XTEXT_MIRC_COLS && i < palette_len; i++)
|
||||
for (i = 32; i < THEME_XTEXT_MIRC_COLS && i < palette_len; i++)
|
||||
{
|
||||
palette[i].red = theme_default_99_mirc_colors[i][0] / 255.0;
|
||||
palette[i].green = theme_default_99_mirc_colors[i][1] / 255.0;
|
||||
@@ -148,11 +147,10 @@ gboolean
|
||||
theme_get_mirc_color (unsigned int mirc_index, GdkRGBA *out_rgba)
|
||||
{
|
||||
ThemeSemanticToken token = (ThemeSemanticToken) (THEME_TOKEN_MIRC_0 + (int) mirc_index);
|
||||
gboolean has_user_colors = theme_runtime_mode_has_user_colors (theme_runtime_is_dark_active ());
|
||||
|
||||
if (mirc_index >= THEME_XTEXT_MIRC_COLS)
|
||||
return FALSE;
|
||||
if (!has_user_colors || mirc_index >= 32)
|
||||
if (mirc_index >= 32)
|
||||
{
|
||||
out_rgba->red = theme_default_99_mirc_colors[mirc_index][0] / 255.0;
|
||||
out_rgba->green = theme_default_99_mirc_colors[mirc_index][1] / 255.0;
|
||||
@@ -173,11 +171,10 @@ gboolean
|
||||
theme_get_mirc_color_rgb16 (unsigned int mirc_index, guint16 *red, guint16 *green, guint16 *blue)
|
||||
{
|
||||
ThemeSemanticToken token = (ThemeSemanticToken) (THEME_TOKEN_MIRC_0 + (int) mirc_index);
|
||||
gboolean has_user_colors = theme_runtime_mode_has_user_colors (theme_runtime_is_dark_active ());
|
||||
|
||||
if (mirc_index >= THEME_XTEXT_MIRC_COLS)
|
||||
return FALSE;
|
||||
if (!has_user_colors || mirc_index >= 32)
|
||||
if (mirc_index >= 32)
|
||||
{
|
||||
*red = (guint16) (theme_default_99_mirc_colors[mirc_index][0] * 257);
|
||||
*green = (guint16) (theme_default_99_mirc_colors[mirc_index][1] * 257);
|
||||
@@ -227,7 +224,6 @@ void
|
||||
theme_get_xtext_colors_for_widget (GtkWidget *widget, XTextColor *palette, size_t palette_len)
|
||||
{
|
||||
ThemeWidgetStyleValues style_values;
|
||||
gboolean has_user_colors;
|
||||
GdkRGBA marker_color;
|
||||
|
||||
if (!palette)
|
||||
@@ -235,9 +231,8 @@ theme_get_xtext_colors_for_widget (GtkWidget *widget, XTextColor *palette, size_
|
||||
|
||||
theme_get_widget_style_values_for_widget (widget, &style_values);
|
||||
theme_runtime_get_xtext_colors (palette, palette_len);
|
||||
has_user_colors = theme_runtime_mode_has_user_colors (theme_runtime_is_dark_active ());
|
||||
if (palette_len >= THEME_XTEXT_MIRC_COLS)
|
||||
theme_access_apply_default_99_palette (palette, palette_len, !has_user_colors);
|
||||
theme_access_apply_default_99_palette (palette, palette_len);
|
||||
if (palette_len > THEME_XTEXT_MARK_FG_INDEX)
|
||||
{
|
||||
palette[THEME_XTEXT_MARK_FG_INDEX].red = style_values.selection_foreground.red;
|
||||
|
||||
+6
-4
@@ -286,10 +286,12 @@ xtext_adj_get_page_increment (GtkAdjustment *adj)
|
||||
static void
|
||||
xtext_adjustment_apply (GtkAdjustment *adj, gdouble lower, gdouble upper, gdouble value, gdouble page_size)
|
||||
{
|
||||
gtk_adjustment_set_lower (adj, lower);
|
||||
gtk_adjustment_set_upper (adj, upper);
|
||||
gtk_adjustment_set_page_size (adj, page_size);
|
||||
gtk_adjustment_set_value (adj, value);
|
||||
gdouble step_increment = page_size * prefs.hex_gui_mouse_scroll_speed / 100.0;
|
||||
|
||||
if (step_increment < 1)
|
||||
step_increment = 1;
|
||||
|
||||
gtk_adjustment_configure (adj, value, lower, upper, step_increment, page_size, page_size);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
Reference in New Issue
Block a user