Force foreground when background is forced in RTP analysis and VOIP calls.

svn path=/trunk/; revision=25212
This commit is contained in:
Stig Bjørlykke 2008-05-01 18:26:01 +00:00
parent 0a4ab4b039
commit b6de8df503
2 changed files with 10 additions and 4 deletions

View File

@ -499,6 +499,7 @@ static const GdkColor COLOR_DEFAULT = {0, 0xffff, 0xffff, 0xffff};
static const GdkColor COLOR_ERROR = {0, 0xffff, 0xbfff, 0xbfff};
static const GdkColor COLOR_WARNING = {0, 0xffff, 0xdfff, 0xbfff};
static const GdkColor COLOR_CN = {0, 0xbfff, 0xbfff, 0xffff};
static const GdkColor COLOR_FOREGROUND = {0, 0x0000, 0x0000, 0x0000};
/****************************************************************************/
/* adds statistics information from the packet to the clist */
@ -2761,12 +2762,13 @@ static void draw_stat(user_data_t *user_data)
/* append a line to clist */
static void add_to_clist(GtkCList *clist, guint32 number, guint16 seq_num,
double delta, double jitter, double bandwidth, gchar *status, gboolean marker,
gchar *timeStr, guint32 pkt_len, GdkColor *color)
gchar *timeStr, guint32 pkt_len, GdkColor *bg_color)
{
guint added_row;
gchar *data[9];
gchar field[9][32];
char *savelocale;
GdkColor fg_color = COLOR_FOREGROUND;
data[0]=&field[0][0];
data[1]=&field[1][0];
@ -2797,7 +2799,8 @@ static void add_to_clist(GtkCList *clist, guint32 number, guint16 seq_num,
added_row = gtk_clist_append(GTK_CLIST(clist), data);
gtk_clist_set_row_data(GTK_CLIST(clist), added_row, GUINT_TO_POINTER(number));
gtk_clist_set_background(GTK_CLIST(clist), added_row, color);
gtk_clist_set_background(GTK_CLIST(clist), added_row, bg_color);
gtk_clist_set_foreground(GTK_CLIST(clist), added_row, &fg_color);
}

View File

@ -108,6 +108,7 @@ static graph_analysis_data_t *graph_analysis_data = NULL;
#define CALL_COL_COMMENTS 8
static const GdkColor COLOR_SELECT = {0, 0x00ff, 0x80ff, 0x80ff};
static const GdkColor COLOR_DEFAULT = {0, 0xffff, 0xffff, 0xffff};
static const GdkColor COLOR_FOREGROUND = {0, 0x0000, 0x0000, 0x0000};
/****************************************************************************/
/* append a line to clist */
@ -121,7 +122,8 @@ static void add_to_clist(voip_calls_info_t* strinfo)
isup_calls_info_t *tmp_isupinfo;
h323_calls_info_t *tmp_h323info;
gboolean tmp_bool = FALSE;
GdkColor color = COLOR_SELECT;
GdkColor bg_color = COLOR_SELECT;
GdkColor fg_color = COLOR_FOREGROUND;
for (c=0;c<NUM_COLS;c++){
data[c]=&field[c][0];
}
@ -170,7 +172,8 @@ static void add_to_clist(voip_calls_info_t* strinfo)
/* set the background color if selected */
if (strinfo->selected) {
calls_ns++;
gtk_clist_set_background(GTK_CLIST(clist), added_row, &color);
gtk_clist_set_background(GTK_CLIST(clist), added_row, &bg_color);
gtk_clist_set_foreground(GTK_CLIST(clist), added_row, &fg_color);
}
/* set data pointer of last row to point to user data for that row */