mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Updated GTK3 palette color parsing to use full 16-bit hex strings when converting to RGBA in palette handling and setup color dialogs.
Switched GtkCellRendererText foreground bindings to the palette foreground property macro in user list, notify list, and DCC views.
This commit is contained in:
@@ -74,24 +74,18 @@ notify_treecell_property_mapper (GtkTreeViewColumn *col, GtkCellRenderer *cell,
|
||||
gchar *text;
|
||||
PaletteColor *colour;
|
||||
int model_column = GPOINTER_TO_INT (data);
|
||||
const char *foreground_property =
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
"foreground-rgba";
|
||||
#else
|
||||
"foreground-gdk";
|
||||
#endif
|
||||
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (model), iter,
|
||||
COLOUR_COLUMN, &colour,
|
||||
model_column, &text, -1);
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
g_object_set (G_OBJECT (cell), "text", text,
|
||||
foreground_property, colour, NULL);
|
||||
PALETTE_FOREGROUND_PROPERTY, colour, NULL);
|
||||
if (colour)
|
||||
gdk_rgba_free (colour);
|
||||
#else
|
||||
g_object_set (G_OBJECT (cell), "text", text,
|
||||
foreground_property, colour, NULL);
|
||||
PALETTE_FOREGROUND_PROPERTY, colour, NULL);
|
||||
if (colour)
|
||||
gdk_color_free (colour);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user