mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-05-16 13:40:18 +00:00
Tighten userlist button/meter layout
This commit is contained in:
@@ -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, ((struct commands *)b)->name);
|
return g_ascii_strcasecmp (a, ((const struct commands *)b)->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct commands *
|
static const 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)
|
||||||
{
|
{
|
||||||
struct commands *cmd;
|
const 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;
|
||||||
struct commands *int_cmd;
|
const 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, TRUE);
|
gtk_widget_set_vexpand (wid, FALSE);
|
||||||
gtk_widget_set_halign (wid, GTK_ALIGN_FILL);
|
gtk_widget_set_halign (wid, GTK_ALIGN_FILL);
|
||||||
gtk_widget_set_valign (wid, GTK_ALIGN_FILL);
|
gtk_widget_set_valign (wid, GTK_ALIGN_CENTER);
|
||||||
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_start (GTK_BOX (parent_box), box, 0, 0, 0);
|
gtk_box_pack_end (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))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4919,13 +4919,12 @@ 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, curlen;
|
gint off1, off2;
|
||||||
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)
|
||||||
{
|
{
|
||||||
@@ -4935,7 +4934,6 @@ 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);
|
||||||
@@ -4950,7 +4948,6 @@ 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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user