Don't use gtk_rc_get_style() in ui_update_tab_status() because it
can cause an invalid memory read on some systems. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1148 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
1650924026
commit
a6f6c721d5
@ -1,3 +1,10 @@
|
||||
2006-12-30 Nick Treleaven <nick.treleaven@btinternet.com>
|
||||
|
||||
* src/ui_utils.c:
|
||||
Don't use gtk_rc_get_style() in ui_update_tab_status() because it
|
||||
can cause an invalid memory read on some systems.
|
||||
|
||||
|
||||
2006-12-26 Nick Treleaven <nick.treleaven@btinternet.com>
|
||||
|
||||
* tagmanager/tm_tag.c, tagmanager/include/tm_tag.h:
|
||||
|
@ -1179,15 +1179,10 @@ void ui_combo_box_add_to_history(GtkComboBox *combo, const gchar *text)
|
||||
void ui_update_tab_status(gint idx)
|
||||
{
|
||||
GdkColor *color = document_get_status(idx);
|
||||
static GtkStyle *style = NULL;
|
||||
|
||||
if (style == NULL) // use and store default foreground colour
|
||||
style = gtk_rc_get_style(doc_list[idx].tab_label);
|
||||
|
||||
gtk_widget_modify_fg(doc_list[idx].tab_label, GTK_STATE_NORMAL,
|
||||
color ? color : &(style->fg[GTK_STATE_NORMAL]));
|
||||
gtk_widget_modify_fg(doc_list[idx].tab_label, GTK_STATE_ACTIVE,
|
||||
color ? color : &(style->fg[GTK_STATE_ACTIVE]));
|
||||
// NULL color will reset to default
|
||||
gtk_widget_modify_fg(doc_list[idx].tab_label, GTK_STATE_NORMAL, color);
|
||||
gtk_widget_modify_fg(doc_list[idx].tab_label, GTK_STATE_ACTIVE, color);
|
||||
|
||||
treeviews_openfiles_update(idx);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user