[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

widget compiling problem



i'm trying to rewrite the color selection widget to suit my own needs. i
haven't gotten as far as rewriting it since i can get it compile. i get
this queer error that i can't figure out.

if i comment out the entire contents of the function things compile ok.
the main error that i can't figure out is on the  declaration of the
GtkTargetEntry targets. i can't find GtkTargetEntry in any headers or
docs.

here's the error and the relevant function:

In function `mg_color_selection_realize': syntax error before `targets'


static void
mg_color_selection_realize (GtkWidget         *widget)
{
  MGColorSelection *colorsel;

      // craps out on next line
  static const GtkTargetEntry targets[] = { 
    { "application/x-color", 0 }
  };


  g_return_if_fail (widget != NULL);
  g_return_if_fail (MG_IS_COLOR_SELECTION (widget));
      
  colorsel = MG_COLOR_SELECTION (widget);
      
  if (GTK_WIDGET_CLASS (color_selection_parent_class)->realize)
    (*GTK_WIDGET_CLASS (color_selection_parent_class)->realize) (widget);
  
  gtk_drag_dest_set (colorsel->sample_area,
                       GTK_DEST_DEFAULT_HIGHLIGHT |
                       GTK_DEST_DEFAULT_MOTION |
                       GTK_DEST_DEFAULT_DROP,
                       targets, 1,
                       GDK_ACTION_COPY);
  
  gtk_drag_source_set (colorsel->sample_area,
                       GDK_BUTTON1_MASK | GDK_BUTTON3_MASK,
                       targets, 1,
                       GDK_ACTION_COPY | GDK_ACTION_MOVE);
    
  gtk_signal_connect (GTK_OBJECT (colorsel->sample_area),
                      "drag_begin",
                      GTK_SIGNAL_FUNC (mg_color_selection_drag_begin),
                      colorsel);
  gtk_signal_connect (GTK_OBJECT (colorsel->sample_area),
                      "drag_end",
                      GTK_SIGNAL_FUNC (mg_color_selection_drag_end),
                      colorsel);
  gtk_signal_connect (GTK_OBJECT (colorsel->sample_area),
                      "drag_data_get",
                      GTK_SIGNAL_FUNC (mg_color_selection_drag_handle),
                      colorsel);
  gtk_signal_connect (GTK_OBJECT (colorsel->sample_area),
                      "drag_data_received",
                      GTK_SIGNAL_FUNC (mg_color_selection_drop_handle),
                      colorsel);

}



thanks.



http://www.op.net/~finklesk/index.html



"The problem is not that the world is full of fools. The problem is that
lightning isn't being distributed right." - Mark Twain




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]