Пример #1
0
static void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
{
 gtk_clist_get_text( clist,row,0,&sbSelectedSkin );
 if ( strcmp( prev,sbSelectedSkin ) )
  {
   prev=sbSelectedSkin;
   uiChangeSkin( sbSelectedSkin );
   gtkActive( SkinBrowser );
  }
 if( !bevent ) return;
 if( bevent->type == GDK_2BUTTON_PRESS )
  {
   free( skinName );
   skinName=strdup( sbSelectedSkin );
   HideSkinBrowser();
  }
}
Пример #2
0
static void prButton( GtkObject * object,gpointer user_data )
{
 if ( sbSelectedSkin )
 {
  switch ( (int)user_data )
   {
    case 0: // cancel
	if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) uiChangeSkin( gtkOldSkin );
	break;
   case 1: // ok
	uiChangeSkin( sbSelectedSkin );   // NOTE TO MYSELF: skin already changed!
	free( skinName );
	skinName=strdup( sbSelectedSkin );
	break;
  }
 }
 HideSkinBrowser();
}
Пример #3
0
static void prButton( GtkObject * object,gpointer user_data )
{
 if ( sbSelectedSkin )
 {
  switch ( (int)user_data )
   {
    case 0: // cancel
	if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) ChangeSkin( gtkOldSkin );
	break;
   case 1: // ok
	ChangeSkin( sbSelectedSkin );
	if ( skinName ) free( skinName );
	skinName=strdup( sbSelectedSkin );
	break;
  }
 }
 HideSkinBrowser();
}