Fix various gcc -Wshadow warnings.
svn path=/trunk/; revision=31737
This commit is contained in:
parent
cbec3dba8c
commit
7397bb0a74
|
@ -151,11 +151,11 @@ static void
|
|||
dhcpstat_draw(void *psp)
|
||||
{
|
||||
dhcpstat_t *sp=psp;
|
||||
guint index;
|
||||
guint idx;
|
||||
|
||||
index=sp->index;
|
||||
idx=sp->index;
|
||||
g_hash_table_foreach( sp->hash, (GHFunc) dhcp_draw_message_type, NULL );
|
||||
if (index != sp->index){
|
||||
if (idx != sp->index){
|
||||
/* We have inserted a new entry corresponding to a status code ,
|
||||
* let's resize the table */
|
||||
gtk_table_resize ( GTK_TABLE(sp->table_message_type), sp->index % 2 , 4);
|
||||
|
|
|
@ -91,18 +91,18 @@ diameterstat_packet(void *pdiameter, packet_info *pinfo, epan_dissect_t *edt _U_
|
|||
{
|
||||
const diameter_req_ans_pair_t *diameter=pdi;
|
||||
diameterstat_t *fs=(diameterstat_t *)pdiameter;
|
||||
int* index = NULL;
|
||||
int* idx = NULL;
|
||||
|
||||
|
||||
index = (int*) g_hash_table_lookup(cmd_str_hash, diameter->cmd_str);
|
||||
if (index == NULL) {
|
||||
index = g_malloc(sizeof(int));
|
||||
*index = (int) g_hash_table_size(cmd_str_hash);
|
||||
g_hash_table_insert(cmd_str_hash, (gchar*) diameter->cmd_str, index);
|
||||
init_srt_table_row(&fs->diameter_srt_table, *index, (const char*) diameter->cmd_str);
|
||||
idx = (int*) g_hash_table_lookup(cmd_str_hash, diameter->cmd_str);
|
||||
if (idx == NULL) {
|
||||
idx = g_malloc(sizeof(int));
|
||||
*idx = (int) g_hash_table_size(cmd_str_hash);
|
||||
g_hash_table_insert(cmd_str_hash, (gchar*) diameter->cmd_str, idx);
|
||||
init_srt_table_row(&fs->diameter_srt_table, *idx, (const char*) diameter->cmd_str);
|
||||
}
|
||||
|
||||
add_srt_table_data(&fs->diameter_srt_table, *index, &diameter->req_time, pinfo);
|
||||
add_srt_table_data(&fs->diameter_srt_table, *idx, &diameter->req_time, pinfo);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ gtk_diameterstat_init(const char *optarg, void *userdata _U_)
|
|||
GtkWidget *vbox;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
int* index;
|
||||
int* idx;
|
||||
|
||||
if(!strncmp(optarg,"diameter,",9)){
|
||||
filter=optarg+9;
|
||||
|
@ -153,10 +153,10 @@ gtk_diameterstat_init(const char *optarg, void *userdata _U_)
|
|||
}
|
||||
|
||||
diameter=g_malloc(sizeof(diameterstat_t));
|
||||
index = g_malloc(sizeof(int));
|
||||
*index = 0;
|
||||
idx = g_malloc(sizeof(int));
|
||||
*idx = 0;
|
||||
cmd_str_hash = g_hash_table_new(g_str_hash,g_str_equal);
|
||||
g_hash_table_insert(cmd_str_hash, (gchar *)"Unknown", index);
|
||||
g_hash_table_insert(cmd_str_hash, (gchar *)"Unknown", idx);
|
||||
|
||||
diameter->win = dlg_window_new("diameter-stat"); /* transient_for top_level */
|
||||
gtk_window_set_destroy_with_parent (GTK_WINDOW(diameter->win), TRUE);
|
||||
|
|
|
@ -87,7 +87,7 @@ gtpstat_packet(void *pgtp, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
|
|||
{
|
||||
const gtp_msg_hash_t *gtp=psi;
|
||||
gtpstat_t *fs=(gtpstat_t *)pgtp;
|
||||
int index=0;
|
||||
int idx=0;
|
||||
|
||||
/* we are only interested in reply packets */
|
||||
if(gtp->is_request){
|
||||
|
@ -99,25 +99,25 @@ gtpstat_packet(void *pgtp, packet_info *pinfo, epan_dissect_t *edt _U_, const vo
|
|||
}
|
||||
|
||||
/* Only use the commands we know how to handle, this is not a comprehensive list */
|
||||
/* Redoing the message indexing is bit reduntant,*/
|
||||
/* but using message type as such would yield a long gtp_srt_table.*/
|
||||
/* Only a fragtion of the messages are matchable req/resp pairs,*/
|
||||
/* it's just doesn't feel feasible*/
|
||||
/* Redoing the message indexing is bit reduntant, */
|
||||
/* but using message type as such would yield a long gtp_srt_table. */
|
||||
/* Only a fraction of the messages are matchable req/resp pairs, */
|
||||
/* it just doesn't feel feasible. */
|
||||
|
||||
switch(gtp->msgtype){
|
||||
case GTP_MSG_ECHO_REQ: index=0;
|
||||
break;
|
||||
case GTP_MSG_CREATE_PDP_REQ: index=1;
|
||||
break;
|
||||
case GTP_MSG_UPDATE_PDP_REQ: index=2;
|
||||
break;
|
||||
case GTP_MSG_DELETE_PDP_REQ: index=3;
|
||||
break;
|
||||
case GTP_MSG_ECHO_REQ: idx=0;
|
||||
break;
|
||||
case GTP_MSG_CREATE_PDP_REQ: idx=1;
|
||||
break;
|
||||
case GTP_MSG_UPDATE_PDP_REQ: idx=2;
|
||||
break;
|
||||
case GTP_MSG_DELETE_PDP_REQ: idx=3;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
add_srt_table_data(&fs->gtp_srt_table, index, >p->req_time, pinfo);
|
||||
add_srt_table_data(&fs->gtp_srt_table, idx, >p->req_time, pinfo);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -989,7 +989,7 @@ static void dialog_graph_draw(user_data_t* user_data)
|
|||
user_data->dlg.dialog_graph.pixmap_width-right_x_border+1,
|
||||
user_data->dlg.dialog_graph.pixmap_height-bottom_y_border);
|
||||
for(i=0;i<=10;i++){
|
||||
int xwidth, lwidth;
|
||||
int xwidth;
|
||||
|
||||
xwidth=5;
|
||||
if(!(i%5)){
|
||||
|
@ -1095,7 +1095,6 @@ static void dialog_graph_draw(user_data_t* user_data)
|
|||
user_data->dlg.dialog_graph.pixmap_height-bottom_y_border+xlen+1);
|
||||
|
||||
if(xlen==17){
|
||||
int lwidth;
|
||||
if(user_data->dlg.dialog_graph.interval>=1000){
|
||||
g_snprintf(label_string, sizeof(label_string), "%ds", current_interval/1000);
|
||||
} else if(user_data->dlg.dialog_graph.interval>=100){
|
||||
|
@ -1161,7 +1160,6 @@ static void dialog_graph_draw(user_data_t* user_data)
|
|||
x_pos=draw_width-1-user_data->dlg.dialog_graph.pixels_per_tick*((last_interval-interval)/user_data->dlg.dialog_graph.interval+1)+left_x_border;
|
||||
|
||||
if(user_data->dlg.dialog_graph.graph[i].items[interval/user_data->dlg.dialog_graph.interval].flags & (STAT_FLAG_WRONG_SEQ|STAT_FLAG_MARKER)){
|
||||
int lwidth;
|
||||
if (user_data->dlg.dialog_graph.graph[i].items[interval/user_data->dlg.dialog_graph.interval].flags & STAT_FLAG_WRONG_SEQ){
|
||||
g_strlcpy(label_string, "x", sizeof(label_string));
|
||||
} else {
|
||||
|
@ -2109,7 +2107,7 @@ static void save_voice_as_destroy_cb(GtkWidget *win _U_, user_data_t *user_data)
|
|||
/* XXX what about endians here? could go something wrong? */
|
||||
static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t *user_data)
|
||||
{
|
||||
int to_fd, forw_fd, rev_fd, fread = 0, rread = 0, fwritten, rwritten;
|
||||
int to_fd, forw_fd, rev_fd, fread_cnt = 0, rread = 0, fwritten, rwritten;
|
||||
gchar f_pd[1] = {0};
|
||||
gchar r_pd[1] = {0};
|
||||
gint16 sample;
|
||||
|
@ -2168,7 +2166,7 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t *
|
|||
case SAVE_FORWARD_DIRECTION_MASK: {
|
||||
progbar_count = user_data->forward.saveinfo.count;
|
||||
progbar_quantum = user_data->forward.saveinfo.count/100;
|
||||
while ((fread = read(forw_fd, f_pd, 1)) > 0) {
|
||||
while ((fread_cnt = read(forw_fd, f_pd, 1)) > 0) {
|
||||
if(stop_flag)
|
||||
break;
|
||||
if((count > progbar_nextstep) && (count <= progbar_count)) {
|
||||
|
@ -2195,7 +2193,7 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t *
|
|||
}
|
||||
|
||||
fwritten = ws_write(to_fd, pd, 2);
|
||||
if ((fwritten < 2) || (fwritten < 0) || (fread < 0)) {
|
||||
if ((fwritten < 2) || (fwritten < 0) || (fread_cnt < 0)) {
|
||||
ws_close(forw_fd);
|
||||
ws_close(rev_fd);
|
||||
ws_close(to_fd);
|
||||
|
@ -2281,11 +2279,11 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t *
|
|||
*f_pd = SILENCE_PCMA;
|
||||
break;
|
||||
}
|
||||
fread = 1;
|
||||
fread_cnt = 1;
|
||||
f_write_silence--;
|
||||
}
|
||||
else if(r_write_silence > 0) {
|
||||
fread = read(forw_fd, f_pd, 1);
|
||||
fread_cnt = read(forw_fd, f_pd, 1);
|
||||
switch (user_data->reversed.statinfo.reg_pt) {
|
||||
case AST_FORMAT_ULAW:
|
||||
*r_pd = SILENCE_PCMU;
|
||||
|
@ -2298,10 +2296,10 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t *
|
|||
r_write_silence--;
|
||||
}
|
||||
else {
|
||||
fread = read(forw_fd, f_pd, 1);
|
||||
fread_cnt = read(forw_fd, f_pd, 1);
|
||||
rread = read(rev_fd, r_pd, 1);
|
||||
}
|
||||
if ((rread == 0) && (fread == 0))
|
||||
if ((rread == 0) && (fread_cnt == 0))
|
||||
break;
|
||||
if ((user_data->forward.statinfo.pt == AST_FORMAT_ULAW) && (user_data->reversed.statinfo.pt == AST_FORMAT_ULAW)){
|
||||
sample = (ulaw2linear(*r_pd) + ulaw2linear(*f_pd)) / 2;
|
||||
|
@ -2322,7 +2320,7 @@ static gboolean copy_file(gchar *dest, gint channels, gint format, user_data_t *
|
|||
|
||||
|
||||
rwritten = ws_write(to_fd, pd, 2);
|
||||
if ((rwritten < 2) || (rread < 0) || (fread < 0)) {
|
||||
if ((rwritten < 2) || (rread < 0) || (fread_cnt < 0)) {
|
||||
ws_close(forw_fd);
|
||||
ws_close(rev_fd);
|
||||
ws_close(to_fd);
|
||||
|
|
|
@ -385,7 +385,7 @@ gtk_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void *
|
|||
|
||||
switch(git->calc_type){
|
||||
guint64 t, pt; /* time in us */
|
||||
int i;
|
||||
int j;
|
||||
case CALC_TYPE_LOAD:
|
||||
/* it is a LOAD calculation of a relative time field.
|
||||
* add the time this call spanned to each
|
||||
|
@ -394,7 +394,7 @@ gtk_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void *
|
|||
*/
|
||||
t=new_time->secs;
|
||||
t=t*1000000+new_time->nsecs/1000;
|
||||
i=idx;
|
||||
j=idx;
|
||||
/* handle current interval */
|
||||
pt=pinfo->fd->rel_ts.secs*1000000+pinfo->fd->rel_ts.nsecs/1000;
|
||||
pt=pt%(git->io->interval*1000);
|
||||
|
@ -402,16 +402,16 @@ gtk_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void *
|
|||
pt=t;
|
||||
}
|
||||
while(t){
|
||||
git->items[i].time_tot.nsecs+=(int) (pt*1000);
|
||||
if(git->items[i].time_tot.nsecs>1000000000){
|
||||
git->items[i].time_tot.secs++;
|
||||
git->items[i].time_tot.nsecs-=1000000000;
|
||||
git->items[j].time_tot.nsecs+=(int) (pt*1000);
|
||||
if(git->items[j].time_tot.nsecs>1000000000){
|
||||
git->items[j].time_tot.secs++;
|
||||
git->items[j].time_tot.nsecs-=1000000000;
|
||||
}
|
||||
|
||||
if(i==0){
|
||||
if(j==0){
|
||||
break;
|
||||
}
|
||||
i--;
|
||||
j--;
|
||||
t-=pt;
|
||||
if(t > (guint32) (git->io->interval*1000)){
|
||||
pt=git->io->interval*1000;
|
||||
|
@ -635,13 +635,13 @@ get_it_value(io_stat_t *io, int graph_id, int idx)
|
|||
|
||||
|
||||
static void
|
||||
print_time_scale_string(char *buf, int buf_len, guint32 t, guint32 t_max, gboolean log)
|
||||
print_time_scale_string(char *buf, int buf_len, guint32 t, guint32 t_max, gboolean log_flag)
|
||||
{
|
||||
if(t_max>=10000000 || (log && t_max>=1000000)){
|
||||
if(t_max>=10000000 || (log_flag && t_max>=1000000)){
|
||||
g_snprintf(buf, buf_len, "%ds",t/1000000);
|
||||
} else if(t_max>=1000000){
|
||||
g_snprintf(buf, buf_len, "%d.%1ds",t/1000000,(t%1000000)/100000);
|
||||
} else if(t_max>=10000 || (log && t_max>=1000)){
|
||||
} else if(t_max>=10000 || (log_flag && t_max>=1000)){
|
||||
g_snprintf(buf, buf_len, "%dms",t/1000);
|
||||
} else if(t_max>=1000){
|
||||
g_snprintf(buf, buf_len, "%d.%1dms",t/1000,(t%1000)/100);
|
||||
|
|
|
@ -220,15 +220,15 @@ mcaststream_on_filter (GtkButton *button _U_,
|
|||
/****************************************************************************/
|
||||
/* when the user selects a row in the stream list */
|
||||
static void
|
||||
mcaststream_on_select_row(GtkCList *clist,
|
||||
gint row _U_,
|
||||
gint column _U_,
|
||||
GdkEventButton *event _U_,
|
||||
gpointer user_data _U_)
|
||||
mcaststream_on_select_row(GtkCList *clist_lcl,
|
||||
gint row _U_,
|
||||
gint column _U_,
|
||||
GdkEventButton *event _U_,
|
||||
gpointer user_data _U_)
|
||||
{
|
||||
gchar label_text[80];
|
||||
|
||||
selected_stream_fwd = gtk_clist_get_row_data(GTK_CLIST(clist), row);
|
||||
selected_stream_fwd = gtk_clist_get_row_data(GTK_CLIST(clist_lcl), row);
|
||||
g_snprintf(label_text, sizeof(label_text), "Selected: %s:%u -> %s:%u",
|
||||
get_addr_name(&(selected_stream_fwd->src_addr)),
|
||||
selected_stream_fwd->src_port,
|
||||
|
@ -254,40 +254,40 @@ typedef struct column_arrows {
|
|||
|
||||
/****************************************************************************/
|
||||
static void
|
||||
mcaststream_click_column_cb(GtkCList *clist, gint column, gpointer data)
|
||||
mcaststream_click_column_cb(GtkCList *clist_lcl, gint column, gpointer data)
|
||||
{
|
||||
column_arrows *col_arrows = (column_arrows *) data;
|
||||
int i;
|
||||
|
||||
gtk_clist_freeze(clist);
|
||||
gtk_clist_freeze(clist_lcl);
|
||||
|
||||
for (i=0; i<NUM_COLS; i++) {
|
||||
gtk_widget_hide(col_arrows[i].ascend_pm);
|
||||
gtk_widget_hide(col_arrows[i].descend_pm);
|
||||
}
|
||||
|
||||
if (column == clist->sort_column) {
|
||||
if (clist->sort_type == GTK_SORT_ASCENDING) {
|
||||
clist->sort_type = GTK_SORT_DESCENDING;
|
||||
if (column == clist_lcl->sort_column) {
|
||||
if (clist_lcl->sort_type == GTK_SORT_ASCENDING) {
|
||||
clist_lcl->sort_type = GTK_SORT_DESCENDING;
|
||||
gtk_widget_show(col_arrows[column].descend_pm);
|
||||
} else {
|
||||
clist->sort_type = GTK_SORT_ASCENDING;
|
||||
clist_lcl->sort_type = GTK_SORT_ASCENDING;
|
||||
gtk_widget_show(col_arrows[column].ascend_pm);
|
||||
}
|
||||
} else {
|
||||
clist->sort_type = GTK_SORT_ASCENDING;
|
||||
clist_lcl->sort_type = GTK_SORT_ASCENDING;
|
||||
gtk_widget_show(col_arrows[column].ascend_pm);
|
||||
gtk_clist_set_sort_column(clist, column);
|
||||
gtk_clist_set_sort_column(clist_lcl, column);
|
||||
}
|
||||
gtk_clist_thaw(clist);
|
||||
gtk_clist_thaw(clist_lcl);
|
||||
|
||||
gtk_clist_sort(clist);
|
||||
gtk_clist_sort(clist_lcl);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
static gint
|
||||
mcaststream_sort_column(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
|
||||
mcaststream_sort_column(GtkCList *clist_lcl, gconstpointer ptr1, gconstpointer ptr2)
|
||||
{
|
||||
char *text1 = NULL;
|
||||
char *text2 = NULL;
|
||||
|
@ -296,10 +296,10 @@ mcaststream_sort_column(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
|
|||
const GtkCListRow *row1 = (const GtkCListRow *) ptr1;
|
||||
const GtkCListRow *row2 = (const GtkCListRow *) ptr2;
|
||||
|
||||
text1 = GTK_CELL_TEXT (row1->cell[clist->sort_column])->text;
|
||||
text2 = GTK_CELL_TEXT (row2->cell[clist->sort_column])->text;
|
||||
text1 = GTK_CELL_TEXT (row1->cell[clist_lcl->sort_column])->text;
|
||||
text2 = GTK_CELL_TEXT (row2->cell[clist_lcl->sort_column])->text;
|
||||
|
||||
switch(clist->sort_column){
|
||||
switch(clist_lcl->sort_column){
|
||||
case 0:
|
||||
case 2:
|
||||
return strcmp (text1, text2);
|
||||
|
|
|
@ -1016,7 +1016,7 @@ static void dialog_graph_draw(user_data_t* user_data)
|
|||
user_data->dlg.dialog_graph.pixmap_width-right_x_border+1,
|
||||
user_data->dlg.dialog_graph.pixmap_height-bottom_y_border);
|
||||
for(i=0;i<=10;i++){
|
||||
int xwidth, lwidth;
|
||||
int xwidth;
|
||||
|
||||
xwidth=5;
|
||||
if(!(i%5)){
|
||||
|
@ -1122,7 +1122,6 @@ static void dialog_graph_draw(user_data_t* user_data)
|
|||
user_data->dlg.dialog_graph.pixmap_height-bottom_y_border+xlen+1);
|
||||
|
||||
if(xlen==17){
|
||||
int lwidth;
|
||||
if(user_data->dlg.dialog_graph.interval>=1000){
|
||||
g_snprintf(label_string, sizeof(label_string), "%ds", current_interval/1000);
|
||||
} else if(user_data->dlg.dialog_graph.interval>=100){
|
||||
|
@ -1185,7 +1184,6 @@ static void dialog_graph_draw(user_data_t* user_data)
|
|||
x_pos=draw_width-1-user_data->dlg.dialog_graph.pixels_per_tick*((last_interval-interval)/user_data->dlg.dialog_graph.interval+1)+left_x_border;
|
||||
|
||||
if(user_data->dlg.dialog_graph.graph[i].items[interval/user_data->dlg.dialog_graph.interval].flags & (STAT_FLAG_WRONG_SEQ|STAT_FLAG_MARKER)){
|
||||
int lwidth;
|
||||
if (user_data->dlg.dialog_graph.graph[i].items[interval/user_data->dlg.dialog_graph.interval].flags & STAT_FLAG_WRONG_SEQ){
|
||||
g_strlcpy(label_string,"x",sizeof(label_string));
|
||||
} else {
|
||||
|
|
|
@ -563,17 +563,17 @@ rtpstream_on_analyse (GtkButton *button _U_,
|
|||
/****************************************************************************/
|
||||
/* when the user selects a row in the stream list */
|
||||
static void
|
||||
rtpstream_on_select_row(GtkCList *clist,
|
||||
gint row _U_,
|
||||
gint column _U_,
|
||||
GdkEventButton *event _U_,
|
||||
gpointer user_data _U_)
|
||||
rtpstream_on_select_row(GtkCList *clist_lcl,
|
||||
gint row _U_,
|
||||
gint column _U_,
|
||||
GdkEventButton *event _U_,
|
||||
gpointer user_data _U_)
|
||||
{
|
||||
gchar label_text[80];
|
||||
|
||||
/* update the labels */
|
||||
if (event==NULL || event->state & GDK_SHIFT_MASK) {
|
||||
selected_stream_rev = gtk_clist_get_row_data(GTK_CLIST(clist), row);
|
||||
selected_stream_rev = gtk_clist_get_row_data(GTK_CLIST(clist_lcl), row);
|
||||
g_snprintf(label_text, sizeof(label_text), "Reverse: %s:%u -> %s:%u, SSRC=0x%X",
|
||||
get_addr_name(&(selected_stream_rev->src_addr)),
|
||||
selected_stream_rev->src_port,
|
||||
|
@ -584,7 +584,7 @@ rtpstream_on_select_row(GtkCList *clist,
|
|||
gtk_label_set_text(GTK_LABEL(label_rev), label_text);
|
||||
}
|
||||
else {
|
||||
selected_stream_fwd = gtk_clist_get_row_data(GTK_CLIST(clist), row);
|
||||
selected_stream_fwd = gtk_clist_get_row_data(GTK_CLIST(clist_lcl), row);
|
||||
g_snprintf(label_text, sizeof(label_text), "Forward: %s:%u -> %s:%u, SSRC=0x%X",
|
||||
get_addr_name(&(selected_stream_fwd->src_addr)),
|
||||
selected_stream_fwd->src_port,
|
||||
|
@ -614,40 +614,40 @@ typedef struct column_arrows {
|
|||
|
||||
/****************************************************************************/
|
||||
static void
|
||||
rtpstream_click_column_cb(GtkCList *clist, gint column, gpointer data)
|
||||
rtpstream_click_column_cb(GtkCList *clist_lcl, gint column, gpointer data)
|
||||
{
|
||||
column_arrows *col_arrows = (column_arrows *) data;
|
||||
int i;
|
||||
|
||||
gtk_clist_freeze(clist);
|
||||
gtk_clist_freeze(clist_lcl);
|
||||
|
||||
for (i=0; i<NUM_COLS; i++) {
|
||||
gtk_widget_hide(col_arrows[i].ascend_pm);
|
||||
gtk_widget_hide(col_arrows[i].descend_pm);
|
||||
}
|
||||
|
||||
if (column == clist->sort_column) {
|
||||
if (clist->sort_type == GTK_SORT_ASCENDING) {
|
||||
clist->sort_type = GTK_SORT_DESCENDING;
|
||||
if (column == clist_lcl->sort_column) {
|
||||
if (clist_lcl->sort_type == GTK_SORT_ASCENDING) {
|
||||
clist_lcl->sort_type = GTK_SORT_DESCENDING;
|
||||
gtk_widget_show(col_arrows[column].descend_pm);
|
||||
} else {
|
||||
clist->sort_type = GTK_SORT_ASCENDING;
|
||||
clist_lcl->sort_type = GTK_SORT_ASCENDING;
|
||||
gtk_widget_show(col_arrows[column].ascend_pm);
|
||||
}
|
||||
} else {
|
||||
clist->sort_type = GTK_SORT_ASCENDING;
|
||||
clist_lcl->sort_type = GTK_SORT_ASCENDING;
|
||||
gtk_widget_show(col_arrows[column].ascend_pm);
|
||||
gtk_clist_set_sort_column(clist, column);
|
||||
gtk_clist_set_sort_column(clist_lcl, column);
|
||||
}
|
||||
gtk_clist_thaw(clist);
|
||||
gtk_clist_thaw(clist_lcl);
|
||||
|
||||
gtk_clist_sort(clist);
|
||||
gtk_clist_sort(clist_lcl);
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
static gint
|
||||
rtpstream_sort_column(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
|
||||
rtpstream_sort_column(GtkCList *clist_lcl, gconstpointer ptr1, gconstpointer ptr2)
|
||||
{
|
||||
char *text1 = NULL;
|
||||
char *text2 = NULL;
|
||||
|
@ -656,10 +656,10 @@ rtpstream_sort_column(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
|
|||
const GtkCListRow *row1 = (const GtkCListRow *) ptr1;
|
||||
const GtkCListRow *row2 = (const GtkCListRow *) ptr2;
|
||||
|
||||
text1 = GTK_CELL_TEXT (row1->cell[clist->sort_column])->text;
|
||||
text2 = GTK_CELL_TEXT (row2->cell[clist->sort_column])->text;
|
||||
text1 = GTK_CELL_TEXT (row1->cell[clist_lcl->sort_column])->text;
|
||||
text2 = GTK_CELL_TEXT (row2->cell[clist_lcl->sort_column])->text;
|
||||
|
||||
switch(clist->sort_column){
|
||||
switch(clist_lcl->sort_column){
|
||||
case 0:
|
||||
case 2:
|
||||
case 5:
|
||||
|
|
Loading…
Reference in New Issue