示例#1
0
GtkWidget *
dia_layer_widget_new(Diagram *dia, Layer *layer)
{
  GtkWidget *widget;
  
  widget = GTK_WIDGET ( gtk_type_new (dia_layer_widget_get_type ()));
  dia_layer_set_layer(DIA_LAYER_WIDGET(widget), dia, layer);

  /* These may get toggled when the button is set without the widget being
   * selected first. */
  DIA_LAYER_WIDGET(widget)->connect_on = FALSE;
  DIA_LAYER_WIDGET(widget)->connect_off = FALSE;

  return widget;
}
示例#2
0
static GtkWidget *
dia_layer_widget_new(Diagram *dia, Layer *layer)
{
  GtkWidget *widget;
  
  widget = GTK_WIDGET ( gtk_type_new (dia_layer_widget_get_type ()));
  dia_layer_set_layer(DIA_LAYER_WIDGET(widget), dia, layer);

  /* These may get toggled when the button is set without the widget being
   * selected first.
   * The connect_on state gets also used to restore with just a deselect
   * of the active layer.
   */
  DIA_LAYER_WIDGET(widget)->connect_on = layer->connectable;
  DIA_LAYER_WIDGET(widget)->connect_off = FALSE;

  return widget;
}