Fix some compilation warnings

Use proper gint8 array variable instead a string
This commit is contained in:
Javier Jardón 2009-10-30 04:47:19 +01:00
parent 8763551b6b
commit 550796d897
2 changed files with 15 additions and 5 deletions

View File

@ -1925,8 +1925,10 @@ abort_column_resize (GtkCList *clist)
if (GTK_CLIST_ADD_MODE(clist)) if (GTK_CLIST_ADD_MODE(clist))
{ {
gint8 dashes[] = { 4, 4 };
gdk_gc_set_line_attributes (clist->xor_gc, 1, GDK_LINE_ON_OFF_DASH, 0,0); gdk_gc_set_line_attributes (clist->xor_gc, 1, GDK_LINE_ON_OFF_DASH, 0,0);
gdk_gc_set_dashes (clist->xor_gc, 0, "\4\4", 2); gdk_gc_set_dashes (clist->xor_gc, 0, dashes, G_N_ELEMENTS (dashes));
} }
} }
@ -3666,10 +3668,12 @@ toggle_add_mode (GtkCList *clist)
gtk_clist_draw_focus (GTK_WIDGET (clist)); gtk_clist_draw_focus (GTK_WIDGET (clist));
if (!GTK_CLIST_ADD_MODE(clist)) if (!GTK_CLIST_ADD_MODE(clist))
{ {
gint8 dashes[] = { 4, 4 };
GTK_CLIST_SET_FLAG (clist, CLIST_ADD_MODE); GTK_CLIST_SET_FLAG (clist, CLIST_ADD_MODE);
gdk_gc_set_line_attributes (clist->xor_gc, 1, gdk_gc_set_line_attributes (clist->xor_gc, 1,
GDK_LINE_ON_OFF_DASH, 0, 0); GDK_LINE_ON_OFF_DASH, 0, 0);
gdk_gc_set_dashes (clist->xor_gc, 0, "\4\4", 2); gdk_gc_set_dashes (clist->xor_gc, 0, dashes, G_N_ELEMENTS (dashes));
} }
else else
{ {
@ -5109,9 +5113,11 @@ gtk_clist_button_release (GtkWidget *widget,
if (GTK_CLIST_ADD_MODE(clist)) if (GTK_CLIST_ADD_MODE(clist))
{ {
gint8 dashes[] = { 4, 4 };
gdk_gc_set_line_attributes (clist->xor_gc, 1, gdk_gc_set_line_attributes (clist->xor_gc, 1,
GDK_LINE_ON_OFF_DASH, 0, 0); GDK_LINE_ON_OFF_DASH, 0, 0);
gdk_gc_set_dashes (clist->xor_gc, 0, "\4\4", 2); gdk_gc_set_dashes (clist->xor_gc, 0, dashes, G_N_ELEMENTS (dashes));
} }
width = new_column_width (clist, i, &x); width = new_column_width (clist, i, &x);

View File

@ -748,9 +748,11 @@ gtk_ctree_realize (GtkWidget *widget)
if (ctree->line_style == GTK_CTREE_LINES_DOTTED) if (ctree->line_style == GTK_CTREE_LINES_DOTTED)
{ {
gint8 dashes[] = { 1, 1 };
gdk_gc_set_line_attributes (ctree->lines_gc, 1, gdk_gc_set_line_attributes (ctree->lines_gc, 1,
GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, GDK_JOIN_MITER); GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, GDK_JOIN_MITER);
gdk_gc_set_dashes (ctree->lines_gc, 0, "\1\1", 2); gdk_gc_set_dashes (ctree->lines_gc, 0, dashes, G_N_ELEMENTS (dashes));
} }
} }
@ -5315,6 +5317,8 @@ gtk_ctree_set_line_style (GtkCTree *ctree,
if (GTK_WIDGET_REALIZED (ctree)) if (GTK_WIDGET_REALIZED (ctree))
{ {
gint8 dashes[] = { 1, 1 };
switch (line_style) switch (line_style)
{ {
case GTK_CTREE_LINES_SOLID: case GTK_CTREE_LINES_SOLID:
@ -5326,7 +5330,7 @@ gtk_ctree_set_line_style (GtkCTree *ctree,
if (GTK_WIDGET_REALIZED (ctree)) if (GTK_WIDGET_REALIZED (ctree))
gdk_gc_set_line_attributes (ctree->lines_gc, 1, gdk_gc_set_line_attributes (ctree->lines_gc, 1,
GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, GDK_JOIN_MITER); GDK_LINE_ON_OFF_DASH, GDK_CAP_BUTT, GDK_JOIN_MITER);
gdk_gc_set_dashes (ctree->lines_gc, 0, "\1\1", 2); gdk_gc_set_dashes (ctree->lines_gc, 0, dashes, G_N_ELEMENTS (dashes));
break; break;
case GTK_CTREE_LINES_TABBED: case GTK_CTREE_LINES_TABBED:
if (GTK_WIDGET_REALIZED (ctree)) if (GTK_WIDGET_REALIZED (ctree))