Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Cool Fire
hexchat
Commits
4e2d3763
Commit
4e2d3763
authored
Jul 23, 2012
by
Berke Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make HexChat remember minimum and maximum users set in channel list
parent
fdc3ed47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
src/common/cfgfiles.c
src/common/cfgfiles.c
+4
-0
src/common/xchat.h
src/common/xchat.h
+2
-0
src/fe-gtk/chanlist.c
src/fe-gtk/chanlist.c
+18
-2
No files found.
src/common/cfgfiles.c
View file @
4e2d3763
...
...
@@ -449,6 +449,8 @@ const struct prefs vars[] = {
{
"gui_auto_open_dialog"
,
P_OFFINT
(
autodialog
),
TYPE_BOOL
},
{
"gui_auto_open_recv"
,
P_OFFINT
(
autoopendccrecvwindow
),
TYPE_BOOL
},
{
"gui_auto_open_send"
,
P_OFFINT
(
autoopendccsendwindow
),
TYPE_BOOL
},
{
"gui_chanlist_maxusers"
,
P_OFFINT
(
gui_chanlist_maxusers
),
TYPE_INT
},
{
"gui_chanlist_minusers"
,
P_OFFINT
(
gui_chanlist_minusers
),
TYPE_INT
},
{
"gui_dialog_height"
,
P_OFFINT
(
dialog_height
),
TYPE_INT
},
{
"gui_dialog_left"
,
P_OFFINT
(
dialog_left
),
TYPE_INT
},
{
"gui_dialog_top"
,
P_OFFINT
(
dialog_top
),
TYPE_INT
},
...
...
@@ -731,6 +733,8 @@ load_config (void)
prefs
.
autoopendccsendwindow
=
1
;
prefs
.
autoopendccchatwindow
=
1
;
prefs
.
userhost
=
1
;
prefs
.
gui_chanlist_maxusers
=
9999
;
prefs
.
gui_chanlist_minusers
=
5
;
prefs
.
gui_url_mod
=
4
;
/* ctrl */
prefs
.
gui_tray
=
1
;
prefs
.
gui_pane_left_size
=
100
;
...
...
src/common/xchat.h
View file @
4e2d3763
...
...
@@ -161,6 +161,8 @@ struct xchatprefs
int
gui_pane_right_size
;
int
gui_pane_right_size_min
;
int
gui_chanlist_maxusers
;
int
gui_chanlist_minusers
;
int
gui_ulist_pos
;
int
tab_pos
;
...
...
src/fe-gtk/chanlist.c
View file @
4e2d3763
...
...
@@ -548,6 +548,7 @@ static void
chanlist_minusers
(
GtkSpinButton
*
wid
,
server
*
serv
)
{
serv
->
gui
->
chanlist_minusers
=
gtk_spin_button_get_value_as_int
(
wid
);
prefs
.
gui_chanlist_minusers
=
serv
->
gui
->
chanlist_minusers
;
if
(
serv
->
gui
->
chanlist_minusers
<
serv
->
gui
->
chanlist_minusers_downloaded
)
{
...
...
@@ -568,6 +569,7 @@ static void
chanlist_maxusers
(
GtkSpinButton
*
wid
,
server
*
serv
)
{
serv
->
gui
->
chanlist_maxusers
=
gtk_spin_button_get_value_as_int
(
wid
);
prefs
.
gui_chanlist_maxusers
=
serv
->
gui
->
chanlist_maxusers
;
}
static
void
...
...
@@ -736,10 +738,24 @@ chanlist_opengui (server *serv, int do_refresh)
serv
->
gui
->
chanlist_data_stored_rows
=
NULL
;
if
(
!
serv
->
gui
->
chanlist_minusers
)
serv
->
gui
->
chanlist_minusers
=
5
;
{
if
(
prefs
.
gui_chanlist_minusers
<
1
||
prefs
.
gui_chanlist_minusers
>
999999
)
{
prefs
.
gui_chanlist_minusers
=
5
;
}
serv
->
gui
->
chanlist_minusers
=
prefs
.
gui_chanlist_minusers
;
}
if
(
!
serv
->
gui
->
chanlist_maxusers
)
serv
->
gui
->
chanlist_maxusers
=
9999
;
{
if
(
prefs
.
gui_chanlist_maxusers
<
1
||
prefs
.
gui_chanlist_maxusers
>
999999
)
{
prefs
.
gui_chanlist_maxusers
=
9999
;
}
serv
->
gui
->
chanlist_maxusers
=
prefs
.
gui_chanlist_maxusers
;
}
serv
->
gui
->
chanlist_window
=
mg_create_generic_tab
(
"ChanList"
,
tbuf
,
FALSE
,
TRUE
,
chanlist_closegui
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment