All pastes #101316 Raw Edit

Untitled

public text v1 · immutable
#101316 ·published 2006-07-26 19:56 UTC
rendered paste body
  	filename = g_strconcat(w_current->bitmap_directory, 
			       G_DIR_SEPARATOR_S, "gschem-select.xpm", NULL);
  	w_current->toolbar_select = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar),
                                     GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                     w_current->toolbar_bus,
                                     _("Select"),
                                     _("Select mode"),
                                     "toolbar/select",
	                             x_window_new_pixmap (filename,
                                     w_current->main_window->window,
                                     &w_current->main_window->style->
                                     bg[GTK_STATE_NORMAL]),
	      		   	     GTK_SIGNAL_FUNC( i_callback_toolbar_edit_select ),
			             w_current);
  	g_free(filename);


****** AND *******

/*! \todo Finish function documentation!!!
 *  \brief
 *  \par Function Description
 *
 *  \note
 *  don't use the widget parameter on this function, or do some checking...
 * since there is a call: widget = NULL, data = 0 (will be w_current hack)
 */
void i_callback_toolbar_edit_select(GtkWidget* widget, gpointer data)
{
  printf( "i_callback_toolbar_edit_select: CALLED ???\n" );
  printf( "Widget = %p\n", widget );
  TOPLEVEL *w_current = (TOPLEVEL *) data;
  exit_if_null(w_current);
  // TODO: BUG: should this be here?
  if (!w_current->page_current) return;

  if (GTK_TOGGLE_BUTTON (widget)->active) {
    if (!o_erase_rubber(w_current)) {
      i_callback_cancel(w_current, 0, NULL);
    }
    i_callback_edit_select((TOPLEVEL*) data, 0, NULL);
  }
}